/* ==========================================================================
   🎮 ROBLOX MATH THEME - AMIR MOHAMMED (3RD GRADE MATHEMATICS)
   ثيم ألعاب روبلوكس لمنصة الرياضيات - الطالب البطل أمير محمد
   ========================================================================== */

:root {
    /* Roblox Signature Colors */
    --roblox-red: #E2231A;
    --roblox-red-dark: #A5140D;
    --roblox-red-glow: rgba(226, 35, 26, 0.45);
    --roblox-blue: #00A2FF;
    --roblox-blue-glow: rgba(0, 162, 255, 0.45);
    --roblox-green: #00B06F;
    --roblox-green-glow: rgba(0, 176, 111, 0.4);
    --roblox-gold: #FFD700;
    --roblox-gold-glow: rgba(255, 215, 0, 0.45);
    
    /* Dark Gaming Theme Palette */
    --roblox-bg: #121316;
    --roblox-panel: #1A1C20;
    --roblox-card: #24272D;
    --roblox-card-hover: #2F333B;
    --roblox-border: #383D47;
    --roblox-border-glow: rgba(0, 162, 255, 0.3);

    /* System Variable Mapping */
    --primary-color: #E2231A;
    --primary-light: #FF4A42;
    --secondary-color: #00A2FF;
    --secondary-light: #52BFFF;
    --accent-color: #FFD700;
    --accent-light: #FFEAA7;
    --success-color: #00B06F;
    --danger-color: #E2231A;
    --background-color: #121316;
    --card-bg: #24272D;
    --text-main: #FFFFFF;
    --text-muted: #9DA3AE;
    
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 12px 30px rgba(226, 35, 26, 0.35);
    --border-radius: 14px;
    --transition-speed: 0.25s;
}

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

body.roblox-theme {
    font-family: 'Cairo', 'Changa', 'Tajawal', sans-serif;
    background-color: var(--roblox-bg);
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 10% 20%, rgba(226, 35, 26, 0.12), transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(0, 162, 255, 0.12), transparent 35%);
    background-size: 36px 36px, 36px 36px, 100% 100%, 100% 100%;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    direction: rtl;
}

/* =========================================
   Floating Roblox Game Blocks & Math Symbols
   ========================================= */
.roblox-floating-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.r-blox {
    position: absolute;
    font-size: 2.2rem;
    opacity: 0.22;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
    animation: floatBlox 8s ease-in-out infinite alternate;
}

.blox-1 { top: 10%; right: 7%; animation-delay: 0s; }
.blox-2 { top: 32%; left: 5%; animation-delay: 1.5s; font-size: 2.5rem; }
.blox-3 { top: 70%; right: 10%; animation-delay: 3s; }
.blox-4 { top: 52%; right: 3%; animation-delay: 2s; }
.blox-5 { top: 20%; left: 16%; animation-delay: 4s; font-size: 1.8rem; }
.blox-6 { top: 80%; left: 8%; animation-delay: 2.5s; font-size: 2.3rem; }
.blox-7 { top: 65%; left: 45%; animation-delay: 5s; }
.blox-8 { top: 8%; left: 40%; animation-delay: 3.5s; font-size: 2.6rem; }
.blox-9 { top: 40%; right: 40%; animation-delay: 4.5s; font-size: 2.4rem; }
.blox-10 { top: 88%; right: 30%; animation-delay: 1s; }

@keyframes floatBlox {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(15deg); }
    100% { transform: translateY(10px) rotate(-10deg); }
}

/* =========================================
   Roblox Header & Navigation
   ========================================= */
