/* ── Ugens Opsummering — editorial-dark layout ── */

body {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 16px 120px;
}

/* WIP banner */
.wip-banner {
    background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(245,158,11,0.06));
    border: 1px solid rgba(245,158,11,0.35);
    color: #fcd34d;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin: -4px 0 20px;
}
.wip-banner strong { color: #fde68a; font-weight: 700; }

.ugen-page { color: var(--text); }

/* Masthead (hero-card content) */
.masthead {
    padding: 18px 20px;
    margin-bottom: 14px;
}
.headline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.masthead-meta {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* Hero stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.hero-stat {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 0.15s, transform 0.1s;
}
button.hero-stat:hover,
button.hero-stat:focus-visible { border-color: var(--accent); outline: none; }
button.hero-stat:active { transform: scale(0.98); }
.hero-stat-value {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 28px;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
}
.hero-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Section headings (hero-card content) */
.ugen-page .section {
    padding: 16px 20px;
    margin-bottom: 12px;
}
.ugen-page .section-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ugen-page .section-sub {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: -8px 0 12px;
}

/* Player list — rankings-list style (climbers / droppers / streaks) */
.ugen-page .rank-list {
    display: flex;
    flex-direction: column;
    margin: -4px -8px -4px;
}
.ugen-page .player-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none; color: var(--text); transition: background 0.15s;
}
.ugen-page .player-row:last-child { border-bottom: none; }
a.player-row:hover { background-color: rgba(255,255,255,0.03); }
.ugen-page .player-row:has(.rank-movement.up){
    background-image: radial-gradient(ellipse 45% 180% at 94% 50%, rgba(74,222,128,0.18) 0%, rgba(34,197,94,0.07) 40%, rgba(74,222,128,0) 75%);
}
.ugen-page .player-row:has(.rank-movement.down){
    background-image: radial-gradient(ellipse 45% 180% at 94% 50%, rgba(248,113,113,0.18) 0%, rgba(239,68,68,0.07) 40%, rgba(248,113,113,0) 75%);
}
.ugen-page .player-row:has(.rank-movement.streak){
    background-image: radial-gradient(ellipse 45% 180% at 94% 50%, rgba(251,146,60,0.18) 0%, rgba(245,158,11,0.07) 40%, rgba(251,146,60,0) 75%);
}
.ugen-page .player-left { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; }
.ugen-page .player-left > div:last-child { min-width: 0; flex: 1 1 auto; }
.ugen-page .player-name {
    font-size: 15px; font-weight: 600;
    color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ugen-page .player-club {
    font-size: 12px; color: var(--text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ugen-page .rank-right { display: flex; align-items: center; flex-shrink: 0; }
.ugen-page .rank-badge-wrapper { display: inline-flex; align-items: center; gap: 10px; }
.ugen-page .rank-badge {
    font-family: 'Space Mono', monospace; font-variant-numeric: tabular-nums;
    font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: -0.4px;
    background: linear-gradient(180deg, #ffffff 0%, #c9d1d9 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    text-shadow: 0 0 14px rgba(74,157,110,0.22);
    white-space: nowrap;
    display: inline-flex; align-items: baseline;
}
.ugen-page .rank-hash {
    opacity: 0.6; font-size: 12px; margin-right: 1px; font-weight: 600;
    -webkit-text-fill-color: rgba(74,157,110,0.9); color: rgba(74,157,110,0.9);
}
.ugen-page .rank-movement {
    font-family: 'Space Mono', monospace; font-variant-numeric: tabular-nums;
    font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0.2px;
    white-space: nowrap; pointer-events: none;
    background: transparent; border: none; padding: 0;
}
.ugen-page .rank-movement.up { color: #b8f5c8; text-shadow: 0 0 10px rgba(34,197,94,0.6); }
.ugen-page .rank-movement.down { color: #ffb8b8; text-shadow: 0 0 10px rgba(239,68,68,0.6); }
.ugen-page .rank-movement.streak { color: #fde68a; text-shadow: 0 0 10px rgba(245,158,11,0.6); }

/* Modal player rank chip retained */
.ugen-page .player-rankbadge {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 1px 6px;
    margin-right: 8px;
    vertical-align: 1px;
}

/* Pullquote (upset) — lives inside a hero-card */
.pullquote {
    margin: 0;
    padding: 0;
    text-align: center;
}
.pullquote-teams {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 15px;
}
.pullquote-winner {
    font-weight: 700;
    color: var(--accent);
}
.pullquote-winner a { color: var(--accent); text-decoration: none; }
.pullquote-winner a:hover { text-decoration: underline; }
.pullquote-score {
    font-family: 'Space Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    padding: 4px 0;
}
.pullquote-loser { color: var(--text-muted); font-weight: 500; }
.pullquote-cap {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}
.pullquote-cap strong { color: var(--text); }
.muted { color: var(--text-muted); }

/* Calibration */
.calib-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.calib-grid .calib { padding: 14px; gap: 12px; }
.calib-grid .calib-value { font-size: 26px; }
.calib-grid .calib-label { font-size: 12px; }
.calib {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 16px;
}
.calib-value {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 32px;
    color: var(--accent);
    line-height: 1;
}
.calib-label { font-size: 13px; color: var(--text); line-height: 1.5; }

/* Empty state */
.ugen-page .empty-state { padding: 24px 16px; text-align: center; color: var(--text-muted); }

/* Footer */
.ugen-foot {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
    font-size: 12px;
}

/* Modal (hero-stat popups) */
.ugen-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.72);
    z-index: 1000;
    display: flex; align-items: flex-end; justify-content: center;
    padding: 0;
}
.ugen-modal-overlay[hidden] { display: none; }
.ugen-modal {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: ugenSlideUp 0.2s ease-out;
}
@keyframes ugenSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.ugen-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
}
.ugen-modal-title {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
}
.ugen-modal-close {
    background: transparent; border: 0;
    color: var(--text-muted);
    font-size: 18px; line-height: 1;
    cursor: pointer; padding: 4px 8px;
}
.ugen-modal-close:hover { color: var(--text); }
.ugen-modal-body { overflow-y: auto; padding: 8px 12px 20px; }

.ugen-mlist, .ugen-elist, .ugen-plist { list-style: none; padding: 0; margin: 0; }
.ugen-group-label {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 14px 0 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--card-border);
}
.ugen-group-label:first-child { margin-top: 2px; }
.ugen-mrow, .ugen-erow, .ugen-prow {
    padding: 10px 4px;
    border-bottom: 1px solid var(--card-border);
}
.ugen-mrow:last-child, .ugen-erow:last-child, .ugen-prow:last-child { border-bottom: 0; }
.ugen-mrow-head {
    display: flex; justify-content: space-between;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    gap: 8px;
}
.ugen-mevent {
    text-align: right;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    min-width: 0;
}
.ugen-mteams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}
.ugen-mteam {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--text-muted);
}
.ugen-mteam:last-child { text-align: right; }
.ugen-mteam.win { color: var(--text); font-weight: 600; }
.ugen-mscore {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    white-space: nowrap;
}
.ugen-erow {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    font-size: 14px;
}
.ugen-ename { color: var(--text); font-weight: 500; }
.ugen-ecount {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    white-space: nowrap;
}
.ugen-prow {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    font-size: 14px;
}
.ugen-pname { color: var(--text); text-decoration: none; font-weight: 600; }
a.ugen-pname:hover { color: var(--accent); }
.ugen-pmeta {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

@media (min-width: 640px) {
    .ugen-modal-overlay { align-items: center; padding: 20px; }
    .ugen-modal { border-radius: 16px; max-height: 80vh; }
}

/* Submenu WIP indicator */
.nav-submenu-item .wip-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
}

@media (min-width: 640px) {
    body { padding: 20px 24px 120px; }
    .headline { font-size: 22px; }
    .hero-stat-value { font-size: 32px; }
    .ugen-page .section-title { font-size: 16px; }
    .pullquote-score { font-size: 24px; }
}
