/* Learn with Fun - Enhanced Colorful CSS */
/* Colorful animations WITHOUT the problematic oval/particle effects */

/* ========================================
   RESET & TAP HIGHLIGHT FIX
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

*:active, *:focus {
    -webkit-tap-highlight-color: transparent !important;
    outline: none;
}

button, input, a {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    outline: none !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes backgroundShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(46, 204, 113, 0.5); }
    50% { box-shadow: 0 0 20px rgba(46, 204, 113, 0.8); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes letterHover {
    0% { transform: scale(1) rotateY(0deg); }
    50% { transform: scale(1.1) rotateY(180deg); }
    100% { transform: scale(1) rotateY(360deg); }
}

@keyframes buttonPulse {
    0% { box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 8px 25px rgba(255,107,107,0.6); }
    100% { box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
}

@keyframes twinkleStars {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

@keyframes loadingShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes cardHover {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.02); }
}

/* ========================================
   BODY & BACKGROUND
   ======================================== */
body {
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Helvetica', sans-serif;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: backgroundShift 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 100px 100px, 150px 150px;
    animation: twinkleStars 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* ========================================
   APP CONTAINER
   ======================================== */
.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    min-height: 100vh;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 15px;
}

.logo {
    color: white;
    font-size: 2em;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    animation: pulse 3s ease-in-out infinite;
}

