:root {
    --bg-color: #080d1d;
    --primary-color: #4deeea;
    --secondary-color: #00a8ff;
    --text-color: #ffffff;
    --text-muted: #8a9bb0;
    --glass-bg: rgba(8, 13, 29, 0.85);
    --glass-border: rgba(77, 238, 234, 0.3);
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Offset for fixed header */
}

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

}

/* Starfield */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at center, #0a1525 0%, #050b14 80%);
}

/* Noise Overlay Removed */

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    background: linear-gradient(to bottom, rgba(5, 5, 16, 0.9), transparent);
    backdrop-filter: blur(5px);
    transition: padding 0.3s ease;
}

.main-header.scrolled {
    padding: 1rem 0;
    background: rgba(5, 11, 20, 0.95);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.menu-toggle {
    display: none;
}

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

.nav-links a:not(.btn) {
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

.nav-links a:not(.btn):hover {
    opacity: 1;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.sound-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.sound-toggle:hover {
    color: var(--primary-color);
    border-color: var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(77, 238, 234, 0.2);
}

.sound-toggle svg {
    pointer-events: none;
}

.nav-lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(5, 11, 20, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    cursor: pointer;
    padding: 0.4rem 2rem 0.4rem 0.8rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    transition: var(--transition);
    outline: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
}

.nav-lang-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(77, 238, 234, 0.2);
}

.nav-lang-select option {
    background-color: #050b14;
    color: var(--text-color);
    padding: 10px;
}

.sound-toggle .hidden {
    display: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-radius: 50px;
    background: radial-gradient(circle at center, rgba(77, 238, 234, 0.1) 0%, transparent 70%);
    box-shadow: 0 0 15px rgba(77, 238, 234, 0.2);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover {
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.btn:hover::before {
    left: 0;
}

.btn.sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
}

.btn.lg {
    padding: 1rem 3rem;
    font-size: 1.2rem;
}

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

.hero-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 4rem;
}



.hero-content {
    text-align: left;
    max-width: 600px;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 1rem;
    position: relative;
    background: linear-gradient(to right, #fff, #a0a0c0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    letter-spacing: 2px;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    min-width: 160px;
    height: 54px;
    color: #fff;
    text-decoration: none;
}

.store-btn:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    background: #111;
}

.store-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.store-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
    align-items: flex-start;
}

.small-text {
    font-size: 0.6rem;
    text-transform: uppercase;
    opacity: 0.9;
    font-family: var(--font-body);
}

.large-text {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-top: 2px;
}

/* Hero Interactive Grid & Icon */
.hero-grid-interactive {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-game-icon {
    width: 180px;
    height: 180px;
    border-radius: 40px;
    box-shadow: 0 0 50px rgba(77, 238, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.hero-game-icon:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 70px rgba(77, 238, 234, 0.5);
}

/* About Visual & Grid */
.about-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lights-out-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 10px;
    background: rgba(5, 16, 30, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    width: fit-content;
    margin: 0 auto;
}

.grid-cell {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grid-cell.active {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color), inset 0 0 5px rgba(255, 255, 255, 0.5);
    border-color: #fff;
}

.grid-cell:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.grid-hint {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    opacity: 0.8;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .hero-section {
        padding-bottom: 4rem;
    }

    .hero-content-wrapper {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero-content {
        text-align: center;
        margin-top: 0;
    }

    .cta-group {
        justify-content: center;
    }

    .lights-out-grid {
        display: none;
        /* Hide interactive grid on mobile if tight */
    }

    .grid-hint {
        display: none;
    }
}

/* Sections */
/* scroll-padding-top handled in html */

/* About Section */
.about-section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 30px rgba(77, 238, 234, 0.2);
}

.section-header .line {
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 0 auto;
    box-shadow: 0 0 10px var(--secondary-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Rules List */
.rules-list {
    list-style: none;
    margin-top: 1rem;
}

.rules-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--text-muted);
}

.rule-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(77, 238, 234, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: -2px;
}



.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.visual-card .image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, rgba(5, 11, 20, 0.5), rgba(77, 238, 234, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.visual-card .image-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('assets/images/screenshot-1.png');
    background-size: cover;
    background-position: center;
    opacity: 0.8;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0 8rem;
}

.gallery-track {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 2rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
}

.gallery-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.gallery-item {
    width: 300px;
    aspect-ratio: 9/16;
    scroll-snap-align: center;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.gallery-item .image-placeholder {
    width: 100%;
    height: 100%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-family: var(--font-heading);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(100, 200, 255, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    font-family: var(--font-heading);
    line-height: 1;
    transition: color 0.2s;
    z-index: 2010;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    /* Match container border radius if any */
}


/* CTA Section */
.cta-section {
    padding: 6rem 0;
    text-align: center;
}



.cta-section p {
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.justify-center {
    justify-content: center;
}

@media (max-width: 600px) {
    .cta-card h2 {
        font-size: 2rem;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
    }
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.socials {
    display: flex;
    gap: 1rem;
}

.socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-family: var(--font-heading);
}

.socials a:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {

    /* Hide Logo on Mobile as requested */
    .logo {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 48px;
        height: 48px;
        padding: 12px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle span {
        width: 100%;
        height: 2px;
        background-color: var(--text-color);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Active state for burger animation (X shape) */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Mobile Menu Overlay */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        /* Solid background */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
        /* Bouncy enter */
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger delay for items */
    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.4s;
    }


    .hero-title {
        font-size: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
}