/* ==========================================================================
   [TAG: CLASSIC_CASINO_THEME]
   style.css - Creativ Poker (Authentischer Luxus-Casino & Multi-Player Look)
   Optimierte Setzung & Komposition für Laptop (16:9) und Smartphone (9:19.5)
   ========================================================================== */

:root {
  /* Farbpalette: Klassischer Monte Carlo Casino Filz & Mahagoni */
  --bg-app: #0e0a07;
  --bg-app-radial: radial-gradient(circle at 50% 15%, #22160e 0%, #0e0a07 100%);
  --bg-table-felt: radial-gradient(ellipse at 50% 45%, #235c3c 0%, #174229 58%, #0b2215 100%);
  --table-wood-rail: #2b1810;
  --table-wood-border: #4a2b1c;
  --table-gold-trim: #d4af37;
  --table-gold-light: #f5d77f;
  --table-line: rgba(245, 240, 230, 0.18);

  --text-main: #fbf9f5;
  --text-gold: #e5c158;
  --text-muted: #b8aba0;
  --text-dark: #1f1610;

  /* Button-Theming */
  --btn-fold-bg: #6b1414;
  --btn-fold-hover: #8e1a1a;
  --btn-call-bg: #14532d;
  --btn-call-hover: #166534;
  --btn-raise-bg: #78350f;
  --btn-raise-hover: #92400e;
  --btn-allin-bg: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);

  /* Standard-Kartengröße (Laptop / Desktop) */
  --card-width: 66px;
  --card-height: 94px;
  --card-player-width: 74px;
  --card-player-height: 104px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg-app-radial);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  padding: 14px;
}

/* ==========================================================================
   [TAG: APP_HEADER] - Obere Navigations- und Statusleiste
   ========================================================================== */
.app-header {
  width: 100%;
  max-width: 1040px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: linear-gradient(180deg, #2a1b14 0%, #190f0a 100%);
  border: 1.5px solid var(--table-gold-trim);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-title {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff3d1 0%, #d4af37 60%, #aa820a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.badge-tag {
  background: rgba(212, 175, 55, 0.15);
  color: var(--text-gold);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--table-gold-trim);
  letter-spacing: 0.5px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.deck-theme-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.god-mode-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-gold);
  background: rgba(212, 175, 55, 0.12);
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--table-gold-trim);
  cursor: pointer;
  transition: all 0.2s ease;
}
.god-mode-switch:hover {
  background: rgba(212, 175, 55, 0.22);
}

/* ==========================================================================
   [TAG: SCREEN_CONTAINERS] - Phasen & Stufen
   ========================================================================== */
.screen-view {
  display: none;
  width: 100%;
  max-width: 1040px;
  flex-direction: column;
  align-items: center;
}

.screen-view.active {
  display: flex;
}

/* ==========================================================================
   [TAG: WIZARD_STEPPER] - Navigationsleiste der 3 Host-Stufen
   ========================================================================== */
.wizard-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(14, 10, 7, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 8px 18px;
  border-radius: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  flex-wrap: wrap;
}

.wizard-step-indicator {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wizard-step-indicator:hover {
  color: var(--text-gold);
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.1);
}

.wizard-step-indicator.active {
  background: var(--table-gold-trim);
  color: #120e0b;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.6);
  border-color: var(--table-gold-trim);
}

.wizard-step-indicator.completed {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.4);
}

.wizard-step-arrow {
  color: var(--table-gold-trim);
  font-weight: 900;
}

/* ==========================================================================
   [TAG: ROLE_SELECT_SCREEN] - Screen 0: Rollenwahl
   ========================================================================== */
.role-select-card {
  width: 100%;
  max-width: 860px;
  background: linear-gradient(180deg, #241710 0%, #150d09 100%);
  border: 2px solid var(--table-gold-trim);
  border-radius: 24px;
  padding: 36px 28px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-top: 10px;
}

.role-title {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-gold);
  letter-spacing: 0.5px;
}

.role-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
}

.role-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  width: 100%;
  margin-top: 20px;
}

.role-box {
  background: linear-gradient(180deg, #2b1c13 0%, #180e08 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 20px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.role-box * {
  pointer-events: none;
}

.role-box:hover {
  border-color: var(--table-gold-trim);
  transform: translateY(-5px);
  box-shadow: 0 14px 35px rgba(212, 175, 55, 0.35);
}

.role-icon {
  font-size: 3.2rem;
  margin-bottom: 2px;
}

.role-box-title {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-gold);
}

.role-box-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  min-height: 64px;
}

/* ==========================================================================
   [TAG: RULE_EDITOR_CARD] - Stufe 1, 2 und 3 Wizard-Karten
   ========================================================================== */
.rule-editor-card {
  width: 100%;
  max-width: 1040px;
  background: linear-gradient(180deg, #241710 0%, #140c08 100%);
  border: 2px solid var(--table-gold-trim);
  border-radius: 22px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.75);
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding-bottom: 16px;
}

.editor-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-gold);
  letter-spacing: 0.5px;
}

.editor-select, .editor-input {
  background: #0f0906;
  color: #f5efe6;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}
.editor-select:focus, .editor-input:focus {
  border-color: var(--table-gold-light);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.editor-settings-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  background: rgba(0, 0, 0, 0.35);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-item label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
}

.timeline-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-btn-small {
  background: rgba(212, 175, 55, 0.15);
  color: var(--text-gold);
  border: 1px solid var(--table-gold-trim);
  border-radius: 8px;
  padding: 7px 14px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.editor-btn-small:hover {
  background: var(--table-gold-trim);
  color: #120e0b;
}

.phases-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 6px;
}

.phase-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #2b1c13 0%, #190f09 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  padding: 12px 18px;
  transition: all 0.2s ease;
  gap: 12px;
}

