/* The Games Vault — hub styles */

:root {
    --gv-red: #C90C0F;
    --gv-red-deep: #8e080a;
    --gv-gold: #FAB719;
    --gv-gold-soft: #fcd34d;
    --gv-ink: #0b1220;
    --gv-slate: #1a2332;
    --gv-slate-mid: #243044;
    --gv-text: #f4f1ea;
    --gv-text-muted: #a8b3c5;
    --gv-surface: rgba(15, 22, 36, 0.82);
    --gv-surface-solid: #121a28;
    --gv-border: rgba(250, 183, 25, 0.22);
    --gv-border-soft: rgba(255, 255, 255, 0.08);
    --gv-radius: 14px;
    --gv-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --gv-font-display: "Rockwell", "Rockwell Nova", "Roboto Slab", Georgia, serif;
    --gv-font-body: "Rockwell", "Rockwell Nova", "Roboto Slab", Georgia, serif;
    --gv-max: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.gv-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--gv-font-body);
    color: var(--gv-text);
    background: var(--gv-ink);
    line-height: 1.55;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

body.gv-page button,
body.gv-page a,
body.gv-page input,
body.gv-page select,
body.gv-page textarea {
    touch-action: manipulation;
}

/* Atmospheric backdrop */
.gv-backdrop {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(160deg, rgba(11, 18, 32, 0.88) 0%, rgba(26, 35, 50, 0.78) 45%, rgba(141, 8, 10, 0.35) 100%),
        url('/interactive/shared/backgrounds/gamesroom.png') center / cover no-repeat;
    pointer-events: none;
}

.gv-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 15% 10%, rgba(201, 12, 15, 0.28), transparent 55%),
        radial-gradient(ellipse 55% 45% at 90% 20%, rgba(250, 183, 25, 0.14), transparent 50%),
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(11, 18, 32, 0.85), transparent 60%);
    pointer-events: none;
}

/* Top bar */
.gv-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(11, 18, 32, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--gv-border-soft);
}

.gv-topbar-inner {
    max-width: var(--gv-max);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gv-brand-mark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.gv-brand-mark img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--gv-border);
}

.gv-brand-mark span {
    font-family: var(--gv-font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--gv-text);
}

.gv-brand-mark em {
    font-style: normal;
    color: var(--gv-gold);
}

.gv-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.gv-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--gv-border-soft);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--gv-gold);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    position: relative;
}

.gv-icon-btn:hover {
    background: rgba(201, 12, 15, 0.18);
    border-color: rgba(201, 12, 15, 0.45);
    color: #fff;
}

.gv-icon-btn:active {
    transform: scale(0.96);
}

.friends-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--gv-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

.gv-friends-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--gv-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

.gv-user-slot {
    display: flex;
    align-items: center;
}

/* Hero — one composition */
.gv-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--gv-border-soft);
}

.gv-hero-inner {
    max-width: var(--gv-max);
    margin: 0 auto;
    padding: clamp(1.75rem, 4vw, 3rem) 1.5rem clamp(1.5rem, 3vw, 2.25rem);
    display: grid;
    gap: 0.85rem;
    align-items: end;
}

.gv-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gv-gold);
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
}

.gv-hero h1 {
    margin: 0;
    font-family: var(--gv-font-display);
    font-size: clamp(2.6rem, 7vw, 4.4rem);
    line-height: 0.98;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    max-width: 12ch;
}

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

.gv-hero-lead {
    margin: 0;
    max-width: 36rem;
    color: var(--gv-text-muted);
    font-size: clamp(1rem, 2.2vw, 1.15rem);
}

.gv-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.gv-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--gv-border-soft);
    background: rgba(255, 255, 255, 0.04);
    color: var(--gv-text-muted);
    font-size: 0.82rem;
}

.gv-pill strong {
    color: var(--gv-text);
    font-weight: 700;
}

/* Filters + main */
.gv-main {
    max-width: var(--gv-max);
    margin: 0 auto;
    padding: 1.75rem 1.5rem 4rem;
}

.gv-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gv-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gv-filter {
    appearance: none;
    border: 1px solid var(--gv-border-soft);
    background: rgba(255, 255, 255, 0.04);
    color: var(--gv-text-muted);
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gv-filter:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.gv-filter.is-active {
    background: var(--gv-red);
    border-color: var(--gv-red);
    color: #fff;
}

.gv-search {
    position: relative;
    min-width: min(100%, 260px);
}

.gv-search input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--gv-border-soft);
    background: rgba(0, 0, 0, 0.28);
    color: var(--gv-text);
    font: inherit;
    font-size: 0.95rem;
}

.gv-search input::placeholder {
    color: var(--gv-text-muted);
}

.gv-search i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gv-text-muted);
    pointer-events: none;
}

.gv-search input:focus {
    outline: 2px solid rgba(250, 183, 25, 0.45);
    outline-offset: 1px;
    border-color: var(--gv-gold);
}

/* Game grid */
.gv-featured {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    margin: 0 0 1.5rem;
    text-decoration: none;
    color: inherit;
    border-radius: var(--gv-radius);
    overflow: hidden;
    border: 1px solid var(--gv-border);
    background:
        linear-gradient(120deg, rgba(201, 12, 15, 0.28) 0%, rgba(18, 26, 40, 0.96) 42%, rgba(18, 26, 40, 0.96) 100%);
    box-shadow: var(--gv-shadow);
    min-height: 168px;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.gv-featured:hover,
.gv-featured:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(250, 183, 25, 0.55);
    box-shadow: 0 24px 55px rgba(201, 12, 15, 0.28);
    outline: none;
}

.gv-featured-media {
    position: relative;
    min-height: 168px;
    background: #0f172a;
}

