/* ========================================
   GAME PORTAL - MODERN DESIGN
   ======================================== */

/* ========= ROOT VARIABLES ========= */
:root {
    /* Color Palette - Vibrant & Energetic */
    --color-bg-primary: #0f0a2e;
    --color-bg-secondary: #1a0f3d;
    --color-bg-tertiary: #2d1b5e;
    --color-accent-primary: #00ffff;
    --color-accent-secondary: #ff00ff;
    --color-accent-gold: #ffea00;
    --color-text-primary: #ffffff;
    --color-text-secondary: #e0d5ff;
    --color-text-muted: #a892ee;
    --color-success: #00ff9d;
    --color-danger: #ff2d5f;
    --color-warning: #ffc200;
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-blur: 20px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(0, 255, 255, 0.5);
    --shadow-glow-pink: 0 0 25px rgba(255, 0, 255, 0.5);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-round: 50%;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ========= RESET & BASE ========= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Accessibility Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-accent-primary);
    color: #000;
    padding: 8px;
    z-index: 10000;
    transition: top 0.3s;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* ========= ANIMATED BACKGROUND ========= */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 20% 30%, 
        rgba(0, 255, 255, 0.25) 0%, 
        transparent 50%
    ),
    radial-gradient(
        circle at 80% 70%, 
        rgba(255, 0, 255, 0.25) 0%, 
        transparent 50%
    ),
    linear-gradient(
        135deg,
        var(--color-bg-primary) 0%,
        var(--color-bg-secondary) 100%
    );
    z-index: -2;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

/* ========================================
   Maintenance Banner (Elegant Design)
   ======================================== */
.maintenance-banner {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    background: linear-gradient(135deg, 
        rgba(69, 26, 3, 0.96) 0%,
        rgba(146, 64, 14, 0.94) 100%
    );
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 20px;
    padding: 0;
    min-width: 320px;
    max-width: 380px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 8px 20px rgba(251, 191, 36, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: bannerSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
               bannerPulse 4s ease-in-out infinite 0.6s;
}

.maintenance-glow {
    position: absolute;
    top: -50%;
    left: -10%;
    right: -10%;
    height: 150%;
    background: radial-gradient(ellipse at top center, 
        rgba(251, 191, 36, 0.12), 
        transparent 60%
    );
    pointer-events: none;
    animation: glowPulse 3s ease-in-out infinite;
}

.maintenance-border {
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, 
        rgba(251, 191, 36, 0.4) 0%, 
        rgba(251, 191, 36, 0.1) 30%,
        rgba(251, 191, 36, 0.05) 50%,
        rgba(251, 191, 36, 0.1) 70%,
        rgba(251, 191, 36, 0.4) 100%
    );
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
    animation: borderShine 6s linear infinite;
}

.maintenance-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.35rem 1.5rem;
    z-index: 1;
}

.maintenance-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(251, 191, 36, 0.18),
        rgba(245, 158, 11, 0.15)
    );
    border: 1.5px solid rgba(251, 191, 36, 0.3);
    border-radius: 14px;
    color: #fcd34d;
    font-size: 1.35rem;
    box-shadow: 
        0 4px 12px rgba(251, 191, 36, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: iconFloat 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.maintenance-banner:hover .maintenance-icon {
    transform: scale(1.05);
    box-shadow: 
        0 6px 16px rgba(251, 191, 36, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.maintenance-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.maintenance-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fef3c7;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.maintenance-eta {
    font-size: 0.88rem;
    color: #fde68a;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.3px;
}

/* Animations */
@keyframes bannerSlideIn {
    from {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes bannerPulse {
    0%, 100% {
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.5),
            0 8px 20px rgba(251, 191, 36, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 24px 70px rgba(0, 0, 0, 0.6),
            0 10px 30px rgba(251, 191, 36, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

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

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(-2deg);
    }
    75% {
        transform: translateY(-4px) rotate(3deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .maintenance-banner {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
        max-width: none;
        border-radius: 16px;
    }
    
    .maintenance-content {
        padding: 1.15rem 1.25rem;
    }
    
    .maintenance-icon {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
        border-radius: 12px;
    }
    
    .maintenance-title {
        font-size: 0.95rem;
    }
    
    .maintenance-eta {
        font-size: 0.82rem;
    }
}



.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ========= MAIN CONTAINER ========= */
.container {
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ========= HEADER ========= */
header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeInDown 0.6s ease-out;
    position: relative;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f5ff, #fc00ff);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 80%;
}

.nav-link:hover, .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.header-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.5));
    animation: logoFloat 3s ease-in-out infinite;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.7));
}

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

.title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #00ffff, #ff00ff, #ffea00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    font-weight: 400;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

/* ========= GAMES GRID ========= */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: var(--spacing-xl);
}

/* ========= GAME CARDS ========= */
.game-card {
    background: linear-gradient(145deg, rgba(31, 15, 62, 0.7), rgba(45, 27, 94, 0.7));
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 0; /* Removed padding for full-width elements */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.6s ease;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
    transform-style: preserve-3d;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
}

.card-content {
    padding: 2rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Ensure button stays at bottom if needed */
    position: relative;
    z-index: 1;
}

/* Grid Background Effect */
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0;
    z-index: 0;
    transform: perspective(500px) rotateX(20deg) scale(1.5);
    transform-origin: top center;
    transition: all 0.5s ease;
    pointer-events: none;
}

/* Glow Effect */
.game-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 255, 255, 0.7);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(0, 255, 255, 0.4);
    background: linear-gradient(145deg, rgba(41, 20, 82, 0.9), rgba(55, 35, 110, 0.9));
}

