/* ===== LEGENDSX ACADEMY - HOME PAGE STYLES ===== */
/* Premium Arabic RTL design with glass morphism - FIXED VERSION */

:root {
    /* Home-specific variables */
    --intro-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --hero-gradient: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    --gold-glow: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    --blue-glow: radial-gradient(circle, rgba(52, 152, 219, 0.2) 0%, transparent 70%);
    --purple-glow: radial-gradient(circle, rgba(155, 89, 182, 0.2) 0%, transparent 70%);
}

/* ===== ENHANCED GAME-LIKE INTRO ANIMATION ===== */
#game-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--intro-bg);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: 'Poppins', 'Tajawal', sans-serif;
}

#game-intro.fade-out {
    animation: introFadeOut 1s ease-out forwards;
}

@keyframes introFadeOut {
    0% { opacity: 1; transform: scale(1); }
    70% { opacity: 0.3; transform: scale(1.1); }
    100% { opacity: 0; visibility: hidden; pointer-events: none; }
}

.intro-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    text-align: center;
}

/* Exploding Particles */
.intro-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.intro-particle {
    position: absolute;
    background: var(--accent-color);
    border-radius: 50%;
    animation: particleExplode 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes particleExplode {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx, 200px), var(--ty, 200px)) scale(0);
        opacity: 0;
    }
}

/* Math Equations Flying In */
.intro-equations {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.equation {
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    opacity: 0;
    animation: equationFly 2s ease-in-out infinite;
}

.equation:nth-child(1) { top: 20%; left: 10%; content: "2 + 2 = 4"; animation-delay: 0.2s; }
.equation:nth-child(2) { top: 60%; left: 80%; content: "5 × 3 = 15"; animation-delay: 0.5s; }
.equation:nth-child(3) { top: 80%; left: 20%; content: "12 ÷ 4 = 3"; animation-delay: 0.8s; }
.equation:nth-child(4) { top: 40%; left: 70%; content: "7 - 3 = 4"; animation-delay: 1.1s; }
.equation:nth-child(5) { top: 10%; left: 50%; content: "9² = 81"; animation-delay: 1.4s; }

@keyframes equationFly {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.5;
    }
    50% {
        transform: translateY(-50px) rotate(360deg);
        opacity: 1;
    }
}

/* Animated Logo with More Effects */
.intro-logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.intro-logo {
    width: 200px;
    height: 200px;
    border-radius: 30px;
    box-shadow: 
        0 0 60px rgba(78, 205, 196, 0.6),
        0 0 120px rgba(52, 152, 219, 0.4),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
    border: 5px solid;
    border-image: linear-gradient(45deg, var(--accent-color), var(--gold-color)) 1;
    position: relative;
    z-index: 3;
    animation: logoPowerUp 2s ease-in-out infinite;
    transform-style: preserve-3d;
    perspective: 1000px;
}

@keyframes logoPowerUp {
    0%, 100% {
        transform: 
            translateY(0) 
            rotateX(0deg) 
            rotateY(0deg) 
            scale(1);
        box-shadow: 
            0 0 60px rgba(78, 205, 196, 0.6),
            0 0 120px rgba(52, 152, 219, 0.4);
    }
    50% {
        transform: 
            translateY(-20px) 
            rotateX(10deg) 
            rotateY(10deg) 
            scale(1.05);
        box-shadow: 
            0 0 80px rgba(78, 205, 196, 0.8),
            0 0 160px rgba(52, 152, 219, 0.6),
            0 0 240px rgba(255, 215, 0, 0.3);
    }
}

/* Sparkling Rings */
.logo-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.logo-ring {
    position: absolute;
    border: 2px solid;
    border-image: linear-gradient(45deg, transparent, var(--accent-color), transparent) 1;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ringPulse 3s ease-in-out infinite;
}

.logo-ring:nth-child(1) {
    width: 320px;
    height: 320px;
    animation-delay: 0s;
}

.logo-ring:nth-child(2) {
    width: 380px;
    height: 380px;
    animation-delay: 0.3s;
}

.logo-ring:nth-child(3) {
    width: 440px;
    height: 440px;
    animation-delay: 0.6s;
}

@keyframes ringPulse {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Enhanced Loading Progress */
.intro-progress {
    margin-top: 3rem;
    width: 100%;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, 
        var(--accent-color) 0%, 
        var(--gold-color) 50%, 
        var(--accent-color) 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: progressGradient 2s linear infinite;
}

@keyframes progressGradient {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.progress-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: sparklePop 0.8s ease-out infinite;
}

@keyframes sparklePop {
    0%, 100% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-8px) scale(1);
        opacity: 1;
    }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.progress-percentage {
    font-weight: bold;
    color: var(--gold-color);
    font-size: 2rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: percentageGlow 1s ease-in-out infinite alternate;
}

