:root {
  --c-bg: #0b0613;
  --c-ink: #fff8ee;
  --c-ink-dim: #d4c7d8;
  --c-blue: #2b6cff;
  --c-pink: #ff4fa3;
  --c-violet: #8a4dff;
  --c-yellow: #ffd84d;
  --c-mint: #6effa3;
  --grad: linear-gradient(135deg, var(--c-blue) 0%, var(--c-violet) 45%, var(--c-pink) 100%);
  --grad-soft: linear-gradient(135deg, rgba(43,108,255,.18) 0%, rgba(255,79,163,.18) 100%);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;
  --t-display: "Shrikhand", "Georgia", serif;
  --t-body: "Space Grotesk", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--c-bg); color: var(--c-ink); font-family: var(--t-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; line-height: 1.5; }
input, textarea, select { font-size: 16px; } /* iOS — bez tohoto zoomne při focusu */
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
em { font-style: italic; }
strong { font-weight: 700; }

/* GRADIENT BACKDROP — pomalu animovaný */
.gradient-bg {
  position: fixed; inset: -10%;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(43,108,255,.55), transparent 60%),
    radial-gradient(50% 50% at 80% 30%, rgba(255,79,163,.5), transparent 60%),
    radial-gradient(70% 60% at 60% 90%, rgba(138,77,255,.45), transparent 65%),
    var(--c-bg);
  filter: blur(40px) saturate(120%);
  z-index: -2;
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-4%, 3%, 0) scale(1.1); }
}
.noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* TOPBAR */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; padding-top: calc(18px + env(safe-area-inset-top)); padding-left: calc(28px + env(safe-area-inset-left)); padding-right: calc(28px + env(safe-area-inset-right)); backdrop-filter: blur(14px); background: rgba(11,6,19,.4); border-bottom: 1px solid rgba(255,255,255,.08); }
.logo { font-family: var(--t-display); font-size: 28px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .5px; }
nav { display: flex; gap: 22px; font-weight: 500; }
nav a { opacity: .8; transition: opacity .2s, color .2s; }
@media (hover: hover) { nav a:hover { opacity: 1; color: var(--c-pink); } }

/* HERO */
.hero { position: relative; padding: 60px 28px 100px; min-height: calc(100vh - 70px); display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; max-width: 1280px; margin: 0 auto; }
.hero-inner { position: relative; z-index: 2; }
.kicker { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--c-ink-dim); margin-bottom: 24px; }
.title { font-family: var(--t-display); line-height: .88; letter-spacing: -1px; }
.t-line { display: block; font-size: clamp(56px, 12vw, 180px); }
.t-line.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t-line.t-40 { font-size: clamp(120px, 26vw, 360px); line-height: .82; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 6px 80px rgba(255,79,163,.25); }
.lead { margin-top: 22px; font-size: 18px; max-width: 560px; color: var(--c-ink-dim); }
.lead strong { color: var(--c-ink); }

/* COUNTDOWN */
.countdown { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.countdown > div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-md); padding: 12px 18px; min-width: 86px; backdrop-filter: blur(8px); }
.countdown b { font-family: var(--t-display); font-size: 36px; display: block; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.countdown span { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--c-ink-dim); }

/* CTA */
.cta-row { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 600; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, opacity .2s; border: none; text-align: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; min-height: 44px; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--grad); color: white; box-shadow: 0 10px 30px rgba(255,79,163,.4), 0 6px 12px rgba(43,108,255,.3); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--c-ink); border: 1px solid rgba(255,255,255,.18); }
@media (hover: hover) {
  .btn-primary:hover { box-shadow: 0 14px 40px rgba(255,79,163,.55), 0 8px 16px rgba(43,108,255,.4); }
  .btn-ghost:hover { background: rgba(255,255,255,.12); }
}