.phase-item:hover {
  border-color: var(--table-gold-trim);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.drag-grip {
  font-size: 1.4rem;
  color: var(--text-gold);
  cursor: grab;
  padding: 0 4px;
  line-height: 1;
}
.drag-grip:active {
  cursor: grabbing;
}

.phase-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.phase-number {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--text-gold);
  background: rgba(0, 0, 0, 0.55);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.phase-icon {
  font-size: 1.3rem;
}

.phase-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.phase-title {
  font-weight: 700;
  color: #f5efe6;
  font-size: 1rem;
}
.phase-details {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.phase-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-move-phase, .btn-delete-phase {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--text-gold);
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}
.btn-move-phase:hover:not(:disabled) {
  background: var(--table-gold-trim);
  color: #120e0b;
}
.btn-delete-phase {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.btn-delete-phase:hover {
  background: #ef4444;
  color: #fff;
}
.btn-move-phase:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.validation-bar {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.validation-bar.is-valid {
  background: rgba(20, 83, 45, 0.3);
  border: 1.5px solid #22c55e;
  color: #86efac;
}
.validation-bar.is-invalid {
  background: rgba(127, 29, 29, 0.3);
  border: 1.5px solid #ef4444;
  color: #fca5a5;
}

.editor-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ==========================================================================
   [TAG: POKER_TABLE_ARENA] - Screen 6: Der Spieltisch (Ovaler Filztisch)
   ========================================================================== */
.poker-arena {
  width: 100%;
  max-width: 1040px;
  background: var(--bg-table-felt);
  border: 14px solid var(--table-wood-rail);
  outline: 2.5px solid var(--table-gold-trim);
  border-radius: 60px;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.9), 0 16px 45px rgba(0, 0, 0, 0.8);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  overflow: hidden;
  min-height: 480px;
}

.game-top-bar {
  width: 100%;
  max-width: 1040px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  background: rgba(26, 16, 11, 0.92);
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  flex-wrap: wrap;
  gap: 10px;
}

.active-game-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-gold);
}

/* [TAG: MULTI_OPPONENTS_ROW] - Obere Reihe für Mitspieler */
.opponents-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
  z-index: 2;
}

.opponent-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(18, 14, 11, 0.85);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  padding: 8px 12px;
  border-radius: 16px;
  transition: all 0.3s ease;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.opponent-slot.active-turn {
  border-color: #f43f5e !important;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.7) !important;
  transform: scale(1.06);
}

.opponent-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.opponent-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--table-gold-trim);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

/* [TAG: COMMUNITY_ZONE] - Tisch-Mitte mit Pot & Community Cards */
.community-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 24px;
  border: 1px solid rgba(245, 240, 230, 0.1);
  margin: 4px auto;
  z-index: 2;
}

/* [TAG: WINNER_BANNER_CARD] - Edle Casino-Gewinn-Anzeige */
.winner-banner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(36, 23, 16, 0.96) 0%, rgba(20, 12, 8, 0.98) 100%);
  border: 2px solid var(--table-gold-trim);
  border-radius: 18px;
  padding: 14px 24px;
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.65), 0 8px 24px rgba(0, 0, 0, 0.85);
  animation: winner-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-bottom: 8px;
  text-align: center;
  gap: 4px;
  max-width: 90%;
}

@keyframes winner-pop-in {
  0% { transform: scale(0.7) translateY(-10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.winner-crown-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
  animation: crown-float 1.5s infinite alternate ease-in-out;
}

@keyframes crown-float {
  0% { transform: translateY(0) rotate(-4deg); }
  100% { transform: translateY(-4px) rotate(4deg); }
}

.winner-main-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-gold);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.winner-hand-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f5efe6;
}

.winner-payout-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 900;
  padding: 3px 14px;
  border-radius: 12px;
  border: 1px solid #6ee7b7;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  margin-top: 4px;
}

.pot-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #1c110a 0%, #0c0704 100%);
  border: 2px solid var(--table-gold-trim);
  padding: 6px 22px;
  border-radius: 24px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.pot-label {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-muted);
}
.pot-amount {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-gold);
}

.phase-indicator {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #f5efe6;
  letter-spacing: 0.5px;
}

.cards-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  perspective: 1000px;
  min-height: var(--card-height);
}

/* [TAG: 3D_CARD_STYLES] */
.card-3d-wrapper {
  width: var(--card-width);
  height: var(--card-height);
  perspective: 1000px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}
.card-3d-wrapper:hover {
  transform: translateY(-4px);
}

.player-zone .card-3d-wrapper {
  width: var(--card-player-width);
  height: var(--card-player-height);
}

.card-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.card-3d-wrapper.is-flipped .card-3d-inner {
  transform: rotateY(0deg);
}
.card-3d-wrapper.is-flipped .card-3d-front {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.card-3d-wrapper.is-flipped .card-3d-back {
  opacity: 0;
  visibility: hidden;
  z-index: 1;
}

.card-3d-wrapper:not(.is-flipped) .card-3d-inner {
  transform: rotateY(180deg);
}
.card-3d-wrapper:not(.is-flipped) .card-3d-front {
  opacity: 0;
  visibility: hidden;
  z-index: 1;
}
.card-3d-wrapper:not(.is-flipped) .card-3d-back {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.card-3d-front,
.card-3d-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  top: 0;
  left: 0;
  border-radius: 6px;
}
.card-3d-front { transform: rotateY(0deg); }
.card-3d-back { transform: rotateY(180deg); }

.poker-card-back-img-wrap {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.65);
  background: #ffffff;
  border: 1px solid #d3c9b8;
  display: block;
}

.poker-card-back-img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: fill;
  display: block;
}

.poker-card-svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* [TAG: PLAYER_ZONE] - Eigene Spieler-Zone am unteren Tischrand */
.player-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 3;
}

.turn-spotlight-badge {
  display: none;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 5px 16px;
  border-radius: 20px;
  text-transform: uppercase;
}

