/* ==========================================================================
   Play Store-style hero + game headers (loads last; overrides fx.css bg look)
   Crisp trailer fills the top, dark fade on the left carries the text.
   ========================================================================== */

/* ----- the video layer: sharp, slightly dimmed, no blur ----- */
.bg-video iframe {
    filter: brightness(0.95) saturate(1.1);
    /* oversize so YouTube's title strip / end cards are cropped away */
    transform: translate(-50%, -50%) scale(1.1);
    right: auto;
}
.bg-video::after {
    background:
        linear-gradient(90deg, rgba(11, 13, 16, 0.94) 0%, rgba(11, 13, 16, 0.78) 26%, rgba(11, 13, 16, 0.18) 60%, transparent 100%),
        linear-gradient(180deg, rgba(11, 13, 16, 0.45) 0%, transparent 16%, transparent 70%, var(--bg) 100%);
}

/* ----- Homepage hero ----- */
.hero {
    min-height: clamp(560px, 56.25vw, calc(100vh - var(--nav-h)));
    display: flex;
    align-items: flex-end;
    padding: 120px 0 56px;
    background: var(--bg);
}
.hero::before, .hero::after { display: none; }
.hero-store {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}
.hero-main { max-width: 560px; }
.hero h1 { font-size: clamp(3rem, 7vw, 5.6rem); margin: 8px 0 14px; }
.hero .lede { margin-bottom: 22px; color: #c3c9d2; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6); }

.hero-stats {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 26px;
}
.hero-stats div { display: flex; flex-direction: column; line-height: 1.2; }
.hero-stats b { font-size: 1.05rem; font-weight: 800; }
.hero-stats span { font-size: 0.78rem; color: var(--dim); }
.hero-stats i { width: 1px; height: 28px; background: var(--line-2); }

.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex: none; }
.now-playing, .sound-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font: 600 0.88rem/1 var(--font);
    color: #fff;
    padding: 13px 20px;
    border-radius: 999px;
    background: rgba(11, 13, 16, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.now-playing:hover, .sound-btn:hover { background: rgba(31, 41, 55, 0.85); border-color: var(--accent); transform: translateY(-2px); }
.now-playing[hidden], .sound-btn[hidden] { display: none; }
.now-playing b { font-weight: 800; }
.np-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #ef4444;
    animation: pulse 1.8s ease-in-out infinite;
}
.sound-ico {
    width: 16px; height: 16px; display: inline-block;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: 0.6;
}
.sound-btn.on .sound-ico { opacity: 1; color: var(--accent); }

/* ----- Game pages: store-style header ----- */
.game-head {
    min-height: clamp(520px, 56.25vw, calc(100vh - var(--nav-h)));
    display: flex;
    align-items: flex-end;
    padding: 70px 0 48px;
    background: var(--bg);
}
.game-page .game-head { background: var(--bg); }
.game-head .head-grid {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 26px;
}
.game-head .head-info { max-width: 620px; }
.game-head .head-icon-row { flex-direction: row; align-items: center; }
.game-head .head-actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
}
.game-head .head-actions .btn { width: auto; flex: 0 1 auto; padding: 13px 26px; }
.game-page .game-head h1 { text-shadow: none; }

/* when there's no trailer (none left now, but keep it graceful) */
.game-head:not([data-bg-trailers]) { min-height: 0; }

@media (max-width: 980px) {
    .hero { min-height: 0; padding: 72px 0 56px; text-align: left; }
    .hero .lede { margin-left: 0; }
    .hero-actions { justify-content: flex-start; }
    .hero-store { flex-direction: column; align-items: flex-start; }
    .hero-side { flex-direction: row; align-items: center; }
    .game-head { min-height: 0; }
}
@media (max-width: 560px) {
    .hero { text-align: left; }
    .hero-actions { justify-content: flex-start; }
}