/* HERO HEAD */
.hero-head { position: relative; aspect-ratio: 1/1.1; display: grid; place-items: center; }
.hero-head img { width: 100%; max-width: 460px; height: auto; filter: drop-shadow(0 30px 60px rgba(255,79,163,.45)) drop-shadow(0 20px 40px rgba(43,108,255,.35)); transition: transform .15s ease-out, filter .25s; will-change: transform; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; cursor: pointer; touch-action: manipulation; }
@media (hover: hover) {
  .hero-head img:hover { filter: drop-shadow(0 30px 60px rgba(255,79,163,.7)) drop-shadow(0 20px 40px rgba(43,108,255,.5)); }
}
.hero-head img:active { transform: scale(0.97) !important; }
.speech { position: absolute; top: 8%; left: -6%; background: white; color: #0b0613; padding: 14px 20px; border-radius: 22px; font-weight: 600; max-width: 260px; opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .25s, transform .25s; box-shadow: 0 20px 40px rgba(0,0,0,.3); pointer-events: none; }
.speech::after { content: ""; position: absolute; bottom: -10px; left: 32px; width: 20px; height: 20px; background: white; transform: rotate(45deg); }
.speech.show { opacity: 1; transform: translateY(0) scale(1); }

/* BLOCKS */
.block { padding: 100px 28px; max-width: 1180px; margin: 0 auto; position: relative; }
.block.alt { background: var(--grad-soft); border-radius: var(--r-lg); margin: 40px 28px; padding: 80px 36px; max-width: calc(1200px); }
.block-head { margin-bottom: 40px; max-width: 720px; }
.eyebrow { font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--c-pink); font-weight: 600; }
.block-head h2 { font-family: var(--t-display); font-size: clamp(40px, 6vw, 80px); line-height: .95; margin-top: 8px; }
.block-head p { margin-top: 16px; color: var(--c-ink-dim); font-size: 17px; }

/* GAME SHELL */
.game-shell { position: relative; background: rgba(0,0,0,.35); border-radius: var(--r-lg); padding: 16px; border: 1px solid rgba(255,255,255,.08); }
.game-shell canvas { width: 100%; max-width: 800px; height: auto; aspect-ratio: 8 / 5; display: block; margin: 0 auto; border-radius: var(--r-md); background: linear-gradient(160deg, #1a0a26, #0b0613); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; image-rendering: auto; }
#snake { aspect-ratio: 1 / 1; max-width: 600px; }
@media (max-width: 900px) {
  /* na mobilu snížit aspekt pro výšku stránky */
  #arcade { aspect-ratio: 4 / 5; }
  #snake { aspect-ratio: 1 / 1; }
}
.game-hud { display: flex; gap: 22px; padding: 14px 8px 4px; font-weight: 600; flex-wrap: wrap; align-items: center; }
.game-hud b { font-family: var(--t-display); color: var(--c-pink); font-size: 26px; margin-left: 4px; }
.game-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: rgba(11,6,19,.7); backdrop-filter: blur(14px); border-radius: var(--r-lg); padding: 28px; text-align: center; }
.game-overlay.hidden { display: none; }
.game-overlay .hint { color: var(--c-ink-dim); font-size: 14px; max-width: 380px; line-height: 1.4; }
.game-overlay h3 { font-family: var(--t-display); font-size: 42px; line-height: 1; }
@media (max-width: 600px) {
  .game-hud { gap: 14px; font-size: 14px; }
  .game-hud b { font-size: 22px; }
  .game-overlay .btn { font-size: 18px; padding: 16px 30px; }
}

/* QUIZ */
.quiz-shell { background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-lg); padding: 32px; min-height: 280px; }
.quiz-start { display: flex; flex-direction: column; gap: 14px; max-width: 360px; margin: 0 auto; padding: 30px 0; align-items: center; }
.quiz-start input, .quiz-shell input[type="text"] { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--r-sm); padding: 14px 18px; width: 100%; outline: none; }
.quiz-start input:focus { border-color: var(--c-pink); }
.quiz-q { display: flex; flex-direction: column; gap: 20px; }
.quiz-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--c-ink-dim); }
.quiz-bar { height: 6px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; }
.quiz-bar > i { display: block; height: 100%; background: var(--grad); width: 0; transition: width .3s ease; }
.quiz-question { font-family: var(--t-display); font-size: clamp(26px, 4vw, 40px); line-height: 1.1; }
.quiz-choices { display: grid; gap: 10px; }
.quiz-choice { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); padding: 18px 20px; border-radius: var(--r-md); cursor: pointer; text-align: left; transition: all .15s; font-weight: 500; min-height: 56px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .quiz-choice:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); } }
.quiz-choice:active { background: rgba(255,255,255,.12); transform: translateY(1px); }
.quiz-choice.correct { background: rgba(110,255,163,.2); border-color: var(--c-mint); }
.quiz-choice.wrong { background: rgba(255,79,163,.15); border-color: var(--c-pink); opacity: .8; }
.quiz-choice:disabled { cursor: default; }
.quiz-final { text-align: center; padding: 30px 0; }
.quiz-final h3 { font-family: var(--t-display); font-size: 48px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px; }
.quiz-board { margin-top: 26px; }
.quiz-board ol { list-style: none; counter-reset: rank; }
.quiz-board li { counter-increment: rank; display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.1); font-weight: 500; }
.quiz-board li::before { content: counter(rank) "."; color: var(--c-pink); margin-right: 10px; font-family: var(--t-display); }

