:root {
    --bg-dark: #1A1A20;
    --text-primary: #E2E8F0;
    --text-secondary: #A0AEC0;
    --white: #FFFFFF;
    --color-red: #db4040d6;
    --color-green: #3a9961;
    --color-blue: #4299E1;
    --color-yellow: #F6E05E;
    --color-purple: #9F7AEA;
    --color-orange: #ED8936;
    --color-brown: #aa6e53;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 0%, #2d3748 0%, var(--bg-dark) 70%);
}

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

header {
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    z-index: 100;
    background-color: rgba(26, 26, 32, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    margin: 6px 0;
    background-color: var(--white);
    transition: 0.4s;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    padding: 1rem 0;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.mobile-nav a {
    display: block;
    padding: 1rem;
    color: var(--text-primary);
    text-decoration: none;
}

/* Hero Section */
.hero {
    padding-top: 140px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

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

.hero-content {
    flex: 1;
    z-index: 10;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero .tagline {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 540px;
    color: var(--text-secondary);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--white);
    color: var(--bg-dark);
    border: 1px solid var(--white);
    box-shadow: 0 4px 14px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.hero-grid-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(7, 50px);
    grid-template-rows: repeat(7, 50px);
    gap: 6px;
    transform: rotateY(-15deg) rotateX(10deg);
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    position: relative;
}

.game-cursor {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 0 0 3px #fff;
    z-index: 50;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
    pointer-events: none;
    top: 0;
    left: 0;
}

.hero-grid:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.grid-cell {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.grid-cell.active {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), inset 0 0 0 2px var(--white);
    transform: scale(1.1) translateZ(20px);
    z-index: 20;
}

/* Section Styling */
.section {
    padding: 6rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 5rem auto;
}

.split-section {
    display: flex;
    align-items: center;
    gap: 6rem;
}

.split-section .content,
.split-section .visual {
    flex: 1;
}

.split-section .content h3 {
    font-size: 2.2rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.split-section .content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.split-section .visual img,
.split-section .visual .mock-grid {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
}

.split-section .visual.portrait img {
    max-width: 320px;
    margin: 0 auto;
    display: block;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.feature-card {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.08);
}

.feature-card .icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1.5rem;
    color: var(--color-blue);
    background: rgba(68, 138, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
}

.feature-card h4 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Level Design Showcase */
.mock-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 6px;
    background-color: #25252b;
    padding: 16px;
    border: 1px solid var(--glass-border);
}

.mock-cell {
    width: 100%;
    padding-bottom: 100%;
    /* Aspect ratio 1:1 */
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
}

.mock-cell.red {
    background-color: var(--color-red);
}

.mock-cell.green {
    background-color: var(--color-green);
}

.mock-cell.blue {
    background-color: var(--color-blue);
}

.mock-cell.yellow {
    background-color: var(--color-yellow);
}

.mock-cell.purple {
    background-color: var(--color-purple);
}

.mock-cell.orange {
    background-color: var(--color-orange);
}

.mock-cell.brown {
    background-color: var(--color-brown);
}

/* Footer */
footer {
    padding: 6rem 0 3rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 6rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-cta {
    margin-bottom: 3rem;
}

.footer-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.footer-links {
    margin-bottom: 2rem;
}

.footer-links a {
    margin: 0 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.copyright {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }

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

@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero {
        height: auto;
        padding: 120px 0 80px 0;
    }

    .hero-content {
        margin-top: 2rem;
        order: -1;
    }

    .hero-grid {
        transform: rotateY(0deg) rotateX(0deg);
        grid-template-columns: repeat(7, 45px);
        grid-template-rows: repeat(7, 45px);
    }

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

    .split-section {
        flex-direction: column;
        gap: 3rem;
    }

    .split-section.reverse {
        flex-direction: column-reverse;
    }

    .split-section .visual {
        margin-bottom: 1rem;
    }

    .split-section .visual.portrait img {
        max-width: 280px;
    }

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

    .section {
        padding: 4rem 0;
    }
}

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

    .hamburger {
        display: block;
    }

    .hamburger.is-active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.is-active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.is-active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

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

@media (max-width: 600px) {
    .container {
        padding: 0 1.5rem;
    }

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

    .hero .tagline {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .hero-grid {
        grid-template-columns: repeat(7, 35px);
        grid-template-rows: repeat(7, 35px);
        gap: 4px;
    }

    .grid-cell {
        width: 35px;
        height: 35px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 375px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-grid {
        grid-template-columns: repeat(7, 30px);
        grid-template-rows: repeat(7, 30px);
    }

    .grid-cell {
        width: 30px;
        height: 30px;
    }
}