.app-header.roblox-header {
    background: linear-gradient(180deg, #1C1E23 0%, #15171B 100%);
    color: #FFF;
    padding: 1.8rem 5% 1.4rem 5%;
    border-bottom: 4px solid var(--roblox-red);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 4px 15px var(--roblox-red-glow);
    position: relative;
    z-index: 10;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Gamer Profile Badge */
.user-info.roblox-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(36, 39, 45, 0.9);
    padding: 0.5rem 1.1rem 0.5rem 0.6rem;
    border-radius: 12px;
    border: 2px solid var(--roblox-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.1);
    transition: transform var(--transition-speed);
}

.user-info.roblox-badge:hover {
    transform: translateY(-2px);
    border-color: var(--roblox-gold);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.user-profile {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    position: relative;
    background: #141619;
    border: 2px solid var(--roblox-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

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

.gamer-lvl {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: var(--roblox-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #FFF;
    font-family: 'Fredoka', 'Cairo', sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.user-text-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #FFF;
    line-height: 1.2;
}

.user-sub {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--roblox-gold);
    letter-spacing: 0.5px;
    font-family: 'Fredoka', 'Cairo', sans-serif;
}

/* 3D Roblox Cube Logo */
.logo.roblox-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    user-select: none;
}

.roblox-cube {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #E2231A 0%, #A5140D 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 6px 0 #670803,
        0 8px 16px rgba(226, 35, 26, 0.5),
        inset 0 2px 3px rgba(255, 255, 255, 0.4);
    transform: rotate(-8deg);
    transition: transform var(--transition-speed);
}

.logo.roblox-logo:hover .roblox-cube {
    transform: rotate(0deg) scale(1.08);
}

.roblox-cube span {
    color: #FFF;
    font-family: 'Fredoka', 'Changa', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.logo-text h1 {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFF;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.logo-sub {
    font-family: 'Fredoka', 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--roblox-blue);
    letter-spacing: 1px;
}

/* Header Navigation Actions */
.header-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.roblox-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #24272D;
    color: #FFF;
    border: 2px solid var(--roblox-border);
    padding: 0.45rem 1.1rem;
    border-radius: 10px;
    font-family: 'Cairo', 'Changa', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 3px 0 #181A1E;
    white-space: nowrap;
}

.roblox-header-btn:hover {
    background: #32363F;
    border-color: var(--roblox-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #181A1E;
}

.roblox-header-btn.game-btn {
    background: #2B2129;
    border-color: #FF0055;
    color: #FFF;
    box-shadow: 0 3px 0 #880E4F;
}

.roblox-header-btn.game-btn:hover {
    background: linear-gradient(135deg, #FF0055, #E2231A);
    border-color: #FF80AB;
    color: #FFF;
    box-shadow: 0 5px 0 #880E4F, 0 0 16px rgba(255, 0, 85, 0.6);
}

.roblox-header-btn.trophy-btn:hover {
    border-color: var(--roblox-gold);
    color: var(--roblox-gold);
}

.portal-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #24272D;
    border: 2px solid var(--roblox-border);
    border-radius: 10px;
    color: #FFF;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 3px 0 #181A1E;
}

.portal-home-btn:hover {
    background: #32363F;
    border-color: var(--roblox-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #181A1E;
}

/* Welcome Hero Strip */
.header-hero-strip {
    margin-top: 1.2rem;
    background: rgba(36, 39, 45, 0.7);
    border: 1px solid var(--roblox-border);
    border-radius: 12px;
    padding: 0.65rem 1.4rem;
    text-align: center;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.hero-strip-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.hero-roblox-greeting {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--roblox-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.hero-divider {
    color: var(--roblox-border);
    font-weight: 900;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: #CFD3DC;
    font-weight: 600;
}

/* Obby Progress Track */
.progress-container.roblox-progress {
    margin-top: 1.4rem;
    background: #181A1D;
    border: 2px solid var(--roblox-border);
    border-radius: 14px;
    padding: 0.8rem 1.4rem;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--roblox-blue);
    margin-bottom: 0.6rem;
}

.obby-target {
    color: var(--roblox-gold);
}

.progress-track-wrap {
    position: relative;
    height: 18px;
    display: flex;
    align-items: center;
}

.progress-branch {
    position: absolute;
    left: 40px;
    right: 40px;
    height: 12px;
    background: #24272D;
    border-radius: 6px;
    border: 1px solid #3A3E47;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.6);
    overflow: hidden;
}

.progress-branch::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(0, 162, 255, 0.25),
        rgba(0, 162, 255, 0.25) 10px,
        transparent 10px,
        transparent 20px
    );
    animation: moveTrack 2s linear infinite;
}

@keyframes moveTrack {
    from { background-position: 0 0; }
    to { background-position: 40px 0; }
}

.butterfly-indicator.roblox-runner {
    position: absolute;
    right: 40px;
    transition: right 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
    animation: runnerJump 0.8s ease-in-out infinite alternate;
}

@keyframes runnerJump {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

.runner-avatar-token {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--roblox-gold);
    object-fit: cover;
    box-shadow: 0 0 12px var(--roblox-gold);
    display: block;
}

.lantern-end.roblox-trophy {
    position: absolute;
    left: 0;
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 0 10px var(--roblox-gold-glow));
    animation: trophyGaze 1.5s ease-in-out infinite alternate;
}

@keyframes trophyGaze {
    0% { transform: scale(1); }
    100% { transform: scale(1.15) rotate(5deg); }
}

/* =========================================
   App Container & Views
   ========================================= */
.app-container {
    max-width: 1250px;
    width: 92%;
    margin: 2rem auto;
    flex: 1;
    position: relative;
    z-index: 1;
}

.hidden,
.view.hidden,
.ai-bot-modal.hidden,
#ai-bot-modal.hidden {
    display: none !important;
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title-wrap h2 {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #FFF;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.section-title-wrap p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Multiplication Big Button */
.mult-simple-btn-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.mult-simple-btn.roblox-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #FFB300, #FF8F00);
    color: #121316;
    border: 3px solid #FFF8E1;
    padding: 0.9rem 2.2rem;
    border-radius: 16px;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.35rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 0 #B26A00, 0 10px 25px rgba(255, 179, 0, 0.45);
    transition: all 0.2s ease;
}

.mult-simple-btn.roblox-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 #B26A00, 0 15px 30px rgba(255, 179, 0, 0.6);
    filter: brightness(1.05);
}

.mult-simple-btn.roblox-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #B26A00;
}

.mult-simple-btn .btn-tag {
    background: rgba(0, 0, 0, 0.18);
    color: #000;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
}

/* =========================================
   Chapter Grid & Roblox Cards
   ========================================= */
.math-chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
}