.game-card:hover::before {
    opacity: 0.3;
    transform: perspective(500px) rotateX(10deg) scale(1.2) translateY(-10px);
}

.game-card:hover::after {
    opacity: 1;
}

/* Ensure content stays on top */
.game-card > * {
    position: relative;
    z-index: 1;
}

/* Coming Soon Card */
.game-card.coming-soon {
    opacity: 0.7;
    position: relative;
}

.game-card.coming-soon:hover {
    transform: translateY(-4px);
}

.coming-soon-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

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

.play-btn.maintenance-btn {
    background: rgba(255, 69, 0, 0.1);
    border: 1px solid rgba(255, 69, 0, 0.5);
    color: #ff4500;
    box-shadow: none;
}

.play-btn.maintenance-btn:hover {
    background: rgba(255, 69, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.2);
    transform: none;
    cursor: not-allowed;
}

.play-btn.maintenance-btn::after {
    display: none;
}

/* Neon Featured Card */
.game-card.neon-featured {
    background: linear-gradient(145deg, rgba(20, 20, 40, 0.8), rgba(30, 27, 75, 0.8));
    border: 1px solid rgba(0, 245, 255, 0.3);
    overflow: hidden;
    position: relative;
}

.game-card.neon-featured .neon-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 245, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: 0;
    transform: perspective(500px) rotateX(20deg) scale(1.5);
    transform-origin: top center;
    transition: transform 0.5s ease;
}

.game-card.neon-featured:hover .neon-grid-bg {
    transform: perspective(500px) rotateX(10deg) scale(1.2) translateY(-10px);
    opacity: 0.5;
}

.game-card.neon-featured .neon-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.game-card.neon-featured:hover .neon-glow {
    opacity: 1;
}

.game-card.neon-featured .game-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(57, 255, 20, 0.6));
    z-index: 1;
    position: relative;
    transition: transform 0.3s ease;
}

.game-card.neon-featured:hover .game-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 25px rgba(57, 255, 20, 0.8));
}

