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

:root {
    --bg-dark: #070709;
    --bg-card: rgba(30, 30, 35, 0.45);
    --bg-card-hover: rgba(30, 30, 35, 0.7);
    --border-color: rgba(255, 255, 255, 0.05);
    
    --color-primary: #00ff87;
    --color-secondary: #00e5ff;
    --color-danger: #ff1744;
    --color-warning: #f27121;
    --color-purple: #7c4dff;
    --color-gold: #ffd700;
    --color-text-main: #f3f4f6;
    --color-text-muted: #9ca3af;
    
    --glow-primary: 0 0 15px rgba(0, 255, 135, 0.4);
    --glow-secondary: 0 0 15px rgba(0, 229, 255, 0.4);
    --glow-danger: 0 0 15px rgba(255, 23, 68, 0.4);
    --glow-purple: 0 0 15px rgba(124, 77, 255, 0.4);
    --glow-gold: 0 0 15px rgba(255, 215, 0, 0.4);

    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--color-text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
    box-shadow: var(--glow-primary);
}

/* Typography & Layout */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, var(--color-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    margin: 15px auto 0;
    border-radius: 2px;
    box-shadow: var(--glow-primary);
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: var(--transition);
}

/* Background Particles Container */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(7, 7, 9, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 900;
    color: #fff;
    font-size: 1.3rem;
    letter-spacing: 2px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    box-shadow: var(--glow-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 255, 135, 0.5);
}

.nav-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--color-primary);
    border-radius: 30px;
    color: var(--color-primary) !important;
    font-weight: 700 !important;
    box-shadow: inset 0 0 0 0 var(--color-primary);
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--color-primary);
    color: #000 !important;
    box-shadow: var(--glow-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

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

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 255, 135, 0.1);
    border: 1px solid rgba(0, 255, 135, 0.3);
    border-radius: 30px;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 10px rgba(0, 255, 135, 0.1);
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #fff;
}

.hero-title span {
    color: var(--color-primary);
    text-shadow: var(--glow-primary);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--color-primary);
    color: #000;
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(0, 255, 135, 0.7);
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

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

.canvas-container {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

#hero-snake-canvas {
    width: 100%;
    height: 100%;
    background: #0a0a0d;
}

.canvas-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.canvas-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: var(--glow-primary);
    animation: pulse 1.5s infinite;
}

.canvas-score {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-gold);
    text-shadow: var(--glow-gold);
}

/* Game Modes */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.mode-card {
    position: relative;
    overflow: hidden;
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--mode-color, var(--color-primary));
    box-shadow: 0 0 10px var(--mode-color, var(--color-primary));
}

.mode-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4), 0 0 20px rgba(var(--mode-color-rgb), 0.15);
}

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

.mode-icon {
    font-size: 2.2rem;
    color: var(--mode-color, var(--color-primary));
    text-shadow: 0 0 10px rgba(var(--mode-color-rgb), 0.3);
}

.mode-badge {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(var(--mode-color-rgb), 0.1);
    color: var(--mode-color);
    border: 1px solid rgba(var(--mode-color-rgb), 0.25);
}

.mode-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #fff;
}

.mode-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.mode-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mode-tag {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Leaderboard */
.leaderboard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
}

.leaderboard-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.selector-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.selector-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.selector-btn.active {
    background: var(--color-primary);
    color: #000;
    border-color: var(--color-primary);
    box-shadow: var(--glow-primary);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.leaderboard-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.leaderboard-item.user-row {
    background: rgba(0, 255, 135, 0.08);
    border-color: rgba(0, 255, 135, 0.3);
}

.rank-col {
    width: 50px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.1rem;
}

.rank-col span {
    font-size: 1.3rem;
}

.avatar-col {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-primary);
    margin-right: 20px;
    border: 1px solid rgba(0, 255, 135, 0.1);
}

.name-col {
    flex-grow: 1;
    font-weight: 600;
}

.score-col {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mission Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto 0;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 31px;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: 15px;
    top: 5px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #111;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 2;
    transition: var(--transition);
}

.timeline-item.completed .timeline-dot {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--glow-primary);
}

.timeline-content {
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(5px);
}

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

.timeline-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.timeline-mode {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.timeline-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.achievement-card {
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ach-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    transition: var(--transition);
}

.achievement-card:hover .ach-icon {
    transform: scale(1.2) rotate(10deg);
}

.ach-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.ach-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.ach-lock {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    opacity: 0.5;
}

/* Stats Section */
.stats {
    background: linear-gradient(180deg, #070709, #0f0f13, #070709);
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--color-primary);
    text-shadow: var(--glow-primary);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
}

/* Call To Action (Download) */
.cta {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    z-index: 2;
    position: relative;
}

.cta-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.cta-desc {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.store-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    border-radius: 12px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.15);
    transition: var(--transition);
}

.store-btn:hover {
    border-color: var(--color-primary);
    box-shadow: var(--glow-primary);
    transform: translateY(-3px);
}

.store-icon {
    font-size: 1.8rem;
}

.store-text {
    text-align: left;
}

.store-text span {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.store-text strong {
    font-size: 1rem;
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    background: #050507;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
}

.footer-logo img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-primary);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-dot {
        left: 3px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
