/* ==========================================================================
   ⚡ SUPER SONIC THE HEDGEHOG - DIRASATI PLATFORM - AYOUB (READING GRADE 3) 🦔
   ========================================================================== */

:root {
    /* Super Sonic Palette */
    --sonic-gold: #FFE600;
    --sonic-gold-bright: #FFF585;
    --sonic-gold-deep: #D4A000;
    --sonic-gold-glow: rgba(255, 230, 0, 0.45);

    --sonic-blue-royal: #0051FF;
    --sonic-blue-electric: #00C8FF;
    --sonic-blue-glow: rgba(0, 200, 255, 0.45);

    --chaos-green: #00E676;
    --shadow-red: #FF1744;
    --tails-orange: #FF9100;

    /* Backgrounds & Cards */
    --bg-main: #060A18;
    --bg-card: #121A33;
    --bg-card-hover: #182345;
    --border-card: 1.5px solid rgba(0, 200, 255, 0.25);
    --border-card-hover: 1.5px solid #FFE600;

    /* Text */
    --text-white: #FFFFFF;
    --text-muted: #9BB0D6;

    /* Typography */
    --font-heading: 'Changa', 'Cairo', sans-serif;
    --font-body: 'Tajawal', 'Cairo', sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body.supersonic-theme {
    font-family: var(--font-body);
    background: radial-gradient(circle at 50% 8%, #14224A 0%, #091026 45%, #040714 100%);
    background-attachment: fixed;
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Views Management */
.view {
    display: none;
    position: relative;
    z-index: 2;
    padding-bottom: 60px;
}

.view.active-view {
    display: block;
    animation: viewFadeIn 0.35s ease;
}

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

/* ==========================================================================
   HEADER & PROFILE (Sonic HUD)
   ========================================================================== */
.app-header.sonic-header {
    background: rgba(8, 14, 32, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 2px solid var(--sonic-gold);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* User Badge */
.user-info.sonic-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 81, 255, 0.15);
    padding: 4px 14px 4px 6px;
    border-radius: 40px;
    border: 1.5px solid var(--sonic-gold);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-info.sonic-badge:hover {
    box-shadow: 0 0 15px var(--sonic-gold);
    transform: translateY(-2px);
}

.user-profile {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0B1124;
    border: 2px solid var(--sonic-gold);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.user-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #FFF;
    white-space: nowrap;
}

/* Header Logo & Title */
.logo.sonic-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sonic-mini-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--sonic-gold));
}

.logo.sonic-logo h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    color: #FFF;
    margin: 0;
    white-space: nowrap;
}

/* Navigation & Stats */
.header-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sonic-hud-stats {
    background: rgba(4, 7, 18, 0.85);
    border: 1px solid rgba(255, 230, 0, 0.35);
    padding: 6px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
}

.hud-val {
    color: var(--sonic-gold);
    font-size: 1.05rem;
}

.header-action-btn {
    padding: 7px 14px;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.game-btn {
    background: linear-gradient(135deg, var(--sonic-blue-royal), #00A2FF);
    color: #FFF;
    border: 1px solid var(--sonic-blue-electric);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--sonic-blue-glow);
}

.portal-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.portal-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--sonic-gold);
}

/* ==========================================================================
   SUPER SONIC CINEMATIC STAGE BUTTONS (Direct Background Art Integration)
   ========================================================================== */
.lesson-path-container {
    max-width: 1400px;
    margin: 25px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.book-btn {
    width: 100%;
    min-height: 185px;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 230, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    outline: none;
    color: #FFF;
    z-index: 1;
    overflow: hidden;
    background: #080D21;
}

.card-bg-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center 25%;
    z-index: -2;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(6, 10, 25, 0.45) 0%, rgba(6, 10, 25, 0.82) 55%, rgba(6, 10, 25, 0.98) 100%);
    z-index: -1;
    transition: background 0.3s ease;
}

.book-btn:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8), 0 0 25px var(--sonic-gold-glow), 0 0 15px var(--sonic-blue-glow);
    border-color: var(--sonic-gold);
}

.book-btn:hover .card-bg-image {
    transform: scale(1.12);
}

.book-btn:hover .card-overlay {
    background: linear-gradient(180deg, rgba(6, 10, 25, 0.25) 0%, rgba(6, 10, 25, 0.72) 50%, rgba(6, 10, 25, 0.94) 100%);
}

.book-btn.completed {
    border-color: var(--chaos-green);
    box-shadow: 0 8px 25px rgba(0, 230, 118, 0.3);
}

.book-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 25px;
}

