:root {
    --bg-dark: #0f0518;
    --bg-panel: #1a0b2e;
    --accent-cyan: #00ced1;
    --accent-dark-cyan: #008b8b;
    --text-main: #e0e0e0;
    --text-title: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Navigation --- */
nav {
    background-color: var(--bg-panel);
    padding: 0.5rem 2rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo links cta";
    align-items: center;
    border-bottom: 2px solid var(--accent-dark-cyan);
    position: sticky;
    top: 0;
    z-index: 1000;
    gap: 1rem;
}

.nav-logo-link {
    grid-area: logo;
    display: flex;
    align-items: center;
    justify-self: start;
    flex-shrink: 0;
    text-decoration: none;
}

.nav-logo-img {
    height: 75px;
    max-width: 220px;
    aspect-ratio: 21 / 9;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.nav-logo-img:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 0 12px var(--accent-cyan));
}

.nav-links {
    grid-area: links;
    list-style: none;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    min-width: 0;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

nav .nav-cta {
    grid-area: cta;
    justify-self: end;
    flex-shrink: 0;
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
}

.nav-toggle {
    display: none;
}

.nav-toggle-icon {
    display: block;
    width: 22px;
    height: 22px;
}

@media (max-width: 1200px) {
    nav {
        padding: 0.45rem 1rem;
        gap: 0.65rem;
    }

    .nav-logo-img {
        height: 58px;
        max-width: 170px;
    }

    .nav-links {
        gap: 0.65rem;
    }

    .nav-links a {
        font-size: 0.92rem;
    }

    nav .nav-cta {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 850px) {
    nav {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo toggle"
            "links links"
            "cta cta";
        padding: 0.55rem 1rem;
        gap: 0.35rem 0.75rem;
    }

    .nav-logo-img {
        height: 52px;
        max-width: 180px;
    }

    .nav-toggle {
        grid-area: toggle;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        justify-self: end;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 2px solid var(--accent-cyan);
        border-radius: 10px;
        background: transparent;
        cursor: pointer;
    }

    .nav-links,
    nav .nav-cta {
        display: none;
    }

    nav.is-open .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-self: stretch;
        gap: 0;
        padding: 0.4rem 0 0.2rem;
        border-top: 1px solid var(--accent-dark-cyan);
    }

    nav.is-open .nav-links a {
        display: block;
        padding: 0.7rem 0.4rem;
        text-align: center;
        font-size: 1.05rem;
    }

    nav.is-open .nav-cta {
        display: inline-block;
        justify-self: center;
        margin: 0.4rem 0 0.75rem;
        padding: 0.5rem 1.2rem;
        font-size: 0.95rem;
        text-align: center;
    }
}
/* --- Header / Hero Section --- */
header {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-panel) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: var(--text-title);
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(0, 206, 209, 0.5);
}

header p {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 1.5rem auto;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    background-color: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--accent-cyan);
    transform: translateY(-3px);
}

/* --- Container & Grids --- */
.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Two-card grids (e.g. Other Worlds) fill the row instead of leaving a gap */
.grid:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 960px) {
    .grid,
    .grid:has(> :nth-child(2):last-child) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.card {
    background-color: var(--bg-panel);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--accent-dark-cyan);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 206, 209, 0.2);
    border-color: var(--accent-cyan);
}

.card h2 {
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.world-grid .card {
    display: flex;
    flex-direction: column;
}

.world-grid .card p {
    margin-bottom: 1.5rem;
}

.world-grid .card .btn {
    align-self: center;
    margin-top: auto;
}

.card-img {
    display: block;
    width: calc(100% + 4rem);
    max-width: none;
    margin: -2rem -2rem 1.5rem -2rem;
    border-radius: 15px 15px 0 0;
    aspect-ratio: 1;
    object-fit: cover;
    border-bottom: 1px solid var(--accent-dark-cyan);
}

.card-img-wide {
    aspect-ratio: 16 / 9;
    object-position: center top;
}

.find-players {
    margin: 4rem auto 0 auto;
    text-align: center;
}

.seo-section {
    max-width: 760px;
    margin: 4rem auto 0 auto;
}

.seo-section h2,
.find-players h2 {
    color: var(--accent-cyan);
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 1.7rem;
    text-wrap: balance;
    line-height: 1.3;
}

.find-players p {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.seo-section p,
.find-players p {
    margin-bottom: 1rem;
}

.seo-section p:last-child,
.find-players p:last-child {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .grid,
    .grid:has(> :nth-child(2):last-child) {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card-img {
        width: calc(100% + 3rem);
        margin: -1.5rem -1.5rem 1.25rem -1.5rem;
    }

    .seo-section h2,
    .find-players h2 {
        font-size: 1.45rem;
    }

    .world-stats {
        font-size: 1.25rem;
        padding: 0 0.5rem;
    }
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-panel);
    border-top: 1px solid var(--accent-dark-cyan);
    margin-top: 3rem;
}

.footer-note {
    margin-top: 0.55rem;
    font-size: 0.82rem;
    line-height: 1.5;
    opacity: 0.75;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.world-stats {
    text-align: center;
    font-size: 1.55rem;
    font-weight: bold;
    color: var(--text-title);
    line-height: 1.45;
    max-width: 46rem;
    margin: 3.5rem auto 0;
    padding: 0 1rem;
}

.world-stats strong {
    color: var(--accent-cyan);
}

/* --- Scroll Animation --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.show {
    opacity: 1;
    transform: translateY(0);
}
