/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #4A90D9;
    --primary-green: #5CB85C;
    --primary-orange: #F5A623;
    --primary-pink: #E91E63;
    --primary-purple: #9C27B0;
    --background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #333;
    --text-light: #666;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-small: 0 4px 15px rgba(0, 0, 0, 0.1);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'SF Pro Rounded', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.app-container {
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 900px;
    background: var(--card-bg);
    border-radius: 30px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header Styles */
.game-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    color: white;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
}

.stat-icon {
    font-size: 1.4rem;
}

/* Screen Management */
.screen {
    display: none;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.screen.active {
    display: flex;
}

/* Home Screen Styles */
#home-screen {
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding-top: 30px;
}

/* Menu Screen Styles */
#menu-screen,
#math-menu-screen,
#reading-menu-screen {
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    padding-top: 15px;
}

/* Screen Header */
.screen-header {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 10px;
}

.screen-header h2 {
    color: var(--text-dark);
    font-size: 1.4rem;
}

/* Subject Cards */
.subject-cards {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    margin: 10px 0;
}

.subject-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-small);
}

.subject-card:active {
    transform: scale(0.95);
}

.math-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.reading-card {
    background: linear-gradient(135deg, #26A69A 0%, #00897B 100%);
    color: white;
}

.subject-icon {
    font-size: 3rem;
}

.subject-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.subject-desc {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Level Selector */
.level-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.level-label {
    font-weight: 600;
    color: var(--text-dark);
}

.level-buttons {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.level-btn {
    padding: 8px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.level-btn:active {
    transform: scale(0.95);
}

.level-btn.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #357ABD 100%);
    color: white;
    border-color: var(--primary-blue);
}

.title {
    font-size: 2.5rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

.menu-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: var(--shadow-small);
}

.menu-btn:active {
    transform: scale(0.98);
}

.bonds-btn {
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    color: white;
}

.addition-btn {
    background: linear-gradient(135deg, #5CB85C 0%, #449D44 100%);
    color: white;
}

.subtraction-btn {
    background: linear-gradient(135deg, #F5A623 0%, #E09100 100%);
    color: white;
}

.mixed-btn {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    color: white;
}

.timer-btn {
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
    color: white;
}

.btn-icon {
    font-size: 2.5rem;
    min-width: 50px;
    text-align: center;
}

.btn-text {
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
}

.btn-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    display: block;
    margin-top: 3px;
}

/* Trophy Case */
.trophy-case {
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.trophy-case h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

#trophies {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.trophy {
    font-size: 2rem;
    padding: 10px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 50%;
    animation: trophyShine 2s ease-in-out infinite;
}

.trophy.locked {
    filter: grayscale(100%);
    opacity: 0.3;
    animation: none;
}

@keyframes trophyShine {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Settings Section */
.settings-section {
    width: 100%;
    max-width: 400px;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.settings-section h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    text-align: center;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-row label {
    font-weight: 600;
    color: var(--text-dark);
}

.difficulty-buttons {
    display: flex;
    gap: 8px;
}

.diff-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.diff-btn:active {
    transform: scale(0.95);
}

.diff-btn.active {
    background: linear-gradient(135deg, var(--primary-purple) 0%, #7B1FA2 100%);
    color: white;
    border-color: var(--primary-purple);
}

.sound-toggle {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sound-toggle.off {
    background: #f5f5f5;
    color: var(--text-light);
}

/* Game Screen Styles */
#game-screen {
    padding: 15px;
}

.game-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--primary-purple);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
}

.timer-display {
    display: none;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.3rem;
    font-weight: 700;
}

.timer-display.active {
    display: flex;
}

.timer-display.warning {
    animation: timerPulse 0.5s ease infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); background: #ff1744; }
}

.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 15px;
}

.mode-title {
    color: var(--text-dark);
    font-size: 1.5rem;
    text-align: center;
}

/* Ten Frame Styles */
.ten-frame-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ten-frame {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 6px;
    padding: 12px;
    background: #f0f0f0;
    border-radius: 15px;
    border: 3px solid #ddd;
}

.ten-frame-cell {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 10px;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ten-frame-cell.filled {
    background: var(--primary-blue);
    border-color: #357ABD;
}

.ten-frame-cell.filled::after {
    content: '';
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #6BB3F0, var(--primary-blue));
    border-radius: 50%;
    box-shadow: inset -2px -2px 5px rgba(0,0,0,0.2);
}

.ten-frame-cell.filled.secondary {
    background: var(--primary-orange);
    border-color: #E09100;
}

.ten-frame-cell.filled.secondary::after {
    background: radial-gradient(circle at 30% 30%, #FFD180, var(--primary-orange));
}

.ten-frame-cell.question {
    background: repeating-linear-gradient(
        45deg,
        #fff,
        #fff 5px,
        #f5f5f5 5px,
        #f5f5f5 10px
    );
    border: 2px dashed var(--primary-purple);
}

.ten-frame-cell.question::after {
    content: '?';
    font-size: 1.5rem;
    color: var(--primary-purple);
    font-weight: bold;
}

.ten-frame-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Problem Display */
.problem-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-small);
    width: 100%;
    max-width: 400px;
}

.problem-num {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    min-width: 60px;
    text-align: center;
}

.problem-num.unknown {
    color: var(--primary-purple);
    background: linear-gradient(135deg, #E1BEE7 0%, #CE93D8 100%);
    padding: 5px 15px;
    border-radius: 15px;
}

.problem-operator, .problem-equals {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
}

/* Answer Choices */
.answers-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 350px;
}

.answer-btn {
    padding: 20px;
    font-size: 2rem;
    font-weight: 800;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: var(--text-dark);
    box-shadow: var(--shadow-small);
}

.answer-btn:active {
    transform: scale(0.95);
}

.answer-btn.correct {
    background: linear-gradient(135deg, #C8E6C9 0%, #81C784 100%);
    animation: correctPulse 0.5s ease;
}

.answer-btn.incorrect {
    background: linear-gradient(135deg, #FFCDD2 0%, #EF9A9A 100%);
    animation: shake 0.5s ease;
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Feedback Area */
.feedback-area {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback-area.show {
    opacity: 1;
}

.feedback-area.correct {
    color: var(--primary-green);
}

.feedback-area.incorrect {
    color: #E57373;
}

.feedback-emoji {
    font-size: 2rem;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green) 0%, #81C784 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Results Screen */
#results-screen {
    justify-content: center;
    align-items: center;
}

.results-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.results-title {
    font-size: 2.5rem;
    color: var(--text-dark);
}

.results-emoji {
    font-size: 5rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.results-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-purple);
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.timer-result {
    display: none;
    margin-top: 10px;
}

.timer-result.active {
    display: flex;
}

.reward-animation {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.star-reward {
    font-size: 2rem;
    animation: starPop 0.5s ease forwards;
    opacity: 0;
}

@keyframes starPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.results-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.results-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.play-again-btn {
    background: linear-gradient(135deg, var(--primary-green) 0%, #449D44 100%);
    color: white;
}

.menu-btn-small {
    background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 100%);
    color: var(--text-dark);
}

.results-btn:active {
    transform: scale(0.95);
}

/* Celebration Overlay */
.celebration-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 100;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 500px) {
    .app-container {
        border-radius: 0;
        max-height: 100%;
    }

    body {
        padding: 0;
    }

    .title {
        font-size: 2rem;
    }

    .problem-num {
        font-size: 2.5rem;
        min-width: 50px;
    }

    .ten-frame-cell {
        width: 38px;
        height: 38px;
    }

    .ten-frame-cell.filled::after {
        width: 25px;
        height: 25px;
    }

    .answer-btn {
        padding: 15px;
        font-size: 1.8rem;
    }
}

@media (max-height: 700px) {
    .game-area {
        gap: 10px;
    }

    .ten-frame-cell {
        width: 35px;
        height: 35px;
    }

    .problem-container {
        padding: 15px;
    }

    .problem-num {
        font-size: 2.2rem;
    }
}

/* Large iPad/Tablet */
@media (min-width: 768px) and (min-height: 900px) {
    .app-container {
        max-width: 700px;
        max-height: 1000px;
    }

    .title {
        font-size: 3rem;
    }

    .ten-frame-cell {
        width: 55px;
        height: 55px;
    }

    .ten-frame-cell.filled::after {
        width: 38px;
        height: 38px;
    }

    .problem-num {
        font-size: 3.5rem;
    }

    .answer-btn {
        padding: 25px;
        font-size: 2.5rem;
    }
}

/* Parent Dashboard Button */
.dashboard-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #607D8B 0%, #455A64 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-btn:active {
    transform: scale(0.95);
}

/* Parent Dashboard Screen */
#dashboard-screen {
    padding: 15px;
    background: #f5f5f5;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-header h2 {
    color: var(--text-dark);
    font-size: 1.4rem;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 20px;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dash-card {
    background: white;
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: var(--shadow-small);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.dash-card-icon {
    font-size: 1.5rem;
}

.dash-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-purple);
}

.dash-card-label {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
}

/* Dashboard Sections */
.dashboard-section {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: var(--shadow-small);
}

.dashboard-section h3 {
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 15px;
}

/* Accuracy Bars */
.accuracy-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accuracy-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accuracy-label {
    font-size: 0.85rem;
    color: var(--text-dark);
    min-width: 110px;
}

.accuracy-bar-container {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.accuracy-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.accuracy-row:nth-child(1) .accuracy-bar {
    background: linear-gradient(90deg, #4A90D9 0%, #357ABD 100%);
}

.accuracy-row:nth-child(2) .accuracy-bar {
    background: linear-gradient(90deg, #5CB85C 0%, #449D44 100%);
}

.accuracy-row:nth-child(3) .accuracy-bar {
    background: linear-gradient(90deg, #F5A623 0%, #E09100 100%);
}

.accuracy-percent {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    min-width: 40px;
    text-align: right;
}

/* Weekly Chart */
.weekly-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    padding: 10px 0;
}

.day-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.day-bar-fill {
    width: 30px;
    background: linear-gradient(180deg, var(--primary-purple) 0%, #7B1FA2 100%);
    border-radius: 5px 5px 0 0;
    transition: height 0.5s ease;
    min-height: 4px;
}

.day-bar-label {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 600;
}

.day-bar-value {
    font-size: 0.7rem;
    color: var(--text-dark);
    font-weight: 700;
}

/* Sessions List */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.session-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.session-mode {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.session-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.session-score {
    display: flex;
    align-items: center;
    gap: 5px;
}

.session-score-value {
    font-size: 1rem;
    font-weight: 700;
}

.session-score-value.good {
    color: var(--primary-green);
}

.session-score-value.medium {
    color: var(--primary-orange);
}

.session-score-value.needs-work {
    color: #E57373;
}

/* Problem Areas */
.problem-areas {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.problem-area-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #FFF3E0;
    border-radius: 10px;
    border-left: 4px solid var(--primary-orange);
}

.problem-area-item.good {
    background: #E8F5E9;
    border-left-color: var(--primary-green);
}

.problem-area-icon {
    font-size: 1.2rem;
}

.problem-area-text {
    font-size: 0.85rem;
    color: var(--text-dark);
}

.no-data-message {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 20px;
}

/* Reset Stats Button */
.reset-stats-btn {
    margin-top: 10px;
    padding: 12px 24px;
    background: #f5f5f5;
    color: #E57373;
    border: 2px solid #E57373;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-stats-btn:active {
    background: #E57373;
    color: white;
}

/* Dashboard Responsive */
@media (max-width: 400px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .dash-card {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 15px;
    }

    .accuracy-label {
        min-width: 90px;
        font-size: 0.75rem;
    }

    .day-bar-fill {
        width: 20px;
    }
}

/* Parent Buttons */
.parent-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.parent-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.parent-btn:active {
    transform: scale(0.95);
}

.guide-btn {
    background: linear-gradient(135deg, #26A69A 0%, #00897B 100%);
    color: white;
}

.dashboard-btn {
    background: linear-gradient(135deg, #607D8B 0%, #455A64 100%);
    color: white;
}

/* Teaching Guide Screen */
#guide-screen {
    padding: 15px;
    background: #f5f5f5;
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.guide-header h2 {
    color: var(--text-dark);
    font-size: 1.3rem;
}

.guide-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 20px;
}

.guide-intro {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-green);
}

.guide-intro p {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.guide-section {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: var(--shadow-small);
}

.guide-section h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.guide-text {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Number Bonds Grid */
.bonds-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.bond-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.bond-pair span:nth-child(1),
.bond-pair span:nth-child(3) {
    color: var(--primary-blue);
    min-width: 25px;
    text-align: center;
}

.bond-pair span:nth-child(5) {
    color: var(--primary-green);
    min-width: 25px;
    text-align: center;
}

.bond-pair span:nth-child(2),
.bond-pair span:nth-child(4) {
    color: var(--text-light);
}

/* Guide Tips */
.guide-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #FFF8E1;
    border-radius: 10px;
    margin-top: 10px;
}

.tip-icon {
    font-size: 1.2rem;
}

.guide-tip span:last-child {
    font-size: 0.85rem;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Demo Ten Frame */
.demo-ten-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
}

.demo-frame {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    border: 2px solid #ddd;
}

.demo-frame.small {
    padding: 6px;
    gap: 3px;
}

.demo-cell {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid #ccc;
    background: white;
}

.demo-frame.small .demo-cell {
    width: 24px;
    height: 24px;
}

.demo-cell.filled {
    background: var(--primary-blue);
    border-color: #357ABD;
}

.demo-cell.filled.blue {
    background: var(--primary-blue);
    border-color: #357ABD;
}

.demo-cell.filled.orange {
    background: var(--primary-orange);
    border-color: #E09100;
}

.demo-cell.empty {
    background: white;
    border: 2px dashed #ccc;
}

.demo-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Visual Example */
.visual-example {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.plus-sign, .equals-sign {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.remaining-dots {
    display: flex;
    gap: 3px;
}

.remaining-dots .demo-cell {
    width: 24px;
    height: 24px;
}

/* Example Box */
.example-box {
    background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
    border-radius: 12px;
    padding: 15px;
    margin: 10px 0;
}

.example-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.example-step:not(:last-child) {
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.step-num {
    width: 24px;
    height: 24px;
    background: var(--primary-purple);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* Tips List */
.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.tips-list li:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.tips-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

/* Quick Reference */
.guide-section.reference {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.guide-section.reference h3 {
    color: white;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.reference-grid span {
    background: rgba(255,255,255,0.9);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-purple);
}

/* Start Practice Button */
.start-practice-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-green) 0%, #449D44 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.start-practice-btn:active {
    transform: scale(0.98);
}

/* Guide Responsive */
@media (max-width: 400px) {
    .parent-buttons {
        flex-direction: column;
    }

    .bond-pair {
        font-size: 1rem;
        padding: 8px;
    }

    .demo-cell {
        width: 28px;
        height: 28px;
    }

    .reference-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================================
   PLACE VALUE DISPLAY (Two-Digit Numbers)
   ================================================ */
.place-value-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-small);
    width: 100%;
    max-width: 400px;
}

.place-value-display {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    min-height: 120px;
}

.place-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.place-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}

.tens-blocks {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    min-height: 80px;
}

.ten-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ten-block-unit {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3);
}

.ones-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    min-height: 50px;
    align-content: start;
}

.one-block {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #F5A623 0%, #E09100 100%);
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3);
}

.place-value-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-top: 5px;
}

/* ================================================
   READING GAME SCREEN
   ================================================ */
#reading-game-screen {
    padding: 15px;
}

/* Reading Game Area */
.reading-game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 15px;
}

/* Word Card Display */
.word-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 30px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    box-shadow: var(--shadow);
    min-width: 250px;
    min-height: 150px;
    transition: all 0.3s ease;
}

.word-card.correct {
    background: linear-gradient(135deg, #C8E6C9 0%, #A5D6A7 100%);
    animation: cardPulse 0.5s ease;
}

.word-card.incorrect {
    background: linear-gradient(135deg, #FFCDD2 0%, #EF9A9A 100%);
    animation: shake 0.5s ease;
}

@keyframes cardPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#current-word {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    letter-spacing: 2px;
}

/* Speak Button */
.speak-btn {
    background: linear-gradient(135deg, #26A69A 0%, #00897B 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-small);
}

.speak-btn:active {
    transform: scale(0.95);
}

.speak-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Picture Display */
.picture-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-small);
    min-width: 200px;
}

#picture-display {
    font-size: 5rem;
    line-height: 1;
}

.picture-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Spelling Input */
.spelling-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 350px;
}

.spelling-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    border: 3px solid #ddd;
    border-radius: 15px;
    background: white;
    color: var(--text-dark);
    transition: all 0.2s ease;
    letter-spacing: 3px;
    text-transform: lowercase;
}

.spelling-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(156, 39, 176, 0.2);
}

