/* ===================================
   Neon / Cyberpunk Theme - TTT Collection
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&display=swap');

:root {
    /* Dark Gradient Background Colors */
    --bg-dark-1: #0a0f1f;
    --bg-dark-2: #0d1228;
    --bg-dark-3: #0a0f1f;
    
    /* Neon Colors */
    --neon-cyan: #00eaff;
    --neon-purple: #9a4dff;
    --neon-pink: #ff1f71;
    --neon-light: #d9e8ff;
    
    /* Background Layers */
    --bg-primary: var(--bg-dark-1);
    --bg-secondary: rgba(13, 18, 40, 0.8);
    --bg-tertiary: rgba(26, 31, 58, 0.6);
    --bg-card: rgba(26, 31, 58, 0.4);
    --bg-card-hover: rgba(37, 43, 74, 0.7);
    
    /* Accent Colors */
    --accent-primary: var(--neon-cyan);
    --accent-secondary: var(--neon-purple);
    --accent-tertiary: var(--neon-pink);
    
    /* Player Colors */
    --player-x-color: var(--neon-pink);
    --player-o-color: var(--neon-purple);
    
    /* Player 1 - Red/Pink */
    --player1-color: #e94560;
    --player1-bg: rgba(233, 69, 96, 0.15);
    --player1-border: rgba(233, 69, 96, 0.5);
    --player1-glow: rgba(233, 69, 96, 0.6);
    
    /* Player 2 - Blue/Purple */
    --player2-color: #5f27cd;
    --player2-bg: rgba(95, 39, 205, 0.15);
    --player2-border: rgba(95, 39, 205, 0.5);
    --player2-glow: rgba(95, 39, 205, 0.6);
    
    /* Legacy support */
    --accent-x: var(--player1-color);
    --accent-o: var(--player2-color);
    
    /* Other colors */
    --warning: #ffa502;
    --success: #2ed573;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(217, 232, 255, 0.7);
    --text-muted: rgba(217, 232, 255, 0.5);
    
    /* Board & Cell Colors */
    --board-bg: rgba(13, 18, 40, 0.5);
    --board-border: rgba(0, 234, 255, 0.3);
    --cell-bg: rgba(26, 31, 58, 0.6);
    --cell-border: rgba(154, 77, 255, 0.4);
    --cell-hover: rgba(0, 234, 255, 0.2);
    --cell-active: rgba(154, 77, 255, 0.3);
    
    /* Status Colors */
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    --danger-color: #ff1f71;
    --info-color: var(--neon-cyan);
    
    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
    --glow-cyan: 0 0 20px rgba(0, 234, 255, 0.5);
    --glow-purple: 0 0 20px rgba(154, 77, 255, 0.5);
    --glow-pink: 0 0 20px rgba(255, 31, 113, 0.5);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 20px;
    
    /* Border Color */
    --border-color: rgba(0, 234, 255, 0.3);
    
    /* Spacing */
    --spacing-sm: clamp(0.75rem, 1.5vw, 1rem);
    --spacing-md: clamp(1rem, 2vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 3vw, 2rem);
}

/* ===================================
   Base Body & Background
   =================================== */
body {
    background: linear-gradient(180deg, var(--bg-dark-1), var(--bg-dark-2), var(--bg-dark-3));
    min-height: 100vh;
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ===================================
   Container
   =================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
    position: relative;
    z-index: 1;
}

/* ===================================
   Header - Neon Style
   =================================== */
header.header {
    position: relative;
    z-index: 10;
    padding: clamp(1.5rem, 4vw, 2.5rem) 0;
    background: linear-gradient(180deg, rgba(10, 15, 31, 0.9) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 234, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 234, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--glow-cyan);
}

.logo-icon::before {
    content: '';
    width: 24px;
    height: 24px;
    background: var(--neon-cyan);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    filter: drop-shadow(0 0 8px var(--neon-cyan));
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    letter-spacing: 0.1em;
    text-shadow: 0 0 20px rgba(0, 234, 255, 0.6);
    color: var(--text-primary);
}

.header-nav {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.875rem, 2vw, 1rem);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: width var(--transition-normal);
}

.nav-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-connect {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: clamp(0.875rem, 2vw, 1rem);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--glow-cyan);
    position: relative;
    overflow: hidden;
}

.btn-connect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 234, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn-connect:hover::before {
    width: 300px;
    height: 300px;
}

.btn-connect:hover {
    background: rgba(0, 234, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.8);
    transform: translateY(-2px);
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    position: relative;
    padding: clamp(4rem, 10vw, 8rem) 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
    z-index: 2;
    overflow: visible;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    width: 100%;
}

