/* Kampagne – Wahlkampf-Strategiespiel */

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface2: #21262d;
  --text: #e8eef7;
  --muted: #8b9cb3;
  --accent: #3d8bfd;
  --accent2: #a371f7;
  --danger: #f85149;
  --ok: #3fb950;
  --warn: #f0883e;
  --party: #d2a8ff;
  --gold: #f7c948;
  --font: "Segoe UI", system-ui, sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); }

/* ===== Landing Page ===== */

.screen {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

.landing { text-align: center; padding-top: 1.5rem; }

.landing-logo-wrap {
  text-align: center;
  margin-bottom: 1rem;
}
.landing-logo {
  max-width: 220px;
  height: auto;
  opacity: 0.7;
}

.landing-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  margin-bottom: 1.25rem;
}
.landing-oemer {
  width: 110px;
  height: auto;
  flex-shrink: 0;
}
.landing-hero-text { flex: 1; }

.game-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin: 0.25rem 0 0.5rem;
}

.landing-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

.landing-hint {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-top: 1.5rem;
  text-align: left;
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #30363d;
}

.join-form {
  display: flex;
  gap: 0.5rem;
}

.code-input {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 2px solid #30363d;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.25em;
  font-family: var(--font);
}
.code-input:focus {
  outline: none;
  border-color: var(--accent);
}
.code-input::placeholder {
  color: var(--muted);
  letter-spacing: 0.15em;
  font-weight: 400;
}

/* ===== Buttons ===== */

.btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  margin: 0;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  line-height: 1.35;
  font-family: var(--font);
  transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #238636, #1f6feb);
  color: #fff;
  text-align: center;
}

.btn-secondary {
  background: var(--accent);
  color: #fff;
  text-align: center;
  min-width: 110px;
}

.btn-large { padding: 1rem; font-size: 1.1rem; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  text-align: center;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #30363d;
  text-align: center;
}

.btn-small {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

/* ===== Game Header ===== */

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.game-title-small {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.session-code {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  margin-left: 0.5rem;
  letter-spacing: 0.1em;
}

.round-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface2);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}

/* ===== Player Identity Card ===== */

.player-identity {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.identity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.player-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--party);
  font-size: 0.8rem;
  font-weight: 600;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ===== Feedback Banner ===== */

.feedback {
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-align: center;
}
.feedback-ok {
  background: rgba(63, 185, 80, 0.15);
  border: 1px solid var(--ok);
  color: var(--ok);
}
.feedback-err {
  background: rgba(248, 81, 73, 0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
}

/* ===== Deltas ===== */

.delta-pos { color: var(--ok); font-weight: 700; }
.delta-neg { color: var(--danger); font-weight: 700; }
.delta-neutral { color: var(--muted); font-weight: 700; }

/* ===== Lobby ===== */

.lobby-section { text-align: center; }

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.qr-img {
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
}

.share-url {
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--accent);
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  width: 100%;
  text-align: center;
}

.player-list {
  margin: 1rem 0;
  text-align: left;
}

.player-chip {
  display: inline-block;
  background: var(--surface);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  margin: 0.2rem;
  font-size: 0.85rem;
}
.player-chip .chip-party {
  color: var(--party);
  font-weight: 600;
  margin-left: 0.3rem;
}
.player-chip.is-host {
  border: 1px solid var(--gold);
}
.player-chip.is-me {
  border: 1px solid var(--accent);
  background: rgba(61, 139, 253, 0.12);
}
.player-chip.is-bot {
  opacity: 0.7;
  border: 1px dashed var(--muted);
  font-style: italic;
}

/* Name Edit (Lobby) */
.name-edit {
  margin-bottom: 1rem;
  text-align: left;
}
.name-edit-prominent {
  background: var(--surface2);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.8rem;
  margin-bottom: 1.2rem;
}
.name-edit-label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--accent);
}
.name-edit-hint {
  font-size: 0.8rem;
  color: var(--warn);
  margin-top: 0.3rem;
  font-weight: 500;
}
.name-edit label {
  display: block;
  margin-bottom: 0.3rem;
}
.name-edit-row {
  display: flex;
  gap: 0.5rem;
}
.name-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 2px solid #30363d;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
}
.name-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Timer Warning Banner (schwebt oben) */
.timer-warning-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--danger);
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  animation: pulse 1s ease-in-out infinite;
}

