/* ==========================================================================
   GG Free — karta gry
   ========================================================================== */

.detail-header .topbar {
    padding-block: 0.8rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 0.18s ease;
}

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

/* Hero --------------------------------------------------------------------- */

.game-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
}

.game-hero-bg {
    position: absolute;
    inset: -2rem;
    width: calc(100% + 4rem);
    height: calc(100% + 4rem);
    object-fit: cover;
    opacity: 0.32;
    filter: blur(26px) saturate(130%);
    transform: scale(1.03);
    pointer-events: none;
}

.game-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 10, 15, 0.94), rgba(7, 10, 15, 0.7) 55%, rgba(7, 10, 15, 0.45)),
        linear-gradient(180deg, rgba(7, 10, 15, 0.1) 40%, var(--bg) 100%);
    pointer-events: none;
}

.game-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    align-items: start;
    gap: 2rem;
    padding-block: 2.6rem 2.8rem;
}

.game-cover {
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.game-cover img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 460 / 215;
    object-fit: cover;
}

.cover-fallback {
    display: grid;
    place-items: center;
    aspect-ratio: 460 / 215;
    color: rgba(148, 163, 184, 0.25);
    font-size: 2.5rem;
    font-weight: 850;
    letter-spacing: -0.06em;
    background:
        radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.25), transparent 60%),
        radial-gradient(circle at 75% 75%, rgba(34, 211, 238, 0.18), transparent 55%),
        #0e151e;
}

.game-intro h1 {
    margin: 0.6rem 0 0.85rem;
    font-size: clamp(2.1rem, 4.8vw, 3.5rem);
    font-weight: 850;
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.game-lead {
    max-width: 65ch;
    margin: 0;
    color: var(--muted);
    font-size: clamp(0.94rem, 1.1vw, 1.02rem);
    line-height: 1.6;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

a.tag {
    text-decoration: none;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

a.tag:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
}

a.tag-mode:hover {
    color: inherit;
}

.hero-review {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hero-review strong {
    color: var(--green);
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.hero-review span {
    color: var(--muted);
    font-size: 0.82rem;
}

.game-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.btn-install,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.68rem 1.1rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.btn-install {
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--green), var(--accent-2));
    color: #041016;
    box-shadow: 0 10px 30px rgba(52, 211, 153, 0.18);
}

.btn-install:hover {
    filter: brightness(1.07);
}

.btn-install:active {
    transform: translateY(1px);
}

.btn-secondary {
    border: 1px solid var(--line-strong);
    background: rgba(13, 20, 29, 0.82);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.12);
}

.btn-ghost {
    border: 1px solid transparent;
    color: var(--muted);
    background: transparent;
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.install-hint {
    max-width: 65ch;
    margin: 0.7rem 0 0;
    color: #7f8da2;
    font-size: 0.76rem;
    line-height: 1.5;
}

.install-hint a {
    color: var(--accent-2);
}

.platform-line {
    margin: 0.8rem 0 0;
    color: #6b7a8f;
    font-size: 0.76rem;
}

/* Układ ------------------------------------------------------------------- */

.game-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 2rem;
    padding-block: 2.5rem 1rem;
}

.game-main {
    min-width: 0;
}

.game-sidebar {
    min-width: 0;
}

.game-section {
    margin-bottom: 2.5rem;
}

.game-section h2 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Trailer ----------------------------------------------------------------- */

.trailer-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #030508;
}

.trailer-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(3, 5, 8, 0.05), rgba(3, 5, 8, 0.55));
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.trailer-shell.is-playing::after {
    opacity: 0;
}