.math-chapter-card {
    background: #1E2127;
    border: 2px solid var(--roblox-border);
    border-radius: 18px;
    padding: 1.5rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
}

.math-chapter-card:hover {
    transform: translateY(-6px);
    border-color: var(--chapter-color, var(--roblox-blue));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 162, 255, 0.3);
    background: #252932;
}

.math-card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.math-chapter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--roblox-gold);
}

.card-speaker-btn {
    background: #2A2E38;
    border: 1px solid var(--roblox-border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    color: #FFF;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.card-speaker-btn:hover {
    background: #363B47;
    border-color: var(--roblox-blue);
}

.math-card-stage {
    position: relative;
    text-align: center;
    margin-bottom: 1.2rem;
}

.math-masha-bubble {
    width: 105px;
    height: 105px;
    border-radius: 20px;
    background: #14161A;
    border: 3px solid var(--chapter-color, var(--roblox-blue));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 162, 255, 0.3);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.math-chapter-card:hover .math-masha-bubble {
    transform: scale(1.08) rotate(-4deg);
    border-color: #FFF;
}

.math-masha-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.math-operator-stamp {
    position: absolute;
    bottom: -6px;
    right: calc(50% - 60px);
    background: var(--chapter-color, var(--roblox-red));
    color: #FFF;
    padding: 3px 10px;
    border-radius: 12px;
    border: 2px solid #FFF;
    font-family: 'Fredoka', 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 4px;
}

.math-card-info {
    flex: 1;
    margin-bottom: 1.2rem;
}

.math-topic-badge {
    display: inline-block;
    color: var(--roblox-blue);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.math-card-title {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #FFF;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.math-progress-wrap {
    background: #141619;
    border: 1px solid #2B2F38;
    border-radius: 10px;
    padding: 8px 12px;
}

.math-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 5px;
}

.math-progress-bar {
    height: 8px;
    background: #252830;
    border-radius: 4px;
    overflow: hidden;
}

.math-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--roblox-blue), var(--roblox-green));
    border-radius: 4px;
    transition: width 0.4s ease;
}

.math-enter-btn {
    width: 100%;
    background: #2A2E38;
    border: 2px solid var(--roblox-border);
    color: #FFF;
    padding: 0.75rem;
    border-radius: 12px;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 0 #121418;
}

.math-chapter-card:hover .math-enter-btn {
    background: linear-gradient(135deg, var(--roblox-red), #B3140C);
    border-color: #FF7088;
    box-shadow: 0 4px 15px var(--roblox-red-glow);
}

/* =========================================
   Chapter View & Obby Lessons Path
   ========================================= */
.sub-view-header {
    text-align: center;
    margin-bottom: 2.2rem;
    position: relative;
}

.sub-view-header .sub-view-title-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.6rem;
}