/* WALL */
.wall-form { display: grid; gap: 12px; max-width: 540px; }
.wall-form input, .wall-form textarea { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--r-sm); padding: 14px 16px; outline: none; resize: vertical; }
.wall-form textarea { min-height: 100px; }
.wall-form input:focus, .wall-form textarea:focus { border-color: var(--c-pink); }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 36px; }
.wall-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-md); padding: 18px 20px; position: relative; overflow: hidden; }
.wall-card::before { content: ""; position: absolute; inset: 0; background: var(--grad); opacity: .08; pointer-events: none; }
.wall-card b { display: block; font-family: var(--t-display); font-size: 20px; margin-bottom: 4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wall-card p { color: var(--c-ink); position: relative; }
.wall-card small { display: block; color: var(--c-ink-dim); margin-top: 6px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }

/* ORACLE */
.oracle { margin-top: 60px; text-align: center; padding: 36px 20px; background: rgba(255,255,255,.04); border-radius: var(--r-lg); border: 1px solid rgba(255,255,255,.08); }
.oracle h3 { font-family: var(--t-display); font-size: 40px; margin-bottom: 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ball { width: 160px; height: 160px; border-radius: 50%; border: none; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), rgba(255,255,255,0) 35%), var(--grad); margin: 20px auto; display: block; box-shadow: 0 30px 60px rgba(255,79,163,.4), inset 0 -20px 40px rgba(0,0,0,.4); cursor: pointer; transition: transform .15s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .ball:hover { transform: scale(1.04); } }
.ball:active { transform: scale(.96); }
.oracle-text { margin-top: 14px; font-family: var(--t-display); font-size: clamp(22px, 3vw, 32px); min-height: 50px; line-height: 1.2; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* VIBE */
.vibe-shell { display: grid; gap: 12px; max-width: 600px; }
.vibe-shell select, .vibe-shell input { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--r-sm); padding: 14px 16px; outline: none; }
.vibe-shell select:focus, .vibe-shell input:focus { border-color: var(--c-pink); }
.vibe-out { margin-top: 12px; padding: 22px; background: var(--grad-soft); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-md); font-family: var(--t-display); font-size: 22px; line-height: 1.3; white-space: pre-wrap; }