.hero-text {
    z-index: 3;
}

.season-badge {
    display: inline-block;
    background: rgba(13, 18, 40, 0.8);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: var(--glow-cyan);
}

.season-badge::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-cyan);
    margin-right: 0.5rem;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.hero-title .highlight {
    color: var(--neon-cyan);
    text-shadow: 0 0 40px rgba(0, 234, 255, 0.8);
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-play-now {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    border: none;
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--glow-pink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-play-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 31, 113, 0.8);
}

.btn-discord {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--glow-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-discord:hover {
    background: rgba(0, 234, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.8);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
}

.stat-label {
    font-size: clamp(0.75rem, 2vw, 1rem);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-separator {
    width: 1px;
    background: rgba(0, 234, 255, 0.3);
    margin: 0 1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.neon-cube {
    width: 100%;
    max-width: 400px;
    height: 400px;
    position: relative;
    animation: cubeFloat 6s ease-in-out infinite;
}

.neon-cube svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(0, 234, 255, 0.6)) 
            drop-shadow(0 0 60px rgba(154, 77, 255, 0.4));
}

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

/* ===================================
   Game Selector Section
   =================================== */
.game-selector {
    position: relative;
    z-index: 2;
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-title {
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 3rem);
    position: relative;
}

.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: clamp(50px, 15vw, 150px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-purple), transparent);
    box-shadow: 0 0 10px rgba(154, 77, 255, 0.5);
}

.section-title::before {
    left: 0;
}

.section-title::after {
    right: 0;
}

.section-title h2 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1.75rem, 5vw, 3rem);
    color: var(--text-primary);
    display: inline-block;
    margin: 0;
}

.section-title h2 .highlight {
    color: var(--neon-purple);
    text-shadow: 0 0 30px rgba(154, 77, 255, 0.8);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(1.5rem, 4vw, 2rem);
    margin-top: 2rem;
}

/* ===================================
   Game Cards - Neon Style
   =================================== */
.game-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    height: 100%;
    display: block;
    text-decoration: none;
    color: inherit;
    padding: clamp(1.5rem, 3vw, 2rem);
    text-align: center;
    animation: cardFloat 4s ease-in-out infinite;
}

.game-card:nth-child(odd) {
    animation-delay: 0s;
}

.game-card:nth-child(even) {
    animation-delay: 2s;
}

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

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 234, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.5), var(--glow-cyan);
    background: var(--bg-card-hover);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    transition: all var(--transition-normal);
}

.card-icon svg {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    transition: transform 0.3s ease, color 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(0, 234, 255, 0.5));
}

.game-card:hover .card-icon svg {
    transform: scale(1.1) rotate(5deg);
    color: var(--accent-secondary);
    filter: drop-shadow(0 0 20px rgba(154, 77, 255, 0.8));
}

@media (max-width: 768px) {
    .card-icon svg {
        width: 40px;
        height: 40px;
    }
}

.game-card h3 {
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.game-card p {
    color: var(--text-secondary);
    font-size: clamp(0.875rem, 2vw, 1rem);
    min-height: clamp(2.5em, 6vw, 3em);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.game-card .badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(13, 18, 40, 0.9);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: clamp(0.625rem, 1.5vw, 0.75rem);
    box-shadow: var(--glow-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-card .badge.advanced {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
    box-shadow: var(--glow-purple);
}

.game-card .badge.experimental {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    box-shadow: var(--glow-pink);
}

/* ===================================
   Game Container Pages
   =================================== */
.game-container {
    position: relative;
    z-index: 2;
    padding: clamp(2rem, 5vw, 4rem) 0;
    min-height: 80vh;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-back {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: clamp(0.875rem, 2vw, 1rem);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--glow-cyan);
}

.btn-back:hover {
    background: rgba(0, 234, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.8);
    transform: translateY(-2px);
}

.game-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1.75rem, 5vw, 3rem);
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(0, 234, 255, 0.6);
    margin: 0;
}

.game-status {
    background: rgba(13, 18, 40, 0.6);
    border: 1px solid rgba(0, 234, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--glow-cyan);
    backdrop-filter: blur(10px);
}

.game-status p {
    margin: 0.5rem 0;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    color: var(--text-primary);
}

.game-status #currentPlayer {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

.board-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: clamp(1rem, 3vw, 2rem);
    box-sizing: border-box;
    position: relative;
}

.board-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid rgba(0, 234, 255, 0.2);
    border-radius: var(--radius-lg);
    animation: borderGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 234, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 234, 255, 0.6);
    }
}