.sound-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.sound-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ========================================
   CATEGORY TABS
   ======================================== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    min-width: 70px;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.tab.active {
    background: white;
    color: #667eea;
    border-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.tab-icon {
    font-size: 1.2em;
    font-weight: bold;
}

.tab-text {
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

/* ========================================
   ACTIVITY PANELS
   ======================================== */
.panels {
    margin-bottom: 20px;
}

.panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.panel.active {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 15px;
}

/* ========================================
   ACTIVITY CARDS
   ======================================== */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 35px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: white;
    min-width: 130px;
    font-family: inherit;
}

.card:hover {
    transform: translateY(-8px) scale(1.05);
}

.card:active {
    transform: translateY(-2px) scale(1.02);
}

.card-icon {
    font-size: 1.8em;
    font-weight: bold;
}

.card-title {
    font-size: 1.1em;
    font-weight: 600;
}

/* Card Colors */
.card-red {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}
.card-red:hover {
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

.card-teal {
    background: linear-gradient(135deg, #4ecdc4, #44b8b0);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}
.card-teal:hover {
    box-shadow: 0 12px 35px rgba(78, 205, 196, 0.6);
}

.card-purple {
    background: linear-gradient(135deg, #a18cd1, #9178c4);
    box-shadow: 0 6px 20px rgba(161, 140, 209, 0.4);
}
.card-purple:hover {
    box-shadow: 0 12px 35px rgba(161, 140, 209, 0.6);
}

.card-yellow {
    background: linear-gradient(135deg, #fbc531, #e8b82a);
    box-shadow: 0 6px 20px rgba(251, 197, 49, 0.4);
}
.card-yellow:hover {
    box-shadow: 0 12px 35px rgba(251, 197, 49, 0.6);
}

.card-blue {
    background: linear-gradient(135deg, #45b7d1, #3ca8c2);
    box-shadow: 0 6px 20px rgba(69, 183, 209, 0.4);
}
.card-blue:hover {
    box-shadow: 0 12px 35px rgba(69, 183, 209, 0.6);
}

/* ========================================
   MAIN CONTENT SECTIONS
   ======================================== */
.content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

.section h2 {
    color: #4a90e2;
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* ========================================
   ALPHABET GRID
   ======================================== */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.letter-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    font-size: 1.8em;
    padding: 18px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.letter-btn:hover {
    transform: scale(1.15) rotate(5deg);
    background: linear-gradient(135deg, #45b7b8, #3a9999);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.5);
}

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

/* Letter Display */
.letter-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 25px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

.big-letter {
    font-size: 7em;
    color: #e74c3c;
    font-weight: bold;
    animation: bounce 2s ease-in-out infinite;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.1);
}

.letter-image {
    margin: 20px 0;
}

.letter-image img {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    animation: pulse 3s ease-in-out infinite;
    background: white;
    padding: 10px;
}

.letter-word {
    font-size: 1.8em;
    color: #3498db;
    font-weight: bold;
}

/* ========================================
   PHONICS SECTION
   ======================================== */
.phonics-container {
    max-width: 900px;
    margin: 0 auto;
}

.vowel-selector {
    text-align: center;
    margin-bottom: 25px;
}

.vowel-selector h3 {
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 15px;
}

.vowel-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.vowel-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.vowel-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.5);
}

.vowel-btn.active {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.6);
}

.vowel-letter {
    font-size: 1.6em;
    font-weight: bold;
}

.vowel-sound {
    font-size: 0.85em;
    opacity: 0.9;
}

.consonant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
    margin-bottom: 25px;
}

.consonant-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 10px;
    font-size: 1.4em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.consonant-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, #2980b9, #1f6dad);
}

.phonics-display {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.current-sound {
    font-size: 3.5em;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.sound-description {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

.play-sound-btn {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 35px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.play-sound-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5);
}

/* ========================================
   BANGLA SECTION
   ======================================== */
.bangla-container {
    max-width: 900px;
    margin: 0 auto;
}

.bangla-category-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-btn {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 18px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    font-size: 1.1em;
}

.category-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5);
}

.category-btn.active {
    background: linear-gradient(135deg, #d35400, #c0392b);
    transform: scale(1.05);
}

.category-desc {
    font-size: 0.85em;
    opacity: 0.9;
    margin-top: 3px;
}

.bangla-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
    gap: 10px;
    margin-bottom: 25px;
    max-height: 280px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
}

.bangla-letter-btn {
    background: linear-gradient(135deg, #16a085, #138d75);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 8px;
    font-size: 1.6em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(22, 160, 133, 0.3);
}

.bangla-letter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(22, 160, 133, 0.5);
}

.bangla-display {
    background: linear-gradient(135deg, #fff, #fdf2e9);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 3px solid #e67e22;
}

.bangla-big-letter {
    font-size: 5em;
    font-weight: bold;
    color: #e67e22;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.bangla-letter-image {
    width: 180px;
    height: 180px;
    margin: 0 auto 15px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bangla-letter-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.bangla-pronunciation {
    font-size: 1.4em;
    color: #7f8c8d;
    margin-bottom: 15px;
    font-style: italic;
}

.bangla-word-section {
    margin-bottom: 20px;
}

.bangla-word {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.bangla-word-meaning {
    font-size: 1.2em;
    color: #7f8c8d;
}

.play-bangla-btn {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.play-bangla-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(39, 174, 96, 0.5);
}

/* ========================================
   ARABIC SECTION
   ======================================== */
.arabic-container {
    max-width: 900px;
    margin: 0 auto;
    direction: rtl;
}

.arabic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
    gap: 10px;
    margin-bottom: 25px;
    direction: rtl;
}

.arabic-letter-btn {
    background: linear-gradient(135deg, #4caf50, #43a047);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.8em;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.arabic-letter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.5);
}

.arabic-display {
    background: linear-gradient(135deg, #fff, #e8f5e9);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    border: 3px solid #4caf50;
}

.arabic-big-letter {
    font-size: 6em;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 10px;
}

.arabic-letter-image {
    width: 180px;
    height: 180px;
    margin: 0 auto 15px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arabic-letter-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.arabic-pronunciation {
    font-size: 1.4em;
    color: #666;
    margin-bottom: 15px;
}

.arabic-word-section {
    margin-bottom: 20px;
}

.arabic-word {
    font-size: 2.2em;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 5px;
}

.arabic-word-meaning {
    font-size: 1.2em;
    color: #666;
    direction: ltr;
}

.play-arabic-btn {
    background: linear-gradient(135deg, #4caf50, #43a047);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.play-arabic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.5);
}

/* ========================================
   SPELLING SECTION
   ======================================== */
.spelling-game {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.word-image {
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.word-image img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 20px;
    background: #f0f0f0;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.word-label {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1.3em;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.word-to-spell {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.letter-slot {
    width: 55px;
    height: 55px;
    border: 3px dashed #3498db;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    background: white;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.letter-choices {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.choice-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 1.6em;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.choice-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(243, 156, 18, 0.5);
}

.choice-btn.used {
    opacity: 0.4;
    cursor: not-allowed;
}

.choice-btn.wrong {
    animation: shake 0.3s ease;
    background: #e74c3c;
}

.spelling-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(155, 89, 182, 0.5);
}

/* ========================================
   COUNTING SECTION
   ======================================== */
.counting-area {
    text-align: center;
}

.number-display {
    font-size: 6em;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

.objects-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    min-height: 80px;
}

.count-object {
    font-size: 2.5em;
    animation: bounce 1s ease-in-out infinite;
}

.count-object:nth-child(2n) {
    animation-delay: 0.1s;
}

.count-object:nth-child(3n) {
    animation-delay: 0.2s;
}

.number-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.number-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    width: 55px;
    height: 55px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.number-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

/* ========================================
   QUIZ SECTION
   ======================================== */
.quiz-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.quiz-question {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
}

.question-text {
    font-size: 1.4em;
    color: #2c3e50;
    margin-bottom: 15px;
}

.question-content {
    font-size: 4em;
    font-weight: bold;
    color: #e74c3c;
}

.quiz-answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.quiz-answer-btn {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    border: none;
    padding: 20px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(116, 185, 255, 0.3);
}

.quiz-answer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(116, 185, 255, 0.5);
}

.quiz-answer-btn.correct {
    background: linear-gradient(135deg, #00b894, #00a383);
    animation: pulse 0.5s ease;
}

.quiz-answer-btn.wrong {
    background: linear-gradient(135deg, #e17055, #d63031);
    animation: shake 0.5s ease;
}

.quiz-score {
    font-size: 1.3em;
    color: #2c3e50;
    font-weight: bold;
}

/* ========================================
   MEMORY GAME
   ======================================== */
.memory-container {
    max-width: 600px;
    margin: 0 auto;
}

.memory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.difficulty-selector {
    display: flex;
    gap: 10px;
}

.difficulty-btn {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 2px solid #3498db;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.difficulty-btn:hover {
    background: rgba(52, 152, 219, 0.3);
}

.difficulty-btn.active {
    background: #3498db;
    color: white;
}

.memory-stats {
    display: flex;
    gap: 20px;
    font-size: 1.1em;
    color: #2c3e50;
}

.new-game-btn {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.new-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(39, 174, 96, 0.5);
}

.memory-board {
    display: grid;
    gap: 10px;
    justify-content: center;
}

.memory-board.easy {
    grid-template-columns: repeat(4, 70px);
}

.memory-board.medium {
    grid-template-columns: repeat(4, 70px);
}

.memory-board.hard {
    grid-template-columns: repeat(4, 70px);
}

.memory-card {
    width: 70px;
    height: 70px;
    cursor: pointer;
    perspective: 1000px;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.memory-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    backface-visibility: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.card-back {
    background: white;
    transform: rotateY(180deg);
}

.memory-card.matched .card-inner {
    transform: rotateY(180deg);
}

.memory-card.matched .card-back {
    background: linear-gradient(135deg, #00b894, #00a383);
}

/* ========================================
   NURSERY RHYMES
   ======================================== */
.rhymes-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.song-selector {
    text-align: center;
}

.song-selector h3 {
    color: #2c3e50;
    font-size: 1.6em;
    margin-bottom: 20px;
}

.song-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.song-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 1.2em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.song-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.song-btn.active {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    animation: pulse 1.5s infinite;
}

.song-btn:nth-child(2) { background: linear-gradient(135deg, #3498db, #2980b9); box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4); }
.song-btn:nth-child(3) { background: linear-gradient(135deg, #9b59b6, #8e44ad); box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4); }
.song-btn:nth-child(4) { background: linear-gradient(135deg, #f39c12, #e67e22); box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4); }
.song-btn:nth-child(5) { background: linear-gradient(135deg, #1abc9c, #16a085); box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4); }

.rhyme-player {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 25px;
    padding: 35px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.song-title {
    font-size: 2.2em;
    color: #2c3e50;
    font-weight: bold;
    margin-bottom: 25px;
    animation: bounce 2s infinite;
}

.lyrics-display {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    margin-bottom: 25px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 4px 15px rgba(0,0,0,0.08);
}

.lyrics-line {
    font-size: 1.8em;
    line-height: 1.6;
    color: #2c3e50;
    text-align: center;
    font-weight: bold;
}

.lyrics-word {
    display: inline-block;
    margin: 0 6px;
    padding: 5px 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.lyrics-word.highlighted {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    transform: scale(1.2);
    animation: highlightBounce 0.5s ease;
}

.lyrics-word.sung {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    opacity: 0.7;
}

@keyframes highlightBounce {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.4); }
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.play-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    font-size: 1.2em !important;
    padding: 15px 35px !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4) !important;
}

.play-btn:hover {
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6) !important;
}

.restart-btn {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4) !important;
}

.restart-btn:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6) !important;
}

.speed-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4) !important;
}

.speed-btn:hover {
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.6) !important;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.progress-bar-rhyme {
    width: 100%;
    max-width: 400px;
    height: 15px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.progress-fill-rhyme {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
    position: relative;
}

.progress-fill-rhyme::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loadingShine 2s ease-in-out infinite;
}

.progress-text-rhyme {
    font-size: 1.1em;
    color: #7f8c8d;
    font-weight: bold;
}

.rhyme-animations {
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.animation-element {
    font-size: 3.5em;
    animation: float 3s ease-in-out infinite;
}

.animation-element:nth-child(2) { animation-delay: 0.5s; }
.animation-element:nth-child(3) { animation-delay: 1s; }
.animation-element:nth-child(4) { animation-delay: 1.5s; }
.animation-element:nth-child(5) { animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* ========================================
   DRAWING SECTION
   ======================================== */
.drawing-container {
    max-width: 900px;
    margin: 0 auto;
}

.drawing-tools {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
}

.color-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.color-btn:hover {
    transform: scale(1.15);
}

.color-btn.active {
    border-color: #333;
    transform: scale(1.2);
}

.brush-sizes {
    display: flex;
    gap: 10px;
}

.brush-btn {
    background: #e9ecef;
    border: 2px solid #adb5bd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.brush-btn:hover {
    background: #dee2e6;
}

.brush-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.drawing-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.canvas-wrapper {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

#drawingCanvas {
    display: block;
    width: 100%;
    height: 400px;
    cursor: crosshair;
}

/* ========================================
   CELEBRATION MODAL
   ======================================== */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.celebration.show {
    display: flex;
}

.celebration-box {
    background: white;
    padding: 40px 60px;
    border-radius: 30px;
    text-align: center;
    animation: bounce 0.5s ease;
}

.celebration-box h2 {
    font-size: 2.5em;
    color: #27ae60;
    margin-bottom: 15px;
}

.celebration-box .stars {
    font-size: 3em;
    margin-bottom: 20px;
}

.celebration-box button {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.celebration-box button:hover {
    transform: scale(1.05);
}

/* ========================================
   LOADING SCREEN
   ======================================== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-text {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.loading-bar {
    width: 250px;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    border-radius: 5px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: loadingShine 1.5s ease-in-out infinite;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .logo {
        font-size: 1.5em;
    }

    .tabs {
        gap: 5px;
        padding: 10px;
    }

    .tab {
        padding: 10px 15px;
        min-width: 55px;
    }

    .tab-icon {
        font-size: 1em;
    }

    .tab-text {
        font-size: 0.65em;
    }

    .card {
        padding: 18px 25px;
        min-width: 100px;
    }

    .card-icon {
        font-size: 1.4em;
    }

    .card-title {
        font-size: 0.95em;
    }

    .content {
        padding: 20px;
        border-radius: 20px;
    }

    .section h2 {
        font-size: 1.8em;
    }

    .big-letter {
        font-size: 5em;
    }

    .letter-btn {
        font-size: 1.5em;
        padding: 15px;
    }

    .alphabet-grid {
        grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .logo {
        font-size: 1.3em;
    }

    .tabs {
        gap: 4px;
        padding: 8px;
        border-radius: 15px;
    }

    .tab {
        padding: 8px 10px;
        min-width: 48px;
        border-radius: 10px;
    }

    .tab-icon {
        font-size: 0.9em;
    }

    .tab-text {
        font-size: 0.55em;
    }

    .panel.active {
        gap: 10px;
        padding: 10px;
    }

    .card {
        padding: 15px 20px;
        min-width: 85px;
        flex: 1;
        max-width: 45%;
        border-radius: 15px;
    }

    .content {
        padding: 15px;
        border-radius: 15px;
    }

    .section h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .big-letter {
        font-size: 4em;
    }

    .letter-image img {
        width: 120px;
        height: 120px;
    }

    .letter-word {
        font-size: 1.4em;
    }

    .quiz-answers {
        grid-template-columns: 1fr;
    }

    .memory-board.easy,
    .memory-board.medium,
    .memory-board.hard {
        grid-template-columns: repeat(4, 60px);
    }

    .memory-card {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 360px) {
    .tab {
        padding: 6px 8px;
        min-width: 42px;
    }

    .card {
        padding: 12px 15px;
        min-width: 75px;
    }

    .card-icon {
        font-size: 1.2em;
    }

    .card-title {
        font-size: 0.85em;
    }
}