.spelling-input.correct {
    border-color: var(--primary-green);
    background: #E8F5E9;
}

.spelling-input.incorrect {
    border-color: #E57373;
    background: #FFEBEE;
}

.submit-spelling-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-purple) 0%, #7B1FA2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-spelling-btn:active {
    transform: scale(0.95);
}

/* Reading Answer Buttons */
.reading-answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 350px;
}

.reading-answer-btn {
    padding: 18px 15px;
    font-size: 1.3rem;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--text-dark);
    box-shadow: var(--shadow-small);
}

.reading-answer-btn:active {
    transform: scale(0.95);
}

.reading-answer-btn.correct {
    background: linear-gradient(135deg, #81C784 0%, #66BB6A 100%);
    color: white;
    animation: correctPulse 0.5s ease;
}

.reading-answer-btn.incorrect {
    background: linear-gradient(135deg, #EF9A9A 0%, #E57373 100%);
    color: white;
    animation: shake 0.5s ease;
}

.reading-answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Speed Reading Timer */
.speed-timer {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
    color: white;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 700;
}

.speed-timer.active {
    display: flex;
}

.speed-timer.warning {
    animation: timerPulse 0.5s ease infinite;
}

/* Reading Mode Labels */
.reading-mode-title {
    color: var(--text-dark);
    font-size: 1.3rem;
    text-align: center;
    padding: 5px 15px;
    background: rgba(38, 166, 154, 0.1);
    border-radius: 10px;
}

/* Reading Menu Buttons */
.sight-words-btn {
    background: linear-gradient(135deg, #26A69A 0%, #00897B 100%);
    color: white;
}

.word-picture-btn {
    background: linear-gradient(135deg, #FF7043 0%, #F4511E 100%);
    color: white;
}

.spelling-btn {
    background: linear-gradient(135deg, #AB47BC 0%, #8E24AA 100%);
    color: white;
}

.speed-reading-btn {
    background: linear-gradient(135deg, #EC407A 0%, #D81B60 100%);
    color: white;
}

/* Reading Level Selector */
.reading-level-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #E0F2F1 0%, #B2DFDB 100%);
    border-radius: 15px;
}

.reading-level-btn.active {
    background: linear-gradient(135deg, #26A69A 0%, #00897B 100%);
    color: white;
    border-color: #00897B;
}

/* Hint Display */
.hint-display {
    display: none;
    padding: 10px 20px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-radius: 10px;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-align: center;
}

.hint-display.show {
    display: block;
}

/* Word Result Display */
.word-result {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px;
    border-radius: 15px;
    font-weight: 600;
}

.word-result.show {
    display: flex;
}

.word-result.correct {
    background: linear-gradient(135deg, #C8E6C9 0%, #A5D6A7 100%);
    color: #2E7D32;
}

.word-result.incorrect {
    background: linear-gradient(135deg, #FFCDD2 0%, #EF9A9A 100%);
    color: #C62828;
}

.correct-word {
    font-size: 1.5rem;
    font-weight: 800;
}

/* ================================================
   READING GAME RESPONSIVE
   ================================================ */
@media (max-width: 500px) {
    #current-word {
        font-size: 2.8rem;
    }

    .word-card {
        padding: 25px 30px;
        min-width: 200px;
    }

    #picture-display {
        font-size: 4rem;
    }

    .spelling-input {
        font-size: 1.5rem;
        padding: 12px 15px;
    }

    .reading-answer-btn {
        padding: 15px 12px;
        font-size: 1.1rem;
    }

    .place-value-display {
        gap: 15px;
    }

    .ten-block-unit {
        width: 10px;
        height: 10px;
    }

    .one-block {
        width: 15px;
        height: 15px;
    }
}

@media (max-height: 700px) {
    .word-card {
        padding: 20px 25px;
        min-height: 120px;
    }

    #current-word {
        font-size: 2.5rem;
    }

    .picture-container {
        padding: 15px;
    }

    #picture-display {
        font-size: 3.5rem;
    }

    .reading-game-area {
        gap: 10px;
    }
}

/* Large screens */
@media (min-width: 768px) and (min-height: 900px) {
    #current-word {
        font-size: 4.5rem;
    }

    .word-card {
        padding: 40px 60px;
        min-width: 300px;
    }

    #picture-display {
        font-size: 6rem;
    }

    .spelling-input {
        font-size: 2.5rem;
    }

    .reading-answer-btn {
        padding: 22px 20px;
        font-size: 1.5rem;
    }

    .place-value-number {
        font-size: 2.5rem;
    }

    .ten-block-unit {
        width: 14px;
        height: 14px;
    }

    .one-block {
        width: 22px;
        height: 22px;
    }
}

/* ================================================
   PLACE VALUE BLOCKS (Tens and Ones)
   ================================================ */
.pv-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pv-blocks {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 60px;
    align-items: flex-end;
}

.pv-block {
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3), 0 2px 4px rgba(0,0,0,0.1);
}

.pv-block.tens-block {
    width: 12px;
    height: 60px;
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
}

.pv-block.ones-block {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #F5A623 0%, #E09100 100%);
}

.pv-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}

