/* ============================================================
   EVERY OTHER PAGE — rules only the browse pages, company and series pages, trending, the history pages, the account pages, About, Contact, Terms and Privacy uses
   ============================================================
   Loaded after gaming-theme.css, and before the first paint only on
   that page (Helpers/PageStyles.cs). A rule belongs here while every
   class it needs is used by this page alone; once another page uses
   one, the rule moves to gaming-theme.css (PageStylesTests).
   ============================================================ */

.gn-hero-eyebrow {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
}

/* --- Search bar ------------------------------------------- */
.gn-search {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
}

.gn-search-input {
    width: 100%;
    padding: 0.875rem 1.25rem 0.875rem 3rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

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

.gn-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}

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

/* ── Legal pages (Terms, Privacy) ───────────────────────────── */
.legal-page {
    max-width: 780px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9375rem;
}

.legal-page section { margin-top: 2.5rem; }
.legal-page section:first-of-type { margin-top: 1.5rem; }

.legal-page h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    letter-spacing: 0.3px;
}

.legal-page h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
}

.legal-page p  { margin: 0 0 0.75rem; }
.legal-page ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }
.legal-page li { margin-bottom: 0.35rem; }
.legal-page a  {
    color: var(--accent-cyan);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-page a:hover { color: var(--text-primary); }

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.875rem;
}
.legal-table th,
.legal-table td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.85rem;
    text-align: left;
    vertical-align: top;
    color: var(--text-secondary);
}
.legal-table th {
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.3px;
}
.legal-table td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.legal-table td:nth-child(2) { white-space: nowrap; }

/* ── Account settings page ──────────────────────────────────── */
.acct-page {
    max-width: 720px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.acct-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.75rem 1.5rem;
}

.acct-card-head { margin-bottom: 1.25rem; }

.acct-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
    letter-spacing: 0.3px;
}

.acct-card-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.45;
}

.acct-card-danger { border-color: rgba(185, 28, 28, 0.45); }