.book-title {
    color: #FFF;
    font-size: 1.35rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 0, 0, 0.9);
    line-height: 1.35;
    font-family: var(--font-heading);
    transition: color 0.2s;
}

.book-btn:hover .book-title {
    color: var(--sonic-gold-bright);
    text-shadow: 0 0 15px var(--sonic-gold-glow), 0 2px 8px #000;
}

.book-meta {
    position: absolute;
    top: 12px;
    right: 14px;
    color: var(--sonic-gold);
    font-size: 0.82rem;
    font-weight: 800;
    background: rgba(6, 10, 25, 0.85);
    padding: 3px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--sonic-gold);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-family: var(--font-heading);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
}

.book-type-badge {
    position: absolute;
    top: 12px;
    left: 14px;
    color: #FFF;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(0, 81, 255, 0.8);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 200, 255, 0.5);
    font-family: var(--font-heading);
    z-index: 3;
}

.book-check {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    background: var(--chaos-green);
    border: 2px solid #FFF;
    border-radius: 50%;
    color: #060A19;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: 0 0 12px var(--chaos-green);
    z-index: 5;
}

.btn-speaker {
    position: absolute;
    bottom: 12px;
    left: 14px;
    font-size: 1.2rem;
    color: #FFF;
    background: rgba(0, 81, 255, 0.85);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid var(--sonic-blue-electric);
    transition: all 0.2s ease;
    z-index: 4;
    cursor: pointer;
}

.btn-speaker:hover {
    transform: scale(1.15);
    background: var(--sonic-gold);
    color: #060A19;
    border-color: #FFF;
    box-shadow: 0 0 15px var(--sonic-gold);
}

.book-action-pill {
    position: absolute;
    bottom: 12px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--sonic-gold), var(--tails-orange));
    color: #060A19;
    font-size: 0.85rem;
    font-weight: 900;
    font-family: var(--font-heading);
    padding: 5px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    z-index: 4;
}

.book-btn:hover .book-action-pill {
    background: linear-gradient(135deg, #FFF, var(--sonic-gold));
    box-shadow: 0 0 15px var(--sonic-gold);
    transform: translateX(-3px);
}

/* ==========================================================================
   LESSON DETAIL VIEW
   ========================================================================== */
.lesson-header-bar.sonic-lesson-bar {
    max-width: 1400px;
    margin: 15px auto 0;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sonic-btn {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 9px 18px;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-btn.sonic-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-btn.sonic-btn:hover {
    background: var(--sonic-blue-royal);
    border-color: var(--sonic-blue-electric);
}

.lesson-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 6px 20px 6px 12px;
    border-radius: 40px;
    border: 1.5px solid var(--sonic-gold);
}

.lesson-sonic-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    background: #0B1124;
}

.lesson-title-box h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    color: #FFF;
}

