/* ==========================================================================
   XDEV Studio - Games showcase page
   ========================================================================== */

.main-nav .is-current {
    color: var(--text);
    background: rgba(10, 18, 39, 0.9);
}

.showcase-hero {
    position: relative;
    padding: 104px 0 72px;
    overflow: hidden;
}

.showcase-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 24px;
    align-items: end;
}

.showcase-copy {
    max-width: 760px;
}

.showcase-copy .section-kicker {
    margin-bottom: 18px;
}

.showcase-copy .section-title {
    margin-bottom: 16px;
}

.showcase-copy .subtitle {
    margin: 0;
}

.showcase-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 24px;
}

.stat-block {
    position: relative;
    z-index: 1;
    padding: 20px 16px;
    border-radius: 22px;
    background: rgba(8, 14, 31, 0.72);
    border: 1px solid rgba(140, 162, 255, 0.12);
}

.stat-label {
    display: block;
    color: #b7f7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.stat-value {
    display: block;
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 34px);
    text-transform: uppercase;
}

.gallery-section {
    padding: 0 0 104px;
}

.gallery-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.gallery-head .section-kicker {
    margin-bottom: 18px;
}

.gallery-count {
    color: #c2fbff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.filter-chip {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(140, 162, 255, 0.18);
    background: rgba(7, 12, 28, 0.64);
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
}

.filter-chip:hover,
.filter-chip.is-active {
    color: var(--text);
    border-color: rgba(77, 221, 255, 0.36);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
    transform: translateY(-1px);
}

.filter-chip.is-active {
    background: linear-gradient(90deg, rgba(59, 107, 255, 0.28), rgba(236, 49, 255, 0.2));
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.gallery-card {
    border-radius: 28px;
}

.gallery-card-button {
    width: 100%;
    border: none;
    padding: 0;
    text-align: left;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.gallery-card-media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-bottom: 1px solid rgba(140, 162, 255, 0.12);
    background:
        radial-gradient(circle at 18% 20%, rgba(59, 107, 255, 0.18), transparent 28%),
        radial-gradient(circle at 82% 82%, rgba(236, 49, 255, 0.16), transparent 22%),
        linear-gradient(180deg, rgba(12, 22, 51, 0.96), rgba(8, 14, 30, 0.96));
}

.gallery-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-card-media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.32));
}

.gallery-card-tag,
.gallery-card-status {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gallery-card-tag {
    top: 14px;
    left: 14px;
    background: rgba(8, 18, 40, 0.88);
    border: 1px solid rgba(77, 221, 255, 0.2);
    color: #b7f7ff;
}

.gallery-card-status {
    top: 14px;
    right: 14px;
    background: rgba(15, 21, 46, 0.88);
    border: 1px solid rgba(140, 162, 255, 0.18);
    color: var(--text-muted);
}

.gallery-card-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    padding: 22px;
}

.gallery-card-body h3 {
    font-size: 22px;
}

.gallery-card-body p {
    color: var(--text-muted);
    font-size: 15px;
}

.gallery-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(7, 12, 28, 0.72);
    border: 1px solid rgba(140, 162, 255, 0.12);
    color: var(--text-muted);
    font-size: 13px;
}

.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.gallery-modal[hidden] {
    display: none;
}

.gallery-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 3, 10, 0.78);
    backdrop-filter: blur(12px);
}

.gallery-dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    max-height: calc(100vh - 48px);
    padding: 28px;
    border-radius: 30px;
    overflow: auto;
}

.gallery-dialog-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 24px;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(140, 162, 255, 0.18);
    background: rgba(7, 12, 28, 0.84);
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.gallery-viewer {
    display: grid;
    gap: 14px;
}

.gallery-viewer > img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 24px;
    background: rgba(7, 12, 28, 0.72);
    border: 1px solid rgba(140, 162, 255, 0.12);
}

.thumb-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.thumb-button {
    width: 110px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid rgba(140, 162, 255, 0.12);
    border-radius: 16px;
    background: rgba(7, 12, 28, 0.72);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: transform var(--transition), opacity var(--transition), border-color var(--transition);
}

.thumb-button img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.thumb-button:hover,
.thumb-button.is-active {
    opacity: 1;
    transform: translateY(-1px);
    border-color: rgba(77, 221, 255, 0.32);
}

.gallery-details {
    display: grid;
    align-content: start;
    gap: 18px;
}

.detail-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(8, 18, 40, 0.88);
    border: 1px solid rgba(77, 221, 255, 0.2);
    color: #b7f7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.detail-pill-soft {
    border-color: rgba(140, 162, 255, 0.18);
    color: var(--text-muted);
}

.gallery-details h2 {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 44px);
    text-transform: uppercase;
}

.detail-summary {
    color: var(--text);
    font-size: 18px;
}

.detail-description {
    color: var(--text-muted);
}

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-meta-item {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(7, 12, 28, 0.72);
    border: 1px solid rgba(140, 162, 255, 0.12);
}

.detail-meta-item span {
    display: block;
    color: #b7f7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.detail-meta-item strong {
    display: block;
    color: var(--text);
    font-size: 16px;
}

.store-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.store-action img {
    display: block;
    height: 54px;
    width: auto;
}

.store-empty {
    color: var(--text-soft);
    font-size: 14px;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 960px) {
    .showcase-hero-inner,
    .gallery-dialog-grid {
        grid-template-columns: 1fr;
    }

    .stats-panel {
        grid-template-columns: 1fr;
    }

    .gallery-head {
        flex-direction: column;
        align-items: start;
    }
}

@media (max-width: 768px) {
    .showcase-hero {
        padding-top: 82px;
    }

    .showcase-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .showcase-hero,
    .gallery-section {
        padding-bottom: 72px;
    }

    .gallery-dialog {
        padding: 22px;
        border-radius: 24px;
    }

    .gallery-card-body {
        padding: 20px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
    }
}