/* Auto-Submit Overlay */
.auto-submit-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.auto-submit-content {
  text-align: center;
  max-width: 320px;
  padding: 1.5rem;
}
.auto-submit-countdown {
  font-size: 4rem;
  font-weight: 900;
  color: var(--danger);
  line-height: 1;
  margin-bottom: 0.5rem;
  animation: pulse 1s ease-in-out infinite;
}
.auto-submit-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.auto-submit-desc {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Proberunde-Banner (Spieler-Ansicht) */
.practice-banner {
  background: linear-gradient(135deg, #2d1f00, #3d2b00);
  border: 2px solid var(--warn);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--warn);
  animation: pulse 2s ease-in-out infinite;
}

/* ===== Action Phase ===== */

.round-intro {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent);
}
.round-intro h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.round-intro p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }

.action-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.action-btn:hover { border-color: #30363d; }
.action-btn.selected { border-color: var(--accent); background: rgba(61, 139, 253, 0.1); }
.action-btn.locked { opacity: 0.35; cursor: not-allowed; }
.action-btn .action-icon { font-size: 1.5rem; flex-shrink: 0; }
.action-btn .action-info { flex: 1; min-width: 0; }
.action-btn .action-name { font-weight: 700; font-size: 0.95rem; }
.action-btn .action-desc { font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }
.action-btn .action-cost { font-size: 0.85rem; font-weight: 700; color: var(--gold); flex-shrink: 0; }
.action-btn .action-cost.free { color: var(--ok); }

.target-select {
  margin: 0.5rem 0;
  padding: 0.75rem;
  background: var(--surface2);
  border-radius: var(--radius);
}
.target-select label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.target-select select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
}

/* Wett-Buttons */
.bet-type-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.bet-btn {
  flex: 1;
  padding: 0.6rem 0.5rem;
  border: 2px solid #30363d;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  font-family: var(--font);
  font-size: 0.85rem;
  line-height: 1.3;
  transition: border-color 0.2s, background 0.2s;
}
.bet-btn:hover { border-color: var(--accent); }
.bet-btn-active {
  border-color: var(--accent);
  background: rgba(61, 139, 253, 0.15);
}

/* Nachahmung Ergebnis-Karten */
.nachahmung-results { margin: 0.5rem 0; }
.nachahmung-card {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  margin-bottom: 0.4rem;
  border-left: 3px solid var(--muted);
  background: var(--surface2);
  font-size: 0.9rem;
  line-height: 1.4;
}
.nachahmung-card.outcome-positive { border-left-color: var(--ok); }
.nachahmung-card.outcome-dirty    { border-left-color: var(--warn); }
.nachahmung-card.outcome-fail,
.nachahmung-card.outcome-no_money { border-left-color: var(--danger); }
.nachahmung-card.copied-me {
  border-left-color: var(--accent2);
  background: rgba(163, 113, 247, 0.08);
}

/* Wetten Ergebnis-Karten */
.wetten-results { margin: 0.5rem 0; }
.wetten-card {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  margin-bottom: 0.4rem;
  border-left: 3px solid var(--muted);
  background: var(--surface2);
  font-size: 0.9rem;
  line-height: 1.4;
}
.wetten-card.won { border-left-color: var(--ok); }
.wetten-card.lost { border-left-color: var(--danger); }
.wetten-card.exposed { border-left-color: var(--warn); background: rgba(240, 136, 62, 0.08); }

