/* ============================================================
   MULTIPLAYER-PLATTFORM – Styles
   ============================================================ */

/* Willkommen / Intro */
.intro { display: flex; justify-content: center; padding: 10px 0 40px; animation: fade .4s ease; }
.intro-card { width: min(460px, 100%); background: var(--card); border: 1px solid var(--stroke); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.intro-photo { position: relative; aspect-ratio: 4/5; background: linear-gradient(160deg, #4a2a7a, #7a2a5a); }
.intro-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.intro-photo.noimg img { display: none; }
.intro-photo.noimg::after { content: "💑"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 5rem; }
.intro-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,8,30,.85), transparent 45%); }
.intro-names { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-weight: 800; font-size: 1.4rem; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); z-index: 1; }
.intro-body { padding: 22px 24px 26px; text-align: center; }
.intro-emoji { font-size: 2.6rem; margin: -50px 0 6px; position: relative; }
.intro-title { font-size: 1.5rem; margin: 6px 0 14px; line-height: 1.25; }
.intro-title .it { color: var(--text-dim); font-weight: 700; font-size: 1.15rem; }
.intro-text { margin: 0 0 8px; line-height: 1.5; }
.intro-text.it, .intro-note.it { color: var(--text-dim); font-size: .95rem; }
.intro-note { margin: 14px 0 6px; line-height: 1.55; font-style: italic; color: var(--accent-2); }
.intro-note b { color: var(--accent); font-style: normal; }
.intro-note.it { color: var(--text-dim); font-style: italic; }
.intro .cta { margin-top: 18px; }
.intro-skip { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--text-dim); text-decoration: underline; font-size: .85rem; cursor: pointer; }