/* FOTO BOOTH */
.foto-shell { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.foto-stage { position: relative; width: 100%; max-width: 720px; aspect-ratio: 4/5; background: #0b0613; border-radius: var(--r-md); overflow: hidden; border: 1px solid rgba(255,255,255,.1); }
.foto-stage video, .foto-stage img#fotoPreview { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-stage video.flip { transform: scaleX(-1); }
.foto-overlay { position: absolute; inset: 0; pointer-events: none; }
.foto-frame { position: absolute; inset: 12px; border: 4px solid transparent; border-radius: 18px; background: linear-gradient(135deg, var(--c-blue), var(--c-pink)) border-box; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.foto-mascot { position: absolute; bottom: 24px; right: 24px; width: 22%; max-width: 130px; filter: drop-shadow(0 8px 20px rgba(255,79,163,.5)); }
.foto-tag { position: absolute; top: 24px; left: 24px; font-family: var(--t-display); font-size: clamp(30px, 6vw, 56px); line-height: .9; color: white; text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.foto-tag span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; font-size: 1.6em; display: block; }
.foto-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.foto-hint { font-size: 13px; color: var(--c-ink-dim); text-align: center; max-width: 520px; }

/* KAPSLE — audio recorder */
.kapsle-shell { max-width: 560px; }
.kapsle-shell input[type="text"] { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--r-sm); padding: 14px 16px; width: 100%; outline: none; margin-bottom: 14px; }
.kapsle-shell input:focus { border-color: var(--c-pink); }
.kapsle-rec { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.kapsle-time { font-family: var(--t-display); font-size: 26px; color: var(--c-pink); }
.kapsle-preview { margin-top: 20px; display: grid; gap: 14px; }
.kapsle-preview audio { width: 100%; }
.recording { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,79,163,.6); } 50% { box-shadow: 0 0 0 20px rgba(255,79,163,0); } }

/* INFO */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.info-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-md); padding: 20px 22px; }
.info-card b { display: block; font-family: var(--t-display); font-size: 22px; margin-bottom: 8px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.info-card p { color: var(--c-ink-dim); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin: 0 2px; }
.dot-b { background: var(--c-blue); }
.dot-p { background: var(--c-pink); }

/* FOOT */
.foot { padding: 50px 28px 80px; text-align: center; color: var(--c-ink-dim); font-size: 13px; }
.foot .tiny { margin-top: 8px; opacity: .6; font-size: 11px; }

/* KONAMI */
.konami { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(11,6,19,.92); backdrop-filter: blur(20px); animation: zoom .4s ease; padding: 28px; }
.konami[hidden] { display: none; }
.konami-inner { background: var(--grad); padding: 40px; border-radius: var(--r-lg); text-align: center; max-width: 500px; color: white; }
.konami-inner h2 { font-family: var(--t-display); font-size: 36px; margin-bottom: 12px; }
.konami-inner img { max-width: 200px; margin: 18px auto; }
@keyframes zoom { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; padding-bottom: 60px; min-height: auto; gap: 20px; }
  .hero-head { order: -1; max-width: 320px; margin: 0 auto; }
  .hero-head img { max-width: 320px; }
  .speech { top: 0; left: 0; max-width: 200px; font-size: 14px; padding: 10px 14px; }
  .block { padding: 60px 20px; }
  .block.alt { padding: 60px 22px; margin: 20px 14px; }
  .countdown > div { min-width: 70px; padding: 10px 12px; }
  .countdown b { font-size: 28px; }
  .topbar { padding: 14px 18px; }
  nav { gap: 14px; font-size: 14px; }
  .ball { width: 150px; height: 150px; }
  .info-grid { gap: 12px; }
  .wall-grid { grid-template-columns: 1fr; gap: 10px; }
  .vibe-out { font-size: 18px; }
  .speech { position: fixed; top: calc(70px + env(safe-area-inset-top)); left: 12px; right: 12px; max-width: none; padding: 12px 16px; font-size: 14px; z-index: 50; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
  .speech::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gradient-bg { animation: none; }
  .hero-head img { transition: none; }
}