@keyframes percentageGlow {
    from { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

/* Loading Tips with Character Animation */
.loading-tips {
    margin-top: 3rem;
    color: rgba(255, 255, 255, 0.9);
    height: 80px;
    overflow: hidden;
    position: relative;
}

.tip-slider {
    position: relative;
    height: 100%;
}

.tip {
    position: absolute;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tip.active {
    opacity: 1;
    transform: translateY(0);
}

.tip-emoji {
    font-size: 1.8rem;
    animation: emojiBounce 1s ease-in-out infinite;
}

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

/* Achievement Badge */
.achievement-badge {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(52, 152, 219, 0.2));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 1rem 2rem;
    color: white;
    font-size: 1.1rem;
    animation: badgeFloat 3s ease-in-out infinite;
    opacity: 0;
}

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

/* ===== HERO SECTION - FIXED ===== */
#hero {
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
    font-family: var(--font-primary);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, var(--blue-glow) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, var(--purple-glow) 0%, transparent 50%);
    z-index: 0;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-primary);
}

.hero-content .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 4s ease-in-out infinite;
}

.hero-features {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    margin: 3rem 0;
    box-shadow: var(--glass-shadow);
}

.feature-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-standard);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item:hover {
    transform: translateX(10px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(52, 152, 219, 0.1);
    color: var(--accent-color);
    flex-shrink: 0;
    font-size: 1.5rem;
    transition: all var(--transition-standard);
}

.feature-item:hover .feature-icon {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

/* Hero Image Section */
.hero-image-wrapper {
    position: relative;
    display: inline-block;
    animation: floatIn 1s ease-out;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateX(50px) rotate(10deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0);
    }
}

.hero-main-image {
    max-width: 450px;
    border-radius: 30px;
    box-shadow: 
        var(--shadow-xl),
        0 0 80px rgba(52, 152, 219, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    animation: heroImageFloat 8s ease-in-out infinite;
}

@keyframes heroImageFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    33% { 
        transform: translateY(-20px) rotate(1deg); 
    }
    66% { 
        transform: translateY(-10px) rotate(-1deg); 
    }
}

.hero-floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-color);
    animation: orbitElement 20s linear infinite;
    box-shadow: var(--glass-shadow);
}

.floating-element.brain { 
    top: 10%; 
    left: 10%; 
    animation-delay: 0s; 
    color: var(--info-color);
}
.floating-element.calc { 
    top: 70%; 
    left: 15%; 
    animation-delay: -5s; 
    color: var(--success-color);
}
.floating-element.trophy { 
    top: 40%; 
    left: 80%; 
    animation-delay: -10s; 
    color: var(--gold-color);
}

@keyframes orbitElement {
    0% {
        transform: 
            rotate(0deg) 
            translateX(180px) 
            rotate(0deg) 
            scale(1);
    }
    25% {
        transform: 
            rotate(90deg) 
            translateX(180px) 
            rotate(-90deg) 
            scale(1.1);
    }
    50% {
        transform: 
            rotate(180deg) 
            translateX(180px) 
            rotate(-180deg) 
            scale(1);
    }
    75% {
        transform: 
            rotate(270deg) 
            translateX(180px) 
            rotate(-270deg) 
            scale(0.9);
    }
    100% {
        transform: 
            rotate(360deg) 
            translateX(180px) 
            rotate(-360deg) 
            scale(1);
    }
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

/* ===== TUTORIAL SECTION - FIXED ===== */
.section-padding {
    padding: 100px 0;
    background: var(--bg-primary);
}

#tutorial {
    background: var(--bg-secondary);
    border-radius: 40px;
    margin: 2rem auto;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

#tutorial::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: 
        radial-gradient(circle at 30% 30%, var(--blue-glow) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, var(--purple-glow) 0%, transparent 50%);
    opacity: 0.3;
    z-index: 0;
}

.section-header {
    position: relative;
    z-index: 1;
}

.section-header .gradient-text {
    font-size: 3.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Video Container */
.premium-video-container {
    position: relative;
    z-index: 1;
}

.video-glass-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 
        var(--shadow-xxl),
        0 0 60px rgba(52, 152, 219, 0.2);
    position: relative;
    transition: all var(--transition-standard);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.video-glass-wrapper:hover {
    transform: 
        translateY(-15px) 
        rotateX(5deg) 
        rotateY(-5deg);
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.3),
        0 0 80px rgba(52, 152, 219, 0.3);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: all var(--transition-standard);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 40px rgba(52, 152, 219, 0.5);
    z-index: 2;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 60px rgba(52, 152, 219, 0.8);
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-color));
}