/* Rollenwahl */
.role-pick { display: grid; gap: 18px; grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
@media (min-width: 560px) { .role-pick { grid-template-columns: 1fr 1fr; } }
.role-card {
  border: 1px solid var(--stroke); background: var(--card); border-radius: var(--radius);
  padding: 30px 22px; color: var(--text); cursor: pointer; text-align: center;
  transition: transform .18s, background .18s, border-color .18s;
}
.role-card:hover { transform: translateY(-4px); background: var(--card-hover); border-color: rgba(255,255,255,.3); }
.role-card.host { background: linear-gradient(160deg, rgba(124,156,255,.18), rgba(124,156,255,.05)); }
.role-card.player { background: linear-gradient(160deg, rgba(255,111,145,.18), rgba(255,111,145,.05)); }
.role-icon { font-size: 3.4rem; display: block; margin-bottom: 10px; }
.role-card h2 { margin: 6px 0; font-size: 1.3rem; }
.role-card p { color: var(--text-dim); margin: 0; font-size: .95rem; }

/* Host-Lobby */
.host-lobby { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .host-lobby { grid-template-columns: auto 1fr; align-items: start; } }
.lobby-join { text-align: center; }
.lobby-join h1 { margin: 0 0 8px; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
.lobby-players h2 { display: flex; align-items: center; gap: 10px; }
.badge { background: var(--accent); color: #2a1500; border-radius: 999px; padding: 2px 12px; font-size: 1rem; font-weight: 800; }
.player-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 20px; min-height: 40px; }
.player-chip { background: var(--card); border: 1px solid var(--stroke); border-radius: 999px; padding: 8px 16px; font-weight: 700; animation: fade .3s ease; }

/* Menü */
.menu-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.menu-head h1 { margin: 0; }
.settings { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.settings label { display: flex; flex-direction: column; font-size: .75rem; color: var(--text-dim); gap: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.settings select {
  background: rgba(0,0,0,.25); color: var(--text); border: 1px solid var(--stroke);
  border-radius: 10px; padding: 8px 12px; font-size: .95rem; font-weight: 600;
}
.settings .switch { flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); cursor: pointer; }
.settings .switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.game-tile { min-height: 120px; align-items: center; text-align: center; }
.game-tile .icon { font-size: 2.4rem; }
.game-tile h3 { margin: 8px 0 6px; font-size: .98rem; }
.tag.int { background: var(--accent-3); color: #08201b; }
.tag.phys { background: var(--accent-4); color: #0d1630; }

/* Teams (Lobby) */
.team-setup { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 4px; }
.team-setup-label { font-weight: 800; color: var(--text-dim); }
.team-btns { display: flex; gap: 6px; }
.team-opt { border: 1px solid var(--stroke); background: rgba(255,255,255,.06); color: var(--text); font-weight: 800; padding: 8px 14px; border-radius: 10px; cursor: pointer; min-width: 44px; }
.team-opt.active { background: var(--accent); color: #2a1500; border-color: var(--accent); }
.team-hint { margin: 0 0 8px; }
.player-chip[data-pid] { cursor: default; }
.sb-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.sb-name small { color: var(--text-dim); font-weight: 500; font-size: .82rem; }
.team-badge { display: inline-block; padding: 6px 16px; border-radius: 999px; color: #10101a; font-weight: 800; margin-bottom: 14px; }

/* Spiel-Shell */
.game-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.timer { font-size: 2rem; font-weight: 900; color: var(--accent); background: rgba(0,0,0,.25); border: 2px solid var(--accent); border-radius: 14px; padding: 6px 18px; min-width: 84px; text-align: center; }
.timer.big { font-size: 3.4rem; padding: 14px 30px; margin: 16px auto; display: inline-block; }
.timer.low { color: #ff5252; border-color: #ff5252; animation: pulse .5s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.game-body { min-height: 40vh; }

.big-stage { text-align: center; padding: 20px 10px; }
.hero-emoji { font-size: 4.5rem; margin: 10px 0; }
.now-playing { font-size: 1.4rem; margin-bottom: 10px; }
.now-playing b { color: var(--accent); }
.guess-call { font-size: 1.6rem; font-weight: 800; color: var(--accent-3); margin: 16px 0; }

/* Scoreboard */
.scoreboard { margin-top: 24px; border: 1px solid var(--stroke); background: var(--card); border-radius: var(--radius); padding: 16px 20px; }
.scoreboard h3 { margin: 0 0 10px; }
.sb-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--stroke); }
.sb-row:last-child { border-bottom: 0; }
.sb-rank { width: 26px; height: 26px; display: grid; place-items: center; background: var(--accent-2); color: #2a0012; border-radius: 50%; font-weight: 800; font-size: .85rem; }
.sb-name { flex: 1; font-weight: 700; }
.sb-pts { font-weight: 900; color: var(--accent); font-size: 1.1rem; }

/* Wortspion reveal */
.reveal-words { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin: 18px auto; }
.reveal-words > div { display: flex; justify-content: space-between; gap: 12px; background: rgba(0,0,0,.25); border-radius: 12px; padding: 12px 16px; }
.rw-label { color: var(--text-dim); font-weight: 700; }
.rw-val { font-weight: 800; color: var(--accent); }
.vote-count { font-size: 2rem; font-weight: 900; color: var(--accent-3); margin: 10px 0; }

/* Memory */
.mem-show { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; font-size: 3.4rem; margin: 20px 0; }

/* Quiz (Laptop) */
.quiz-stage { text-align: center; }
.q-num { color: var(--text-dim); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.q-text { margin: 10px auto 20px; max-width: 760px; }
.q-text b { display: block; font-size: 1.7rem; }
.q-text span { color: var(--text-dim); font-size: 1.1rem; }
.q-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 760px; margin: 0 auto; }
.quiz-ans { border-radius: 14px; padding: 16px; color: #10101a; font-weight: 800; text-align: center; transition: opacity .25s, transform .25s; }
.quiz-ans b { display: block; font-size: 1.15rem; }
.quiz-ans span { font-size: .9rem; opacity: .75; }
.quiz-ans.dim { opacity: .28; }
.quiz-ans.correct { outline: 4px solid #fff; transform: scale(1.04); box-shadow: 0 0 24px rgba(255,255,255,.4); }

/* Vor-Ort-Tools */
.tools { display: flex; justify-content: center; margin: 10px 0 18px; }
.tool-card { text-align: center; }
.tool-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* ---------- SPIELER (Handy) ---------- */
.join-screen { text-align: center; max-width: 420px; margin: 8vh auto 0; }
.join-screen h1 { font-size: 1.6rem; }
.field { display: flex; flex-direction: column; text-align: left; gap: 6px; margin: 18px 0; font-weight: 700; color: var(--text-dim); }
.field input { font-size: 1.3rem; padding: 14px; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(0,0,0,.25); color: var(--text); }
.lang-pick { display: flex; gap: 10px; margin-bottom: 18px; }
.lang-opt { flex: 1; padding: 14px; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(255,255,255,.06); color: var(--text); font-weight: 700; font-size: 1rem; cursor: pointer; }
.lang-opt.active { background: var(--accent); color: #2a1500; border-color: var(--accent); }
.spin { animation: spin 1.2s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.p-info, .p-word, .p-actor, .p-result, .p-vote, .p-quiz, .p-mem, .p-draw { text-align: center; padding: 6vh 4vw; }
.p-big-emoji { font-size: 5rem; margin-bottom: 10px; }
.p-info p { font-size: 1.3rem; color: var(--text-dim); }
.p-sub { color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: .9rem; }
.p-big { font-size: clamp(2.4rem, 12vw, 4rem); font-weight: 900; margin: 14px 0 26px; color: var(--accent); line-height: 1.1; }
.p-btns { display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin: 0 auto; }
.p-result h2 { font-size: 1.6rem; }
.p-score { font-size: 1.2rem; color: var(--text-dim); margin-top: 10px; }
.p-score b { color: var(--accent); font-size: 1.5rem; }

/* Vote */
.p-vote h2 { margin-bottom: 20px; }
.vote-opt { display: block; width: 100%; max-width: 420px; margin: 8px auto; padding: 16px; font-size: 1.15rem; font-weight: 800; border-radius: 14px; border: 1px solid var(--stroke); background: rgba(255,255,255,.08); color: var(--text); cursor: pointer; }
.vote-opt:hover { background: var(--card-hover); }

/* Quiz-Buttons (Handy) */
.p-quiz { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 4vh 4vw; min-height: 60vh; align-content: center; }
.p-ans { border: 0; border-radius: 18px; font-size: 1.15rem; font-weight: 800; color: #10101a; min-height: 22vh; cursor: pointer; transition: opacity .2s, transform .1s; }
.p-ans:active { transform: scale(.97); }
.p-ans.dim { opacity: .3; }

/* Memory-Grid (Handy) */
.p-mem h2 { font-size: 1.2rem; margin-bottom: 14px; }
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 460px; margin: 0 auto 20px; }
.mem-cell { aspect-ratio: 1; font-size: 2rem; border-radius: 14px; border: 2px solid var(--stroke); background: rgba(255,255,255,.06); cursor: pointer; }
.mem-cell.sel { border-color: var(--accent); background: rgba(255,179,71,.25); transform: scale(1.05); }

/* Draw (Handy) */
.p-drawtop { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.p-word-inline { font-size: 1.5rem; font-weight: 900; color: var(--accent); }

/* Handy-only: Timer-Badge auf dem Handy */
.p-timer { display: inline-block; font-size: 1.5rem; font-weight: 900; color: var(--accent); background: rgba(0,0,0,.25); border: 2px solid var(--accent); border-radius: 12px; padding: 4px 16px; margin-bottom: 12px; }
.p-timer.low { color: #ff5252; border-color: #ff5252; }

/* Zeichnung ansehen (Rater-Handy) */
.p-watch { text-align: center; padding: 3vh 4vw; }
.p-watch .p-sub { margin-bottom: 10px; display: block; }

/* Merk-Symbole (Handy) */
.p-memshow { text-align: center; padding: 5vh 4vw; }
.p-memshow h2 { margin-bottom: 10px; }

/* Erklärungen (Handy) */
.p-rules { padding: 2vh 2vw 6vh; }
.p-rules .detail-head { justify-content: center; }
.p-rules .scene { margin: 14px 0; }

/* Quiz mit Frage (Handy) */
.p-quizwrap { display: flex; flex-direction: column; min-height: 82vh; }
.p-qhead { text-align: center; padding: 12px 4vw 8px; }
.p-qtext { font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.p-qnum { display: block; font-size: .8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.p-quizwrap .p-quiz { flex: 1; min-height: 0; padding: 4px 4vw 4vw; }

/* ---------- Wer bin ich? (Handy) ---------- */
.p-whoami { display: flex; flex-direction: column; gap: 12px; padding: 14px; min-height: 80vh; }
.wa-turn { text-align: center; font-weight: 700; padding: 10px; border-radius: 12px;
  border: 1px solid var(--stroke); background: rgba(255,255,255,0.06); }
.wa-turn.you { background: var(--accent-2); color: #241132; border-color: transparent; font-size: 1.15rem; }
.wa-you { text-align: center; padding: 14px; border-radius: 14px; border: 1px dashed var(--stroke);
  color: var(--text-dim); font-weight: 700; }
.wa-sub { font-weight: 700; margin-top: 4px; opacity: 0.8; }
.wa-others { display: flex; flex-direction: column; gap: 8px; }
.wa-other { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(255,255,255,0.06); }
.wa-other.done { opacity: 0.45; text-decoration: line-through; }
.wa-oname { color: var(--text-dim); }
.wa-oword { font-weight: 800; font-size: 1.1rem; }

/* ---------- Partner-Quiz (Handy) ---------- */
.p-cphint { text-align: center; color: var(--text-dim); font-weight: 700; margin: 6px 0 2px; }
.p-ans.cp { flex-direction: column; }
.p-ans.chosen { outline: 3px solid #fff; }