.player-zone.active-turn .turn-spotlight-badge {
  display: block;
  background: linear-gradient(180deg, #1e5631 0%, #133a21 100%);
  color: #a7f3d0;
  border: 1.5px solid #34d399;
  animation: pulse-spotlight 1.2s infinite alternate ease-in-out;
}

@keyframes pulse-spotlight {
  0% { transform: scale(0.96); box-shadow: 0 0 8px rgba(52, 211, 153, 0.4); }
  100% { transform: scale(1.04); box-shadow: 0 0 22px rgba(52, 211, 153, 0.8); }
}

.player-info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #241710 0%, #150d09 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}

.player-zone.active-turn .player-info-card {
  border-color: var(--table-gold-light) !important;
  box-shadow: 0 0 28px rgba(212, 175, 55, 0.65) !important;
  transform: scale(1.04);
}

.player-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
  color: #120e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.85rem;
}
.player-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #f5efe6;
}
.player-chips {
  color: var(--text-gold);
  font-weight: 800;
  font-size: 1.05rem;
}
.player-current-bet {
  background: rgba(212, 175, 55, 0.15);
  color: var(--text-gold);
  border: 1px solid rgba(212, 175, 55, 0.5);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ==========================================================================
   [TAG: CONTROLS_PANEL] - Unteres Aktions-Dock
   ========================================================================== */
.controls-panel {
  width: 100%;
  max-width: 1040px;
  background: linear-gradient(180deg, #241710 0%, #150d09 100%);
  border: 1.5px solid var(--table-gold-trim);
  border-radius: 20px;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.turn-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.turn-indicator-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background: #34d399;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 12px #34d399;
  animation: pulse-dot 1s infinite alternate;
}
@keyframes pulse-dot {
  0% { opacity: 0.5; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.25); }
}

.action-buttons-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hand-ended-row {
  display: flex;
  width: 100%;
  justify-content: center;
}

.poker-btn {
  flex: 1;
  min-width: 100px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--table-gold-trim);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  touch-action: manipulation;
}
.poker-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
}
.poker-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.poker-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-fold {
  background: linear-gradient(180deg, var(--btn-fold-bg) 0%, #450a0a 100%);
  color: #fecdd3;
  border-color: #991b1b;
}
.btn-check-call {
  background: linear-gradient(180deg, var(--btn-call-bg) 0%, #052e16 100%);
  color: #d1fae5;
  border-color: #16a34a;
}
.btn-raise {
  background: linear-gradient(180deg, var(--btn-raise-bg) 0%, #451a03 100%);
  color: #fef3c7;
  border-color: var(--table-gold-trim);
}
.btn-allin {
  background: var(--btn-allin-bg);
  color: #120e0b;
  border-color: #fde68a;
  font-weight: 900;
}

.raise-slider-group {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.45);
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}
.raise-slider {
  flex: 1;
  accent-color: var(--table-gold-trim);
  cursor: pointer;
  height: 6px;
}
.raise-amount-badge {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text-gold);
}

/* ==========================================================================
   [TAG: PIN_AND_QR_STYLING] - Screen 3 & Screen 4
   ========================================================================== */
.host-pin-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pin-code-huge {
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 8px;
  color: var(--text-gold);
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.65);
  background: rgba(0, 0, 0, 0.55);
  padding: 8px 28px;
  border-radius: 14px;
  border: 2px dashed var(--table-gold-trim);
}
.qr-code-box {
  margin: 10px 0;
  display: flex;
  justify-content: center;
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}
.pin-input-field {
  background: #0f0906;
  color: var(--text-gold);
  border: 2px solid var(--table-gold-trim);
  border-radius: 12px;
  padding: 12px;
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
  letter-spacing: 8px;
  outline: none;
  width: 100%;
}
.pin-input-field:focus {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.connection-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f5efe6;
}

/* ==========================================================================
   [TAG: SHOWCASE_SECTION] - Einklappbare Deck-Galerie
   ========================================================================== */
.showcase-section {
  width: 100%;
  max-width: 1040px;
  margin-top: 20px;
  background: linear-gradient(180deg, #241710 0%, #140c08 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 8px;
}
.showcase-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}
.deck-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

/* [TAG: DICE_OVERLAY] */
.dice-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.dice-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.dice-cube {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.7);
  animation: roll-anim 0.6s infinite alternate ease-in-out;
}
@keyframes roll-anim {
  0% { transform: rotate(-20deg) scale(0.9); }
  100% { transform: rotate(20deg) scale(1.1); }
}
.dice-result-msg {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-gold);
  text-align: center;
  max-width: 440px;
}

/* ==========================================================================
   [TAG: RESPONSIVE_LAYOUTS] - Dedizierte Anpassungen für Smartphone & Tablet
   ========================================================================== */

/* 📱 TABLET & NARROW SCREENS (<= 768px) */
@media (max-width: 768px) {
  body {
    padding: 8px;
  }
  .app-header {
    padding: 10px 14px;
    border-radius: 12px;
  }
  .logo-title {
    font-size: 1.15rem;
  }
  .role-options-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .role-select-card {
    padding: 24px 18px;
  }
  .poker-arena {
    border-radius: 36px;
    border-width: 8px;
    padding: 16px 10px;
    min-height: 440px;
  }
}