/* Lesson Navigation Tabs */
.lesson-tabs.sonic-tabs {
    max-width: 1400px;
    margin: 15px auto;
    padding: 0 20px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.tab-trigger {
    flex: 1;
    min-width: 140px;
    padding: 12px 14px;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1.5px solid rgba(255, 230, 0, 0.2);
    border-radius: 14px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.tab-trigger:hover {
    color: #FFF;
    border-color: var(--sonic-gold);
    background: var(--bg-card-hover);
}

.tab-trigger.active {
    background: linear-gradient(135deg, var(--sonic-blue-royal), #0B1C4D);
    color: #FFF;
    border-color: var(--sonic-gold);
    box-shadow: 0 4px 15px var(--sonic-blue-glow);
}

/* Tab Content */
.lesson-body.sonic-lesson-body {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.tab-content {
    display: none;
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px solid rgba(255, 230, 0, 0.25);
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.tab-content.active {
    display: block;
    animation: tabSlideIn 0.3s ease;
}

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

/* Reader Tab */
.section-header.sonic-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Reader Tab Toolbar & Speed Controls */
.reader-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.speed-toggle-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(6, 10, 25, 0.8);
    border: 1.5px solid rgba(0, 200, 255, 0.35);
    padding: 4px 8px;
    border-radius: 12px;
}

.toolbar-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--sonic-gold);
    margin-left: 4px;
}

.speed-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.speed-btn:hover {
    color: #FFF;
    background: rgba(0, 81, 255, 0.3);
}

.speed-btn.active {
    background: linear-gradient(135deg, var(--sonic-gold), var(--tails-orange));
    color: #060A19;
    font-weight: 900;
    box-shadow: 0 0 10px var(--sonic-gold-glow);
}

.toolbar-btn {
    background: rgba(0, 81, 255, 0.35);
    border: 1.5px solid var(--sonic-blue-electric);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    padding: 7px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    border-color: var(--sonic-gold);
    background: rgba(0, 81, 255, 0.55);
    transform: translateY(-2px);
}

.toolbar-btn.active {
    background: linear-gradient(135deg, var(--chaos-green), #00A3FF);
    color: #060A19;
    font-weight: 900;
    border-color: #FFF;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.6);
}

.info-bubble.sonic-info-bubble {
    background: rgba(0, 81, 255, 0.15);
    border: 1px solid var(--sonic-blue-electric);
    color: #D6E4FF;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 600;
}

.text-display.sonic-text-display {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sentence-card {
    background: rgba(6, 10, 25, 0.65);
    border: 1.5px solid rgba(255, 230, 0, 0.18);
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFF;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    line-height: 2.2;
}

.sentence-card:hover {
    background: rgba(0, 81, 255, 0.22);
    border-color: var(--sonic-gold);
    transform: translateX(-4px);
}

.sentence-card.playing {
    background: linear-gradient(90deg, rgba(255, 230, 0, 0.2), rgba(0, 81, 255, 0.25));
    border-color: var(--sonic-gold);
    box-shadow: 0 0 20px var(--sonic-gold-glow);
}

.sentence-text-wrap {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

/* Interactive Word Chips */
.interactive-word {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 2px;
    border-radius: 8px;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

.interactive-word:hover {
    background: rgba(255, 230, 0, 0.25);
    border-color: var(--sonic-gold);
    color: var(--sonic-gold-bright);
    transform: scale(1.12);
    text-shadow: 0 0 12px var(--sonic-gold);
    box-shadow: 0 0 10px rgba(255, 230, 0, 0.35);
}

.interactive-word.word-active {
    background: linear-gradient(135deg, var(--sonic-gold), var(--tails-orange)) !important;
    color: #060A19 !important;
    transform: scale(1.18);
    box-shadow: 0 0 18px var(--sonic-gold);
    font-weight: 900;
    border-color: #FFF;
}

.interactive-word.karaoke-highlight {
    background: linear-gradient(135deg, #FFE600, #FF9100) !important;
    color: #060A19 !important;
    border-radius: 8px;
    transform: scale(1.15);
    box-shadow: 0 0 20px #FFE600;
    font-weight: 900;
    text-shadow: none !important;
}

/* Phonics Visual Colors */
.ph-mark { display: inline; }
.ph-harakah { color: #FF7043; font-weight: 900; }
.ph-sukoon { color: #00E5FF; font-weight: 900; }
.ph-shaddah { color: #FF1744; font-weight: 900; }
.ph-tanwin { color: #FFD600; font-weight: 900; }
.ph-madd { color: #E040FB; font-weight: 900; text-decoration: underline; text-decoration-color: #E040FB; }

.sentence-actions-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sentence-spell-quick-btn {
    background: rgba(0, 81, 255, 0.4);
    border: 1px solid var(--sonic-blue-electric);
    color: #FFF;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sentence-spell-quick-btn:hover {
    background: var(--sonic-gold);
    color: #060A19;
    border-color: #FFF;
    transform: scale(1.08);
    box-shadow: 0 0 12px var(--sonic-gold);
}

.sentence-speaker {
    font-size: 1.3rem;
    opacity: 0.85;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sentence-speaker:hover {
    transform: scale(1.2);
    opacity: 1;
    background: rgba(255, 230, 0, 0.2);
}

/* ==========================================================================
   🔤 SPELLING & PHONICS LAB STYLES (معمل التهجي الصوتي الذكي)
   ========================================================================== */
.spelling-studio-wrap {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.spelling-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: rgba(10, 18, 43, 0.7);
    padding: 16px 20px;
    border-radius: 18px;
    border: 1.5px solid rgba(0, 200, 255, 0.3);
}

.spelling-title-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.spelling-sonic-icon {
    font-size: 2.2rem;
}

.spelling-title-box h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--sonic-gold);
}

.spelling-title-box p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.spelling-custom-input-box {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 450px;
}

.spelling-custom-input-box input {
    flex: 1;
    background: rgba(6, 10, 25, 0.8);
    border: 1.5px solid rgba(0, 200, 255, 0.4);
    border-radius: 12px;
    padding: 10px 16px;
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    outline: none;
    transition: all 0.2s ease;
}

.spelling-custom-input-box input:focus {
    border-color: var(--sonic-gold);
    box-shadow: 0 0 12px var(--sonic-gold-glow);
}

.spelling-words-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(6, 10, 25, 0.5);
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 230, 0, 0.2);
}

.strip-label {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--sonic-gold);
    white-space: nowrap;
}

.strip-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    width: 100%;
}

.spelling-word-chip {
    background: rgba(0, 81, 255, 0.25);
    border: 1px solid rgba(0, 200, 255, 0.4);
    color: #D6E4FF;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.spelling-word-chip:hover {
    background: rgba(0, 81, 255, 0.5);
    border-color: var(--sonic-gold);
    color: #FFF;
    transform: translateY(-2px);
}

.spelling-word-chip.active {
    background: linear-gradient(135deg, var(--sonic-gold), var(--tails-orange));
    color: #060A19;
    border-color: #FFF;
    font-weight: 900;
    box-shadow: 0 0 14px var(--sonic-gold);
}

/* Hero Active Word Display Card */
.spelling-hero-card {
    background: radial-gradient(circle at 50% 30%, #172754 0%, #0c1430 70%, #070c1d 100%);
    border: 2.5px solid var(--sonic-gold);
    border-radius: 24px;
    padding: 26px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px var(--sonic-gold-glow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sonic-ring-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 230, 0, 0.15);
    border: 1px solid var(--sonic-gold);
    padding: 4px 14px;
    border-radius: 20px;
    color: var(--sonic-gold);
    font-weight: 900;
    font-size: 0.85rem;
}

.word-speed-indicator {
    font-size: 0.85rem;
    color: #9BB0D6;
}

.hero-word-text {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    font-size: 3.8rem;
    font-weight: 900;
    color: #FFF;
    text-shadow: 0 4px 20px rgba(255, 230, 0, 0.5), 0 0 40px rgba(0, 200, 255, 0.35);
    margin: 10px 0 20px;
    line-height: 1.4;
    letter-spacing: 1px;
}

.hero-word-audio-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sonic-audio-big-btn, .sonic-audio-slow-btn, .sonic-echo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 14px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.sonic-audio-big-btn {
    background: linear-gradient(135deg, var(--sonic-gold), var(--tails-orange));
    color: #060A19;
    box-shadow: 0 4px 15px rgba(255, 230, 0, 0.4);
}

.sonic-audio-slow-btn {
    background: linear-gradient(135deg, #00C8FF, #0051FF);
    color: #FFF;
    box-shadow: 0 4px 15px rgba(0, 200, 255, 0.4);
}

.sonic-echo-btn {
    background: linear-gradient(135deg, #E040FB, #7C4DFF);
    color: #FFF;
    box-shadow: 0 4px 15px rgba(224, 64, 251, 0.4);
}

.sonic-audio-big-btn:hover, .sonic-audio-slow-btn:hover, .sonic-echo-btn:hover {
    transform: translateY(-3px) scale(1.05);
    filter: brightness(1.15);
}

/* Echo Challenge Box */
.echo-challenge-box {
    margin-top: 22px;
    background: rgba(6, 10, 25, 0.85);
    border: 2px solid #E040FB;
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    animation: tabSlideIn 0.3s ease;
}

.echo-challenge-box.hidden {
    display: none !important;
}

.echo-countdown-ring {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E040FB, #FF1744);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: #FFF;
    box-shadow: 0 0 25px #E040FB;
}

.countdown-pulse {
    animation: pulseGlow 0.9s infinite;
}

.echo-text-hint h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #FFF;
    margin-bottom: 4px;
}

.echo-text-hint p {
    font-size: 1.05rem;
    color: #E2ECFF;
}

/* Dual Breakdown Grid (Syllables & Letters) */
.spelling-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.breakdown-card {
    background: rgba(10, 18, 43, 0.8);
    border: 1.5px solid rgba(0, 200, 255, 0.3);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.breakdown-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.breakdown-card-header h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--sonic-gold);
}

.breakdown-badge {
    font-size: 0.8rem;
    color: #9BB0D6;
    background: rgba(0, 81, 255, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
}

/* Syllables Pills */
.syllables-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.syllable-pill {
    flex: 1;
    min-width: 90px;
    max-width: 140px;
    background: rgba(6, 10, 25, 0.85);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 2px solid;
    position: relative;
}

.syllable-pill.sakn-pill {
    border-color: #00C8FF;
    box-shadow: 0 4px 14px rgba(0, 200, 255, 0.25);
}

.syllable-pill.madd-pill {
    border-color: #FFE600;
    box-shadow: 0 4px 14px rgba(255, 230, 0, 0.25);
}

.syllable-pill.short-pill {
    border-color: #00E676;
    box-shadow: 0 4px 14px rgba(0, 230, 118, 0.25);
}

.syllable-pill.tanwin-pill {
    border-color: #FF9100;
    box-shadow: 0 4px 14px rgba(255, 145, 0, 0.25);
}

.syllable-pill.al-pill {
    border-color: #A855F7;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.25);
}

.syllable-pill:hover {
    transform: translateY(-5px) scale(1.06);
    filter: brightness(1.2);
}

.pill-pulse {
    animation: pillPulseAnim 0.5s ease;
}

@keyframes pillPulseAnim {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); box-shadow: 0 0 25px var(--sonic-gold); }
    100% { transform: scale(1); }
}

.syl-text {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    font-size: 2.1rem;
    font-weight: 900;
    color: #FFF;
    line-height: 1.2;
}

.syl-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: #D6E4FF;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 8px;
    border-radius: 10px;
}

.syl-speaker {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Letters Tiles */
.letters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.letter-tile {
    width: 62px;
    height: 70px;
    background: rgba(6, 10, 25, 0.85);
    border: 2px solid var(--sonic-blue-electric);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.letter-tile:hover {
    transform: scale(1.12);
    border-color: var(--sonic-gold);
    box-shadow: 0 0 15px var(--sonic-gold);
    background: rgba(0, 81, 255, 0.3);
}

.letter-pulse {
    animation: pillPulseAnim 0.5s ease;
}

.let-char {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--sonic-gold-bright);
    line-height: 1;
}

.let-audio-icon {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 3px;
}

/* Word Builder & Scramble Arena */
.word-builder-arena {
    background: radial-gradient(circle at 50% 50%, #152247 0%, #091129 100%);
    border: 2px solid var(--chaos-green);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 230, 118, 0.2);
}

.builder-header {
    text-align: center;
    margin-bottom: 20px;
}

.builder-title-badge {
    display: inline-block;
    background: rgba(0, 230, 118, 0.2);
    border: 1px solid var(--chaos-green);
    color: var(--chaos-green);
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.builder-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #FFF;
}

.builder-slots-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
    min-height: 72px;
    flex-wrap: wrap;
}

.builder-slot {
    width: 66px;
    height: 72px;
    border-radius: 16px;
    border: 2px dashed rgba(255, 230, 0, 0.5);
    background: rgba(6, 10, 25, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    font-weight: 900;
    color: var(--sonic-gold-bright);
    cursor: pointer;
    transition: all 0.2s ease;
}

.builder-slot.filled {
    border-style: solid;
    border-color: var(--sonic-gold);
    background: linear-gradient(135deg, rgba(0, 81, 255, 0.5), rgba(0, 200, 255, 0.3));
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.4);
}

.builder-slot.success-glow {
    background: rgba(0, 230, 118, 0.4) !important;
    border-color: var(--chaos-green) !important;
    box-shadow: 0 0 25px var(--chaos-green) !important;
    transform: scale(1.08);
}

.builder-slot.error-shake {
    animation: errorShake 0.5s ease;
    border-color: var(--shadow-red) !important;
    box-shadow: 0 0 20px var(--shadow-red) !important;
}

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

.slot-idx {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.25);
    font-family: var(--font-heading);
}

.builder-pool-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.pool-tile {
    min-width: 62px;
    height: 66px;
    border-radius: 16px;
    border: 2px solid var(--sonic-gold);
    background: linear-gradient(135deg, #182859, #0e1738);
    color: #FFF;
    font-size: 2rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    padding: 0 10px;
}

.pool-tile:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.1);
    background: linear-gradient(135deg, var(--sonic-gold), var(--tails-orange));
    color: #060A19;
    box-shadow: 0 0 18px var(--sonic-gold);
}

.pool-tile.used {
    opacity: 0.22;
    transform: scale(0.9);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.2);
}

.builder-controls-footer {
    display: flex;
    justify-content: center;
    gap: 14px;
}

/* Vocab Tab */
.vocab-header-info h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--sonic-gold);
    margin-bottom: 20px;
}

.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.vocab-card {
    background: rgba(6, 10, 25, 0.7);
    border: 1.5px solid rgba(0, 200, 255, 0.3);
    border-radius: 16px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.vocab-card:hover {
    transform: translateY(-4px);
    border-color: var(--sonic-gold);
    box-shadow: 0 6px 18px var(--sonic-gold-glow);
    background: rgba(10, 18, 43, 0.9);
}

.vocab-word {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--sonic-gold);
    margin-bottom: 6px;
}

.vocab-meaning {
    font-size: 1.1rem;
    font-weight: 600;
    color: #E2ECFF;
}

/* ==========================================================================
   MINI-GAMES TAB
   ========================================================================== */
.game-menu.sonic-game-menu h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--sonic-gold);
    text-align: center;
    margin-bottom: 20px;
}