/* ================================================
   GUIDE TABS
   ================================================ */
.guide-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.guide-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: #e9ecef;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-dark);
}

.guide-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.guide-tab:active {
    transform: scale(0.98);
}

.guide-tab-content {
    display: none;
}

.guide-tab-content.active {
    display: block;
}

/* Level Reference in Guide */
.levels-reference {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.levels-reference .level-ref {
    padding: 10px 15px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.guide-section.reference .levels-reference .level-ref {
    background: rgba(255,255,255,0.95);
}

/* ================================================
   DASHBOARD TABS
   ================================================ */
.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.dash-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: #e9ecef;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-dark);
}

.dash-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dash-tab:active {
    transform: scale(0.98);
}

/* Reading Accuracy Bars */
.accuracy-bar.reading-bar {
    background: linear-gradient(90deg, #26A69A 0%, #00897B 100%);
}

/* Reading Answer Buttons Variants */
.reading-answer-btn.big-btn {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #26A69A 0%, #00897B 100%);
    color: white;
    font-size: 1.4rem;
    padding: 20px;
}

.reading-answer-btn.skip-btn {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 100%);
    color: var(--text-dark);
    font-size: 1rem;
    padding: 12px;
}

/* Word Match Button */
.word-match-btn {
    background: linear-gradient(135deg, #FF7043 0%, #F4511E 100%);
    color: white;
}

/* Reading timer button */
.reading-timer-btn {
    background: linear-gradient(135deg, #EC407A 0%, #D81B60 100%);
    color: white;
}

/* Sentence button */
.sentence-btn {
    background: linear-gradient(135deg, #7E57C2 0%, #5E35B1 100%);
    color: white;
}

/* Word display container */
.word-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Reading Answers Container */
.reading-answers-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 350px;
}

/* Place Value Container Responsive */
@media (max-width: 500px) {
    .pv-block.tens-block {
        width: 10px;
        height: 50px;
    }

    .pv-block.ones-block {
        width: 16px;
        height: 16px;
    }
}

@media (min-width: 768px) and (min-height: 900px) {
    .pv-block.tens-block {
        width: 14px;
        height: 70px;
    }

    .pv-block.ones-block {
        width: 24px;
        height: 24px;
    }
}

/* ================================================
   STORY MODE STYLES
   ================================================ */
.story-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 500px;
    padding: 15px;
}

.story-title {
    color: var(--primary-purple);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.story-text {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    padding: 20px;
    border-radius: 15px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dark);
    box-shadow: var(--shadow-small);
}

.story-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.story-choice-btn {
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: var(--text-dark);
    text-align: left;
    box-shadow: var(--shadow-small);
}

.story-choice-btn:hover {
    transform: translateX(5px);
}

.story-choice-btn:active {
    transform: scale(0.98);
}

.story-choice-btn.ending-btn {
    background: linear-gradient(135deg, var(--primary-green) 0%, #449D44 100%);
    color: white;
    text-align: center;
    font-size: 1.2rem;
}

.story-ending {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: 15px;
    margin-bottom: 15px;
}

.ending-message {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2E7D32;
}

/* Story button menu */
.story-btn {
    background: linear-gradient(135deg, #FF7043 0%, #F4511E 100%);
    color: white;
}

/* ================================================
   VOCABULARY MODE STYLES
   ================================================ */
.vocab-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 450px;
    padding: 15px;
}

.vocab-word {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-purple);
    text-align: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
    border-radius: 15px;
}

.vocab-definition {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: 10px;
}

.vocab-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-radius: 10px;
    width: 100%;
}

.vocab-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.vocab-choice-btn {
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--text-dark);
    box-shadow: var(--shadow-small);
}