/* 📱 SMARTPHONE HOCHFORMAT (<= 480px / 9:19.5 Aspektverhältnis) */
@media (max-width: 480px) {
  :root {
    --card-width: 46px;
    --card-height: 66px;
    --card-player-width: 58px;
    --card-player-height: 82px;
  }

  body {
    padding: 6px 4px;
  }

  /* Header kompakt & einzeilig */
  .app-header {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 10px;
  }
  .logo-title {
    font-size: 1rem;
    letter-spacing: 1px;
  }
  .badge-tag {
    font-size: 0.65rem;
    padding: 2px 8px;
  }
  .header-tools {
    gap: 8px;
  }
  .god-mode-switch {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  /* Wizard-Nav-Bar */
  .wizard-nav-bar {
    padding: 6px 10px;
    gap: 6px;
    border-radius: 14px;
  }
  .wizard-step-indicator {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  /* Startscreen */
  .role-title {
    font-size: 1.5rem;
  }
  .role-subtitle {
    font-size: 0.95rem;
  }
  .role-box {
    padding: 20px 14px;
  }
  .role-box-desc {
    min-height: auto;
    font-size: 0.85rem;
  }

  /* Wizard Stufen */
  .rule-editor-card {
    padding: 16px 12px;
    border-radius: 16px;
    gap: 14px;
  }
  .editor-title {
    font-size: 1.05rem;
  }
  .editor-settings-row {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }
  .phase-item {
    padding: 10px 12px;
    gap: 8px;
  }
  .phase-left {
    gap: 8px;
  }
  .phase-title {
    font-size: 0.9rem;
  }
  .phase-details {
    font-size: 0.75rem;
  }
  .pin-code-huge {
    font-size: 2.2rem;
    letter-spacing: 5px;
    padding: 6px 16px;
  }

  /* 🏟️ POKER ARENA: Smartphone Horseshoe Stadium Setzung */
  .poker-arena {
    border-radius: 28px;
    border-width: 6px;
    padding: 12px 8px;
    min-height: 420px;
    gap: 12px;
  }

  .game-top-bar {
    padding: 8px 12px;
    margin-bottom: 8px;
  }
  .active-game-title {
    font-size: 0.9rem;
  }
  .pot-display {
    padding: 4px 14px;
  }
  .pot-amount {
    font-size: 1.1rem;
  }

  .opponents-row {
    gap: 8px;
  }
  .opponent-slot {
    min-width: 90px;
    padding: 6px 8px;
    border-radius: 12px;
  }
  .opponent-header {
    font-size: 0.75rem;
  }

  .community-zone {
    padding: 8px 6px;
    border-radius: 16px;
    gap: 6px;
  }
  .phase-indicator {
    font-size: 0.85rem;
  }

  .player-info-card {
    padding: 6px 14px;
    gap: 8px;
    font-size: 0.85rem;
  }
  .player-name, .player-chips {
    font-size: 0.9rem;
  }

  /* 🕹️ CONTROLS PANEL: Daumenzone (Thumb Zone) */
  .controls-panel {
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
    margin-top: 8px;
  }
  .turn-banner {
    padding-bottom: 6px;
  }
  .turn-indicator-pill {
    font-size: 0.95rem;
  }

  .action-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .poker-btn {
    min-width: unset;
    min-height: 48px;
    padding: 10px;
    font-size: 0.9rem;
  }
  .poker-btn#btn-showdown {
    grid-column: span 2;
  }
  .hand-ended-row .poker-btn {
    width: 100%;
    min-height: 52px;
  }
  .raise-slider-group {
    padding: 8px 12px;
    gap: 10px;
  }
}

/* ==========================================================================
   [TAG: NEW_POKER_TABLE_LAYOUT]
   Neues ovales Tisch-Design, radiale Ellipsen-Sitzordnung & Stepper/Jetons-Dock
   ========================================================================== */

:root {
  /* Farbsystem für CSS-Karten */
  --card-theme-color:         #e11d48;
  --card-theme-glow:          rgba(225,29,72,0.4);
  --card-theme-wedge-bg:      linear-gradient(135deg, rgba(225,29,72,0.08) 0%, rgba(225,29,72,0.22) 100%);
  --card-theme-diagonal-line: linear-gradient(135deg, rgba(255,255,255,0.9) 48%, rgba(225,29,72,0.15) 50%, rgba(255,255,255,0.9) 52%);
}

/* Top-Bar im Spieltisch */
.table-topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #241710 0%, #150d09 100%);
  padding: 8px 16px;
  border-radius: 14px;
  border: 1px solid rgba(212,175,55,0.35);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  z-index: 30;
  gap: 10px;
  margin-bottom: 10px;
}

.table-topbar-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-gold);
}

.gear-btn {
  background: rgba(212,175,55,0.15);
  border: 1.2px solid rgba(212,175,55,0.45);
  color: var(--text-gold);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.gear-btn:hover {
  background: rgba(212,175,55,0.3);
  transform: rotate(30deg) scale(1.05);
}

/* Ovaler Filztisch Canvas */
.poker-table-canvas {
  position: relative;
  background: var(--bg-table-felt);
  border: 14px solid var(--table-wood-rail);
  outline: 2.5px solid var(--table-gold-trim);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.9), 0 12px 40px rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 480px;
  height: 520px;
  border-radius: 200px;
  margin: 8px 0 14px 0;
  transition: all 0.3s ease;
  overflow: visible;
}
.poker-table-canvas::before {
  content: '';
  position: absolute;
  top: 18px; left: 18px; right: 18px; bottom: 18px;
  border: 1.5px dashed rgba(245,240,230,0.18);
  border-radius: inherit;
  pointer-events: none;
}

/* Tisch-Mitte */
.table-center-zone {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.35);
  padding: 12px 22px;
  border-radius: 22px;
  border: 1px solid rgba(212,175,55,0.25);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  z-index: 5;
  text-align: center;
}
.pot-pill {
  background: linear-gradient(180deg, #1c110a 0%, #0b0704 100%);
  border: 1.5px solid var(--table-gold-trim);
  border-radius: 20px;
  padding: 3px 18px;
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-gold);
  box-shadow: 0 0 16px rgba(212,175,55,0.4);
}
.community-cards-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: nowrap;
}