.acct-profile-row {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.acct-profile-meta { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }

.acct-kv {
    display: flex;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.acct-kv strong {
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acct-msg {
    border-radius: var(--radius-md);
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.acct-msg-ok {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.acct-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.acct-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* Pending-deletion banner — red tint so the user can't miss that their
   account is on its way out. Appears above everything else on the page so
   the Cancel button is the first interactive control they encounter. */
.acct-pending-banner {
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid rgba(185, 28, 28, 0.45);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    color: var(--text-secondary);
}

.acct-pending-head {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.acct-pending-head > svg {
    color: #fca5a5;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.acct-pending-head strong { color: #fca5a5; display: block; }

.acct-pending-head p {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
}
.acct-pending-head p strong { color: var(--text-primary); display: inline; }

.acct-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.gl-search-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

.gl-search-form .gn-search { flex: 1; margin: 0; }

@media (max-width: 900px) {

    .gl-search-form { flex-direction: column; }
    .gl-search-form .gn-search { max-width: 100%; }
}

@media (max-width: 640px) {
    .gl-hero-inner .gn-hero-eyebrow { display: none; }
}

.li-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.875rem;
}

.li-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.125rem 1.25rem;
    min-height: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.li-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, var(--accent-glow) 0%, transparent 55%);
    opacity: 0.3;
    z-index: -1;
    transition: opacity var(--transition);
}

.li-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.li-card:hover::before { opacity: 0.85; }

.li-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin-bottom: 0.375rem;
    display: block;
}

.li-card-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* --- Browse pages: groups, tile meta, genre covers, letters ------ */
.li-group { margin-top: 2.5rem; }
.li-group:first-child { margin-top: 0; }
.li-group-head { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.li-group-note { font-size: 0.85rem; color: var(--text-muted); }
.li-card-meta { display: block; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; margin-bottom: 0.45rem; }
.li-tag-trending { display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: rgba(6, 182, 212, 0.14); color: var(--accent-cyan); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em; }
.li-letters { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: -0.25rem 0 1rem; }
.li-letter { min-width: 2rem; height: 2rem; padding: 0 0.5rem; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--text-secondary); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.li-letter:hover:not(:disabled) { background: var(--bg-elevated); color: var(--text-primary); }
.li-letter.active { background: var(--accent); color: #fff; }
.li-letter:disabled { opacity: 0.3; cursor: default; }
.li-letter:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.li-pills .gl-pill { text-decoration: none; }
.li-grid-genres { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.li-card-genre { min-height: 150px; justify-content: flex-start; }
.li-genre-covers { display: flex; margin-bottom: 0.9rem; }
.li-genre-covers img { width: 48px; height: 64px; object-fit: cover; border-radius: 5px; border: 2px solid var(--bg-card); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); background: var(--bg-elevated); }
.li-genre-covers img + img { margin-left: -14px; }
.li-card:hover .li-genre-covers img + img { margin-left: -6px; }
.li-genre-covers img { transition: margin var(--transition); }
.li-card-genre .li-card-meta { flex: 1; }

/* --- Trending: platform chips and the top three ------------------ */
.tr-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.tr-chips .dl-chip { text-decoration: none; }
.tr-top { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tr-top-card { position: relative; display: flex; gap: 1rem; padding: 1rem; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border); color: inherit; text-decoration: none; height: 100%; min-width: 0; transition: border-color var(--transition), transform var(--transition); }
.tr-top-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.tr-top-card:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.tr-top-rank { position: absolute; top: 0.6rem; left: 0.6rem; z-index: 1; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.95rem; line-height: 1; padding: 0.25rem 0.45rem; border-radius: 6px; background: var(--accent); color: #fff; }
.tr-top-cover { width: 120px; height: 160px; object-fit: cover; border-radius: 8px; flex: none; background: var(--bg-elevated); }
.tr-top-body { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.tr-top-title { font-family: 'Rajdhani', sans-serif; font-size: 1.25rem; font-weight: 700; line-height: 1.15; color: var(--text-primary); }
.tr-top-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-muted); }
.tr-top-score { position: static; width: auto; height: auto; font-size: 0.78rem; padding: 0.15rem 0.45rem; }
.tr-top-summary { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tr-top-cta { margin-top: auto; font-size: 0.8rem; font-weight: 600; color: var(--accent-cyan); }
@media (max-width: 1000px) { .tr-top { grid-template-columns: 1fr; } .tr-top-summary { -webkit-line-clamp: 2; }
}
@media (max-width: 640px) { .tr-top-cover { width: 84px; height: 112px; }
}

/* --- Company variant: logo + text ------------------------- */
.li-card-company {
    flex-direction: row;
    align-items: center;
    gap: 0.875rem;
    min-height: 84px;
}

.li-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.li-card-company .li-card-title {
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Coming Soon state ------------------------------------ */
.li-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 5rem 2rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.li-coming-soon::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 50% 0%, rgba(124, 58, 237, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 100% 100%, rgba(6, 182, 212, 0.15) 0%, transparent 60%);
    z-index: -1;
}

.li-coming-soon-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.li-coming-soon-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.01em;
}

.li-coming-soon-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    max-width: 520px;
    line-height: 1.7;
    margin: 0 0 1rem;
}

.li-coming-soon-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
}

@media (max-width: 720px) {
    .li-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.625rem; }
    .li-coming-soon { padding: 3rem 1.25rem; }
}

@media (max-width: 640px) {
    .gn-hero-eyebrow { font-size: 0.7rem; }

    /* Touch-friendly search input */
    .gn-search-input {
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        font-size: 16px;   /* prevent iOS zoom on focus */
    }
}

@media (max-width: 380px) {
    .li-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Series page (SeriesPage.razor) ──
   The list is a sequence, so it is numbered: the counter is the play order. Each row
   ends in its hours and price; under the hours runs the total played "so far". */
.sr { padding-bottom:3rem; }
.sr-totals { display:grid; grid-template-columns:repeat(auto-fit, minmax(11rem, 1fr)); gap:0; margin:1.75rem 0 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.sr-total { padding:1rem 1.25rem 1rem 0; }
.sr-total + .sr-total { padding-left:1.25rem; border-left:1px solid var(--border); }
.sr-total dt { font-size:.8rem; color:var(--text-muted); }
.sr-total dd { margin:.15rem 0 0; font-family:'Rajdhani', sans-serif; font-size:2rem; font-weight:700; line-height:1.1; color:var(--text-primary); font-variant-numeric:tabular-nums; }
.sr-total dd.sr-total-note { font-family:'Inter', 'Inter Fallback', 'Inter Fallback Roboto', system-ui, sans-serif; font-size:.78rem; font-weight:400; line-height:1.4; color:var(--text-secondary); }
.sr-heading { margin:2.25rem 0 0; flex-wrap:wrap; row-gap:.25rem; }
.sr-total-note a { color:inherit; text-decoration:underline; text-decoration-color:var(--border-bright); text-underline-offset:2px; }
.sr-total-note a:hover { color:var(--text-primary); }
.sr-list { list-style:none; margin:.75rem 0 0; padding:0; counter-reset:sr; border-top:1px solid var(--border); }
.sr-item { counter-increment:sr; display:grid; grid-template-columns:2.25rem 66px minmax(0,1fr) auto; column-gap:1rem; align-items:center; padding:.85rem 0; border-bottom:1px solid var(--border); }
.sr-item::before { content:counter(sr); font-family:'Rajdhani', sans-serif; font-size:1.5rem; font-weight:700; color:var(--text-muted); text-align:right; font-variant-numeric:tabular-nums; }
.sr-cover { display:block; width:66px; height:88px; border-radius:6px; overflow:hidden; background:var(--bg-elevated); }
.sr-cover img { display:block; width:100%; height:100%; object-fit:cover; }
.sr-title { font-family:'Rajdhani', sans-serif; font-size:1.25rem; font-weight:700; line-height:1.2; color:var(--text-primary); text-decoration:none; }
.sr-title:hover { color:var(--accent-cyan); }
.sr-title:focus-visible { outline:2px solid var(--accent-cyan); outline-offset:2px; border-radius:2px; }
.sr-meta { margin-top:.2rem; font-size:.82rem; color:var(--text-muted); }
/* Two fixed columns, so hours line up under hours and prices under prices whatever a row has. */
.sr-figures { display:grid; grid-template-columns:6rem 5.5rem; column-gap:1.5rem; text-align:right; }
.sr-figure--price { grid-column:2; }
.sr-figure-value { display:block; font-family:'Rajdhani', sans-serif; font-size:1.25rem; font-weight:700; line-height:1.2; color:var(--text-primary); font-variant-numeric:tabular-nums; }
.sr-figure--price .sr-figure-value { color:var(--score-great); }
.sr-figure-note { display:block; font-size:.72rem; color:var(--text-muted); font-variant-numeric:tabular-nums; }
@media (max-width: 640px) {
    /* One total per line: what it is on the left, the figure on the right, its note under the label. */
    .sr-totals { grid-template-columns:1fr; }
    .sr-total { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:1rem; align-items:baseline; padding:.75rem 0; }
    .sr-total + .sr-total { padding-left:0; border-left:0; border-top:1px solid var(--border); }
    .sr-total dt { grid-column:1; grid-row:1; font-size:.9rem; color:var(--text-secondary); }
    .sr-total dd { grid-column:2; grid-row:1 / span 2; margin:0; font-size:1.6rem; align-self:center; }
    .sr-total dd.sr-total-note { grid-column:1; grid-row:2; align-self:start; color:var(--text-muted); }
    /* Number and cover on the left; title, then the figures, on the right. */
    .sr-item { grid-template-columns:1.5rem 54px minmax(0,1fr); column-gap:.75rem; align-items:start; }
    .sr-item::before { font-size:1.2rem; padding-top:.1rem; }
    .sr-cover { width:54px; height:72px; }
    .sr-title { font-size:1.1rem; }
    .sr-figures { grid-column:3; grid-template-columns:6.5rem auto; justify-content:start; column-gap:1rem; margin-top:.5rem; text-align:left; }
    .sr-figure--price { grid-column:2; }
}

/* Company page. The hero is a centred 720 px column (.gl-hero-inner): the links row
   under the intro is centred with it, and the description below sits in the same
   column, its text left-aligned so a long one still reads as a paragraph. */
.cp-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem 1.25rem; }
.cp-about { max-width: 720px; margin: 0 auto 1.5rem; }
.cp-igdb { color: var(--text-secondary); font-size: 0.875rem; text-decoration: underline; text-underline-offset: 3px; }
.cp-igdb:hover { color: var(--text-primary); }

/* ── History lists: release dates that moved, new lowest prices, Steam's risers and
   fallers (HistoryRow). A cover, the title with one line under it, and the fact on
   the right in tabular figures; on a phone the fact drops under the title. ───────── */
.hy-group { max-width: 52rem; margin: 0 auto 2.25rem; }
.hy-heading { font-family: 'Rajdhani', sans-serif; font-size: 1.35rem; font-weight: 700; margin: 0 0 0.75rem; color: var(--text-primary); }
.hy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.hy-list-wide { max-width: 52rem; margin: 0 auto 2.25rem; }
.hy-row { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0.2rem 0.9rem; align-items: center; padding: 0.55rem 0.9rem 0.55rem 0.55rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.hy-cover { display: block; width: 3rem; height: 4rem; border-radius: 6px; overflow: hidden; background: var(--bg-elevated); }
.hy-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hy-cover-empty { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--text-muted); font-family: 'Rajdhani', sans-serif; font-weight: 700; }
.hy-main { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.hy-title { color: var(--text-primary); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.hy-title:hover, .hy-title:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.hy-sub { color: var(--text-muted); font-size: 0.82rem; line-height: 1.4; }
.hy-sub:empty { display: none; }
.hy-sub a { color: var(--text-secondary); }
.hy-fact { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; text-align: right; font-variant-numeric: tabular-nums; }
.hy-dates { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 0.1rem 0.6rem; color: var(--text-primary); }
.hy-dates s { color: var(--text-muted); font-size: 0.88rem; }
.hy-dates strong { font-weight: 600; }
.hy-price { font-family: 'Rajdhani', sans-serif; font-size: 1.25rem; }
.hy-note { font-size: 0.8rem; color: var(--text-muted); }
.hy-note.hy-later { color: var(--score-mixed); }
.hy-note.hy-earlier { color: var(--accent-cyan); }
.hy-change { font-family: 'Rajdhani', sans-serif; font-size: 1.35rem; font-weight: 700; }
.hy-change.hy-up { color: var(--score-great); }
.hy-change.hy-down { color: var(--score-bad); }
.hy-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; align-items: start; max-width: 76rem; margin: 0 auto; }
.hy-cols .hy-group { max-width: none; margin-left: 0; margin-right: 0; width: 100%; }
@media (max-width: 900px) {
    .hy-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .hy-row { grid-template-columns: 3rem minmax(0, 1fr); }
    .hy-fact { grid-column: 2; align-items: flex-start; text-align: left; }
    .hy-dates { justify-content: flex-start; }
}