.sub-view-header h1 {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFF;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.sub-view-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.roblox-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #24272D;
    color: #FFF;
    border: 2px solid var(--roblox-border);
    padding: 0.55rem 1.4rem;
    border-radius: 12px;
    font-family: 'Cairo', 'Changa', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 #14161A;
    margin-bottom: 1rem;
}

.roblox-back-btn:hover {
    background: #32363F;
    border-color: var(--roblox-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #14161A;
}

/* Wavy Obby Lessons Path */
.lesson-path-container.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6rem;
    padding: 1rem 0;
}

.lesson-adventure-card {
    background: #1E2127;
    border: 2px solid var(--roblox-border);
    border-radius: 18px;
    padding: 1.4rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.lesson-adventure-card:hover {
    transform: translateY(-6px);
    border-color: var(--roblox-gold);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 215, 0, 0.3);
    background: #252932;
}

.card-header-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.lesson-status-pill {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 10px;
}

.lesson-status-pill.new {
    background: rgba(0, 162, 255, 0.15);
    color: var(--roblox-blue);
    border: 1px solid var(--roblox-blue);
}

.lesson-status-pill.completed {
    background: rgba(0, 176, 111, 0.15);
    color: var(--roblox-green);
    border: 1px solid var(--roblox-green);
}

.card-stage-bubble {
    width: 90px;
    height: 90px;
    border-radius: 18px;
    background: #14161A;
    border: 3px solid var(--roblox-gold);
    margin: 0 auto 1rem auto;
    overflow: hidden;
    box-shadow: 0 0 15px var(--roblox-gold-glow);
    transition: transform 0.25s ease;
}

.lesson-adventure-card:hover .card-stage-bubble {
    transform: scale(1.1) rotate(5deg);
    border-color: #FFF;
}

.card-masha-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-info-section {
    flex: 1;
    text-align: center;
    margin-bottom: 1rem;
}

.card-info-section .card-title {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFF;
    margin-bottom: 0.4rem;
}

.card-type-chip {
    font-size: 0.85rem;
    color: var(--roblox-blue);
    font-weight: 700;
}

.card-action-btn {
    width: 100%;
    background: #2A2E38;
    border: 2px solid var(--roblox-border);
    color: #FFF;
    padding: 0.65rem;
    border-radius: 12px;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 0 #121418;
}

.lesson-adventure-card:hover .card-action-btn {
    background: linear-gradient(135deg, var(--roblox-blue), #0070BA);
    border-color: #70CFFF;
    box-shadow: 0 4px 15px rgba(0, 162, 255, 0.4);
}

/* =========================================
   Lesson Mode: Hide Header & Top Bar
   ========================================= */
body.lesson-mode .app-header {
    display: none !important;
}

body.lesson-mode .app-container {
    padding-top: 1.5rem;
}

.lesson-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1C1F26;
    border: 2px solid var(--roblox-border);
    border-radius: 16px;
    padding: 0.8rem 1.5rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 162, 255, 0.15);
    gap: 12px;
    flex-wrap: wrap;
}

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