.board {
    display: grid;
    width: 100%;
    max-width: min(95vw, 90vh, 800px);
    max-height: min(90vh, 800px);
    margin: auto;
    padding: clamp(1rem, 3vw, 2rem);
    gap: clamp(0.75rem, 2vw, 1.25rem);
    background: var(--board-bg);
    border: 2px solid var(--board-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), inset 0 0 30px rgba(0, 234, 255, 0.1);
    justify-items: stretch;
    backdrop-filter: blur(10px);
    position: relative;
    animation: boardFadeIn 0.5s ease;
    box-sizing: border-box;
}

@keyframes boardFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.board.size-3 { grid-template-columns: repeat(3, 1fr); }
.board.size-4 { grid-template-columns: repeat(4, 1fr); }
.board.size-5 { grid-template-columns: repeat(5, 1fr); }
.board.size-6 { grid-template-columns: repeat(6, 1fr); }
.board.size-7 { grid-template-columns: repeat(7, 1fr); }
.board.size-9 { grid-template-columns: repeat(9, 1fr); }

.cell {
    width: 100%;
    aspect-ratio: 1;
    background: var(--cell-bg);
    border: 2px solid var(--cell-border);
    border-radius: clamp(0.5rem, 1.5vw, 0.75rem);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.25rem, 5vw, 2.5rem);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cell::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 234, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    border-radius: 50%;
}

.cell:hover:not(.occupied):not(.blocked)::before {
    width: 150%;
    height: 150%;
}

.cell:hover:not(.occupied):not(.blocked) {
    background: var(--cell-hover);
    border-color: var(--neon-cyan);
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.4), inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cell.occupied {
    cursor: not-allowed;
}

.cell.X {
    color: var(--player-x-color);
    border-color: var(--player-x-color);
    background: linear-gradient(135deg, rgba(255, 31, 113, 0.2), rgba(255, 31, 113, 0.05));
    text-shadow: 0 0 10px rgba(255, 31, 113, 0.5);
    box-shadow: 0 0 15px rgba(255, 31, 113, 0.3), inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cell.O {
    color: var(--player-o-color);
    border-color: var(--player-o-color);
    background: linear-gradient(135deg, rgba(154, 77, 255, 0.2), rgba(154, 77, 255, 0.05));
    text-shadow: 0 0 10px rgba(154, 77, 255, 0.5);
    box-shadow: 0 0 15px rgba(154, 77, 255, 0.3), inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cell.blocked {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-color: #444;
    cursor: not-allowed;
    opacity: 0.5;
}

.game-controls {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 234, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.btn {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1.5rem, 4vw, 2rem);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: var(--text-primary);
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.8);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--cell-border);
}

.btn-secondary:hover {
    background: var(--cell-hover);
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.player-mode {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.player-mode label {
    color: var(--text-secondary);
    font-size: clamp(0.875rem, 2vw, 1rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-mode input[type="radio"] {
    accent-color: var(--neon-cyan);
}

.game-info-panel {
    background: rgba(13, 18, 40, 0.6);
    border: 1px solid rgba(0, 234, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
}

.game-info-panel h4 {
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

.game-info-panel p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===================================
   Footer - Neon Style
   =================================== */
.footer {
    background: linear-gradient(180deg, transparent 0%, rgba(10, 15, 31, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 234, 255, 0.2);
    color: var(--text-secondary);
    padding: clamp(2rem, 5vw, 3rem) 0;
    margin-top: clamp(3rem, 8vw, 5rem);
    text-align: center;
}

.footer-highlight {
    font-weight: bold;
    color: var(--neon-cyan);
    display: block;
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-highlight a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.footer-highlight a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(255, 31, 113, 0.5);
    text-decoration: underline;
}

.copyright-code {
    text-align: start;
    font-size: larger;
    font-family: monospace;
    background-color: rgba(13, 18, 40, 0.8);
    padding: 1rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-top: 10px;
    border: 1px solid rgba(0, 234, 255, 0.2);
    box-shadow: var(--glow-cyan);
}

.copyright-code a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.copyright-code a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(255, 31, 113, 0.5);
    text-decoration: underline;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-separator {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .board {
        max-width: 98vw;
    }
    
    .board.size-9 .cell {
        font-size: clamp(0.625rem, 4vw, 1rem);
    }
}

/* ===================================
   Text Selection Styling
   =================================== */
::selection {
    background: rgba(0, 234, 255, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(0, 234, 255, 0.3);
    color: inherit;
}

/* ===================================
   Custom Scrollbar
   =================================== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-primary);
}

@media (max-width: 768px) {
    .hero-visual {
        display: none;
    }
}
