:root {
    --background: #0b0b0d;
    --surface: #131316;
    --surface-hover: #19191d;

    --text: #f5f5f5;
    --muted: #8d8d96;

    --border: #27272c;
    --border-hover: #3a3a42;

    --accent: #ff6542;
    --accent-hover: #ff795a;

    --max-width: 1200px;
    --radius: 18px;
}


/* ========================================
   RESET
======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(
            circle at 50% -20%,
            #1b1513 0%,
            #0b0b0d 45%
        );

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    min-height: 100vh;

    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
}

img {
    max-width: 100%;
}


/* ========================================
   NAVBAR
======================================== */

.navbar {
    position: relative;

    width: 100%;
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    max-width: var(--max-width);

    margin: auto;

    padding: 0 24px;

    border-bottom: 1px solid transparent;
}

.brand {
    display: flex;
    align-items: center;

    gap: 11px;

    color: var(--text);

    text-decoration: none;

    font-size: 18px;
    font-weight: 800;

    letter-spacing: -0.03em;
}

.brand img {
    width: 38px;
    height: 38px;

    object-fit: contain;

    border-radius: 10px;
}

.brand span {
    transition: color 0.2s ease;
}

.brand:hover span {
    color: var(--accent);
}


/* ========================================
   SUPPORT BUTTON
======================================== */

.support-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 10px 16px;

    border: 1px solid var(--border);

    border-radius: 999px;

    background: var(--surface);

    color: var(--text);

    text-decoration: none;

    font-size: 13px;
    font-weight: 800;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.support-btn:hover {
    background: var(--surface-hover);

    border-color: var(--border-hover);

    transform: translateY(-2px);
}

.support-icon {
    color: var(--accent);

    font-size: 13px;
}


/* ========================================
   HERO
======================================== */

.hero {
    position: relative;

    max-width: var(--max-width);

    margin: auto;

    padding: 120px 24px 100px;

    overflow: hidden;
}


/* Decorative glow */

.hero::before {
    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    top: -250px;
    left: 40%;

    background: var(--accent);

    opacity: 0.035;

    filter: blur(120px);

    border-radius: 50%;

    pointer-events: none;
}

.hero-content {
    position: relative;

    max-width: 780px;
}

.eyebrow,
.section-label {
    color: var(--muted);

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 0.18em;

    text-transform: uppercase;
}

.hero h1 {
    margin-top: 18px;

    font-size:
        clamp(56px, 9vw, 105px);

    line-height: 0.92;

    letter-spacing: -0.075em;

    font-weight: 900;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    max-width: 590px;

    margin-top: 30px;

    color: var(--muted);

    font-size: 18px;

    line-height: 1.65;
}


/* ========================================
   HERO STATS
======================================== */

.hero-stats {
    display: flex;

    gap: 50px;

    margin-top: 45px;
}

.hero-stats div {
    display: flex;

    flex-direction: column;

    gap: 2px;
}

.hero-stats strong {
    color: var(--text);

    font-size: 32px;

    line-height: 1;

    letter-spacing: -0.05em;
}

.hero-stats span {
    color: var(--muted);

    font-size: 11px;

    font-weight: 600;
}


/* ========================================
   GAMES SECTION
======================================== */

.games-section {
    max-width: var(--max-width);

    margin: auto;

    padding: 20px 24px 110px;
}

.section-heading {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    margin-bottom: 30px;
}

.section-heading h2 {
    margin-top: 7px;

    color: var(--text);

    font-size: 36px;

    font-weight: 850;

    letter-spacing: -0.05em;
}

#collection-count {
    color: var(--muted);

    font-size: 12px;

    font-weight: 600;
}


/* ========================================
   GAME GRID
======================================== */

.games-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}


/* ========================================
   GAME CARD
======================================== */

.game-card {
    position: relative;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    overflow: hidden;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

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

    background: var(--surface-hover);

    border-color: var(--border-hover);

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.35);
}


/* ========================================
   GAME IMAGE
======================================== */

.game-card-image {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: #080809;
}