.game-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.game-stage-card {
    position: relative;
    min-height: 220px;
    border-radius: 20px;
    border: 2px solid rgba(0, 200, 255, 0.35);
    background: #080D21;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-card-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center 20%;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(6, 10, 25, 0.35) 0%, rgba(6, 10, 25, 0.85) 55%, rgba(6, 10, 25, 0.98) 100%);
    z-index: 2;
    transition: background 0.3s ease;
}

.game-stage-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--sonic-gold);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8), 0 0 25px var(--sonic-gold-glow);
}

.game-stage-card:hover .game-card-bg-image {
    transform: scale(1.12);
}

.game-stage-card:hover .game-card-overlay {
    background: linear-gradient(180deg, rgba(6, 10, 25, 0.2) 0%, rgba(6, 10, 25, 0.75) 50%, rgba(6, 10, 25, 0.95) 100%);
}

.game-mode-badge {
    position: relative;
    z-index: 3;
    align-self: flex-start;
    background: rgba(0, 81, 255, 0.85);
    border: 1px solid rgba(0, 200, 255, 0.5);
    color: #FFF;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: var(--font-heading);
}

.game-mode-badge.boss-mode {
    background: rgba(255, 23, 68, 0.85);
    border-color: rgba(255, 23, 68, 0.6);
}