/* Radiale Sitzplätze um den Tisch */
.seats-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.seat-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 15;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.seat-card-box {
  background: linear-gradient(180deg, #241710 0%, #150d09 100%);
  border: 1.5px solid rgba(212,175,55,0.4);
  border-radius: 16px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.7);
  transition: all 0.25s ease;
  white-space: nowrap;
}
.seat-node:hover .seat-card-box {
  border-color: var(--table-gold-light);
  transform: scale(1.06);
  box-shadow: 0 0 20px rgba(212,175,55,0.5);
}
.seat-node.active-turn .seat-card-box {
  border-color: #34d399 !important;
  box-shadow: 0 0 24px rgba(52,211,153,0.8) !important;
  transform: scale(1.08);
  animation: pulse-border 1.2s infinite alternate ease-in-out;
}
@keyframes pulse-border {
  0% { transform: scale(1.04); }
  100% { transform: scale(1.10); }
}
.seat-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
  color: #120e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
}
.seat-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f5efe6;
}
.seat-chips {
  color: var(--text-gold);
  font-weight: 800;
  font-size: 0.85rem;
}
.seat-cards-group {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  background: rgba(0,0,0,0.45);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(212,175,55,0.25);
}
.dealer-badge {
  background: #f8fafc;
  color: #0f172a;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.65rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.8);
  border: 1px solid #d4af37;
  flex-shrink: 0;
}
.seat-node.is-hero .seat-card-box {
  border: 2px solid var(--table-gold-trim);
  background: linear-gradient(180deg, #2e1a12 0%, #170d08 100%);
  padding: 7px 16px;
}
.seat-node.is-hero .seat-cards-group {
  background: rgba(0,0,0,0.6);
  padding: 5px 8px;
  border-color: rgba(212,175,55,0.5);
}

/* Skalierungs-Container für Karten */
.card-scale-outer {
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}
.card-scale-inner {
  position: absolute;
  top: 0; left: 0;
  display: flex;
  gap: 3px;
}
.seat-node .poker-card:hover,
.seat-node .classic-card:hover {
  transform: none;
}

/* ==========================================================================
   [TAG: SHOWCASE_CONTROLS_DOCK]
   Steuerungs-Dock unten (Aktionen, Stepper, Jetons)
   ========================================================================== */
.showcase-controls-dock {
  width: 100%;
  background: linear-gradient(180deg, #1f140e 0%, #100a07 100%);
  border: 1.5px solid rgba(212,175,55,0.4);
  border-radius: 18px;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.8);
  z-index: 50;
  min-height: 118px;
  max-height: 118px;
  overflow: hidden;
}
.dock-turn-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #34d399;
}

/* Stepper */
.bet-stepper-row {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  width: 100%;
}
.stepper-btn {
  background: #1e130c;
  border: 1.5px solid rgba(212,175,55,0.4);
  color: var(--text-gold);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.stepper-btn:hover {
  background: rgba(212,175,55,0.25);
  border-color: var(--table-gold-light);
}
.stepper-display {
  flex: 1;
  max-width: 180px;
  background: #090604;
  border: 1.5px solid var(--table-gold-trim);
  padding: 4px 10px;
  border-radius: 8px;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-gold);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
}

/* Casino-Jetons */
.bet-chips-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  width: 100%;
  padding: 1px 0;
}
.poker-chip {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  border: 2.5px dashed rgba(255,255,255,0.85);
  outline: 1.5px solid rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.62rem;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.75), inset 0 0 8px rgba(0,0,0,0.6);
  transition: all 0.16s cubic-bezier(0.34,1.56,0.64,1);
  user-select: none;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}
