/* ============================================
   GAMINGSPHERE.IO - NEON ARCADE COMMAND CENTER
   A bold, immersive gaming dashboard
   ============================================ */

/* Google Fonts - Distinctive Typography */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* Core Palette - Electric Neon */
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00aa;
    --neon-purple: #bf00ff;
    --neon-blue: #0066ff;
    --neon-green: #00ff88;
    --neon-yellow: #ffe600;
    --neon-orange: #ff6600;
    --neon-red: #ff0044;

    /* Backgrounds - Deep Space */
    --bg-deep: #050508;
    --bg-primary: #0a0a12;
    --bg-secondary: #0f0f1a;
    --bg-elevated: #141428;
    --bg-card: rgba(20, 20, 45, 0.6);
    --bg-glass: rgba(15, 15, 30, 0.85);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --text-glow: #00f0ff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    --gradient-card: linear-gradient(145deg, rgba(30, 30, 60, 0.4), rgba(10, 10, 25, 0.8));
    --gradient-glow: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.15) 0%, transparent 70%);

    /* Effects */
    --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 40px rgba(0, 240, 255, 0.2);
    --glow-magenta: 0 0 20px rgba(255, 0, 170, 0.5), 0 0 40px rgba(255, 0, 170, 0.2);
    --glow-soft: 0 4px 30px rgba(0, 0, 0, 0.5);

    /* Borders */
    --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
    --border-glow: 1px solid rgba(0, 240, 255, 0.3);

    /* Layout */
    --header-height: 72px;
    --sidebar-width: 280px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Safe areas */
    --safe-area-top: env(safe-area-inset-top, 0px);
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    font-weight: 500;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 0, 170, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(191, 0, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Grid Overlay for Depth */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-magenta), var(--neon-cyan));
}

/* ============================================
   HEADER - Command Bar
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    padding-top: var(--safe-area-top);
}

.site-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-magenta), transparent);
    opacity: 0.5;
}

.site-logo {
    font-family: 'Orbitron', monospace;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.site-logo:hover {
    text-shadow: var(--glow-cyan);
}

.site-logo span {
    font-size: 28px;
    filter: drop-shadow(0 0 8px var(--neon-cyan));
}

/* Search Bar */
.header-search {
    flex: 1;
    max-width: 480px;
    margin: 0 32px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 12px 20px 12px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search input:focus {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.header-search::before {
    content: '⌕';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s ease;
}

.header-search:focus-within::before {
    color: var(--neon-cyan);
}

/* Profile Widget */
.profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 8px;
    background: var(--gradient-card);
    border: var(--border-subtle);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-widget:hover {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.profile-level {
    font-size: 11px;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   LAYOUT - Main Container
   ============================================ */

.main-container {
    display: flex;
    margin-top: calc(var(--header-height) + var(--safe-area-top));
    min-height: calc(100vh - var(--header-height));
    position: relative;
    z-index: 1;
}

/* ============================================
   SIDEBAR - Control Panel
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    padding: 24px 16px;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
}

/* Player Stats Card */
.player-stats-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.player-stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.stat-item {
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* XP Progress Bar */
.xp-progress-container {
    margin-top: 16px;
}

.xp-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.xp-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.xp-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    position: relative;
    transition: width 0.5s ease;
}

.xp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: xpShimmer 2s infinite;
}

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

/* Category List */
.category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    /* Container */
}

.category-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.category-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.category-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.category-link:hover::before {
    transform: scaleY(1);
}

.category-link.active {
    background: rgba(0, 240, 255, 0.08);
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.category-link.active::before {
    transform: scaleY(1);
}

.category-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
    filter: grayscale(0.3);
    transition: filter 0.25s ease;
}

.category-link:hover .category-icon,
.category-link.active .category-icon {
    filter: grayscale(0);
}

/* Leaderboard Section */
.leaderboard-section {
    margin-top: auto;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.leaderboard-list {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.25s ease;
}

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

.leaderboard-item:hover {
    background: rgba(0, 240, 255, 0.05);
}

.leaderboard-game {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.leaderboard-score {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px rgba(255, 230, 0, 0.5);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.content-area {
    flex: 1;
    padding: 24px 32px;
    max-width: 1400px;
}

@media (max-width: 768px) {
    .content-area {
        padding: 16px;
    }
}

/* ============================================
   RECENTLY PLAYED - Continue Playing
   ============================================ */

.recently-played-section {
    margin-bottom: 40px;
}

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

.section-header h3 {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-left: 16px;
}

.section-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.recently-played-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.recently-played-list::-webkit-scrollbar {
    height: 4px;
}

.recent-game-card {
    flex-shrink: 0;
    width: 140px;
    text-decoration: none;
    scroll-snap-align: start;
}

.recent-game-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--glow-soft);
}

.recent-game-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recent-game-card:hover .recent-game-thumb {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--glow-cyan);
}

.recent-game-card:hover .recent-game-thumb::before {
    opacity: 1;
}

.recent-game-name {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.recent-game-card:hover .recent-game-name {
    color: var(--neon-cyan);
}

/* ============================================
   GAME GRID - The Main Event
   ============================================ */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-auto-rows: 160px;
    grid-auto-flow: dense;
    gap: 16px;
    width: 100%;
}

@media (max-width: 600px) {
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        grid-auto-rows: 120px;
        gap: 12px;
    }
}

/* Game Tile */
.app-icon {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    background: var(--bg-card);
    border: var(--border-subtle);
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.app-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.app-icon:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 240, 255, 0.15);
    z-index: 10;
}