.lesson-title-box h1 {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--roblox-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.lesson-sub-chapter {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.home-nav-btn {
    margin-bottom: 0;
}

.lesson-tabs {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: #24272D;
    border: 2px solid var(--roblox-border);
    color: #FFF;
    padding: 0.75rem 1.6rem;
    border-radius: 14px;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 #14161A;
}

.tab-btn:hover {
    background: #2E333D;
    border-color: var(--roblox-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #14161A;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--roblox-red), #B3140C);
    border-color: #FF7088;
    color: #FFF;
    box-shadow: 0 4px 0 #6A0803, 0 0 15px var(--roblox-red-glow);
}

/* Content Wrapper & Cards */
.content-wrapper {
    background: #1A1C20;
    border: 2px solid var(--roblox-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.pane {
    display: none;
}

.pane.active {
    display: block;
    animation: fadeIn 0.35s ease-in-out;
}

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

.card {
    background: #24272D;
    border: 2px solid var(--roblox-border);
    border-radius: 16px;
    padding: 1.8rem;
    margin-bottom: 1.5rem;
    color: #FFF;
}

/* Blackboard / Interactive Teacher Zone */
.interactive-blackboard {
    background: #0E1013;
    border: 4px solid #383D47;
    border-radius: 18px;
    padding: 1.8rem;
    margin: 1.5rem 0;
    color: #FFF;
    box-shadow: inset 0 3px 10px rgba(0,0,0,0.8);
}

.teacher-bubble {
    background: #2A2E38;
    border: 2px solid var(--roblox-gold);
    border-radius: 14px;
    padding: 1.2rem;
    color: #FFF;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form Inputs in Dark Theme */
input[type="text"], input[type="number"], select {
    background: #181A1E;
    border: 2px solid var(--roblox-border);
    border-radius: 10px;
    color: #FFF;
    padding: 0.6rem 1rem;
    font-family: 'Cairo', 'Changa', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus {
    outline: none;
    border-color: var(--roblox-blue);
    box-shadow: 0 0 12px rgba(0, 162, 255, 0.4);
}

/* =========================================
   Multiplication Table Styling
   ========================================= */
.mult-nav-bar {
    margin-bottom: 2rem;
}

.mult-tabs-scroll {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.6rem 0.2rem;
    scrollbar-width: thin;
}

.mult-tab-btn {
    background: #24272D;
    border: 2px solid var(--roblox-border);
    color: #FFF;
    padding: 0.6rem 1.4rem;
    border-radius: 12px;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 3px 0 #14161A;
}

.mult-tab-btn:hover {
    background: #32363F;
    border-color: var(--roblox-blue);
    transform: translateY(-2px);
}

.mult-tab-btn.active {
    background: linear-gradient(135deg, var(--roblox-blue), #0070BA);
    border-color: #70CFFF;
    box-shadow: 0 4px 0 #004573, 0 0 15px rgba(0, 162, 255, 0.45);
}

.mult-tab-btn.full-grid-tab.active {
    background: linear-gradient(135deg, var(--roblox-green), #007A4D);
    border-color: #5CFFB0;
}

.mult-tab-btn.quiz-tab.active {
    background: linear-gradient(135deg, #FFB300, #FF8F00);
    color: #000;
    border-color: #FFF;
}

.mult-grid-table {
    width: 100%;
    border-collapse: collapse;
    background: #1C1F26;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--roblox-border);
}

.mult-grid-table th, .mult-grid-table td {
    padding: 0.8rem;
    text-align: center;
    border: 1px solid var(--roblox-border);
    font-family: 'Changa', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
}

.mult-grid-table th {
    background: #282C36;
    color: var(--roblox-gold);
}

.mult-grid-table td {
    cursor: pointer;
    transition: all 0.15s ease;
}

.mult-grid-table td:hover {
    background: var(--roblox-blue);
    color: #FFF;
    transform: scale(1.15);
    box-shadow: 0 0 12px var(--roblox-blue);
    z-index: 2;
    position: relative;
}

/* Quiz Challenge Box */
.mult-quiz-box {
    background: #1C1F26;
    border: 3px solid var(--roblox-gold);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.3);
}

.quiz-opt-btn {
    background: #272B35;
    border: 2px solid var(--roblox-border);
    color: #FFF;
    font-family: 'Changa', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    padding: 1rem 2rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 #121418;
    min-width: 110px;
}

.quiz-opt-btn:hover {
    background: #333845;
    border-color: var(--roblox-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 0 #121418;
}

/* =========================================
   Roblox Achievements Room
   ========================================= */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
}

.badge-card {
    background: #1E2127;
    border: 2px solid var(--roblox-border);
    border-radius: 18px;
    padding: 1.6rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    transition: transform 0.25s ease;
}

.badge-card:hover {
    transform: translateY(-4px);
    border-color: var(--roblox-gold);
}

.badge-card.unlocked {
    border-color: var(--roblox-gold);
    background: linear-gradient(145deg, #252830, #2C261B);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.35);
}

.badge-icon {
    font-size: 3.2rem;
    display: block;
    margin-bottom: 0.6rem;
}

/* =========================================
   Roblox Supercharged Profile 7-Second Effects
   ========================================= */
.user-info.roblox-badge.roblox-supercharged {
    border-color: #00E5FF !important;
    animation: superchargedPulse 0.4s infinite alternate !important;
    transform: scale(1.08) !important;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.8), 0 0 50px rgba(255, 0, 85, 0.7) !important;
}

@keyframes superchargedPulse {
    0% {
        box-shadow: 0 0 20px #00E5FF, 0 0 40px #FF0055, inset 0 0 15px #FFD700;
        border-color: #00E5FF;
    }
    100% {
        box-shadow: 0 0 35px #FF0055, 0 0 70px #00E5FF, inset 0 0 25px #00FF88;
        border-color: #FFD700;
        transform: scale(1.12);
    }
}

.roblox-supercharged .user-profile {
    animation: avatarDiscoGlow 0.35s infinite linear !important;
    border-color: #FFF !important;
}

@keyframes avatarDiscoGlow {
    0% { box-shadow: 0 0 20px #FF0055, 0 0 40px #00E5FF; transform: rotate(-4deg); }
    50% { box-shadow: 0 0 30px #FFD700, 0 0 60px #00FF88; transform: rotate(4deg); }
    100% { box-shadow: 0 0 25px #00E5FF, 0 0 50px #FF0055; transform: rotate(-4deg); }
}

.roblox-supercharged .gamer-lvl {
    background: linear-gradient(90deg, #FF0055, #FFD700, #00E5FF) !important;
    color: #000 !important;
    font-weight: 900 !important;
    font-size: 0.75rem !important;
    animation: rainbowShift 0.5s infinite linear !important;
}

@keyframes rainbowShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Screen RGB Laser Border Overlay */
.roblox-screen-lasers {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
}

.roblox-screen-lasers.active {
    opacity: 1;
    border: 8px solid transparent;
    animation: screenLaserAnim 0.6s infinite linear, laserPulse 0.4s infinite alternate;
}

@keyframes screenLaserAnim {
    0% {
        box-shadow: inset 0 0 30px #FF0055, inset 0 0 60px rgba(255, 0, 85, 0.4);
        border-color: #FF0055;
    }
    25% {
        box-shadow: inset 0 0 30px #00E5FF, inset 0 0 60px rgba(0, 229, 255, 0.4);
        border-color: #00E5FF;
    }
    50% {
        box-shadow: inset 0 0 30px #FFD700, inset 0 0 60px rgba(255, 215, 0, 0.4);
        border-color: #FFD700;
    }
    75% {
        box-shadow: inset 0 0 30px #00FF88, inset 0 0 60px rgba(0, 255, 136, 0.4);
        border-color: #00FF88;
    }
    100% {
        box-shadow: inset 0 0 30px #FF0055, inset 0 0 60px rgba(255, 0, 85, 0.4);
        border-color: #FF0055;
    }
}

@keyframes laserPulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Level Up Floating Toast */
.roblox-powerup-toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px) scale(0.7);
    background: linear-gradient(135deg, rgba(226, 35, 26, 0.95), rgba(0, 162, 255, 0.95));
    border: 3px solid #FFD700;
    border-radius: 30px;
    padding: 10px 28px;
    color: #FFFFFF;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.7);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.roblox-powerup-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0px) scale(1);
    animation: toastBob 0.6s infinite alternate ease-in-out;
}

@keyframes toastBob {
    0% { transform: translateX(-50%) translateY(0px) scale(1); }
    100% { transform: translateX(-50%) translateY(-6px) scale(1.04); }
}

/* Burst Blox Particles */
.roblox-burst-particle {
    position: fixed;
    font-size: 1.8rem;
    pointer-events: none;
    z-index: 10001;
    animation: particleFly 1.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

@keyframes particleFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.6) rotate(0deg);
    }
    60% {
        opacity: 1;
        transform: translate(var(--tx), var(--ty)) scale(1.4) rotate(360deg);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--tx) * 1.3), calc(var(--ty) + 120px)) scale(0.8) rotate(720deg);
    }
}

/* =========================================
   AI Roblox Math Bot
   ========================================= */
.ai-bot-btn.roblox-bot-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--roblox-red) 0%, #A5140D 100%);
    color: white;
    border: 3px solid var(--roblox-gold);
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(226, 35, 26, 0.6), 0 0 15px var(--roblox-gold-glow);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-speed);
    animation: botPulse 2.5s infinite;
}

@keyframes botPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(226, 35, 26, 0.6); }
    50% { transform: scale(1.08); box-shadow: 0 12px 30px rgba(0, 162, 255, 0.8), 0 0 20px var(--roblox-gold); }
}

.ai-bot-modal.roblox-bot-modal {
    position: fixed;
    bottom: 105px;
    left: 30px;
    width: 360px;
    max-width: 90vw;
    background: #1A1C20;
    border: 2px solid var(--roblox-border);
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 162, 255, 0.3);
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.ai-bot-header.roblox-panel-header {
    background: linear-gradient(135deg, var(--roblox-red) 0%, #B3140C 100%);
    color: white;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-bot-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    font-family: 'Changa', sans-serif;
}

.close-bot-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}

.close-bot-btn:hover { background: rgba(255,255,255,0.4); }

.ai-bot-messages {
    padding: 16px;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #141619;
}

.bot-message {
    background: #24272D;
    border: 1px solid var(--roblox-border);
    border-radius: 12px;
    padding: 12px 14px;
    color: #FFF;
    font-size: 0.95rem;
    line-height: 1.5;
}

.user-message {
    background: linear-gradient(135deg, var(--roblox-blue), #0070BA);
    color: #FFF;
    border-radius: 12px;
    padding: 10px 14px;
    align-self: flex-start;
    font-size: 0.95rem;
    font-weight: 700;
}

.ai-bot-input-area {
    padding: 12px;
    background: #1A1C20;
    border-top: 1px solid var(--roblox-border);
    display: flex;
    gap: 8px;
}

.send-bot-btn.roblox-btn {
    background: var(--roblox-red);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    font-family: 'Changa', sans-serif;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s;
}

.send-bot-btn.roblox-btn:hover {
    background: #FF2442;
}

/* =========================================
   Footer & Copyright Link
   ========================================= */
.app-footer.site-footer {
    background: #14161A;
    border-top: 2px solid var(--roblox-border);
    padding: 1.6rem 20px;
    margin-top: auto;
    text-align: center;
    position: relative;
    z-index: 5;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9DA3AE;
    text-decoration: none;
    font-family: 'Cairo', 'Changa', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 8px 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.25s ease;
}

.footer-link:hover {
    color: #00E5FF;
    background: rgba(0, 229, 255, 0.1);
    border-color: #00E5FF;
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(0, 229, 255, 0.35);
}

/* =========================================
   🎮 Roblox Mini-Games Section (ألعاب وتحديات روبلوكس)
   ========================================= */
.games-menu-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.games-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.game-card {
    background: #1E2127;
    border: 2px solid var(--roblox-border);
    border-radius: 18px;
    padding: 1.8rem 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 0 #121418, 0 10px 20px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-6px);
    background: #272C36;
    border-color: var(--roblox-blue);
    box-shadow: 0 10px 0 #121418, 0 15px 30px rgba(0, 162, 255, 0.35);
}

.game-card:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #121418;
}

.game-card .game-icon {
    font-size: 3.8rem;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.3));
    transition: transform 0.25s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.15) rotate(6deg);
}

