/* Hlavní menu, kolekce, nastavení a mapa: vlastní pozadí, ne scéna ze zápasu.
   Tmavá noc galavečera: pomalá polární záře, zlaté kruhy jako ring light, jemné jiskry a zrno. */
#hub-bg { position: fixed; inset: 0; z-index: 89; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(120% 60% at 50% 115%, rgba(255, 46, 136, .14), transparent 60%),
    radial-gradient(90% 55% at 50% -10%, rgba(126, 92, 255, .2), transparent 65%),
    linear-gradient(180deg, #0b0816 0%, #06040c 55%, #0a0611 100%);
}
body:not(.in-hub) #hub-bg { display: none; }
body.in-hub :is(.stage-bg, #ambient, #stage) { visibility: hidden; }
body.no-board #stage { visibility: hidden; }
.screen.hub { background: transparent; }

/* Polární záře: tři velké měkké skvrny, které se pomalu přelévají */
.aurora { position: absolute; width: 110vmax; height: 110vmax; left: 50%; top: 50%; border-radius: 50%; opacity: .7; will-change: transform;
  animation: drift 38s ease-in-out infinite alternate; }
.a1 { background: radial-gradient(circle, rgba(181, 76, 245, .42), transparent 55%); --x0: -95%; --y0: -85%; --x1: -45%; --y1: -60%; }
.a2 { background: radial-gradient(circle, rgba(255, 46, 136, .32), transparent 55%); --x0: -10%; --y0: -30%; --x1: -60%; --y1: -15%; animation-duration: 46s; }
.a3 { background: radial-gradient(circle, rgba(255, 196, 92, .22), transparent 55%); --x0: -70%; --y0: -20%; --x1: -20%; --y1: -55%; animation-duration: 54s; }
@keyframes drift {
  from { transform: translate(var(--x0), var(--y0)) scale(1); }
  to { transform: translate(var(--x1), var(--y1)) scale(1.15); }
}

/* Zlaté soustředné kruhy za logem, po kterých pomalu obíhá světlo */
.halo { position: absolute; left: 50%; top: 34%; width: min(140vw, 900px); will-change: transform; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, rgba(255, 214, 128, .05), rgba(255, 230, 170, .55) 12%, rgba(255, 214, 128, .05) 28%, rgba(255, 214, 128, .05) 55%, rgba(255, 140, 200, .4) 66%, rgba(255, 214, 128, .05) 80%);
  -webkit-mask: repeating-radial-gradient(circle, transparent 0 38px, #000 38px 39.5px), radial-gradient(circle, #000 18%, transparent 68%);
  mask: repeating-radial-gradient(circle, transparent 0 38px, #000 38px 39.5px), radial-gradient(circle, #000 18%, transparent 68%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  animation: halo 28s linear infinite; opacity: .8; }
@keyframes halo { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Jiskry: jeden prvek, mnoho stínů */
.sparkles, .sparkles::after { position: absolute; left: 0; top: 0; width: 2px; height: 2px; border-radius: 50%; background: transparent;
  box-shadow: 12vw 18vh #fff6d8, 84vw 12vh #ffe3a0, 70vw 32vh #fff, 22vw 46vh #ffd1e6, 91vw 58vh #fff6d8, 8vw 72vh #fff, 46vw 8vh #fff,
    58vw 64vh #ffe3a0, 34vw 84vh #fff, 76vw 88vh #ffd1e6, 4vw 34vh #ffe3a0, 64vw 4vh #fff6d8, 96vw 30vh #fff, 28vw 26vh #fff, 52vw 92vh #ffe3a0;
  animation: twinkle 4.5s ease-in-out infinite; }
.sparkles::after { content: ''; transform: translate(5vw, 9vh); animation-delay: -2.2s; }
@keyframes twinkle { 50% { opacity: .2; } }

.grain { position: absolute; inset: 0; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#hub-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 85% 75% at 50% 42%, transparent 45%, rgba(0, 0, 0, .7)); }

/* Menu */
#menu { justify-content: space-between; }
.menu-top { display: flex; justify-content: flex-end; min-height: 40px; }
#menu .menu-inner { gap: 16px; }
.menu-dock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(460px, 100%); margin: 18px auto 0; }
.dock-btn { display: grid; justify-items: center; gap: 7px; padding: 12px 6px 11px; border-radius: 18px; cursor: pointer;
  background: linear-gradient(180deg, rgba(40, 30, 64, .92), rgba(18, 12, 32, .92)); border: 1px solid rgba(255, 214, 128, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 26px rgba(0, 0, 0, .35);
  font: 700 12px/1 var(--font-display); letter-spacing: .04em; color: #efe4ff; transition: transform .15s, border-color .2s, background .2s; }
.dock-btn:hover { border-color: rgba(255, 214, 128, .6); background: linear-gradient(180deg, rgba(255, 214, 128, .14), rgba(255, 255, 255, .03)); }
.dock-btn:active { transform: scale(.96); }
.dock-btn svg { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(255, 204, 77, .45)); }
.dock-btn svg .fill { fill: var(--gold); stroke: none; }

/* Účet vpravo nahoře */
.profile { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); cursor: pointer;
  background: rgba(16, 10, 30, .9); color: var(--paper); font: 600 13px/1 var(--font-body); }
.chip img, .chip .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: var(--plum); box-shadow: 0 0 0 1.5px var(--gold); }
.chip.google { padding: 7px 14px 7px 10px; background: #fff; color: #1f1f1f; border: 0; }
.chip.google svg { width: 18px; height: 18px; }

/* Společná hlavička podstránek */
.hub-inner { width: min(640px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.hub-inner.wide { width: min(980px, 100%); }
.hub-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.hub-head h2 { margin: 0; text-align: center; font: 900 clamp(24px, 6.5vw, 36px)/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff6d8, var(--gold) 55%, #c98a12); -webkit-background-clip: text; background-clip: text; color: transparent; }
.back-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); cursor: pointer;
  font: 700 24px/1 var(--font-body); color: var(--paper); display: grid; place-items: center; }

/* Nastavení */
.set-group { padding: 6px 16px; border-radius: 18px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09); }
.set-group h3 { margin: 12px 0 4px; font: 800 12px/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.set-group h3 + .set-row { border-top: 0; }
.set-row > span { display: grid; gap: 3px; }
.set-row b { font-weight: 600; font-size: 15px; }
.set-row small { color: var(--muted); font-size: 12.5px; }
.switch { flex: 0 0 auto; position: relative; width: 52px; height: 30px; border-radius: 999px; border: 0; cursor: pointer; background: rgba(255, 255, 255, .16); transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.switch[aria-checked="true"] { background: linear-gradient(180deg, #ffe08a, var(--gold-deep)); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }
.account { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.account img, .account .avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--plum); box-shadow: 0 0 0 2px var(--gold); }
.account .who { flex: 1; display: grid; gap: 2px; min-width: 0; }
.account .who small { color: var(--muted); font-size: 12.5px; }
.google-btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: #1f1f1f; font: 600 15px/1 var(--font-body); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.google-btn svg { width: 20px; height: 20px; }
#settings .fine { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .aurora, .halo, .sparkles, .sparkles::after { animation: none; }
}