.app-icon:hover::before {
    opacity: 1;
}

.app-icon-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20%;
    position: relative;
    overflow: hidden;
}

/* Subtle scan line effect on game tiles */
.app-icon-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    opacity: 0.3;
}

.app-icon-image svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.app-icon:hover .app-icon-image svg {
    transform: scale(1.15) rotate(3deg);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

/* Game Label */
.app-icon-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: var(--text-primary);
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.app-icon:hover .app-icon-label {
    opacity: 1;
    transform: translateY(0);
}

/* Play Indicator */
.app-icon::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 24px;
    color: white;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.app-icon:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Tile Size Variants */
.app-icon.large {
    grid-column: span 2;
    grid-row: span 2;
}

.app-icon.wide {
    grid-column: span 2;
}

.app-icon.tall {
    grid-row: span 2;
}

/* Featured Badge */
.app-icon.large::before {
    opacity: 0.3;
}

/* ============================================
   STAGGER ANIMATION ON LOAD
   ============================================ */

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

.app-icon {
    animation: fadeSlideUp 0.5s ease backwards;
}

.app-icon:nth-child(1) { animation-delay: 0.05s; }
.app-icon:nth-child(2) { animation-delay: 0.1s; }
.app-icon:nth-child(3) { animation-delay: 0.15s; }
.app-icon:nth-child(4) { animation-delay: 0.2s; }
.app-icon:nth-child(5) { animation-delay: 0.25s; }
.app-icon:nth-child(6) { animation-delay: 0.3s; }
.app-icon:nth-child(7) { animation-delay: 0.35s; }
.app-icon:nth-child(8) { animation-delay: 0.4s; }
.app-icon:nth-child(9) { animation-delay: 0.45s; }
.app-icon:nth-child(10) { animation-delay: 0.5s; }
.app-icon:nth-child(11) { animation-delay: 0.55s; }
.app-icon:nth-child(12) { animation-delay: 0.6s; }
.app-icon:nth-child(n+13) { animation-delay: 0.65s; }

/* ============================================
   GAME UI COMPONENTS (for in-game overlays)
   ============================================ */

/* Home Button */
.home-button {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: var(--border-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    text-decoration: none;
    z-index: 100;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.home-button:hover,
.home-button:active {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: var(--glow-cyan);
    transform: scale(1.05);
}

.home-button svg {
    width: 24px;
    height: 24px;
}

/* Game Over Screen */
.game-over-screen {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
    backdrop-filter: blur(20px);
}

.game-over-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.game-over-title {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.new-high-score {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--neon-yellow);
    text-shadow: 0 0 20px var(--neon-yellow);
    margin-bottom: 24px;
    animation: highScorePulse 1s ease-in-out infinite alternate;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes highScorePulse {
    from { opacity: 0.7; transform: scale(1); }
    to { opacity: 1; transform: scale(1.05); }
}

/* Game Stats Grid */
.game-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
    width: 100%;
}

.game-stat-box {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.game-stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 32px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
}

.game-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
}

/* Game Buttons */
.game-over-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.game-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 32px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-cyan);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.game-button:hover,
.game-button:active {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.game-button.secondary {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}

.game-button.secondary:hover,
.game-button.secondary:active {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
    backdrop-filter: blur(20px);
}

.tutorial-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.tutorial-title {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.tutorial-instructions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    width: 100%;
}

.tutorial-instruction {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    text-align: left;
}

.tutorial-key {
    min-width: 70px;
    padding: 10px 14px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-sm);
    color: var(--neon-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

.tutorial-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Score Pop Animation */
.score-pop {
    position: fixed;
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    pointer-events: none;
    z-index: 300;
    animation: scorePop 0.8s ease-out forwards;
}

@keyframes scorePop {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.3);
    }
}

/* Combo Indicator */
.combo-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', monospace;
    font-size: 42px;
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow: 0 0 30px var(--neon-yellow);
    pointer-events: none;
    z-index: 300;
    opacity: 0;
    transition: opacity 0.3s;
}

.combo-indicator.show {
    opacity: 1;
    animation: comboScale 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes comboScale {
    0% { transform: translate(-50%, -50%) scale(2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Screen Shake */
.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(calc(-1 * var(--shake-intensity, 12px))); }
    40% { transform: translateX(var(--shake-intensity, 12px)); }
    60% { transform: translateX(calc(-1 * var(--shake-intensity, 12px) * 0.5)); }
    80% { transform: translateX(calc(var(--shake-intensity, 12px) * 0.5)); }
}

/* Achievement Toast */
.achievement-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 2px solid var(--neon-yellow);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 300;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 0 30px rgba(255, 230, 0, 0.2);
}

.achievement-toast.show {
    transform: translateX(0);
}

.achievement-toast .achievement-icon {
    font-size: 36px;
    filter: drop-shadow(0 0 10px var(--neon-yellow));
}

.achievement-toast .achievement-label {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    color: var(--neon-yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.achievement-toast .achievement-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .site-header {
        padding: 0 16px;
    }

    .site-logo {
        font-size: 18px;
    }

    .site-logo span {
        font-size: 24px;
    }

    .header-search {
        margin: 0 16px;
    }

    .profile-widget .profile-info {
        display: none;
    }

    .game-over-title {
        font-size: 36px;
    }

    .game-stat-value {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .header-search {
        display: none;
    }

    .app-icon.large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .game-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-text {
    text-shadow: var(--glow-cyan);
}

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-subtle);
}

/* Hide elements visually but keep for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
