:root {
    --primary-color: #FF9F1C;
    --secondary-color: #2EC4B6;
    --bg-color: #CBF3F0;
    --text-color: #333;
    --card-bg: #FFFFFF;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Comic Neue', cursive, sans-serif;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.book-container {
    background-color: var(--card-bg);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    border: 5px solid var(--primary-color);
}

header h1 {
    color: var(--primary-color);
    margin: 10px 0 5px;
    font-size: 2.5rem;
}

header p {
    color: #666;
    margin: 0 0 20px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.2rem;
}

.image-frame {
    width: 100%;
    height: 350px;
    background-color: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    border: 3px solid var(--secondary-color);
}

#story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.text-area {
    margin-bottom: 30px;
    padding: 10px;
    background: #fff9f0;
    border-radius: 10px;
}

.english-text {
    font-size: 1.8rem;
    color: #222;
    margin: 10px 0;
    line-height: 1.4;
}

.chinese-text {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.2rem;
    color: #666;
    margin: 5px 0 15px;
}

.speak-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    transition: transform 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.speak-button:hover {
    background-color: #25a296;
    transform: scale(1.05);
}

.speak-button:active {
    transform: scale(0.95);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #eee;
}

.nav-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    transition: opacity 0.2s;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#page-num {
    font-size: 1.2rem;
    font-weight: bold;
    color: #888;
}

@media (max-width: 480px) {
    .english-text {
        font-size: 1.4rem;
    }

    .image-frame {
        height: 250px;
    }

    header h1 {
        font-size: 2rem;
    }
}