.game-card.neon-featured .game-title {
    background: linear-gradient(135deg, #00f5ff, #39ff14);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
    z-index: 1;
    position: relative;
}

.game-card.neon-featured .play-btn.neon-btn {
    background: linear-gradient(90deg, #7c3aed, #ea580c);
    color: #0a0a1f;
    font-weight: 800;
    border: none;
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
    z-index: 1;
    position: relative;
}

.game-card.neon-featured .play-btn.neon-btn.maintenance-btn {
    background: linear-gradient(135deg, #c2410c, #b91c1c) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3) !important;
}



.game-card.neon-featured .play-btn.neon-btn:hover {
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.6), 0 0 10px rgba(57, 255, 20, 0.4);
    transform: translateY(-2px) scale(1.05);
}

/* AI Hero Banner */
.ai-hero-banner {
    position: relative;
    width: 100%;
    padding: 2.5rem;
    background: linear-gradient(135deg, 
        #0a1929 0%, 
        #1e3a8a 20%, 
        #3b82f6 40%, 
        #8b5cf6 60%, 
        #ec4899 80%, 
        #f59e0b 100%);
    background-size: 300% 300%;
    animation: heroGradient 10s ease infinite;
    overflow: hidden;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

@keyframes heroGradient {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 75%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 25%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.ai-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: bgPulse 4s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Circuit Pattern */
.ai-circuit-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    overflow: hidden;
}

.circuit-line {
    position: absolute;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
    height: 2px;
    animation: circuitFlow 3s linear infinite;
}

.circuit-line:nth-child(1) {
    top: 20%;
    left: -100%;
    width: 40%;
    animation-delay: 0s;
}

.circuit-line:nth-child(2) {
    top: 50%;
    left: -100%;
    width: 60%;
    animation-delay: 1s;
}

.circuit-line:nth-child(3) {
    top: 80%;
    left: -100%;
    width: 50%;
    animation-delay: 2s;
}

@keyframes circuitFlow {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.circuit-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: dotPulse 2s ease-in-out infinite;
}

.circuit-dot:nth-child(4) {
    top: 20%;
    right: 15%;
    animation-delay: 0s;
}

.circuit-dot:nth-child(5) {
    top: 50%;
    left: 20%;
    animation-delay: 0.7s;
}

.circuit-dot:nth-child(6) {
    bottom: 20%;
    right: 30%;
    animation-delay: 1.4s;
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* AI Banner Content */
.ai-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.ai-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 2px solid rgba(0, 245, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(0, 245, 255, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5rem;
    animation: badgeBounce 3s ease-in-out infinite;
}

@keyframes badgeBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
}

.ai-icon-large {
    font-size: 2rem;
    filter: drop-shadow(0 0 15px rgba(0, 245, 255, 0.8));
    animation: rotate 4s linear infinite;
}

.ai-text-large {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.8),
                 0 2px 4px rgba(0, 0, 0, 0.5);
}

.ai-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6),
                 0 0 10px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
    animation: subtitleGlow 3s ease-in-out infinite;
    margin-top: 0.5rem;
    font-family: var(--font-body);
}

@keyframes subtitleGlow {
    0%, 100% {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
                     0 2px 8px rgba(0, 0, 0, 0.5);
    }
}

/* AI Glow Effect */
.ai-glow-effect {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    filter: blur(20px);
    animation: glowPulse 3s ease-in-out infinite;
}

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

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

/* AI Particles */
.ai-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: float 4s ease-in-out infinite;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    top: 40%;
    left: 30%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    top: 80%;
    left: 60%;
    animation-delay: 1.5s;
}

.particle:nth-child(5) {
    top: 30%;
    left: 90%;
    animation-delay: 0.5s;
}

@keyframes float {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-20px) scale(1.2);
    }
}

/* AI Icon Glow */
.ai-icon-glow {
    position: relative;
    z-index: 2;
    animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5))
                drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8))
                drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    }
}

@keyframes gradientShift2 {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}



/* ========= CARD CONTENT ========= */
.game-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.game-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff, #b8b8d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-description {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.game-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.play-btn {
    display: inline-block;
    background: linear-gradient(135deg, #00f5ff, #fc00ff);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 245, 255, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.play-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
    z-index: -1;
}

@media (hover: hover) {
    .play-btn:hover::after {
        left: 100%;
    }
}

.play-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 245, 255, 0.5),
                0 4px 12px rgba(252, 0, 255, 0.3);
}

.play-btn:active:not(:disabled) {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 245, 255, 0.3);
}

.play-btn:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
}

.play-btn:disabled {
    background: #475569;
    cursor: not-allowed;
    opacity: 0.5;
}

/* ========= ANIMATIONS ========= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ========= TESTIMONIALS ========= */
.testimonials-section {
    margin-top: 6rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.section-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #00f5ff, #fc00ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 245, 255, 0.2);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 245, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.player-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid rgba(0, 245, 255, 0.3);
}

.player-details {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: 700;
    color: var(--color-text-primary);
    font-size: 1.1rem;
    margin: 0;
}