.gv-featured-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gv-featured-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.2rem 1.4rem;
    min-width: 0;
}

.gv-featured-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--gv-gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gv-featured-title {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.gv-featured-desc {
    margin: 0;
    color: var(--gv-text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gv-featured-cta {
    display: flex;
    align-items: center;
    padding: 0 1.4rem 0 0.5rem;
}

.gv-featured-cta .gv-play {
    width: auto;
    min-width: 9.5rem;
    margin-top: 0;
    padding: 0.9rem 1.35rem;
}

.gv-daily-leagues {
    margin: 0 0 1.35rem;
}

.gv-section[hidden] {
    display: none;
}

.gv-section-title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 2.6vw, 1.75rem);
    font-weight: 700;
    color: #fff;
}

.gv-section-title span {
    color: var(--gv-gold);
}

.gv-section-lead {
    margin: 0 0 1.15rem;
    color: var(--gv-text-muted);
    max-width: 40rem;
}

.gv-section-plain > .gv-section-title {
    display: none;
}

.gv-section-party {
    margin-top: 2.4rem;
    padding-top: 1.85rem;
    border-top: 1px solid var(--gv-border);
}

.gv-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
}

.gv-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--gv-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--gv-surface-solid);
    border: 1px solid var(--gv-border-soft);
    box-shadow: var(--gv-shadow);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
    min-height: 100%;
}

.gv-card:hover,
.gv-card:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(201, 12, 15, 0.55);
    box-shadow: 0 24px 55px rgba(201, 12, 15, 0.22);
    outline: none;
}

.gv-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(145deg, #1e293b, #0f172a);
}

.gv-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.gv-card:hover .gv-card-media img {
    transform: scale(1.04);
}

.gv-card-media::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(11, 18, 32, 0.92), transparent);
    pointer-events: none;
}

.gv-daily-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
}

.gv-daily-badge.ready {
    background: rgba(201, 12, 15, 0.92);
    border-color: transparent;
}

.gv-daily-badge.completed {
    background: rgba(16, 185, 129, 0.92);
    border-color: transparent;
}

.gv-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.15rem 1.2rem 1.3rem;
    flex: 1;
}

.gv-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.gv-tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gv-gold);
    background: rgba(250, 183, 25, 0.12);
    border: 1px solid rgba(250, 183, 25, 0.25);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.gv-tag-party {
    color: #fff;
    background: rgba(201, 12, 15, 0.28);
    border-color: rgba(201, 12, 15, 0.45);
}

.gv-card-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.gv-card-desc {
    margin: 0;
    color: var(--gv-text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gv-stats,
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.25rem;
    padding: 0.55rem 0.4rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--gv-border-soft);
    min-height: 3.1rem;
}

.gv-stat,
.stats-bar .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-align: center;
}

.gv-stat-value,
.stats-bar .stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gv-gold);
    line-height: 1.1;
}

.gv-stat-label,
.stats-bar .stat-label {
    font-size: 0.62rem;
    color: var(--gv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stats-bar .stat-icon {
    display: none;
}

.stats-bar .stat-item.highlight .stat-value {
    color: var(--gv-gold-soft);
}

.gv-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: var(--gv-red);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    transition: background 0.2s ease;
}

.gv-card:hover .gv-play {
    background: var(--gv-red-deep);
}

.gv-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gv-text-muted);
    border: 1px dashed var(--gv-border-soft);
    border-radius: var(--gv-radius);
}

/* Mobile drawer */
.gv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9997;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gv-overlay.active {
    display: block;
    opacity: 1;
}

.gv-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100vh;
    background: var(--gv-surface-solid);
    border-left: 1px solid var(--gv-border-soft);
    z-index: 9998;
    transform: translateX(105%);
    transition: transform 0.28s ease;
    padding: 1.25rem;
    overflow-y: auto;
}

.gv-drawer.active {
    transform: translateX(0);
}

.gv-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--gv-border-soft);
}

.gv-drawer-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--gv-gold);
}

/* Signup reminder */
#signup-reminder-banner {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: 420px;
    width: calc(100% - 2rem);
    background: linear-gradient(145deg, #1a2332, #121a28);
    color: var(--gv-text);
    padding: 1rem 1.15rem;
    border-radius: 12px;
    box-shadow: var(--gv-shadow);
    z-index: 9999;
    border: 1px solid var(--gv-border);
}

#signup-reminder-banner .btn-primary,
#signup-reminder-banner button.btn-primary {
    background: var(--gv-red) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 700;
    cursor: pointer;
}

#signup-reminder-banner .btn-secondary,
#signup-reminder-banner button.btn-secondary {
    background: transparent !important;
    color: var(--gv-text) !important;
    border: 1px solid var(--gv-border-soft) !important;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Auth / friends compatibility on dark hub */
body.gv-page .user-display,
body.gv-page .profile-badge,
body.gv-page .auth-toggle {
    color: var(--gv-text);
}

/* Responsive */
@media (max-width: 980px) {
    .gv-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .gv-user-desktop {
        display: none;
    }

    .gv-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gv-hero-inner {
        padding-top: 2rem;
    }

    .gv-featured {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .gv-featured-media {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .gv-featured-cta {
        padding: 0 1.2rem 1.2rem;
    }

    .gv-featured-cta .gv-play {
        width: 100%;
    }

    .gv-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .gv-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .gv-filter {
        flex: 0 0 auto;
    }

    .gv-card-desc {
        -webkit-line-clamp: 2;
    }

    .gv-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 721px) {
    .gv-burger {
        display: none;
    }

    .gv-drawer,
    .gv-overlay {
        display: none !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