.poker-chip:hover {
  transform: translateY(-3px) scale(1.1);
}
.poker-chip:active {
  transform: scale(0.95);
}
.chip-5   { background: radial-gradient(circle at 40% 40%, #ef4444 0%, #b91c1c 70%, #7f1d1d 100%); }
.chip-10  { background: radial-gradient(circle at 40% 40%, #3b82f6 0%, #1d4ed8 70%, #172554 100%); }
.chip-25  { background: radial-gradient(circle at 40% 40%, #22c55e 0%, #15803d 70%, #052e16 100%); }
.chip-50  { background: radial-gradient(circle at 40% 40%, #f97316 0%, #c2410c 70%, #431407 100%); }
.chip-100 { background: radial-gradient(circle at 40% 40%, #27272a 0%, #09090b 70%, #000 100%); border-color: var(--table-gold-trim); color: var(--text-gold); }
.chip-reset-btn {
  background: rgba(220,38,38,0.25);
  border: 1.5px solid #ef4444;
  color: #fca5a5;
  border-radius: 10px;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.2s;
}
.chip-reset-btn:hover {
  background: rgba(220,38,38,0.4);
  color: #fff;
}

/* Dock Aktions-Buttons */
.dock-actions-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  width: 100%;
}
.dock-btn {
  flex: 1;
  padding: 7px 6px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.dock-btn.btn-fold  { background: rgba(220,38,38,0.25);   border-color: #ef4444; color: #fca5a5; }
.dock-btn.btn-check { background: rgba(59,130,246,0.25);  border-color: #60a5fa; color: #bfdbfe; }
.dock-btn.btn-raise { background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%); border-color: #f5d77f; color: #120e0b; font-weight: 900; }
.dock-btn.btn-allin { background: rgba(168,85,247,0.25);  border-color: #c084fc; color: #e9d5ff; }

/* ==========================================================================
   [TAG: OPTIONS_OVERLAY_AND_VISUAL_PICKER]
   Options-Overlay mit visuellen Miniatur-Karten-Drawern
   ========================================================================== */
.options-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.options-overlay.open {
  display: flex;
}
.options-panel {
  background: linear-gradient(180deg, #1f140e 0%, #120b07 100%);
  border: 1.5px solid rgba(212,175,55,0.5);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.95);
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,55,0.3) transparent;
}
.options-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(212,175,55,0.3);
  padding-bottom: 10px;
}
.options-header-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-gold);
}
.options-close-btn {
  background: rgba(220,38,38,0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 800;
}
.opt-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.opt-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-gold);
}
.opt-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.opt-btn {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(212,175,55,0.3);
  color: #e2d7ce;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.opt-btn:hover {
  border-color: var(--table-gold-light);
  background: rgba(212,175,55,0.15);
  color: #fff;
}
.opt-btn.active {
  background: var(--table-gold-trim);
  color: #110c08;
  border-color: var(--table-gold-light);
}

/* Visuelle Miniatur-Picker Box */
.visual-picker-box {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.visual-picker-active-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.visual-picker-active-btn {
  background: rgba(212,175,55,0.12);
  border: 1.5px solid var(--table-gold-trim);
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-gold);
  font-weight: 800;
  font-size: 0.85rem;
}
.visual-picker-active-btn:hover {
  background: rgba(212,175,55,0.25);
  box-shadow: 0 0 12px rgba(212,175,55,0.3);
}
.visual-picker-drawer {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px 4px;
  border-top: 1px solid rgba(212,175,55,0.2);
  margin-top: 4px;
}
.visual-picker-drawer.open {
  display: grid;
}

/* Miniatur Karten-Kacheln */
.visual-thumb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(212,175,55,0.2);
  cursor: pointer;
  transition: all 0.2s;
}
.visual-thumb-wrap:hover {
  border-color: var(--table-gold-light);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.visual-thumb-wrap.active {
  border-color: #34d399;
  background: rgba(52,211,153,0.12);
  box-shadow: 0 0 12px rgba(52,211,153,0.5);
}
.card-preview-mini {
  width: 44px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.card-preview-mini .classic-card,
.card-preview-mini .poker-card,
.card-preview-mini .card-back,
.card-preview-mini .poker-card-svg {
  width: 44px !important;
  height: 62px !important;
  transform: scale(0.95);
}
.card-preview-mini .card-back-svg {
  width: 44px;
  height: 62px;
}

/* ==========================================================================
   [TAG: CSS_ALL_15_CARD_DESIGNS]
   Definition aller 15 CSS-Kartendesigns (D1-D6, 7A-7E, V1-V5)
   ========================================================================== */
.classic-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 5px;
  border: 1px solid #d3c9b8;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  font-weight: 800;
  font-size: 0.88rem;
  color: #111;
  user-select: none;
  flex-shrink: 0;
}
.classic-card.large  { width: 96px; height: 138px; font-size: 1.5rem; border-radius: 9px; border-width: 1.5px; }
.classic-card.small  { width: 46px; height: 66px; font-size: 0.88rem; border-radius: 5px; }
.classic-card.mini   { width: 44px; height: 62px; font-size: 0.8rem; border-radius: 4px; }
.classic-card.red    { color: #dc2626; }
.classic-card.black  { color: #111827; }

.poker-card {
  background: linear-gradient(180deg, #ffffff 0%, #fdfbf7 100%);
  border-radius: 9px;
  border: 1.5px solid #d4cbbd;
  box-shadow: 0 8px 22px rgba(0,0,0,0.7), inset 0 0 1px rgba(0,0,0,0.2);
  position: relative;
  user-select: none;
  overflow: hidden;
  display: flex;
  color: var(--card-theme-color);
  flex-shrink: 0;
}
.poker-card.large  { width: 96px; height: 138px; }
.poker-card.medium { width: 54px; height: 78px; border-radius: 6px; }
.poker-card.small  { width: 46px; height: 66px; border-radius: 5px; border-width: 1px; }
.poker-card.mini   { width: 44px; height: 62px; border-radius: 4px; border-width: 1px; }

/* D1: Minimal Corner */
.card-d1 { flex-direction: column; justify-content: space-between; padding: 6px 8px; }
.card-d1::before { content: ''; position: absolute; inset: 0; background: var(--card-theme-diagonal-line); pointer-events: none; }
.card-d1 .top-q { align-self: flex-start; font-family: 'Outfit', sans-serif; font-size: 2.5rem; font-weight: 900; line-height: 0.85; letter-spacing: -1px; z-index: 2; }
.card-d1 .bot-suit { align-self: flex-end; font-size: 3.45rem; line-height: 0.75; z-index: 2; filter: drop-shadow(0 2px 6px var(--card-theme-glow)); }
.card-d1.small, .card-d1.mini { padding: 3px 4px; }
.card-d1.small .top-q, .card-d1.mini .top-q { font-size: 1.35rem; }
.card-d1.small .bot-suit, .card-d1.mini .bot-suit { font-size: 1.9rem; }

/* D2: Inverted */
.card-d2 { flex-direction: column; justify-content: space-between; padding: 6px 8px; }
.card-d2::before { content: ''; position: absolute; inset: 0; background: var(--card-theme-diagonal-line); transform: scaleX(-1); pointer-events: none; }
.card-d2 .top-suit { align-self: flex-end; font-size: 3.45rem; line-height: 0.75; z-index: 2; filter: drop-shadow(0 2px 6px var(--card-theme-glow)); }
.card-d2 .bot-q { align-self: flex-start; font-family: 'Outfit', sans-serif; font-size: 2.5rem; font-weight: 900; line-height: 0.85; letter-spacing: -1px; z-index: 2; }
.card-d2.small, .card-d2.mini { padding: 3px 4px; }
.card-d2.small .top-suit, .card-d2.mini .top-suit { font-size: 1.9rem; }
.card-d2.small .bot-q, .card-d2.mini .bot-q { font-size: 1.35rem; }

/* D3: Giant Center */
.card-d3 { align-items: center; justify-content: center; position: relative; }
.card-d3 .wing-tr { position: absolute; top: 3px; right: 5px; font-size: 2.4rem; line-height: 1; }
.card-d3 .wing-bl { position: absolute; bottom: 3px; left: 5px; font-size: 2.4rem; line-height: 1; }
.card-d3 .center-giant-q { font-family: 'Outfit', sans-serif; font-size: 3.4rem; font-weight: 900; line-height: 1; filter: drop-shadow(0 2px 6px var(--card-theme-glow)); }
.card-d3.small .wing-tr, .card-d3.mini .wing-tr { top: 2px; right: 3px; font-size: 1.45rem; }
.card-d3.small .wing-bl, .card-d3.mini .wing-bl { bottom: 2px; left: 3px; font-size: 1.45rem; }
.card-d3.small .center-giant-q, .card-d3.mini .center-giant-q { font-size: 1.8rem; }

/* D5: Ribbon Bar */
.card-d5 { flex-direction: column; justify-content: space-between; align-items: center; position: relative; padding: 4px; }
.card-d5 .corner-suit-tl { position: absolute; top: 3px; left: 5px; font-size: 1.9rem; }
.card-d5 .corner-suit-br { position: absolute; bottom: 3px; right: 5px; font-size: 1.9rem; }
.card-d5 .ribbon-bar { position: absolute; width: 140%; height: 32px; background: var(--card-theme-color); top: 50%; transform: translateY(-50%) rotate(-25deg); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.card-d5 .ribbon-q { color: #fff; font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 900; line-height: 1; }
.card-d5.small .corner-suit-tl, .card-d5.mini .corner-suit-tl { font-size: 1.1rem; }
.card-d5.small .corner-suit-br, .card-d5.mini .corner-suit-br { font-size: 1.1rem; }
.card-d5.small .ribbon-bar, .card-d5.mini .ribbon-bar { height: 18px; }
.card-d5.small .ribbon-q, .card-d5.mini .ribbon-q { font-size: 1.1rem; }

/* D6: Farbkeil Wedge */
.card-d6 { flex-direction: column; justify-content: space-between; padding: 6px 8px; position: relative; }
.card-d6 .triangle-bot { position: absolute; bottom: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 0 95px 75px; border-color: transparent transparent var(--card-theme-wedge-bg) transparent; pointer-events: none; }
.card-d6 .d6-q { align-self: flex-start; font-family: 'Outfit', sans-serif; font-size: 2.5rem; font-weight: 900; line-height: 0.85; }
.card-d6 .d6-suit { align-self: flex-end; font-size: 3.2rem; line-height: 0.75; z-index: 2; }
.card-d6.small, .card-d6.mini { padding: 3px 4px; }
.card-d6.small .d6-q, .card-d6.mini .d6-q { font-size: 1.35rem; }
.card-d6.small .d6-suit, .card-d6.mini .d6-suit { font-size: 1.8rem; }
.card-d6.small .triangle-bot, .card-d6.mini .triangle-bot { border-width: 0 0 50px 38px; }

/* 7A: Pure Bold */
.style-7a { flex-direction: column; justify-content: center; align-items: center; gap: 2px; }
.style-7a .card-val { font-family: 'Outfit', sans-serif; font-size: 3.2rem; font-weight: 900; line-height: 0.85; }
.style-7a .card-sym { font-size: 3.2rem; line-height: 0.75; }
.style-7a.small, .style-7a.mini { gap: 1px; }
.style-7a.small .card-val, .style-7a.mini .card-val { font-size: 1.6rem; }
.style-7a.small .card-sym, .style-7a.mini .card-sym { font-size: 1.6rem; }

/* 7B: Casino Gold */
.style-7b { flex-direction: column; justify-content: center; align-items: center; background: radial-gradient(circle, #fff 40%, #fdf6e2 100%); border-color: #d4af37; }
.style-7b .card-val { font-family: 'Cinzel', serif; font-size: 2.8rem; font-weight: 900; line-height: 0.85; }
.style-7b .card-sym { font-size: 2.8rem; line-height: 0.8; }
.style-7b.small, .style-7b.mini .card-val { font-size: 1.45rem; }
.style-7b.small, .style-7b.mini .card-sym { font-size: 1.45rem; }

/* 7C: Two-Tone */
.style-7c { display: flex; flex-direction: column; }
.style-7c .val-half { flex: 1; display: flex; align-items: center; justify-content: center; font-family: 'Outfit', sans-serif; font-size: 2.2rem; font-weight: 900; background: rgba(0,0,0,0.03); }
.style-7c .sym-half { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; background: var(--card-theme-wedge-bg); }
.style-7c.small .val-half, .style-7c.mini .val-half { font-size: 1.25rem; }
.style-7c.small .sym-half, .style-7c.mini .sym-half { font-size: 1.45rem; }

/* 7D: Royal Line (Exakte Zentrierungswerte!) */
.style-7d { display: flex; flex-direction: column; padding: 0; }
.style-7d .top-half-zone { flex: 1; display: flex; align-items: center; justify-content: center; }
.style-7d .bot-half-zone { flex: 1; display: flex; align-items: center; justify-content: center; }
.style-7d .gold-divider { height: 1.5px; background: linear-gradient(90deg, transparent, #d4af37 20%, #d4af37 80%, transparent); width: 85%; align-self: center; }
.style-7d .card-val { font-family: 'Playfair Display', serif; font-size: 2.8rem; font-weight: 900; line-height: 1; transform: translateY(-3px); }
.style-7d .card-sym { font-size: 3.3rem; line-height: 1; transform: translateY(-9.5px); }
.style-7d.small .card-val, .style-7d.mini .card-val { font-size: 1.44rem; transform: translateY(-1.5px); }
.style-7d.small .card-sym, .style-7d.mini .card-sym { font-size: 1.65rem; transform: translateY(-3.5px); }

/* 7E: Gaming */
.style-7e { flex-direction: column; justify-content: center; align-items: center; background: #11141d; border-color: var(--card-theme-color); }
.style-7e .card-val { font-family: 'Space Grotesk', sans-serif; font-size: 2.8rem; font-weight: 800; color: #fff; line-height: 0.85; filter: drop-shadow(0 0 8px var(--card-theme-glow)); }
.style-7e .card-sym { font-size: 2.8rem; line-height: 0.8; filter: drop-shadow(0 0 10px var(--card-theme-glow)); }
.style-7e.small .card-val, .style-7e.mini .card-val { font-size: 1.45rem; }
.style-7e.small .card-sym, .style-7e.mini .card-sym { font-size: 1.45rem; }

/* V1: Diagonale A */
.card-v1 { position: relative; }
.card-v1 .suit-box-tr { position: absolute; top: 4px; right: 6px; font-size: 2.4rem; }
.card-v1 .rank-box-bl { position: absolute; bottom: 4px; left: 6px; font-family: 'Outfit', sans-serif; font-size: 2.4rem; font-weight: 900; line-height: 0.85; }
.card-v1.small .suit-box-tr, .card-v1.mini .suit-box-tr { font-size: 1.4rem; top: 2px; right: 4px; }
.card-v1.small .rank-box-bl, .card-v1.mini .rank-box-bl { font-size: 1.3rem; bottom: 2px; left: 4px; }

/* V2: Diagonale B */
.card-v2 { position: relative; }
.card-v2 .rank-box-tl { position: absolute; top: 4px; left: 6px; font-family: 'Outfit', sans-serif; font-size: 2.4rem; font-weight: 900; line-height: 0.85; }
.card-v2 .suit-box-br { position: absolute; bottom: 4px; right: 6px; font-size: 2.4rem; }
.card-v2.small .rank-box-tl, .card-v2.mini .rank-box-tl { font-size: 1.3rem; top: 2px; left: 4px; }
.card-v2.small .suit-box-br, .card-v2.mini .suit-box-br { font-size: 1.4rem; bottom: 2px; right: 4px; }

/* V3: Split Dual */
.card-v3 { align-items: center; justify-content: center; position: relative; }
.card-v3 .corner-suit-tr { position: absolute; top: 3px; right: 5px; font-size: 1.6rem; }
.card-v3 .corner-suit-bl { position: absolute; bottom: 3px; left: 5px; font-size: 1.6rem; }
.card-v3 .center-q { font-family: 'Outfit', sans-serif; font-size: 3rem; font-weight: 900; }
.card-v3.small .corner-suit-tr, .card-v3.mini .corner-suit-tr { font-size: 1rem; }
.card-v3.small .corner-suit-bl, .card-v3.mini .corner-suit-bl { font-size: 1rem; }
.card-v3.small .center-q, .card-v3.mini .center-q { font-size: 1.6rem; }

/* V4: Dual Index */
.card-v4 { flex-direction: column; justify-content: space-between; position: relative; padding: 4px 6px; }
.card-v4 .corner-index-tl { display: flex; flex-direction: column; align-items: center; line-height: 0.85; }
.card-v4 .corner-index-br { display: flex; flex-direction: column; align-items: center; line-height: 0.85; transform: rotate(180deg); }
.card-v4 .idx-rank { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 900; }
.card-v4 .idx-suit { font-size: 1.4rem; }
.card-v4 .center-suit-large { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2.8rem; }
.card-v4.small, .card-v4.mini { padding: 2px 4px; }
.card-v4.small .idx-rank, .card-v4.mini .idx-rank { font-size: 0.85rem; }
.card-v4.small .idx-suit, .card-v4.mini .idx-suit { font-size: 0.85rem; }
.card-v4.small .center-suit-large, .card-v4.mini .center-suit-large { font-size: 1.6rem; }

/* V5: Watermark Center */
.card-v5 { position: relative; padding: 4px 6px; }
.card-v5 .corner-tag { display: flex; flex-direction: column; align-items: flex-start; line-height: 0.9; font-weight: 900; font-size: 1.1rem; }
.card-v5 .bg-watermark-q { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Outfit', sans-serif; font-size: 4.8rem; font-weight: 900; opacity: 0.08; color: #000; pointer-events: none; }
.card-v5 .center-gem { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2.6rem; }
.card-v5.small .corner-tag, .card-v5.mini .corner-tag { font-size: 0.8rem; }
.card-v5.small .bg-watermark-q, .card-v5.mini .bg-watermark-q { font-size: 2.6rem; }
.card-v5.small .center-gem, .card-v5.mini .center-gem { font-size: 1.5rem; }



/* ==========================================================================
   [TAG: SAMMLUNG_ONLINE] - Anbindung an die Mini-Spiele-Sammlung & Online-Tisch
   ========================================================================== */

/* Der Regel-Baukasten wurde auf dem Handy breiter als der Bildschirm (Flex-Kind ohne Breite) */
#rule-editor-container {
  width: 100%;
  min-width: 0;
}
.rule-editor-card, .editor-header, .timeline-header, .phase-item, .phase-left, .phase-info {
  min-width: 0;
}
.editor-title, .phase-title {
  overflow-wrap: anywhere;
}
.editor-select, .editor-input {
  max-width: 100%;
  min-width: 0;
}

/* Gepasste Spieler am Tisch etwas blasser */
.seat-node.is-folded {
  opacity: 0.55;
}

/* Hinweisfenster ("Verbindung weg", "Tisch verlassen?") */
.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 4, 2, 0.72);
}
.notice-overlay.open {
  display: flex;
}
.notice-panel {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #2a1b14 0%, #140c08 100%);
  border: 2px solid var(--table-gold-trim);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.8);
}
.notice-title {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-gold);
}
.notice-text {
  color: var(--text-main);
  line-height: 1.45;
}
.notice-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.notice-buttons .poker-btn {
  min-width: 130px;
}

/* Kurzmeldung am unteren Rand */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  z-index: 9500;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(20, 12, 8, 0.95);
  border: 1px solid var(--table-gold-trim);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* QR-Code in der Lobby des Spielleiters */
.qr-code-box:empty {
  display: none;
}
.qr-code-box svg {
  display: block;
  width: 200px;
  height: 200px;
}

/* Vorlagen-Auswahl im Regel-Baukasten: auf dem Handy nicht breiter als die Karte */
.preset-dropdown-group {
  min-width: 0;
  max-width: 100%;
  flex: 1 1 220px;
}
#preset-select {
  flex: 1;
  min-width: 0;
  width: 100%;
  text-overflow: ellipsis;
}