.game-mode-badge.emerald-mode {
    background: rgba(0, 230, 118, 0.85);
    border-color: rgba(0, 230, 118, 0.6);
    color: #060A19;
}

.game-card-body {
    position: relative;
    z-index: 3;
    margin-top: 25px;
    margin-bottom: 15px;
}

.game-card-body h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 900;
    color: #FFF;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.9);
    transition: color 0.2s;
}

.game-stage-card:hover .game-card-body h4 {
    color: var(--sonic-gold-bright);
    text-shadow: 0 0 15px var(--sonic-gold-glow);
}

.game-card-body p {
    font-size: 0.9rem;
    color: #D6E4FF;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.game-play-btn {
    position: relative;
    z-index: 3;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--sonic-gold), var(--tails-orange));
    color: #060A19;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 900;
    padding: 8px 18px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.25s ease;
}

.game-stage-card:hover .game-play-btn {
    background: linear-gradient(135deg, #FFF, var(--sonic-gold));
    box-shadow: 0 0 18px var(--sonic-gold);
    transform: translateX(-4px);
}

.game-arena {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hidden,
#game-menu.hidden,
.game-menu.hidden,
.game-arena.hidden {
    display: none !important;
}

.game-arena-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.game-badge {
    background: linear-gradient(135deg, var(--sonic-blue-royal), #04143D);
    border: 1px solid var(--sonic-gold);
    color: var(--sonic-gold);
    padding: 4px 14px;
    border-radius: 16px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
}

.game-hud-indicators {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hud-pill {
    background: rgba(6, 10, 25, 0.85);
    border: 1.5px solid rgba(0, 200, 255, 0.35);
    padding: 4px 12px;
    border-radius: 16px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rings-pill b { color: var(--sonic-gold); }
.speed-pill b { color: var(--sonic-blue-electric); }
.boss-hp-pill b { color: var(--shadow-red); }
.combo-pill b { color: var(--tails-orange); }
.altitude-pill b { color: var(--chaos-green); }

.game-question-banner {
    background: linear-gradient(135deg, rgba(0, 81, 255, 0.22) 0%, rgba(6, 10, 25, 0.92) 50%, rgba(0, 81, 255, 0.22) 100%);
    border: 2px solid var(--sonic-gold);
    border-radius: 18px;
    padding: 14px 22px;
    margin: 8px 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.game-question-banner .q-icon {
    font-size: 1.6rem;
}

.game-question-banner h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 900;
    color: #FFF;
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

.canvas-game-box {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--sonic-gold);
    background: #040714;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 81, 255, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.canvas-game-box canvas {
    display: block;
    width: 100%;
    max-width: 900px;
    height: auto;
    touch-action: none;
    cursor: pointer;
}

.runner-touch-controls, .jumper-touch-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 18px;
    background: rgba(8, 14, 32, 0.95);
    border-top: 1px solid rgba(255, 230, 0, 0.25);
    gap: 10px;
    flex-wrap: wrap;
}

.lane-ctrl-btn, .jumper-ctrl-btn {
    background: linear-gradient(135deg, var(--sonic-blue-royal), #00A2FF);
    color: #FFF;
    border: 1.5px solid var(--sonic-blue-electric);
    padding: 8px 18px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    user-select: none;
}

.lane-ctrl-btn:hover, .jumper-ctrl-btn:hover {
    box-shadow: 0 0 15px var(--sonic-blue-glow);
}

.lane-ctrl-btn:active, .jumper-ctrl-btn:active {
    transform: scale(0.94);
    background: var(--sonic-gold);
    color: #060A19;
    border-color: #FFF;
}

.lane-hint {
    font-size: 0.85rem;
    color: #D6E4FF;
    font-family: var(--font-heading);
    font-weight: 700;
    text-align: center;
    flex: 1;
}

/* ==========================================================================
   WRITING & QUIZ TABS
   ========================================================================== */
.writing-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

.words-to-write {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.write-word-chip {
    background: rgba(6, 10, 25, 0.7);
    border: 1.5px solid rgba(255, 230, 0, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: #FFF;
    cursor: pointer;
    transition: all 0.2s ease;
}

.write-word-chip:hover, .write-word-chip.active {
    background: rgba(0, 81, 255, 0.3);
    border-color: var(--sonic-gold);
    color: var(--sonic-gold);
}

.canvas-wrapper.sonic-canvas-wrap {
    background: #04060F;
    border: 2px solid var(--sonic-gold);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#write-canvas {
    width: 100%;
    height: 300px;
    background: #080D21;
    border-radius: 12px;
    cursor: crosshair;
    touch-action: none;
    border: 1.5px dashed rgba(255, 230, 0, 0.3);
}

.secondary-btn.sonic-btn {
    background: rgba(255, 23, 68, 0.2);
    border: 1px solid var(--shadow-red);
    color: #FFF;
}

.secondary-btn.sonic-btn:hover {
    background: var(--shadow-red);
}

.quiz-card.sonic-quiz-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quiz-q-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--sonic-gold);
    text-align: center;
}

.quiz-options-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.quiz-option-btn {
    background: rgba(10, 18, 43, 0.9);
    border: 1.5px solid rgba(0, 200, 255, 0.3);
    color: #FFF;
    padding: 16px 20px;
    border-radius: 14px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option-btn:hover {
    background: var(--sonic-blue-royal);
    border-color: var(--sonic-gold);
}

/* ==========================================================================
   DRAWING STUDIO MODAL
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.show {
    display: flex;
}

.modal-content.sonic-modal {
    background: #080D21;
    border: 2px solid var(--sonic-gold);
    border-radius: 22px;
    padding: 24px;
    max-width: 750px;
    width: 100%;
    box-shadow: 0 0 35px var(--sonic-gold-glow);
}

.studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.studio-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.studio-sonic-thumb {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.studio-title-box h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--sonic-gold);
}

.close-studio-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFF;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
}

.drawing-challenge-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0, 81, 255, 0.18);
    border: 1px solid var(--sonic-blue-electric);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.challenge-sonic-preview {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    background: #050816;
    border: 2px solid var(--sonic-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reference-sonic-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.challenge-text h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--sonic-gold);
}

.challenge-text p {
    font-size: 0.85rem;
    color: #D6E4FF;
    margin-bottom: 6px;
}

.sonic-character-picker-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.art-thumb {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    object-fit: contain;
    background: #050816;
}

.art-thumb.active {
    border-color: var(--sonic-gold);
    box-shadow: 0 0 8px var(--sonic-gold);
}

.studio-canvas-wrap {
    background: #04060F;
    border: 1.5px solid var(--sonic-gold);
    border-radius: 14px;
    padding: 8px;
    margin-bottom: 14px;
}

#masha-draw-canvas {
    width: 100%;
    height: 260px;
    background: #080D21;
    border-radius: 10px;
    cursor: crosshair;
    touch-action: none;
}

.studio-tools-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

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

.color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

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

.brush-size-picker {
    display: flex;
    gap: 6px;
}

.size-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFF;
    padding: 4px 12px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.size-btn.active {
    background: var(--sonic-blue-royal);
    border-color: var(--sonic-gold);
    color: var(--sonic-gold);
}

.studio-actions-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.primary-btn.sonic-btn.btn-gold {
    background: linear-gradient(135deg, var(--sonic-gold), var(--tails-orange));
    color: #050816;
    font-weight: 900;
}

/* Checklist & Celebration Modals */
.checklist-header-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.checklist-sonic-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(10, 18, 43, 0.85);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 230, 0, 0.2);
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFF;
    cursor: pointer;
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--sonic-gold);
}

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

.celebration-sonic-box {
    width: 100px;
    height: 100px;
}

.celebration-sonic-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px var(--sonic-gold));
}

.reward-stars {
    font-size: 2.2rem;
    letter-spacing: 10px;
}

/* Footer */
.app-footer.sonic-footer {
    background: rgba(5, 8, 20, 0.95);
    border-top: 1px solid rgba(255, 230, 0, 0.2);
    padding: 16px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.footer-link {
    color: var(--sonic-gold);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 900px) {
    .header-top {
        flex-direction: column;
        gap: 14px;
    }
    .writing-layout {
        grid-template-columns: 1fr;
    }
    .spelling-top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .spelling-custom-input-box {
        max-width: 100%;
    }
    .hero-word-text {
        font-size: 2.7rem;
    }
    .sentence-card {
        flex-direction: column;
        align-items: flex-start;
        font-size: 1.25rem;
    }
    .sentence-actions-wrap {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ==========================================================================
   ⚡ SUPER SONIC RADIANT HERO SHOWCASE (Profile Click Effect)
   ========================================================================== */
.sonic-hero-showcase {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 6, 18, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    cursor: pointer;
    overflow: hidden;
}

.sonic-hero-showcase.active {
    opacity: 1;
    visibility: visible;
}

.hero-burst-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: scale(0.7);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sonic-hero-showcase.active .hero-burst-container {
    transform: scale(1);
    animation: heroFloat 3s ease-in-out infinite alternate;
}

/* Rotating Radiant Sunburst Rays */
.sunburst-rays {
    position: absolute;
    width: 680px;
    height: 680px;
    border-radius: 50%;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(255, 230, 0, 0.85) 0deg 12deg,
        rgba(255, 170, 0, 0.18) 12deg 24deg
    );
    filter: blur(12px);
    animation: rotateSunburst 9s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes rotateSunburst {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Concentric Radiant Shockwave Rings */
.shockwave-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid #FFE600;
    box-shadow: 0 0 25px #FFE600, inset 0 0 25px #FFE600;
    z-index: 2;
    pointer-events: none;
    animation: shockwavePulse 2.2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.shockwave-ring.ring-1 {
    width: 320px;
    height: 320px;
    animation-delay: 0s;
}

.shockwave-ring.ring-2 {
    width: 440px;
    height: 440px;
    animation-delay: 0.6s;
}

.shockwave-ring.ring-3 {
    width: 560px;
    height: 560px;
    animation-delay: 1.2s;
}

@keyframes shockwavePulse {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
        border-color: #FFF585;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
        border-color: #FF9100;
    }
}

/* Blazing Radiant Core Light */
.golden-core-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFFFFF 0%, #FFF585 25%, #FFE600 55%, #FF9100 80%, transparent 95%);
    filter: blur(35px);
    box-shadow: 0 0 100px rgba(255, 230, 0, 0.9);
    z-index: 3;
    pointer-events: none;
    animation: corePulse 1.8s ease-in-out infinite alternate;
}

@keyframes corePulse {
    0% {
        transform: scale(0.9);
        opacity: 0.85;
        filter: blur(30px);
    }
    100% {
        transform: scale(1.15);
        opacity: 1;
        filter: blur(45px);
    }
}

/* Super Sonic Hero Figure */
.super-sonic-hero-img {
    position: relative;
    width: 320px;
    height: 320px;
    object-fit: contain;
    z-index: 5;
    filter: drop-shadow(0 0 35px #FFE600) drop-shadow(0 0 70px rgba(255, 230, 0, 0.9)) drop-shadow(0 15px 30px rgba(0, 0, 0, 0.8));
    animation: heroFigurePulse 2.5s ease-in-out infinite alternate;
}

@keyframes heroFigurePulse {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes heroFloat {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-8px);
    }
}

/* Hero Caption Card */
.hero-caption-card {
    position: relative;
    z-index: 6;
    margin-top: -15px;
    background: rgba(8, 14, 35, 0.95);
    border: 2px solid var(--sonic-gold);
    border-radius: 24px;
    padding: 16px 36px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px var(--sonic-gold-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hero-title-badge {
    background: linear-gradient(135deg, var(--sonic-gold), var(--tails-orange));
    color: #060A19;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 900;
    padding: 4px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-name-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: #FFF;
    text-shadow: 0 0 20px var(--sonic-gold), 0 2px 10px #000;
    margin: 4px 0 0 0;
}

.hero-motto {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sonic-gold-bright);
    margin: 0;
}

.hero-close-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}