.player-rank {
    font-size: 0.85rem;
    color: #00f5ff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.testimonial-text {
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.rating {
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* ========= STATS SECTION ========= */
.stats-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-container {
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
}

/* Smartphone-specific optimizations */
/* Removed - consolidated into comprehensive mobile section below */

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(96, 165, 250, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #00f5ff, #fc00ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.4));
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(252, 0, 255, 0.6));
}

.stat-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00f5ff, #fc00ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .main-nav {
        gap: 1rem;
        padding: 0.75rem;
        width: 100%;
        max-width: 300px;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    body {
        padding: 1rem;
    }

    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    header {
        margin-bottom: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* AI Hero Banner Mobile */
    .ai-hero-banner {
        width: 100%;
        padding: 1.5rem;
    }
    
    .ai-badge-large {
        padding: 0.6rem 1.2rem;
        gap: 0.5rem;
    }
    
    .ai-icon-large {
        font-size: 1.5rem;
    }
    
    .ai-text-large {
        font-size: 0.75rem;
    }
    
    .ai-subtitle {
        font-size: 0.7rem;
    }
}

/* ========================================
   Testimonial Slider Styles
   ======================================== */
.testimonials-section {
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.testimonials-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.testimonials-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    /* Animation will be set via JS to handle dynamic width */
}

.testimonials-track:hover {
    animation-play-state: paused;
}

.testimonial-card {
    width: 350px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Quote Icon Background */
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 8rem;
    font-family: serif;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
    pointer-events: none;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.player-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid rgba(96, 165, 250, 0.3);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.2);
}

.player-details {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: 700;
    color: var(--color-text-primary);
    font-size: 1.1rem;
    margin: 0;
}

.player-rank {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    width: fit-content;
    margin-top: 0.2rem;
}

.rank-player { color: #34d399; background: rgba(16, 185, 129, 0.1); }
.rank-pro { color: #60a5fa; background: rgba(59, 130, 246, 0.1); }
.rank-master { color: #a78bfa; background: rgba(139, 92, 246, 0.1); }
.rank-grandmaster { color: #fbbf24; background: rgba(245, 158, 11, 0.1); }

.testimonial-text {
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    min-height: 4.8rem; /* Approx 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rating {
    display: flex;
    gap: 0.2rem;
}

.rating i {
    color: #fbbf24;
    font-size: 0.9rem;
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
}

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

/* ========================================
   Category Filter Styles
   ======================================== */
.filter-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 250px));
    justify-content: center;
    gap: 2rem;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-label i {
    color: var(--color-accent-primary);
    font-size: 1rem;
}

.category-dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.75rem 2.5rem 0.75rem 1.25rem;
    width: 100%;
    background: linear-gradient(145deg, rgba(30, 30, 60, 0.6), rgba(40, 35, 90, 0.6));
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 12px;
    color: var(--color-text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2300f5ff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-dropdown:hover {
    border-color: var(--color-accent-primary);
    background: linear-gradient(145deg, rgba(40, 40, 80, 0.8), rgba(50, 45, 100, 0.8));
    box-shadow: 0 6px 20px rgba(0, 245, 255, 0.15);
}

.category-dropdown:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

.category-dropdown option {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    padding: 0.75rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .filter-section {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        gap: 1.5rem;
    }
}

/* Very small screens - single column */
@media (max-width: 480px) {
    .filter-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Footer */
#app-footer {
    padding: 2rem 0;
    margin-top: 4rem;
    width: 100%;
    background: transparent;
}

/* ========= COMPREHENSIVE RESPONSIVE BREAKPOINTS ========= */

/* Tablet (481px - 1024px) */
@media (min-width: 481px) and (max-width: 1024px) {
    body {
        padding: 1.5rem;
    }
    
    .title {
        font-size: 2.8rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .card-content {
        padding: 1.5rem;
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    .container {
        padding: 0;
    }
    
    header {
        margin-bottom: 1.5rem;
    }
    
    .header-logo {
        width: 60px;
        height: 60px;
    }
    
    .title {
        font-size: 2rem;
        letter-spacing: 0.05em;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-content {
        padding: 1.25rem;
    }
    
    .game-icon {
        font-size: 2.5rem;
    }
    
    .game-title {
        font-size: 1.25rem;
    }
    
    .game-description {
        font-size: 0.875rem;
    }
    
    .play-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    /* Stats Section */
    .stats-section {
        margin-top: 1.5rem;
        margin-bottom: 2rem;
        padding: 1rem 0;
    }
    
    .stats-container {
        gap: 0.75rem;
        padding: 0;
    }
    
    .stat-card {
        padding: 0.85rem;
    }
    
    .stat-icon {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* Extra small mobile (max-width: 360px) */
@media (max-width: 360px) {
    body {
        padding: 0.75rem;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .games-grid {
        gap: 1.25rem;
    }
    
    .card-content {
        padding: 1rem;
    }
}