.submit-bar {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.submit-bar .btn { flex: 1; text-align: center; }
.action-slots {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 0.4rem;
}

.submitted-banner {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  margin-top: 1rem;
}
.submitted-banner .check { font-size: 2rem; }
.submitted-banner p { color: var(--muted); margin: 0.5rem 0 0; }

/* ===== Results Phase ===== */

.results-section { margin-bottom: 1rem; }

/* Ömer Card – PNG + Sprechblase + Audio */
.oemer-card {
  background: linear-gradient(135deg, #1a2332, #1e293b);
  border: 1px solid var(--accent2);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  transition: transform 0.1s;
}
.oemer-card:active { transform: scale(0.99); }
.oemer-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.oemer-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent2);
  flex-shrink: 0;
}
.oemer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.oemer-info { flex: 1; min-width: 0; }
.oemer-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.oemer-role {
  font-size: 0.8rem;
  color: var(--muted);
}
.oemer-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent2);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
}
.oemer-play-btn:hover { background: var(--accent); transform: scale(1.1); }
.oemer-play-btn:active { transform: scale(0.95); }
.oemer-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #c9d1d9;
}
.oemer-text p { margin: 0.4rem 0; }

/* Ömer Mini – PNG + Sprechblase (für Kontext-Kommentare) */
.oemer-mini {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.75rem 0;
}
.oemer-mini-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent2);
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.oemer-mini-bubble {
  flex: 1;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  position: relative;
}
.oemer-mini-bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid var(--surface);
}
.oemer-mini-play {
  display: inline-block;
  margin-left: 0.4rem;
  cursor: pointer;
  color: var(--accent2);
  font-size: 0.9rem;
}
.oemer-mini-play:hover { color: var(--accent); }

.event-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  border-left: 4px solid var(--warn);
}
.event-card h4 { margin: 0 0 0.3rem; font-size: 0.95rem; }
.event-card p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.event-affected {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--warn);
}

.player-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 0.35rem;
}
.player-result .pr-name { font-weight: 600; font-size: 0.9rem; }
.player-result .pr-party { color: var(--party); font-size: 0.8rem; margin-left: 0.3rem; }
.player-result .pr-stats { text-align: right; font-size: 0.85rem; }
.player-result .pr-delta { font-size: 0.8rem; }
.player-result.is-me { border-left: 3px solid var(--accent); }

/* ===== Leaderboard ===== */

.leaderboard { margin: 0.75rem 0; }

.lb-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 0.3rem;
}
.lb-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.lb-rank.gold { background: var(--gold); color: #000; }
.lb-rank.silver { background: #c0c0c0; color: #000; }
.lb-rank.bronze { background: #cd7f32; color: #000; }
.lb-info { flex: 1; min-width: 0; }
.lb-name { font-weight: 600; font-size: 0.9rem; }
.lb-party { color: var(--party); font-size: 0.8rem; margin-left: 0.3rem; }
.lb-values { text-align: right; }
.lb-followers { font-weight: 700; }
.lb-score { font-size: 0.8rem; color: var(--muted); }
.lb-entry.is-me { border-left: 3px solid var(--accent); }

/* ===== Final Results ===== */

.final-champion {
  text-align: center;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}
.champion-emoji { font-size: 2.5rem; }
.champion-title {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.3rem 0 0.1rem;
}
.champion-name {
  font-size: 1.3rem;
  font-weight: 800;
}

/* Final Hero (Ömer + Logo) */
.final-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(255, 215, 0, 0.08));
  border-radius: var(--radius);
}
.final-oemer-full {
  height: 140px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}
.final-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
}

/* Lobby Logo */
.lobby-logo {
  display: block;
  margin: 0.5rem auto 1rem;
  height: 90px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
}

/* Champion Party */
.champion-party {
  font-size: 0.85rem;
  color: var(--party);
  margin-top: 0.15rem;
}

/* Attack Results */
.attack-results {
  margin: 0.75rem 0;
}
.attack-card {
  background: var(--surface);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}
.attack-card.blocked {
  border-left-color: var(--accent);
  opacity: 0.75;
}
.attack-reason {
  color: var(--muted);
  font-style: italic;
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

/* Risk text on action buttons */
.action-risk {
  font-size: 0.75rem;
  color: var(--warn);
  margin-top: 0.25rem;
  line-height: 1.3;
  opacity: 0.85;
}

/* Aufdecken results */
.aufdecken-results {
  margin: 0.5rem 0;
}
.aufdecken-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
  border-left: 3px solid var(--muted);
  font-size: 0.9rem;
}
.aufdecken-card.correct {
  border-left-color: var(--ok);
  background: rgba(63, 185, 80, 0.08);
}
.aufdecken-card.wrong {
  border-left-color: var(--danger);
  background: rgba(248, 81, 73, 0.08);
}
.aufdecken-card.targeted {
  border-left-color: var(--accent2);
  background: rgba(163, 113, 247, 0.08);
}