.trailer-poster {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trailer-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    translate: -50% -50%;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.78rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(5, 10, 15, 0.82);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 750;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.trailer-play:hover {
    background: rgba(139, 92, 246, 0.72);
    border-color: rgba(255, 255, 255, 0.45);
}

.trailer-play:active {
    transform: translate(-50%, -50%) scale(0.98);
}

.trailer-unmute {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(5, 10, 15, 0.86);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.trailer-unmute:hover {
    background: rgba(139, 92, 246, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

.trailer-unmute:focus-visible {
    outline: 2px solid #a5f3fc;
    outline-offset: 2px;
}

.trailer-shell video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.trailer-note {
    min-height: 1.15em;
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.trailer-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.trailer-tab {
    padding: 0.38rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 650;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.trailer-tab:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.trailer-tab.is-active,
.trailer-tab[aria-pressed="true"] {
    color: #a5f3fc;
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.1);
}

/* Galeria ----------------------------------------------------------------- */

.shot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.6rem;
}

.shot {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.shot:hover {
    border-color: rgba(139, 92, 246, 0.55);
    transform: translateY(-2px);
}

.shot:hover img {
    transform: scale(1.035);
}

/* Opis -------------------------------------------------------------------- */

.game-description {
    max-width: 78ch;
    color: #b7c3d3;
    font-size: 0.94rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.game-description > :first-child {
    margin-top: 0;
}

.game-description p,
.game-description ul,
.game-description ol,
.game-description blockquote,
.game-description table {
    margin: 0 0 1rem;
}

.game-description h1,
.game-description h2,
.game-description h3,
.game-description h4 {
    margin: 1.5em 0 0.6em;
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.game-description h1 { font-size: 1.35rem; }
.game-description h2 { font-size: 1.2rem; }
.game-description h3 { font-size: 1.05rem; }
.game-description h4 { font-size: 0.95rem; }

.game-description a {
    color: var(--accent-2);
    text-decoration: none;
}

.game-description a:hover {
    text-decoration: underline;
}

.game-description img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.game-description ul,
.game-description ol {
    padding-left: 1.4rem;
}

.game-description li {
    margin-bottom: 0.35rem;
}

.game-description blockquote {
    padding: 0.4rem 0 0.4rem 1rem;
    border-left: 2px solid var(--accent);
    color: var(--muted);
}

.game-description table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.game-description th,
.game-description td {
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.game-description code {
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    font-family: var(--mono);
    font-size: 0.86em;
}

/* Wymagania --------------------------------------------------------------- */

.requirements {
    display: grid;
    gap: 0.6rem;
}

.req-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
}

.req-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
}

.req-card summary::-webkit-details-marker {
    display: none;
}

.req-card summary::after {
    content: "+";
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
}

.req-card[open] summary::after {
    content: "−";
}

.req-body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.84rem;
}

.req-body h3 {
    margin: 0.9rem 0 0.35rem;
    color: var(--text);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.req-html ul {
    margin: 0;
    padding-left: 1.2rem;
}

.req-html li {
    margin-bottom: 0.2rem;
}

.req-html strong {
    color: #cdd8e6;
}

/* Panel boczny ------------------------------------------------------------ */

.panel {
    margin-bottom: 0.9rem;
    padding: 1.05rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.panel h2 {
    margin: 0 0 0.8rem;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.review-score {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
}

.review-score strong {
    color: var(--green);
    font-size: 2rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.review-score span {
    color: var(--muted);
    font-size: 0.78rem;
}

.review-progress {
    width: 100%;
    height: 0.55rem;
    margin: 0.8rem 0 0.55rem;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    background: rgba(148, 163, 184, 0.16);
}

.review-progress::-webkit-progress-bar {
    background: rgba(148, 163, 184, 0.16);
    border-radius: 999px;
}

.review-progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green), var(--accent-2));
}

.review-progress::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green), var(--accent-2));
}

.review-details {
    margin: 0;
    color: #7f8da2;
    font-size: 0.76rem;
    line-height: 1.45;
}

.panel-link {
    display: inline-block;
    margin-top: 0.55rem;
    color: var(--accent-2);
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
}

.panel-link + .panel-link {
    display: block;
}

.panel-link:hover {
    text-decoration: underline;
}

.info-list {
    margin: 0;
}

.info-list > div {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 0.55rem;
    padding-block: 0.55rem;
    border-top: 1px solid var(--line);
}

.info-list > div:first-child {
    padding-top: 0;
    border-top: 0;
}

.info-list > div:last-child {
    padding-bottom: 0;
}

.info-list dt {
    color: #6f7f94;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.info-list dd {
    margin: 0;
    color: #cfd9e6;
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: right;
    overflow-wrap: anywhere;
}

.info-list dd a {
    color: var(--accent-2);
    text-decoration: none;
}

.info-list dd a:hover {
    text-decoration: underline;
}

.rating-badge {
    display: inline-block;
    margin: 0.1rem 0 0.1rem 0.25rem;
    padding: 0.1rem 0.35rem;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    color: #cdd8e6;
    font-size: 0.68rem;
    white-space: nowrap;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
}

.feature-tag {
    padding: 0.22rem 0.48rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: #a9b6c9;
    font-size: 0.7rem;
}

.muted {
    color: var(--muted);
    font-size: 0.82rem;
}

/* Lightbox ---------------------------------------------------------------- */

.lightbox-open {
    overflow: hidden;
}

.lightbox {
    width: min(100% - 2rem, 1200px);
    max-width: 1200px;
    max-height: 92vh;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #05080c;
    color: var(--text);
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.86);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.lightbox-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 12rem;
    padding: 1rem;
}

.lightbox img {
    display: block;
    max-width: 100%;
    max-height: 84vh;
    object-fit: contain;
    border-radius: 0.45rem;
}

.lightbox button {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(7, 10, 15, 0.78);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: background 0.18s ease;
}

.lightbox button:hover {
    background: rgba(139, 92, 246, 0.7);
}

.lightbox-close {
    top: 0.55rem;
    right: 0.55rem;
}

.lightbox-prev {
    top: 50%;
    left: 0.55rem;
    translate: 0 -50%;
}

.lightbox-next {
    top: 50%;
    right: 0.55rem;
    translate: 0 -50%;
}

/* Błąd -------------------------------------------------------------------- */

.game-error {
    padding-block: 4rem 6rem;
}

.game-error .state {
    max-width: 620px;
    margin-inline: auto;
}

.game-error .state h1 {
    margin: 0.55rem 0 0;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
}

.game-error .btn-install {
    margin-top: 1rem;
}

/* Responsywność ----------------------------------------------------------- */

@media (max-width: 980px) {
    .game-hero-inner {
        grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
        gap: 1.5rem;
    }

    .game-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 1.5rem;
    }
}

@media (max-width: 820px) {
    .game-hero-inner {
        grid-template-columns: minmax(0, 1fr);
        padding-block: 2rem 2.2rem;
    }

    .game-cover {
        width: min(100%, 420px);
    }

    .game-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .game-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 0.8rem;
    }

    .panel {
        margin-bottom: 0;
    }
}

@media (max-width: 560px) {
    .game-intro h1 {
        font-size: clamp(1.9rem, 9vw, 2.5rem);
    }

    .game-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .btn-install,
    .btn-secondary,
    .btn-ghost {
        width: 100%;
    }

    .game-section {
        margin-bottom: 2rem;
    }

    .shot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .trailer-play {
        padding: 0.65rem 0.9rem;
        font-size: 0.78rem;
    }

    .trailer-unmute {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.4rem 0.65rem;
        font-size: 0.7rem;
    }

    .lightbox-inner {
        min-height: 8rem;
        padding: 0.5rem;
    }

    .lightbox button {
        width: 2.15rem;
        height: 2.15rem;
    }

    .info-list > div {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}
