:root {
    --bg-dark: #050510;
    --text-main: #ffffff;
    --text-muted: #8899a6;

    --cyan: #00f0ff;
    --cyan-glow: rgba(0, 240, 255, 0.6);
    --purple: #bf00ff;
    --purple-glow: rgba(191, 0, 255, 0.6);
    --orange: #ffaa00;
    --green: #00ff66;

    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 2rem;
}

/* Background Effects */
.glow-horizon {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    box-shadow: 0 0 20px var(--purple), 0 0 40px var(--cyan);
    z-index: 10;
}

.grid-floor {
    position: fixed;
    bottom: -20vh;
    left: 0;
    width: 100vw;
    height: 80vh;
    background-image:
        linear-gradient(rgba(5, 5, 16, 1) 20%, rgba(0, 240, 255, 0.1) 100%),
        repeating-linear-gradient(90deg, transparent 0, transparent 40px, rgba(0, 240, 255, 0.1) 41px),
        repeating-linear-gradient(0deg, transparent 0, transparent 40px, rgba(191, 0, 255, 0.1) 41px);
    transform: perspective(100vh) rotateX(60deg);
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    font-family: var(--font-body);
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.settings-icon {
    font-size: 1.2rem;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

/* Hero Section */
.hero {
    margin-top: 4rem;
    margin-bottom: 5rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(90deg, var(--cyan), #00aaff);
    color: #000;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 0 20px var(--cyan-glow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--cyan-glow);
}

.explore-link {
    display: block;
    margin-top: 1.5rem;
    color: var(--cyan);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Section Styling */
.section-block {
    margin-bottom: 4rem;
}

.section-title {
    text-align: left;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #fff;
}

/* Grids */
.cards-grid {
    display: grid;
    gap: 1.5rem;
}

.primary-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.static-grid,
.challenge-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Main Game Cards */
.game-card {
    background: rgba(25, 25, 40, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
    text-align: left;
    position: relative;
    overflow: hidden;
    width: 350px;
    max-width: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
}

.cyan-theme {
    box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.3);
}

.purple-theme {
    box-shadow: 0 0 0 1px rgba(191, 0, 255, 0.3);
}

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

.game-thumb {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 10px;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cyan-theme .game-thumb {
    border: 2px solid var(--cyan);
}

.purple-theme .game-thumb {
    border: 2px solid var(--purple);
}

.gray-theme {
    box-shadow: 0 0 0 1px rgba(136, 136, 136, 0.3);
    opacity: 0.7;
}

.gray-theme .game-thumb {
    border: 2px solid #666;
}

.gray-theme .play-btn {
    background: linear-gradient(90deg, #444, #666);
    color: #aaa;
    cursor: not-allowed;
    box-shadow: none;
}

.game-info h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.game-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.play-btn {
    display: block;
    text-align: center;
    padding: 0.6rem 0;
    width: 100%;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: #000;
    transition: opacity 0.2s;
}

.cyan-theme .play-btn {
    background: linear-gradient(90deg, var(--cyan), #00aaff);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.purple-theme .play-btn {
    background: linear-gradient(90deg, #d500f9, #aa00ff);
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.4);
    color: #fff;
}

.play-btn:hover {
    opacity: 0.9;
}

/* Static Cards */
.static-card {
    height: 120px;
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #555;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 2px;
    opacity: 0.7;
    position: relative;
    overflow: hidden;
}

/* Simple noise simulation for static cards */
.static-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-radial-gradient(#000 0, #000 1px, #111 2px, #222 3px);
    opacity: 0.2;
    z-index: 0;
}

.static-card h2 {
    position: relative;
    z-index: 1;
}

/* Challenge Cards */
.challenge-card {
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.orange-border {
    border: 1px solid var(--orange);
    box-shadow: inset 0 0 20px rgba(255, 170, 0, 0.1);
}

.green-border {
    border: 1px solid var(--green);
    box-shadow: inset 0 0 20px rgba(0, 255, 102, 0.1);
}

.purple-border {
    border: 1px solid var(--purple);
    box-shadow: inset 0 0 20px rgba(191, 0, 255, 0.1);
}

.chal-label {
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.chal-time {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.orange-border .chal-time {
    color: var(--orange);
}

.green-border .chal-time {
    color: var(--green);
}

.purple-border .chal-time {
    color: var(--purple);
}

.chal-link {
    font-size: 0.7rem;
    color: #fff;
    text-decoration: none;
    opacity: 0.7;
}

/* Footer / How it Works */
.how-it-works {
    margin-top: 6rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.step p {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
}

.legal-footer {
    border-top: 1px solid #222;
    padding-top: 2rem;
    font-size: 0.7rem;
    color: #555;
    line-height: 1.6;
}

/* Sparkle/Star */
.sparkle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: #fff;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 1.5rem 1rem;
    }

    .logo-img {
        height: 60px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .grid-floor {
        bottom: -10vh;
    }

    .primary-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
        gap: 1rem;
        /* Hide scrollbar */
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
        flex-wrap: nowrap;
        /* Ensure scrolling on mobile */
        justify-content: flex-start;
        /* Reset centering for slider */
    }

    .primary-grid::-webkit-scrollbar {
        display: none;
    }

    .game-card {
        min-width: 85%;
        scroll-snap-align: center;
        margin-right: 0;
    }

    /* Challenge grid stack normally */
    .challenge-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Pagination Dots */
.slider-dots {
    display: none;
    /* Hidden on desktop */
}

@media (max-width: 768px) {
    .slider-dots {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .dot {
        width: 8px;
        height: 8px;
        background-color: #555;
        border-radius: 50%;
        transition: background-color 0.3s;
    }

    .dot.active {
        background-color: #fff;
        width: 24px;
        border-radius: 4px;
    }
}