/* ==========================================================================
   STYLE.CSS - KOMPLETT-DATEI (STAND 29.10.2026 - V2.9.1)
   Haupt-Stylesheet für Tisch, Raum-Themes, UI, Drawers & Pure-Black-Fix
   ========================================================================== */

* { box-sizing: border-box; }
html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  background: #05070c;
  color: #eee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #111827 0%, #05070c 100%);
  z-index: 999999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.rotate-icon {
  width: 74px;
  height: 74px;
  border: 3px solid #38bdf8;
  border-radius: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #facc15;
  font-size: 2rem;
  animation: tiltPhone 1.6s ease-in-out infinite alternate;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
}
@keyframes tiltPhone {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-90deg); }
}
.rotate-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #facc15;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.rotate-sub {
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 280px;
  line-height: 1.4;
  margin-bottom: 20px;
}
.btn-force-landscape {
  background: #0284c7;
  color: #fff;
  border: 1.5px solid #38bdf8;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.5);
}

/* Sofortiger Dreh-Hinweis auf Samsung & allen Smartphones im Hochformat */
@media screen and (orientation: portrait) and (max-width: 960px) {
  #rotate-overlay { display: flex !important; }
  .app-layout { display: none !important; }
}
body.force-portrait-overlay #rotate-overlay {
  display: flex !important;
}
body.force-portrait-overlay .app-layout {
  display: none !important;
}

/* Dynamischer Hintergrund & Raum-Themes */
.casino-room-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #05070c;
}

/* Holodeck: Sauberer dunkler Raum-Hintergrund (das 3D-Gitter für Wand & schrägen Boden kommt aus table-themes.js) */
.casino-room-bg.theme-holodeck {
  background-color: #030712 !important;
  background-image: none !important;
  background-position: center center;
}

.casino-room-bg.theme-bar { background-image: url('/media/bilder/bar.jpg'); }
.casino-room-bg.theme-library { background-image: url('/media/bilder/bibliothek.jpg'); }
.casino-room-bg.theme-lounge { background-image: url('/media/bilder/lounge.jpg'); }
.casino-room-bg.theme-tresor { background-image: url('/media/bilder/tresor.jpg'); }
.casino-room-bg.theme-yacht { background-image: url('/media/bilder/yacht.jpg'); }
.casino-room-bg.theme-training { background-image: url('/media/bilder/training.jpg'); }
.casino-room-bg.theme-haie { background-image: url('/media/bilder/haie.jpg'); }
.casino-room-bg.theme-dschungel { background-image: url('/media/bilder/dschungel.jpg'); }
.casino-room-bg.theme-gletscher { background-image: url('/media/bilder/gletscher.jpg'); }
.casino-room-bg.theme-vulkan { background-image: url('/media/bilder/vulkan.jpg'); }
.casino-room-bg.theme-schnee { background-image: url('/media/bilder/schnee.jpg'); }
.casino-room-bg.theme-china { background-image: url('/media/bilder/china.jpg'); }
.casino-room-bg.theme-disney { background-image: url('/media/bilder/disney.jpg'); }
.casino-room-bg.theme-wsop { background-image: url('/media/bilder/wsop.jpg'); }
.casino-room-bg.theme-wein { background-image: url('/media/bilder/wein.jpg'); }
.casino-room-bg.theme-strand { background-image: url('/media/bilder/strand.jpg'); }
.casino-room-bg.theme-hinterzimmer { background-image: url('/media/bilder/hinterzimmer.jpg'); }

/* Dschungel auf Breitbild-PC-Monitoren: Oben ausrichten, damit die Papageien sichtbar bleiben */
@media screen and (min-width: 1200px) and (min-aspect-ratio: 16/10) {
  .casino-room-bg.theme-dschungel {
    background-position: center 8% !important;
    background-size: cover !important;
  }
}

/* Kappadokien: Unten ausrichten (center 82%), damit das helle Sandstein-Plateau unter dem Tisch liegt! */
.casino-room-bg.theme-kappadokien {
  background-image: url('/media/bilder/kappadokien.jpg');
  background-position: center 82% !important;
}

/* Arena */
.casino-room-bg.theme-arena {
  background-image: url('/media/bilder/arena.jpg');
  background-position: center 58% !important;
}

/* ==========================================================================
   FIX: DAUERHAFTE SICHTBARKEIT DER RAUM-THEMES BEI AKTIVEM THEME-PURE-BLACK
   Verhindert, dass layout.js (body.theme-pure-black .casino-room-bg) das
   Hintergrundbild am PC-Tisch auf #000000 / background-image: none zwingt.
   ========================================================================== */
body.theme-pure-black.is-poker-table-body #casino-room-bg,
body.theme-pure-black #casino-room-bg.casino-room-bg {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 0 !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

body.theme-pure-black #casino-room-bg.theme-bar { background-image: url('/media/bilder/bar.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-library { background-image: url('/media/bilder/bibliothek.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-lounge { background-image: url('/media/bilder/lounge.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-tresor { background-image: url('/media/bilder/tresor.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-yacht { background-image: url('/media/bilder/yacht.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-training { background-image: url('/media/bilder/training.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-haie { background-image: url('/media/bilder/haie.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-dschungel { background-image: url('/media/bilder/dschungel.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-gletscher { background-image: url('/media/bilder/gletscher.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-vulkan { background-image: url('/media/bilder/vulkan.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-schnee { background-image: url('/media/bilder/schnee.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-china { background-image: url('/media/bilder/china.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-disney { background-image: url('/media/bilder/disney.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-wsop { background-image: url('/media/bilder/wsop.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-wein { background-image: url('/media/bilder/wein.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-strand { background-image: url('/media/bilder/strand.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-hinterzimmer { background-image: url('/media/bilder/hinterzimmer.jpg') !important; }
body.theme-pure-black #casino-room-bg.theme-kappadokien {
  background-image: url('/media/bilder/kappadokien.jpg') !important;
  background-position: center 82% !important;
}
body.theme-pure-black #casino-room-bg.theme-arena {
  background-image: url('/media/bilder/arena.jpg') !important;
  background-position: center 58% !important;
}