/* Koalition results */
.koalition-results {
  margin: 0.5rem 0;
}
.koalition-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
  border-left: 3px solid var(--muted);
  font-size: 0.9rem;
}
.koalition-card.mutual {
  border-left-color: var(--ok);
  background: rgba(63, 185, 80, 0.08);
}
.koalition-card.one-sided {
  border-left-color: var(--warn);
  background: rgba(240, 136, 62, 0.08);
}
.koalition-card.leaked {
  border-left-color: var(--danger);
  background: rgba(248, 81, 73, 0.08);
}

.ranking-tabs {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.ranking-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  text-align: center;
}
.ranking-tab.active {
  background: var(--accent);
  color: #fff;
}

/* ===== Lessons Carousel ===== */

.carousel { position: relative; margin: 0.75rem 0; }

.carousel-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #484f58 transparent;
}

.card {
  flex: 0 0 min(300px, 82vw);
  scroll-snap-align: start;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.card h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.card p { margin: 0; color: #c9d1d9; line-height: 1.45; font-size: 0.9rem; }

/* ===== Host Controls ===== */

.host-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px dashed #30363d;
}
.host-controls .btn {
  flex: 1;
  min-width: 100px;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.55rem 0.5rem;
}
.host-label {
  width: 100%;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 0.2rem;
}

/* ===== Status Banners ===== */

.status-banner {
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  background: var(--surface2);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-align: center;
}

.hint {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
  margin: 0.75rem 0;
}

/* ===== Waiting dots ===== */

.waiting-dots::after {
  content: "";
  animation: dots 1.5s steps(4) infinite;
}
@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

/* ===== Swipe UI (Organic Postings) ===== */

.swipe-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 20, 25, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 0.75rem;
}

.swipe-header {
  text-align: center;
}
.swipe-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.swipe-counter {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.swipe-hint {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.3rem;
  font-weight: 600;
}

.swipe-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.swipe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface2);
  transition: background 0.2s;
}
.swipe-dot.active { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.swipe-dot.posted { background: var(--ok); }
.swipe-dot.skipped { background: var(--danger); opacity: 0.4; }

.swipe-card-wrap {
  position: relative;
  width: min(360px, 88vw);
  perspective: 800px;
}

.swipe-card {
  position: relative;
  width: 100%;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  border-top: 4px solid var(--accent);
}
.swipe-card.dragging {
  transition: none;
  cursor: grabbing;
}

.swipe-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.swipe-avatar { font-size: 1.5rem; }
.swipe-handle {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}
.swipe-category {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.swipe-card-body {
  padding: 1rem 1.1rem;
}
.swipe-card-body p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
}
.swipe-hashtags {
  display: block;
  margin-top: 0.5rem;
  color: var(--accent);
  font-size: 0.85rem;
}

.swipe-card-effects {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: var(--surface2);
  font-size: 0.88rem;
  font-weight: 700;
}
.swipe-effect.followers { color: var(--accent); }
.swipe-effect.cred-pos { color: var(--ok); }
.swipe-effect.cred-neg { color: var(--danger); }

/* Swipe labels (POSTEN / SKIP) */
.swipe-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 800;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 3px solid;
  opacity: 0;
  transition: opacity 0.1s;
  pointer-events: none;
  z-index: 10;
}
.swipe-label-post {
  right: 1rem;
  color: var(--ok);
  border-color: var(--ok);
  background: rgba(63, 185, 80, 0.15);
}
.swipe-label-skip {
  left: 1rem;
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(248, 81, 73, 0.15);
}

/* Exit animations */
.swipe-card.exit-left {
  animation: swipeLeft 0.3s ease-out forwards;
}
.swipe-card.exit-right {
  animation: swipeRight 0.3s ease-out forwards;
}
@keyframes swipeLeft {
  to { transform: translateX(-150%) rotate(-15deg); opacity: 0; }
}
@keyframes swipeRight {
  to { transform: translateX(150%) rotate(15deg); opacity: 0; }
}

