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

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

html {
    scroll-behavior: smooth;
}

body {
    background: #111;
    color: #999;
    font-family: "Cairo", Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}


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

.header {
    background: #171717;
    border-bottom: 1px solid #252525;
}

.header-inner {
    width: min(1180px, calc(100% - 40px));
    height: 72px;
    margin: auto;

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


/* LOGO */

.logo {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: #6cc04a;
}


/* NAV */

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: #999;
    font-size: 14px;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: #fff;
}


/* NAVIGATION */

.navigation {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.navigation a {
    color: #aaa;
    transition: color 0.2s ease;
}

.navigation a:hover {
    color: #6cc04a;
}


/* ACCOUNT */

.account {
    display: flex;
    align-items: center;
    gap: 10px;

    color: #777;
    font-size: 13px;
}

.account a {
    transition: color 0.2s ease;
}

.account a:hover {
    color: #6cc04a;
}

.account span {
    color: #444;
}


/* =========================================================
   GLOBAL CONTAINERS
========================================================= */

.container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

.game-container {
    width: min(1080px, calc(100% - 40px));
    margin: auto;
}


/* =========================================================
   HOME PAGE
========================================================= */

.search-section {
    text-align: center;
    padding: 50px 0px 0px;
}

.search-section h1 {
    color: #fff;
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 8px;
}

.search-section h1 span {
    color: #6cc04a;
}

.search-box {
    width: min(650px, 100%);
    margin: auto;
}

.game-section {
    margin-bottom: 65px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #292929;

    padding-bottom: 14px;
    margin-bottom: 25px;
}

.section-title h2 {
    color: #ddd;
    font-size: 21px;
    font-weight: 400;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.game-card {
    background: #181818;
    border: 1px solid #242424;
    border-radius: 3px;

    overflow: hidden;

    display: block;

    color: inherit;
    text-decoration: none;

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

.game-card:hover {
    transform: translateY(-5px);
    border-color: #3a3a3a;
}

.game-card .poster {
    position: relative;
    aspect-ratio: 2 / 3;

    background: #222;
    overflow: hidden;
}

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

    object-fit: cover;
    display: block;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.game-card:hover .poster img {
    transform: scale(1.04);
    opacity: 0.85;
}

.port {
    position: absolute;

    top: 10px;
    left: 10px;

    background: #6cc04a;
    color: #fff;

    padding: 3px 7px;

    font-size: 10px;
    font-weight: bold;

    border-radius: 2px;
}

.game-info {
    padding: 14px;
}

.game-info h3 {
    color: #ddd;

    font-size: 15px;
    font-weight: 400;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    margin-bottom: 5px;

    direction: ltr;
}




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

.game-heading {
    text-align: center;
    padding: 35px 0 32px;
    direction: ltr;
}

.game-heading h1 {
    color: #fff;
    font-size: 34px;
    font-weight: 400;
}

.developer {
    color: #777;
    font-size: 18px;
    margin-top: 3px;
}

.genres {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 7px;
    margin-top: 12px;
}

.genres span {
    color: #6cc04a;
    font-size: 12px;
}

.genres span:not(:last-child)::after {
    content: "/";
    color: #444;
    margin-left: 7px;
}

.game-main {
    display: grid;
    grid-template-columns: 290px 1fr;

    gap: 42px;

    padding-bottom: 55px;
}

.poster-column {
    display: flex;
    justify-content: center;
}

.poster {
    width: 270px;
    aspect-ratio: 2 / 3;

    overflow: hidden;

    background: #1c1c1c;
    border: 1px solid #292929;

    border-radius: 3px;
}

.poster img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.game-details {
    padding-top: 5px;
    min-width: 0;
}

.description {
    display: block;

    margin-top: 10px;

    color: #999;

    font-size: 16px;
    line-height: 1.9;

    text-align: right;

    word-break: normal;
    overflow-wrap: break-word;
}

.download-actions {
    display: flex;

    gap: 10px;

    margin-top: 30px;
}

.download-button,
.magnet-button {
    border: 1px solid #333;
    border-radius: 3px;

    background: #202020;

    color: #bbb;

    padding: 10px 24px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

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

.download-button:hover,
.magnet-button:hover {
    background: #6cc04a;
    border-color: #6cc04a;
    color: #fff;
}

.like-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 115px;
    border: 1px solid #333;
    border-radius: 3px;
    background: #202020;
    color: #bbb;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.like-button:hover {
    background: #242424;
    border-color: #6cc04a;
    color: #fff;
}

.like-button.liked {
    background: #202020;
    border-color: #6cc04a;
    color: #6cc04a;
}

.like-icon {
    font-size: 16px;
    line-height: 1;
    transition: transform .2s ease;
}

.like-button:hover .like-icon {
    transform: scale(1.15);
}

.like-button.liked .like-icon {
    color: #6cc04a;
}

.like-count {
    color: #777;
    font-size: 12px;
}

.like-button.liked .like-count {
    color: #6cc04a;
}

/* =========================================================
   SOCIAL LINKS / ICONS
========================================================= */

.social-links {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 25px;
}

.social-links a {
    width: 42px;
    height: 42px;

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

    background: #202020;

    border: 1px solid #303030;

    border-radius: 50%;

    color: #aaa;

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

.social-links a:hover {
    background: #242424;

    border-color: #6cc04a;

    color: #6cc04a;

    transform: translateY(-2px);
}

.social-links svg {
    width: 19px;
    height: 19px;

    display: block;

    fill: currentColor;

    transition:
        fill 0.2s ease,
        transform 0.2s ease;
}

.social-links a:hover svg {
    fill: #6cc04a;

    transform: scale(1.05);
}

.social-links a[aria-label="github"] svg {
    width: 20px;
    height: 20px;
}

.social-links a[aria-label="x"] svg {
    width: 18px;
    height: 18px;
}


/* =========================================================
   SCREENSHOTS
========================================================= */

.screenshots-section {
    padding-bottom: 50px;
}

.screenshots {
    display: grid;

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

    gap: 12px;
}

.screenshot {
    position: relative;

    overflow: hidden;

    background: #181818;
    border: 1px solid #292929;

    border-radius: 3px;

    cursor: pointer;
}

.screenshot img {
    width: 100%;
    height: auto;

    display: block;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.screenshot:hover img {
    transform: scale(1.03);
    opacity: 0.85;
}

.trailer-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

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

    color: #fff;

    font-size: 30px;

    pointer-events: none;
}


/* =========================================================
   SUPPORT PAGE
========================================================= */

.page-heading {
    text-align: center;

    padding: 50px 0 38px;
}

.page-heading h1 {
    color: #fff;

    font-size: 34px;
    font-weight: 500;
}

.page-heading h1 span {
    color: #6cc04a;
}

.page-heading p {
    color: #777;

    font-size: 15px;

    margin-top: 8px;
}


/* SUPPORT BOX */

.support-box {
    width: 100%;

    background: #171717;

    border: 1px solid #252525;

    border-radius: 4px;

    padding: 35px;

    margin-bottom: 25px;

    text-align: center;
}

.support-box h2 {
    color: #fff;

    font-size: 21px;
    font-weight: 600;

    margin-bottom: 10px;
}

.support-box p {
    max-width: 700px;

    margin: 0 auto;

    color: #888;

    font-size: 14px;

    line-height: 2;
}

.support-box strong {
    color: #6cc04a;
    font-weight: 600;
}


/* SUPPORT METHODS */

.support-methods {
    display: grid;

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

    gap: 15px;

    padding-bottom: 55px;
}

.support-card {
    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-height: 190px;

    padding: 25px;

    background: #171717;

    border: 1px solid #252525;

    border-radius: 4px;

    text-align: center;

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

.support-card:hover {
    background: #1b1b1b;

    border-color: #333;

    transform: translateY(-2px);
}


/* SUPPORT ICON */

.support-icon {
    width: 52px;
    height: 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 14px;

    background: #202020;

    border: 1px solid #303030;

    border-radius: 50%;

    color: #6cc04a;

    font-size: 20px;
    font-weight: 700;
}

.support-card h3 {
    color: #fff;

    font-size: 17px;
    font-weight: 600;

    margin-bottom: 4px;
}

.support-card p {
    color: #666;

    font-size: 12px;

    margin-bottom: 15px;
}


/* SUPPORT BUTTON */

.support-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 130px;

    padding: 8px 18px;

    background: #252525;

    border: 1px solid #333;

    border-radius: 3px;

    color: #bbb;

    font-size: 12px;
    font-weight: 600;

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

.support-button:hover {
    background: #6cc04a;

    border-color: #6cc04a;

    color: #fff;
}

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

body.game-page {
    position: relative;
    background: #111;
}

.game-background {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;

    z-index: 0;
    overflow: hidden;
    pointer-events: none;

    background: #111;
}

.game-background-image {
    position: absolute;
    top: -60px;
    right: -60px;
    bottom: -60px;
    left: -60px;
    width: calc(100% + 120px);
    height: calc(100% + 120px);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(32px);
    transform: scale(1.08);
    opacity: 0;

    transition:
        opacity 0.7s ease,
        background-image 0s;
}

.game-background-image.visible {
    opacity: 1;
}

.game-background-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgb(17, 17, 17) 0%,
            rgba(17, 17, 17, 0.9) 40%,
            rgba(17, 17, 17, 1) 100%,
            rgba(17, 17, 17, 1) 100%
        );
}

body.game-page .header {
    position: relative;
    z-index: 2;

    background: rgba(23, 23, 23, 0.82);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.game-page .game-container {
    position: relative;
    z-index: 1;
}

body.game-page .footer {
    position: relative;
    z-index: 1;

    background: transparent;
}

body.game-page .poster {
    position: relative;
    z-index: 2;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45);
}

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

.footer {
    margin-top: 80px;

    background: #111;

    padding-top: 35px;
}

.footer-inner {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

.copyright {
    width: min(1180px, calc(100% - 40px));

    margin: 25px auto 0;

    padding: 18px 0;

    border-top: 1px solid #252525;

    text-align: center;

    color: #444;

    font-size: 10px;
}

/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 650px) {

    .game-background {
        width: 100vw;
        height: 100vh;
    }

    .game-background-image {
        top: -40px;
        right: -40px;
        bottom: -40px;
        left: -40px;

        width: calc(100% + 80px);
        height: calc(100% + 80px);

        filter: blur(24px);

        transform: scale(1.08);
    }


    .game-background-overlay {
        background:
            linear-gradient(
                to top,
                rgb(17, 17, 17) 0%,
                rgba(17, 17, 17, 0.9) 40%,
                rgba(17, 17, 17, 1) 100%,
                rgba(17, 17, 17, 1) 100%
            );
    }

}


@media (max-width: 650px) {
    .download-actions {
        flex-direction: column;
    }

    .like-button,
    .download-button,
    .magnet-button {
        width: 100%;
    }
}

@media (max-width: 900px) {

    .nav {
        display: none;
    }

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


/* =========================================================
   RESPONSIVE — GAME
========================================================= */

@media (max-width: 850px) {

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

    .game-main {
        grid-template-columns: 220px 1fr;
        gap: 30px;
    }

    .poster {
        width: 220px;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 650px) {

    .header-inner {
        height: 62px;

        width: calc(100% - 24px);
    }

    .logo {
        font-size: 23px;
    }

    .account {
        gap: 6px;
        font-size: 10px;
    }

    .navigation {
        font-size: 11px;
    }

    .container,
    .game-container {
        width: calc(100% - 24px);
    }


    /* HOME */

    .search-section {
        padding: 50px 12px 35px;
    }

    .search-section h1 {
        font-size: 28px;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }


    /* GAME */

    .game-heading {
        padding: 30px 0 28px;
    }

    .game-heading h1 {
        font-size: 24px;
    }

    .game-main {
        grid-template-columns: 1fr;
        gap: 25px;
    }

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

    .poster {
        width: 240px;
    }

    .description {
        font-size: 14px;
        line-height: 1.9;
    }

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


    /* SUPPORT */

    .page-heading {
        padding: 35px 0 28px;
    }

    .page-heading h1 {
        font-size: 27px;
    }

    .page-heading p {
        font-size: 13px;
    }

    .support-box {
        padding: 25px 18px;
    }

    .support-box h2 {
        font-size: 19px;
    }

    .support-box p {
        font-size: 13px;
        line-height: 1.9;
    }

    .support-methods {
        grid-template-columns: 1fr;

        gap: 10px;

        padding-bottom: 35px;
    }

    .support-card {
        min-height: 175px;
    }


    /* FOOTER */

    .footer-inner {
        width: calc(100% - 24px);
    }

    .copyright {
        width: calc(100% - 24px);
    }

    .download-actions {
        flex-direction: column;
    }
}


/* =========================================================
   RESPONSIVE — SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .account span {
        display: none;
    }

    .account {
        gap: 8px;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .support-box {
        padding: 22px 15px;
    }

    .poster {
        width: 220px;
    }
}