.play-button i {
    margin-left: 5px; /* Center the play icon */
}

.info-card {
    transition: all var(--transition-standard);
    border: 1px solid var(--glass-border);
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.info-card:hover {
    transform: translateY(-15px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-xl);
}

.info-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
}

/* ===== INTERACTIVE ABOUT SECTION - FIXED ===== */
#about {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-color), 
        transparent);
}

.bg-light {
    background: none !important;
}

/* About Buttons - FIXED */
.about-buttons-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    margin-bottom: 2rem;
}

.about-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-btn {
    background: transparent;
    border: none;
    padding: 1.5rem;
    border-radius: 16px;
    text-align: right;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-standard);
    border: 1px solid transparent;
}

.about-btn:hover {
    background: rgba(52, 152, 219, 0.08);
    transform: translateX(-8px);
    border-color: var(--glass-border);
}

.about-btn.active {
    background: rgba(52, 152, 219, 0.15);
    border-color: var(--accent-color);
    transform: translateX(-8px);
    box-shadow: 
        inset 0 0 20px rgba(52, 152, 219, 0.1),
        0 5px 15px rgba(52, 152, 219, 0.1);
}

.about-btn.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-color);
    border-radius: 0 4px 4px 0;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.2));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-color);
    flex-shrink: 0;
    transition: all var(--transition-standard);
}

.about-btn:hover .btn-icon {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    transform: scale(1.1);
}

.about-btn.active .btn-icon {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-text {
    flex: 1;
    text-align: right;
}

.btn-text h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.btn-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* About Content - FIXED */
.about-content-container {
    position: relative;
    min-height: 500px;
}

.about-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: all var(--transition-slow);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
}

.about-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    position: relative;
    animation: contentAppear 0.6s ease-out;
}

@keyframes contentAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* About Content Cards */
.vision-card, .mission-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05), 
        rgba(255, 255, 255, 0.1));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform var(--transition-standard);
}

.vision-card:hover, .mission-card:hover {
    transform: translateY(-5px);
}

.about-stats {
    background: linear-gradient(135deg, 
        rgba(52, 152, 219, 0.05), 
        rgba(155, 89, 182, 0.05));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 2rem;
}

.stat-number {
    font-size: 3rem;
    background: linear-gradient(45deg, var(--accent-color), var(--gold-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

/* Training Cards */
.training-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    height: 100%;
    transition: all var(--transition-standard);
    position: relative;
    overflow: hidden;
}

.training-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--gold-color));
    opacity: 0;
    transition: opacity var(--transition-standard);
}

.training-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.training-card:hover::before {
    opacity: 1;
}

.training-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--accent-color);
}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 1200px) {
    .hero-main-image {
        max-width: 380px;
    }
    
    .section-header .gradient-text {
        font-size: 2.8rem;
    }
}