/* Swipe buttons */
.swipe-buttons {
  display: flex;
  gap: 2rem;
}
.swipe-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2.5px solid;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.15s;
}
.swipe-btn:hover { transform: scale(1.1); }
.swipe-btn:active { transform: scale(0.95); }
.swipe-btn-skip { border-color: var(--danger); color: var(--danger); }
.swipe-btn-skip:hover { background: rgba(248, 81, 73, 0.15); }
.swipe-btn-post { border-color: var(--ok); color: var(--ok); }
.swipe-btn-post:hover { background: rgba(63, 185, 80, 0.15); }

/* Swipe done screen */
.swipe-done {
  text-align: center;
  padding: 1rem;
}
.swipe-done-icon { font-size: 2.5rem; }
.swipe-done h3 { margin: 0.3rem 0; }
.swipe-done p { color: var(--muted); margin: 0.3rem 0; }

.swipe-summary {
  margin: 0.75rem 0;
  text-align: left;
}

/* Mini post cards (results + summary) */
.mini-post-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}
.mini-post-avatar { font-size: 1.1rem; flex-shrink: 0; }
.mini-post-text { flex: 1; color: var(--muted); line-height: 1.3; }
.mini-post-effects { flex-shrink: 0; font-size: 0.78rem; white-space: nowrap; }

/* Swipe badge on action button */
.action-swipe-badge {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(63, 185, 80, 0.15);
  color: var(--ok);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== Round Timer (player) ===== */

.round-timer {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  letter-spacing: 0.05em;
}

.round-timer.timer-warning {
  color: var(--danger);
  animation: pulse-timer 1s ease-in-out infinite;
}

@keyframes pulse-timer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Korruption Results (player) ===== */

.korruption-results {
  margin: 0.5rem 0;
}
.korruption-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
  border-left: 3px solid var(--muted);
  font-size: 0.9rem;
}
.korruption-card.success {
  border-left-color: var(--danger);
  background: rgba(248, 81, 73, 0.08);
}
.korruption-card.failed {
  border-left-color: var(--muted);
  background: rgba(139, 156, 179, 0.06);
}

/* ===== Support Results (player) ===== */

.support-results {
  margin: 0.5rem 0;
}
.support-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
  border-left: 3px solid var(--ok);
  font-size: 0.9rem;
}
.support-card.penalty {
  border-left-color: var(--danger);
  background: rgba(248, 81, 73, 0.08);
}

/* ===== Utility ===== */

.mt-1 { margin-top: 0.75rem; }
.mb-1 { margin-bottom: 0.75rem; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-small { font-size: 0.85rem; }
.hidden { display: none !important; }

/* Langeweile-gesperrte Aktionen */
.action-btn.boredom-locked {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--warn) !important;
  position: relative;
}
.boredom-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 136, 62, 0.18);
  border-radius: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--warn);
  pointer-events: none;
  z-index: 2;
}

/* Motivations-Banner (Action-Phase, oben) */
.round-motivation {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.15), rgba(163, 113, 247, 0.12));
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: 0.6rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Pflicht-Badge auf Aktions-Button */
.action-mandatory-badge {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 0.25rem;
  padding: 0.1rem 0.35rem;
  margin-left: 0.4rem;
  vertical-align: middle;
  text-transform: uppercase;
}

/* ===================================================================
   Reaction Panel (Spieler-Seite)
   =================================================================== */
.reaction-panel {
  position: fixed;
  bottom: 1.2rem;
  right: 1rem;
  z-index: 999;
}

.reaction-toggle {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.reaction-toggle:active { transform: scale(0.88); }
.reaction-toggle.reaction-toggle-open { border-color: var(--accent); }
.reaction-toggle.reaction-cooldown { opacity: 0.45; pointer-events: none; }

.reaction-drawer {
  position: absolute;
  bottom: 3.8rem;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 0.65rem;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 300px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.reaction-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  padding: 0.4rem 0.55rem;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.1s, transform 0.1s;
  line-height: 1;
}
.reaction-btn:active { transform: scale(0.82); }
.reaction-btn:hover { background: var(--border); }

.reaction-btn-text {
  font-size: 0.78rem;
  padding: 0.38rem 0.65rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