.game-card .game-title {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: #FFF;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.game-card .game-tag {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--roblox-gold);
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 3px 12px;
    border-radius: 12px;
}

/* Game In-Action Header & Stage */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #16181D;
    border: 2px solid var(--roblox-border);
    border-radius: 14px;
    padding: 0.8rem 1.4rem;
    margin-bottom: 1.5rem;
    gap: 10px;
    flex-wrap: wrap;
}

.game-header h3 {
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--roblox-gold);
    margin: 0;
}

.game-header .back-btn {
    background: #24272D;
    border: 2px solid var(--roblox-border);
    color: #FFF;
    padding: 0.45rem 1.1rem;
    border-radius: 10px;
    font-family: 'Cairo', 'Changa', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 0 #121418;
}

.game-header .back-btn:hover {
    background: #32363F;
    border-color: var(--roblox-blue);
    transform: translateY(-2px);
}

.game-question {
    background: #14161A;
    border: 2px solid var(--roblox-gold);
    border-radius: 16px;
    padding: 1.4rem;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #FFF;
    text-align: center;
    margin: 1.5rem 0;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2), inset 0 2px 8px rgba(0,0,0,0.6);
}

/* 1. Meteor Game */
.meteor-container {
    position: relative;
    height: 360px;
    background: #0E1013;
    border: 2px solid var(--roblox-border);
    border-radius: 18px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.meteor {
    position: absolute;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFB300, #E2231A);
    border: 3px solid #FFF;
    color: #FFF;
    font-family: 'Changa', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(226, 35, 26, 0.7);
    transition: transform 0.15s ease;
    user-select: none;
    z-index: 5;
}

.meteor:hover {
    transform: scale(1.1);
    box-shadow: 0 0 35px rgba(0, 162, 255, 0.9);
    border-color: #00E5FF;
}

/* 2. Energy Race */
.energy-track {
    position: relative;
    height: 40px;
    background: #141619;
    border: 2px solid var(--roblox-border);
    border-radius: 20px;
    margin: 1.5rem 0;
    overflow: visible;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
}

.energy-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00A2FF, #00FF88);
    border-radius: 20px;
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.robot-runner {
    position: absolute;
    top: -12px;
    transform: translateX(-50%);
    font-size: 2.5rem;
    transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 12px var(--roblox-gold));
    line-height: 1;
}