.game-card-image::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to bottom,
            transparent 60%,
            rgba(0, 0, 0, 0.25)
        );

    pointer-events: none;
}

.game-card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.45s ease,
        filter 0.45s ease;
}

.game-card:hover .game-card-image img {
    transform: scale(1.06);

    filter: brightness(1.08);
}


/* ========================================
   GAME NUMBER
======================================== */

.game-number-badge {
    position: absolute;

    top: 12px;
    left: 12px;

    z-index: 3;

    padding: 6px 9px;

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: 999px;

    background:
        rgba(0, 0, 0, 0.72);

    color: white;

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.08em;

    backdrop-filter: blur(10px);
}


/* ========================================
   CARD CONTENT
======================================== */

.game-card-content {
    padding: 18px;
}

.game-card-title {
    color: var(--text);

    font-size: 19px;

    font-weight: 850;

    letter-spacing: -0.035em;
}

.game-card-description {
    min-height: 40px;

    margin-top: 7px;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.5;
}


/* ========================================
   PLAY BUTTON
======================================== */

.play-btn {
    width: 100%;

    margin-top: 18px;

    padding: 12px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: #1b1b20;

    color: var(--text);

    font-size: 12px;

    font-weight: 850;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.play-btn:hover {
    background: var(--accent);

    border-color: var(--accent);

    color: white;
}


/* ========================================
   SUPPORT SECTION
======================================== */

.support-section {
    max-width: var(--max-width);

    margin: 0 auto 100px;

    padding: 55px 24px;

    border-top: 1px solid var(--border);

    border-bottom: 1px solid var(--border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 40px;
}

.support-section h2 {
    margin-top: 8px;

    font-size: 36px;

    font-weight: 850;

    letter-spacing: -0.05em;
}

.support-section p:not(.section-label) {
    max-width: 530px;

    margin-top: 10px;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.65;
}


/* ========================================
   LARGE SUPPORT BUTTON
======================================== */

.large-support-btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 14px 20px;

    border: 1px solid var(--accent);

    border-radius: 12px;

    background: var(--accent);

    color: white;

    text-decoration: none;

    font-size: 12px;

    font-weight: 850;

    white-space: nowrap;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.large-support-btn:hover {
    background: var(--accent-hover);

    transform: translateY(-2px);

    box-shadow:
        0 10px 35px rgba(255, 101, 66, 0.18);
}


/* ========================================
   GAME PAGE
======================================== */

.game-page {
    max-width: var(--max-width);

    margin: auto;

    padding: 20px 24px 100px;
}


/* ========================================
   GAME TOP BAR
======================================== */

.game-topbar {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 38px;
}

.back-btn {
    color: var(--muted);

    text-decoration: none;

    font-size: 12px;

    font-weight: 800;

    transition: color 0.2s ease;
}

.back-btn:hover {
    color: var(--text);
}

.game-number {
    color: var(--muted);

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 0.12em;
}


/* ========================================
   GAME HEADER
======================================== */

.game-header {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 35px;

    margin-bottom: 25px;
}

.game-header h1 {
    margin-top: 8px;

    font-size:
        clamp(42px, 7vw, 76px);

    line-height: 0.94;

    letter-spacing: -0.065em;

    font-weight: 900;
}

.game-header p:not(.section-label) {
    max-width: 650px;

    margin-top: 15px;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.6;
}


/* ========================================
   ITCH BUTTON
======================================== */

.itch-btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 13px 18px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: var(--surface);

    color: var(--text);

    text-decoration: none;

    font-size: 11px;

    font-weight: 850;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.itch-btn:hover {
    background: var(--surface-hover);

    border-color: var(--border-hover);

    transform: translateY(-2px);
}


/* ========================================
   GAME FRAME
======================================== */

.game-wrapper {
    width: 100%;
}

.game-frame-container {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    min-height: 500px;

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    background: #050506;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.45);
}

.game-frame-container iframe {
    position: absolute;

    inset: 0;

    z-index: 2;

    width: 100%;
    height: 100%;

    border: 0;

    background: #000;
}

.loading-message {
    position: absolute;

    inset: 0;

    z-index: 1;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #050506;

    color: var(--muted);

    font-size: 12px;
}


/* ========================================
   GAME INFO
======================================== */

.game-info {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    margin-top: 18px;

    border-top: 1px solid var(--border);

    border-bottom: 1px solid var(--border);
}

.game-info div {
    display: flex;

    flex-direction: column;

    gap: 5px;

    padding: 22px;

    border-right: 1px solid var(--border);
}

.game-info div:last-child {
    border-right: 0;
}

.info-label {
    color: var(--muted);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.game-info strong {
    color: var(--text);

    font-size: 13px;

    font-weight: 750;
}


/* ========================================
   GAME SUPPORT
======================================== */

.game-support {
    padding: 95px 0 30px;

    text-align: center;
}

.game-support h2 {
    color: var(--text);

    font-size: 42px;

    font-weight: 900;

    letter-spacing: -0.055em;
}

.game-support p {
    max-width: 510px;

    margin: 13px auto 27px;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.65;
}


/* ========================================
   404
======================================== */

.not-found {
    max-width: var(--max-width);

    margin: auto;

    padding: 160px 24px;

    text-align: center;
}

.not-found h1 {
    margin-top: 10px;

    color: var(--text);

    font-size: 62px;

    font-weight: 900;

    letter-spacing: -0.065em;
}

.not-found p:not(.section-label) {
    margin: 15px 0 28px;

    color: var(--muted);

    font-size: 14px;
}


/* ========================================
   FOOTER
======================================== */

footer {
    max-width: var(--max-width);

    margin: auto;

    padding: 30px 24px 45px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-top: 1px solid var(--border);

    color: #66666e;

    font-size: 10px;
}


/* ========================================
   UTILITIES
======================================== */

.hidden {
    display: none !important;
}


/* ========================================
   SELECTION
======================================== */

::selection {
    background: var(--accent);

    color: white;
}


/* ========================================
   SCROLLBAR
======================================== */

::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: #29292e;

    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a42;
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 850px) {

    .games-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .support-section {
        flex-direction: column;

        align-items: flex-start;
    }

    .game-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .itch-btn {
        width: 100%;
    }

    .game-frame-container {
        min-height: 400px;
    }
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 600px) {

    .navbar {
        height: 68px;

        padding: 0 16px;
    }

    .brand span {
        display: none;
    }

    .support-btn {
        padding: 9px 14px;

        font-size: 11px;
    }


    /* Hero */

    .hero {
        padding:
            80px 16px 70px;
    }

    .hero h1 {
        font-size: 58px;
    }

    .hero p {
        margin-top: 24px;

        font-size: 15px;
    }

    .hero-stats {
        gap: 35px;

        margin-top: 35px;
    }


    /* Games */

    .games-section {
        padding:
            15px 16px 75px;
    }

    .games-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .section-heading h2 {
        font-size: 29px;
    }


    /* Support */

    .support-section {
        margin-bottom: 60px;

        padding:
            40px 16px;
    }

    .support-section h2 {
        font-size: 30px;
    }

    .support-section p:not(.section-label) {
        font-size: 13px;
    }

    .large-support-btn {
        width: 100%;
    }


    /* Game page */

    .game-page {
        padding:
            20px 16px 70px;
    }

    .game-header h1 {
        font-size: 49px;
    }

    .game-frame-container {
        aspect-ratio: 16 / 10;

        min-height: 250px;

        border-radius: 13px;
    }


    /* Game info */

    .game-info div {
        padding: 16px;
    }

    .game-info strong {
        font-size: 11px;
    }


    /* Game support */

    .game-support {
        padding-top: 65px;
    }

    .game-support h2 {
        font-size: 33px;
    }


    /* 404 */

    .not-found {
        padding:
            120px 16px;
    }

    .not-found h1 {
        font-size: 45px;
    }


    /* Footer */

    footer {
        padding:
            28px 16px 40px;

        flex-direction: column;

        align-items: flex-start;

        gap: 8px;
    }
}