/* Spiele-Übersicht /games + Ranglisten-Seite /games/{key} (G0-Hub, docs/games/design_handoff_games). Statisch, kein Build. */

.zc-hub {
    --zc-hub-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
    --zc-hub-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / .08), 0 4px 6px -4px rgb(0 0 0 / .05);
    --zc-hub-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    color: #111827;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.zc-hub *, .zc-hub *::before, .zc-hub *::after { box-sizing: border-box; }
.zc-hub [x-cloak] { display: none !important; }
:where(.zc-hub) a { color: inherit; text-decoration: none; }
:where(.zc-hub) ol { list-style: none; margin: 0; padding: 0; }
.zc-hub-num { font-variant-numeric: tabular-nums; }
.zc-hub-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* --- Icon-Chips je Spiel (D2) --- */
.zc-hub-chip { display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: linear-gradient(135deg, #EC4899, #8B5CF6); color: #fff; }
[data-game="flatter"] .zc-hub-chip { background: #ECFEFF; color: #0891B2; }
[data-game="jungle"] .zc-hub-chip { background: #F0FDF4; color: #16A34A; }
[data-game="sweetsrush"] .zc-hub-chip { background: #FDF2F8; color: #DB2777; }
[data-game="bowling"] .zc-hub-chip { background: #F5F3FF; color: #7C3AED; }
[data-game="stack"] .zc-hub-chip { background: #FFFBEB; color: #D97706; }
[data-game="whack"] .zc-hub-chip { background: #FFF1F2; color: #E11D48; }
[data-game="memory"] .zc-hub-chip { background: #FDF2F8; color: #DB2777; }
[data-game="reaction"] .zc-hub-chip { background: #F0FDF4; color: #16A34A; }
[data-game="math_sprint"] .zc-hub-chip { background: #EFF6FF; color: #2563EB; }
[data-game="stroop"] .zc-hub-chip { background: #FFF7ED; color: #EA580C; }
[data-game="blind_timer"] .zc-hub-chip { background: #F0FDFA; color: #0D9488; }

/* --- Übersicht --- */
.zc-hub-page { max-width: 1120px; margin: 0 auto; padding: clamp(24px, 5vw, 44px) clamp(16px, 4vw, 32px) 40px; }
.zc-hub-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: clamp(20px, 3vw, 28px); }
.zc-hub-head__title { flex: 1 1 360px; display: flex; gap: 14px; align-items: flex-start; }
.zc-hub-head__chip { width: 48px; height: 48px; border-radius: 16px; font-size: 20px; }
.zc-hub-h1 { font-family: Poppins, Inter, sans-serif; font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; color: #111827; margin: 0; }
.zc-hub-intro { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: #6B7280; max-width: 560px; text-wrap: pretty; }

.zc-hub-segment { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: #F3F4F6; }
.zc-hub-segment button { min-width: 96px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: #6B7280; font: 600 14px/1 Inter, sans-serif; cursor: pointer; transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease; }
.zc-hub-segment button[aria-selected="true"] { background: #fff; color: #111827; box-shadow: var(--zc-hub-shadow-sm); }
.zc-hub-segment button:focus-visible { outline: 2px solid #EC4899; outline-offset: 2px; }

.zc-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2vw, 24px); }

.zc-hub-card { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 20px; background: #fff; border: 1px solid #F3F4F6; border-radius: 16px; box-shadow: var(--zc-hub-shadow-sm); transition: box-shadow 200ms ease, transform 200ms ease; }
.zc-hub-board-slot { min-width: 0; }
@supports (grid-template-rows: subgrid) {
    .zc-hub-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 16px; }
}
.zc-hub-card:hover { box-shadow: var(--zc-hub-shadow-hover); transform: translateY(-2px); }
.zc-hub-card:has(.zc-hub-card__link:focus-visible) { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #EC4899; }
.zc-hub-card__link { outline: none; }
.zc-hub-card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.zc-hub-card__head { display: flex; gap: 12px; align-items: flex-start; }
.zc-hub-card__chip { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; }
.zc-hub-card__body { flex: 1; min-width: 0; }
.zc-hub-card__title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.zc-hub-card__name { font-family: Poppins, Inter, sans-serif; font-size: 17px; line-height: 24px; font-weight: 700; color: #111827; }
.zc-hub-card__rule { margin: 2px 0 0; font-size: 13px; line-height: 19px; color: #6B7280; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zc-hub-card__chevron { font-size: 13px; color: #D1D5DB; margin-top: 6px; }

.zc-hub-variants { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; margin: 0 0 -6px; }
.zc-hub-variants__label { font-size: 12px; line-height: 16px; font-weight: 500; color: #6B7280; }
.zc-hub-variants__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.zc-hub-variants button { min-height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; min-width: 0; }
.zc-hub-variants button span { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 32px; padding: 0 8px; border-radius: 9999px; border: 1px solid #E5E7EB; background: #fff; color: #4B5563; font: 600 12px/1.2 Inter, sans-serif; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease; }
.zc-hub-variants button[aria-pressed="true"] span { background: #FDF2F8; border-color: #FBCFE8; color: #DB2777; }
.zc-hub-variants button:focus-visible { outline: none; }
.zc-hub-variants button:focus-visible span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #EC4899; }

.zc-hub-top { display: flex; flex-direction: column; gap: 4px; margin: 0 -8px; }
.zc-hub-top li { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 8px; border-radius: 12px; }
.zc-hub-top li.is-me { background: #FDF2F8; }
.zc-hub-top__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zc-hub-top__name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: #111827; }
.zc-hub-top__profile { font-size: 12px; line-height: 16px; color: #6B7280; }
.zc-hub-top__score { font-size: 14px; font-weight: 700; color: #111827; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zc-hub-free-dot { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9999px; border: 2px dashed #E5E7EB; display: flex; align-items: center; justify-content: center; font: 800 13px/1 Poppins, Inter, sans-serif; color: #D1D5DB; }
.zc-hub-free-text { font-size: 13px; color: #9CA3AF; }
.zc-hub-empty { min-height: 152px; padding: 16px; border-radius: 12px; background: #F9FAFB; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.zc-hub-empty__chip { width: 40px; height: 40px; border-radius: 12px; background: #FCE7F3; color: #EC4899; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 6px; }
.zc-hub-empty__title { font-size: 14px; font-weight: 600; color: #111827; }
.zc-hub-empty__text { font-size: 13px; color: #6B7280; }

.zc-hub-card__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #F3F4F6; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.zc-hub-me { font-size: 12px; font-weight: 600; color: #DB2777; }
.zc-hub-me[data-tone="none"] { color: #9CA3AF; }
.zc-hub-open { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #EC4899; white-space: nowrap; flex-shrink: 0; }
.zc-hub-open i { font-size: 11px; }

/* --- Medaillen (B4, Farben D1) --- */
.zc-medal { --coin: radial-gradient(circle at 32% 26%, #FEF9C3 0%, #FDE047 30%, #EAB308 70%, #A16207 100%); --ink: #422006; }
.zc-medal[data-rank="2"] { --coin: radial-gradient(circle at 32% 26%, #FFFFFF 0%, #E4E4E7 34%, #A1A1AA 74%, #52525B 100%); --ink: #27272A; }
.zc-medal[data-rank="3"] { --coin: radial-gradient(circle at 32% 26%, #FFEDD5 0%, #FDBA74 30%, #EA580C 72%, #9A3412 100%); --ink: #431407; }
.zc-medal--sm { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9999px; background: var(--coin); color: var(--ink); display: flex; align-items: center; justify-content: center; font: 800 14px/1 Poppins, Inter, sans-serif; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4), inset 0 -2px 3px rgba(0,0,0,.16), 0 1px 2px rgba(17,24,39,.2); }
.zc-medal--lg { --size: 50px; position: relative; flex-shrink: 0; width: var(--size); height: calc(var(--size) * 1.36); }
.zc-medal--lg[data-rank="1"] { --size: 62px; }
.zc-medal__ribbon { position: absolute; top: 0; width: calc(var(--size) * .26); height: calc(var(--size) * .62); transform-origin: 50% 0; }
.zc-medal__ribbon--l { left: calc(var(--size) * .2); background: #EC4899; transform: rotate(-18deg); }
.zc-medal__ribbon--r { left: calc(var(--size) * .54); background: #8B5CF6; transform: rotate(18deg); }
.zc-medal__coin { position: absolute; left: 0; bottom: 0; width: var(--size); height: var(--size); border-radius: 9999px; background: var(--coin); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 3px rgba(255,255,255,.45), inset 0 0 0 6px rgba(0,0,0,.05), inset 0 -4px 6px rgba(0,0,0,.16), 0 8px 16px -8px rgba(17,24,39,.5); }
.zc-medal__coin i { font-size: 18px; opacity: .5; }
.zc-medal--lg[data-rank="1"] .zc-medal__coin i { font-size: 22px; }

/* --- Ranglisten-Seite --- */
.zc-hub-detail { max-width: 768px; margin: 0 auto; padding: clamp(12px, 3vw, 28px) clamp(16px, 4vw, 24px) 48px; display: flex; flex-direction: column; gap: 20px; }
.zc-hub-back { align-self: flex-start; margin-left: -8px; }
.zc-hub-detail__head { display: flex; gap: 16px; align-items: center; }
.zc-hub-detail__chip { width: 60px; height: 60px; border-radius: 16px; font-size: 24px; }
.zc-hub-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #DB2777; }
.zc-hub-detail__h1 { font-family: Poppins, Inter, sans-serif; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; margin: 2px 0 0; color: #111827; }
.zc-hub-detail__rule { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: #6B7280; }

.zc-hub-vnav { display: flex; flex-direction: column; gap: 8px; }
.zc-hub-vnav__label { font-size: 14px; font-weight: 500; color: #374151; }
.zc-hub-vnav__bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: #F3F4F6; }
.zc-hub-vnav__bar a { min-height: 60px; padding: 8px 6px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; color: #4B5563; transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease; }
.zc-hub-vnav__bar a[aria-current="page"] { background: #fff; color: #111827; box-shadow: var(--zc-hub-shadow-sm); }
.zc-hub-vnav__bar a:focus-visible { outline: 2px solid #EC4899; outline-offset: 2px; }
.zc-hub-vnav__name { font-size: 14px; line-height: 20px; font-weight: 700; }
.zc-hub-vnav__sub { font-size: 12px; line-height: 16px; color: #6B7280; text-wrap: balance; }
.zc-hub-vnav__hint { font-size: 12px; line-height: 18px; color: #6B7280; margin: 0; }

.zc-hub-board { background: #fff; border: 1px solid #F3F4F6; border-radius: 16px; box-shadow: var(--zc-hub-shadow-sm); }
.zc-hub-tabs { display: flex; border-bottom: 1px solid #F3F4F6; }
.zc-hub-tabs button { flex: 1; min-height: 52px; border: 0; background: transparent; font: 600 14px/1 Inter, sans-serif; color: #6B7280; cursor: pointer; transition: color 200ms ease, box-shadow 200ms ease; }
.zc-hub-tabs button[aria-selected="true"] { color: #DB2777; box-shadow: inset 0 -2px 0 #EC4899; }
.zc-hub-tabs button:focus-visible { outline: 2px solid #EC4899; outline-offset: -2px; }
.zc-hub-meta { margin: 0; padding: 14px 20px 0; font-size: 12px; line-height: 18px; color: #6B7280; text-align: center; text-wrap: balance; }

.zc-hub-podium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); align-items: end; gap: clamp(6px, 2vw, 14px); padding: 22px clamp(8px, 3vw, 28px) 0; border-bottom: 1px solid #F3F4F6; background: radial-gradient(110% 85% at 50% 100%, #FDF2F8 0%, rgba(253,242,248,0) 72%); }
.zc-hub-podium > li { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; text-align: center; }
.zc-hub-podium > li[data-pos="1"] { order: 2; }
.zc-hub-podium > li[data-pos="2"] { order: 1; }
.zc-hub-podium > li[data-pos="3"] { order: 3; }
.zc-hub-podium__who { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.zc-hub-podium__you { margin-bottom: 3px; }
.zc-hub-podium__name { display: block; max-width: 100%; font-size: 14px; line-height: 20px; font-weight: 700; color: #111827; }
.zc-hub-podium__score { font-weight: 800; font-size: 15px; line-height: 1.3; font-variant-numeric: tabular-nums; color: #111827; }
.zc-hub-podium > li[data-pos="1"] .zc-hub-podium__score { font-size: 18px; }
.zc-hub-podium__slug { display: block; max-width: 100%; font-size: 12px; line-height: 18px; font-weight: 500; color: #EC4899; }
.zc-hub-podium__slug.is-private { color: #9CA3AF; }
.zc-hub-step { --step-bg: linear-gradient(180deg, #FEF08A, #FEFCE8); --step-line: #FACC15; --step-ink: rgba(66,32,6,.55); width: 100%; height: 48px; border-radius: 12px 12px 0 0; background: var(--step-bg); box-shadow: inset 0 3px 0 var(--step-line); display: flex; justify-content: center; padding-top: 10px; font: 800 24px/1 Poppins, Inter, sans-serif; color: var(--step-ink); }
.zc-hub-step[data-rank="2"] { --step-bg: linear-gradient(180deg, #E4E4E7, #FAFAFA); --step-line: #A1A1AA; --step-ink: rgba(39,39,42,.45); }
.zc-hub-step[data-rank="3"] { --step-bg: linear-gradient(180deg, #FED7AA, #FFF7ED); --step-line: #FB923C; --step-ink: rgba(67,20,7,.45); }
.zc-hub-podium > li[data-pos="1"] .zc-hub-step { height: 88px; font-size: 30px; }
.zc-hub-podium > li[data-pos="2"] .zc-hub-step { height: 64px; }
.zc-hub-step.is-free { background: #F9FAFB; box-shadow: none; border: 1px dashed #E5E7EB; border-bottom: 0; color: #D1D5DB; }
.zc-hub-podium__free { width: 50px; height: 50px; border-radius: 9999px; border: 2px dashed #E5E7EB; display: flex; align-items: center; justify-content: center; color: #D1D5DB; font-size: 17px; }
.zc-hub-podium__free-name { font-size: 14px; line-height: 20px; font-weight: 700; color: #9CA3AF; }
.zc-hub-podium__free-score { font-size: 15px; font-weight: 800; color: #D1D5DB; }

.zc-hub-list { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.zc-hub-list > li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; min-height: 52px; padding: 6px 12px 6px 4px; border-radius: 12px; transition: background-color 150ms ease; scroll-margin: 96px; }
.zc-hub-list > li:hover { background: #F9FAFB; }
.zc-hub-list > li.is-me { background: #FDF2F8; }
.zc-hub-list__rank { text-align: center; font-size: 14px; font-weight: 700; color: #6B7280; font-variant-numeric: tabular-nums; }
.zc-hub-list__who { min-width: 0; display: flex; flex-direction: column; }
.zc-hub-list__name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: #111827; }
.zc-hub-list__profile { font-size: 12px; line-height: 16px; color: #6B7280; }
.zc-hub-list__profile a { font-weight: 500; color: #EC4899; }
.zc-hub-list__profile.is-private { color: #9CA3AF; }
.zc-hub-list__score { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zc-hub-more { padding: 0 16px 16px; }

.zc-hub-mebar { position: sticky; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 10; margin: 12px; padding: 10px 10px 10px 12px; border-radius: 14px; background: #fff; border: 1px solid #FBCFE8; box-shadow: var(--zc-hub-shadow-lg); display: flex; align-items: center; gap: 12px; }
.zc-hub-mebar.has-nav { bottom: calc(80px + env(safe-area-inset-bottom)); }
.zc-hub-mebar__avatar { width: 36px; height: 36px; flex-shrink: 0; border-radius: 9999px; background: linear-gradient(to bottom right, #EC4899, #8B5CF6); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.zc-hub-mebar__avatar img { width: 100%; height: 100%; object-fit: cover; }
.zc-hub-mebar__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zc-hub-mebar__label { font-size: 12px; line-height: 16px; font-weight: 600; color: #DB2777; }
.zc-hub-mebar__text { font-size: 15px; line-height: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    .zc-hub-card, .zc-hub-card:hover { transform: none; transition: box-shadow 200ms ease; }
}

/* --- Spielen direkt auf /games (Flag games_hub_play) --- */
.zc-hub-play-slot { position: relative; z-index: 1; display: inline-flex; flex-shrink: 0; }
.zc-hub-play { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 9999px; background: linear-gradient(135deg, #EC4899, #8B5CF6); color: #fff; font: 700 14px/1 Inter, sans-serif; cursor: pointer; box-shadow: 0 4px 12px rgba(236, 72, 153, .25); transition: transform 150ms ease, box-shadow 150ms ease; }
.zc-hub-play i { font-size: 12px; }
.zc-hub-play:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(236, 72, 153, .32); }
.zc-hub-play:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #EC4899; }
.zc-hub-detail__play { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .zc-hub-play { transition: none; } .zc-hub-play:hover { transform: none; } }