.energy-options {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.energy-btn {
    background: #24272D;
    border: 2px solid var(--roblox-border);
    color: #FFF;
    font-family: 'Changa', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    padding: 12px 32px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 0 #121418;
    transition: all 0.2s ease;
    min-width: 100px;
}

.energy-btn:hover {
    background: #333845;
    border-color: var(--roblox-blue);
    transform: translateY(-3px);
    box-shadow: 0 7px 0 #121418, 0 0 15px rgba(0, 162, 255, 0.4);
}

/* 3. Circuit / Blox Matching Cards */
.circuit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    max-width: 580px;
    margin: 1.5rem auto;
}

.circuit-card {
    height: 110px;
    perspective: 1000px;
    cursor: pointer;
}

.circuit-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    border-radius: 14px;
}

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

.circuit-front, .circuit-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 2px solid var(--roblox-border);
    font-family: 'Changa', sans-serif;
    font-weight: 800;
    text-align: center;
    padding: 8px;
    box-sizing: border-box;
}

.circuit-front {
    background: #1E2127;
    color: var(--roblox-gold);
    font-size: 2.2rem;
    box-shadow: 0 4px 0 #121418;
}

.circuit-back {
    background: linear-gradient(135deg, var(--roblox-blue), #0070BA);
    color: #FFF;
    transform: rotateY(180deg);
    border-color: #70CFFF;
    font-size: 1.25rem;
    box-shadow: 0 4px 0 #004573;
}

.circuit-card.matched .circuit-back {
    background: linear-gradient(135deg, var(--roblox-green), #007A4D);
    border-color: #5CFFB0;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

/* 4. Processor / Bot Assembly */
.processor-container {
    max-width: 520px;
    margin: 1.5rem auto;
    text-align: center;
}

.robot-screen {
    background: #0E1013;
    border: 3px solid var(--roblox-border);
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 1.8rem;
    font-family: 'Changa', 'Cairo', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #FFF;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

.robot-screen.error {
    border-color: #FF0055;
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.6);
}

.missing-slot {
    display: inline-block;
    width: 75px;
    height: 42px;
    border-bottom: 3px dashed var(--roblox-gold);
    vertical-align: middle;
    margin: 0 6px;
}

.processor-parts {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.part {
    background: #24272D;
    border: 2px solid var(--roblox-border);
    color: #FFF;
    font-family: 'Changa', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    padding: 12px 30px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 0 #121418;
    transition: all 0.2s ease;
}

.part:hover {
    background: #333845;
    border-color: var(--roblox-gold);
    transform: translateY(-3px);
    box-shadow: 0 7px 0 #121418, 0 0 15px rgba(255, 215, 0, 0.4);
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media (max-width: 768px) {
    .app-header.roblox-header { padding: 1.2rem 4%; }
    .header-top { flex-direction: column; gap: 0.9rem; text-align: center; }
    .header-nav-actions { justify-content: center; width: 100%; }
    .hero-strip-content { flex-direction: column; gap: 0.3rem; }
    .hero-divider { display: none; }
    .math-chapters-grid { grid-template-columns: 1fr; }
    .lesson-header-bar { flex-direction: column; text-align: center; }
}