.vocab-choice-btn:active {
    transform: scale(0.98);
}

.vocab-choice-btn.correct {
    background: linear-gradient(135deg, #81C784 0%, #66BB6A 100%);
    color: white;
}

.vocab-choice-btn.incorrect {
    background: linear-gradient(135deg, #EF9A9A 0%, #E57373 100%);
    color: white;
}

.vocab-choice-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Vocab button menu */
.vocab-btn {
    background: linear-gradient(135deg, #7E57C2 0%, #5E35B1 100%);
    color: white;
}

/* ================================================
   COMPREHENSION MODE STYLES
   ================================================ */
.comprehension-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    padding: 10px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.passage-title {
    color: var(--primary-blue);
    font-size: 1.3rem;
    text-align: center;
}

.passage-text {
    background: white;
    padding: 15px;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    box-shadow: var(--shadow-small);
    border-left: 4px solid var(--primary-blue);
    max-height: 200px;
    overflow-y: auto;
}

.comprehension-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 12px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-radius: 10px;
}

.comprehension-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comprehension-choice-btn {
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text-dark);
    text-align: left;
    box-shadow: var(--shadow-small);
}

.comprehension-choice-btn:active {
    transform: scale(0.98);
}

.comprehension-choice-btn.correct {
    background: linear-gradient(135deg, #81C784 0%, #66BB6A 100%);
    color: white;
}

.comprehension-choice-btn.incorrect {
    background: linear-gradient(135deg, #EF9A9A 0%, #E57373 100%);
    color: white;
}

.comprehension-choice-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Comprehension button menu */
.comprehension-btn {
    background: linear-gradient(135deg, #26A69A 0%, #00897B 100%);
    color: white;
}

/* ================================================
   UPDATED SPELLING STYLES
   ================================================ */
.big-speak {
    font-size: 1.3rem;
    padding: 20px 30px;
    margin-bottom: 10px;
}

/* ================================================
   RESPONSIVE ADJUSTMENTS FOR NEW MODES
   ================================================ */
@media (max-width: 500px) {
    .story-text {
        font-size: 1rem;
        padding: 15px;
    }

    .vocab-word {
        font-size: 2rem;
    }

    .passage-text {
        font-size: 0.95rem;
        max-height: 150px;
    }
}

@media (max-height: 700px) {
    .story-container {
        gap: 15px;
    }

    .vocab-container {
        gap: 15px;
    }

    .comprehension-container {
        max-height: calc(100vh - 200px);
    }

    .passage-text {
        max-height: 120px;
    }
}

/* ================================================
   AI STORY GENERATION STYLES
   ================================================ */

/* API Key Input in Settings */
.ai-setting {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.api-key-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.api-key-input:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.api-key-input::placeholder {
    color: #999;
}

.api-hint {
    font-size: 0.75rem;
    color: #888;
}

.api-hint a {
    color: var(--primary-purple);
    text-decoration: none;
}

.api-hint a:hover {
    text-decoration: underline;
}

/* Story Loading State */
.story-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f0f0f0;
    border-top: 5px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    color: var(--primary-purple);
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* AI Story Badge */
.ai-badge {
    display: inline-block;
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 10px;
    font-weight: 600;
    vertical-align: middle;
}