@media (max-width: 992px) {
    #hero {
        padding: 120px 0 80px;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 3rem;
    }
    
    .hero-features {
        padding: 2rem;
    }
    
    .feature-item {
        justify-content: center;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-image-wrapper {
        margin: 0 auto;
    }
    
    .hero-main-image {
        max-width: 320px;
    }
    
    /* About Section - Mobile Fix */
    .about-buttons-container {
        position: static;
        margin-bottom: 2rem;
    }
    
    .about-buttons {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .about-btn {
        min-width: 200px;
        padding: 1rem;
    }
    
    .btn-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .btn-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin: 0 auto;
    }
    
    .btn-text {
        text-align: center;
    }
    
    .about-content-container {
        min-height: auto;
    }
    
    .about-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        margin-bottom: 2rem;
    }
    
    .about-content.active {
        display: block;
        animation: none;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
    }
    
    .stat-item {
        flex: 1;
    }
    
    .section-padding {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .hero-main-image {
        max-width: 280px;
    }
    
    .intro-logo {
        width: 150px;
        height: 150px;
    }
    
    .section-header .gradient-text {
        font-size: 2.2rem;
    }
    
    .play-button {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .info-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .about-content {
        padding: 2rem;
    }
    
    .training-card {
        padding: 2rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    #hero {
        padding: 100px 0 60px;
    }
    
    .hero-main-image {
        max-width: 240px;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions .btn-gradient,
    .hero-actions .btn-glass {
        width: 100%;
        text-align: center;
    }
    
    .intro-logo {
        width: 120px;
        height: 120px;
    }
    
    .section-header .gradient-text {
        font-size: 1.8rem;
    }
    
    .play-button {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .about-buttons {
        flex-direction: column;
    }
    
    .about-btn {
        min-width: auto;
        width: 100%;
    }
    
    .about-content {
        padding: 1.5rem;
    }
    
    .about-stats {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
}

/* ===== RTL FIXES ===== */
[dir="rtl"] {
    .hero-actions {
        flex-direction: row-reverse;
    }
    
    .about-btn.active::before {
        right: auto;
        left: 0;
        border-radius: 4px 0 0 4px;
    }
    
    .about-btn:hover {
        transform: translateX(8px);
    }
    
    .about-btn.active {
        transform: translateX(8px);
    }
    
    .floating-element.brain { right: 10%; left: auto; }
    .floating-element.calc { right: 15%; left: auto; }
    .floating-element.trophy { right: 80%; left: auto; }
    
    .btn-text {
        text-align: right;
    }
    
    .feature-item {
        flex-direction: row-reverse;
    }
    
    .feature-icon {
        margin-right: 0;
        margin-left: 1rem;
    }
}

/* ===== LEGENDSX ACADEMY - HOME PAGE STYLES ===== */
/* Premium Arabic RTL design with glass morphism - ENHANCED VERSION */

:root {
    /* Home-specific variables */
    --intro-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --hero-gradient: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    --gold-glow: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    --blue-glow: radial-gradient(circle, rgba(52, 152, 219, 0.2) 0%, transparent 70%);
    --purple-glow: radial-gradient(circle, rgba(155, 89, 182, 0.2) 0%, transparent 70%);
}

/* ===== ENHANCED GAME-LIKE INTRO ===== */
/* Fix: Prevent scrolling during intro */
html.intro-active,
html.intro-active body {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
}

#game-intro {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: var(--intro-bg);
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    font-family: 'Poppins', 'Tajawal', sans-serif;
    margin: 0 !important;
    padding: 0 !important;
}

#game-intro.fade-out {
    animation: introFadeOut 1s ease-out forwards;
}

@keyframes introFadeOut {
    0% { opacity: 1; transform: scale(1); }
    70% { opacity: 0.3; transform: scale(1.1); }
    100% { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* Skip Button */
.skip-intro-btn {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
}

.skip-intro-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
}

/* Logo Loading Container */
.logo-loading-container {
    position: relative;
    margin-bottom: 3rem;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-skeleton {
    width: 180px;
    height: 180px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    animation: skeletonShimmer 1.5s infinite linear;
}

@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-gears {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.gear {
    position: absolute;
    font-size: 2rem;
    animation: gearSpin 3s linear infinite;
    opacity: 0.5;
}

.gear-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.gear-2 {
    top: 60%;
    left: 60%;
    animation-delay: 1s;
    animation-direction: reverse;
}

.gear-3 {
    top: 40%;
    left: 10%;
    animation-delay: 0.5s;
    animation-duration: 4s;
}

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

.loading-math {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.math-operation {
    opacity: 0.7;
}

.math-result {
    color: var(--gold-color);
    font-weight: bold;
    animation: mathResultGlow 2s infinite alternate;
}

@keyframes mathResultGlow {
    from { text-shadow: 0 0 5px var(--gold-color); }
    to { text-shadow: 0 0 20px var(--gold-color), 0 0 30px var(--gold-color); }
}

/* System Boot Messages */
.boot-messages {
    margin-top: 2rem;
    width: 100%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.boot-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(-20px);
    animation: bootMessageAppear 0.5s forwards;
}

.boot-message:nth-child(1) { animation-delay: 0.5s; }
.boot-message:nth-child(2) { animation-delay: 1s; }
.boot-message:nth-child(3) { animation-delay: 1.5s; }

@keyframes bootMessageAppear {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.boot-icon {
    color: var(--success-color);
    font-weight: bold;
}

/* Enhanced Loading Progress */
.intro-progress {
    margin-top: 3rem;
    width: 100%;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, 
        var(--accent-color) 0%, 
        var(--gold-color) 50%, 
        var(--accent-color) 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: progressGradient 2s linear infinite;
}

@keyframes progressGradient {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Rest of the CSS remains the same from previous version... */
/* (Keep all your existing CSS from previous version) */

/* Add this for the registration check styling */
.start-journey-btn:hover,
.join-us-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

/* Make sure body doesn't scroll during intro */
body.intro-active {
    overflow: hidden !important;
    height: 100vh !important;
}