.bar-lounge-chair {
  position: absolute;
  bottom: 34vh;
  left: 17%;
  width: 110px;
  height: 130px;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(ellipse at 50% 35%, rgba(65, 35, 25, 0.85) 0%, rgba(20, 12, 10, 0.95) 70%, rgba(5, 5, 8, 1) 100%);
  border-radius: 60px 60px 25px 25px;
  transform: perspective(500px) rotateX(12deg) rotateY(15deg);
  border-top: 2px solid rgba(210, 140, 80, 0.25);
  box-shadow: 0 18px 30px rgba(0,0,0,0.85);
  filter: blur(0.5px);
}

.app-layout {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
}

.header-bar {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: rgba(11, 16, 28, 0.94);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 100;
  flex-shrink: 0;
  gap: 6px;
}
.header-left, .header-right { display: flex; align-items: center; gap: 5px; }
.badge { padding: 3px 6px; background: #0284c7; color: #fff; border-radius: 4px; font-weight: bold; font-size: 0.72rem; }
.badge-blind { background: #7c3aed; }
.badge-rng { background: #065f46; color: #34d399; border: 1px solid #059669; cursor: pointer; }

.btn-ui { padding: 4px 8px; font-size: 0.74rem; background: #0284c7; color: #fff; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; text-decoration: none; }
.btn-ui:hover { background: #0369a1; }
.btn-ui:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-secondary { background: #334155; color: #f8fafc; border: 1px solid #475569; transition: all 0.2s; }
.btn-grinder-toggle { background: #0f172a; border: 1.5px solid #facc15; color: #facc15; }
.btn-grinder-toggle:hover { background: #facc15; color: #000; }

.btn-hamburger { background: #1e293b; border: 1.5px solid #38bdf8; color: #38bdf8; font-size: 1rem; padding: 3px 8px; }
.btn-lounge-music { background: #0f172a; border: 1.5px solid #38bdf8; color: #38bdf8; }
.btn-lounge-music.muted { border-color: #64748b; color: #94a3b8; }
.btn-fullscreen { background: #7c3aed; border: 1.5px solid #a78bfa; color: #fff; }
.btn-fullscreen:hover { background: #6d28d9; }

.room-select { padding: 4px 6px; font-size: 0.76rem; border-radius: 5px; border: 1px solid #475569; background: #1e293b; color: #fff; max-width: 140px; }

/* Hamburger Menü (Linke Seitenleiste) */
#hamburger-menu {
  position: fixed;
  top: 42px;
  left: 0;
  width: 275px;
  max-height: calc(100dvh - 42px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(11, 16, 28, 0.98);
  border-right: 2px solid #334155;
  border-bottom: 2px solid #334155;
  box-shadow: 10px 10px 30px rgba(0,0,0,0.9);
  z-index: 250;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  backdrop-filter: blur(10px);
  border-radius: 0 0 8px 0;
}
#hamburger-menu.open { transform: translateX(0); }
.menu-section-title { font-size: 0.70rem; font-weight: bold; color: #94a3b8; text-transform: uppercase; margin-top: 4px; border-bottom: 1px solid #334155; padding-bottom: 2px; }

#grinder-drawer {
  position: fixed;
  top: 42px;
  left: 0;
  bottom: 0;
  width: 82vw;
  max-width: 320px;
  background: rgba(11, 16, 28, 0.98);
  border-right: 2px solid #334155;
  box-shadow: 10px 0 35px rgba(0,0,0,0.9);
  z-index: 200;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(10px);
}
#grinder-drawer.open { transform: translateX(0); }

.grinder-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
  padding-bottom: 8px;
}
.grinder-drawer-title { font-weight: bold; color: #facc15; font-size: 0.95rem; }
.grinder-drawer-close { background: transparent; border: none; color: #94a3b8; font-size: 1.3rem; cursor: pointer; }

.bot-roster-list { display: flex; flex-direction: column; gap: 8px; }
.bot-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
.bot-item-info { display: flex; align-items: center; gap: 8px; }
.bot-item-thumb { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1.5px solid #d4af37; }
.bot-item-name { font-size: 0.80rem; font-weight: bold; color: #f8fafc; }
.btn-bot-action { padding: 4px 8px; font-size: 0.70rem; font-weight: bold; border-radius: 4px; border: none; cursor: pointer; }
.btn-bot-add { background: #16a34a; color: #fff; }
.btn-bot-remove { background: #dc2626; color: #fff; }

/* Hand History Drawer */
#history-drawer {
  position: fixed;
  top: 42px;
  right: 0;
  bottom: 0;
  width: 86vw;
  max-width: 380px;
  background: rgba(11, 16, 28, 0.98);
  border-left: 2px solid #334155;
  box-shadow: -10px 0 35px rgba(0,0,0,0.9);
  z-index: 210;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(10px);
}
#history-drawer.open { transform: translateX(0); }
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
  padding-bottom: 8px;
}
.history-title { font-weight: bold; color: #38bdf8; font-size: 0.95rem; }
.history-close { background: transparent; border: none; color: #94a3b8; font-size: 1.3rem; cursor: pointer; }
.history-item {
  background: #1e293b;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-item-top { display: flex; justify-content: space-between; color: #94a3b8; font-size: 0.65rem; }
.history-item-pot { color: #facc15; font-weight: bold; }