:root {
  --color-bg-dark: #1a1a2e;
  --color-bg-panel: #162447;
  --color-primary: #e43f5a;
  --color-secondary: #f39c12;
  --color-text: #fff;
  --color-border: #0f152d;
  --font-heading: "Luckiest Guy", cursive, sans-serif;
  --font-body: "Comic Neue", "Varela Round", sans-serif;
  --comic-border: 4px solid var(--color-border);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--color-bg-dark);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 #000;
}

/* HUD Panel */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 30px;
  z-index: 999;
  pointer-events: none; /* Klicks auf Hintergrund durchlassen */
}
#hud > * {
  pointer-events: auto;
} /* Aber Buttons bleiben klickbar */

.hud-group {
  display: flex;
  gap: 15px;
  background: rgba(255, 255, 255, 0.85);
  padding: 10px;
  border-radius: 15px;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}
.hud-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 5px 15px;
  border-radius: 12px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #000;
}
.hud-icon {
  font-size: 1.5rem;
}

.inventory {
  display: flex;
  gap: 15px;
  background: rgba(255, 255, 255, 0.85);
  padding: 10px;
  border-radius: 15px;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}
.inv-slot {
  width: 50px;
  height: 50px;
  border: 4px dashed rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  filter: grayscale(1);
  opacity: 0.5;
}
.inv-slot.active {
  border-style: solid;
  border-color: #000;
  opacity: 1;
  filter: grayscale(0);
  background: #fff;
  box-shadow: 3px 3px 0 #000;
}

#fullscreen-btn {
  background: #fff;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: transform 0.1s;
}
#fullscreen-btn:hover {
  transform: scale(1.05);
}

/* App Container */
#app {
  flex: 1;
  position: relative;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: flex-end; /* WICHTIG: Szene am Untergrund andocken! */
  justify-content: center;
  background-color: var(--color-bg-dark);
  overflow: hidden; /* Überstehendes Canvas ("Cover") abschneiden */
}

.view.active {
  display: flex;
  animation: fadeIn 0.4s ease-out forwards;
}

/* SMART COVER CONTAINER (Verriegelt die Pixelkoordinaten!) */
.scene-container {
  position: absolute;
  aspect-ratio: 16 / 9;
  /* Simuliert exakt das 'cover' Verhalten auf einem echten div: */
  width: calc(max(100vw, 100vh * (16 / 9)));
  height: calc(max(100vh, 100vw * (9 / 16)));
  background-size: 100% 100%; /* Da die Box strikt 16:9 ist, verzerrt sich nichts! */
  background-repeat: no-repeat;
  background-position: center bottom;
  bottom: 0; /* Fallback, align-items: flex-end im parent macht die Arbeit */
}

/* Background Map Assignments auf die internen Container geleitet */
#main-casino-map {
  background-image: url("../assets/images/bg/bg_panorama.webp");
}
#view-blackjack .scene-container {
  background-image: url("../assets/images/bg/bg_table_duckjack.webp");
}
#view-poker .scene-container {
  background-image: url("../assets/images/bg/bg_table_poker.webp");
}
#view-menu-cards .scene-container {
  background-image: url("../assets/images/bg/bg_table_poker.webp");
}
#view-slots .scene-container {
  background-image: url("../assets/images/bg/bg_slots.webp");
}
#view-shell .scene-container {
  background-image: url("../assets/images/bg/bg_shellgame.webp");
}
#view-dealer .scene-container {
  background-image: url("../assets/images/bg/bg_shellgame.webp");
}
#view-menu-shady .scene-container {
  background-image: url("../assets/images/bg/bg_shellgame.webp");
}
#view-counter .scene-container {
  background-image: url("../assets/images/bg/bg_cashier.webp");
}
#view-bar .scene-container {
  background-image: url("../assets/images/bg/bg_bar.webp");
}
#view-dj .scene-container {
  background-image: url("../assets/images/bg/bg_dj.webp");
}
#view-scratchcard .scene-container {
  background-color: var(--color-bg-dark);
}

/* Hotspots - Point & Click Overlay System */
.hotspot {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  /* Automatisierte Skalierung der Original-Photoshop-Pixel für das 2752x1536 Panorama */
  left: calc((var(--px-left, 0) / 2752) * 100%);
  top: calc((var(--px-top, 0) / 1536) * 100%);
  width: calc((var(--px-width, 100) / 2752) * 100%);
  height: calc((var(--px-height, 100) / 1536) * 100%);
}

/* Die transparenten Bildausschnitte (Tische, Automaten) */
.hover-element {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Verhindert Verzerrung und zentriert innerhalb der Hitbox */
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0 0 rgba(255, 215, 0, 0)); /* Baseline für Animation */
}

/* Hover-Effekt: Neonglühen und minimaler Pop-out */
.hotspot:hover .hover-element {
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8)) brightness(1.15)
    contrast(1.1);
}

/* Buttons */
.btn {
  background: var(--color-primary);
  color: white;
  border: 4px solid #000;
  padding: 12px 25px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 4px 4px 0 #000;
  transition:
    transform 0.1s,
    box-shadow 0.1s;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.btn:disabled {
  opacity: 0.5;
  filter: grayscale(1);
  cursor: not-allowed;
}
.btn:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}
.btn:active:not(:disabled) {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0 #000;
}

.back-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  background: var(--color-text);
  color: #000;
  border: 4px solid #000;
}

/* Welcome Screen */
#welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 1);
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 2.5s ease-in 0.5s; /* Fade out starts after 0.5s and lasts 2.5s, matching curtain end */
}

/* Base style for all curtains */
.curtain {
  position: absolute;
  height: 100%;
  z-index: 1001;
}

/* Middle open curtains going UP */
.curtain.mid {
  background-image: url("../assets/images/bg/curtain_middle.png");
  background-size: 100% 100%;
  background-position: center bottom;
  background-repeat: no-repeat;
  transition-timing-function: ease-in; /* Nur sanft nach oben, kein Bounce */
}
.curtain.mid-2 {
  left: 30vw;
  width: 40vw;
  transition-duration: 2s;
  transition-delay: 0s;
  z-index: 1000;
}
.curtain.mid-1 {
  left: -5vw;
  width: 45vw;
  transition-duration: 1.5s;
  transition-delay: 0.5s;
  z-index: 1001;
}
.curtain.mid-3 {
  right: -5vw;
  width: 45vw;
  transition-duration: 1s;
  transition-delay: 1s;
  z-index: 1001;
}

/* Side cord curtains going SIDEWAYS */
.curtain.side {
  width: 50vw;
  z-index: 1004; /* Front-most layer */
  /* Starting simultaneously with mid-3 (1s), finishing with mid-3 (3s) */
  transition-duration: 1.5s;
  transition-delay: 1.5s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); /* Smooth exit */
  background-size: auto 100%; /* Verhindert in die Breite gestreckte Verzerrung */
  background-repeat: no-repeat;
}
.curtain.side.left {
  left: 0;
  background-image: url("../assets/images/bg/curtain_left.png");
  background-position: left bottom; /* Bindet das Bild an den linken Rand an */
}
.curtain.side.right {
  right: 0;
  background-image: url("../assets/images/bg/curtain_right.png");
  background-position: right bottom; /* Bindet das Bild an den rechten Rand an */
}

/* Animation triggers */
#welcome-screen.open {
  background-color: rgba(0, 0, 0, 0);
}
#welcome-screen.open .curtain.mid {
  transform: translateY(-100%);
}
#welcome-screen.open .curtain.side.left {
  transform: translateX(-100%);
}
#welcome-screen.open .curtain.side.right {
  transform: translateX(100%);
}

#welcome-screen h1 {
  z-index: 1005;
  font-size: 4rem;
  text-align: center;
}
#welcome-screen p {
  z-index: 1005;
  margin-top: 20px;
  font-size: 1.5rem;
  opacity: 0.8;
}
#welcome-screen.open h1,
#welcome-screen.open p {
  animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Modals & Alerts */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: var(--color-bg-panel);
  padding: 30px;
  border-radius: 15px;
  border: var(--comic-border);
  text-align: center;
  max-width: 400px;
}

#dagobert-push {
  position: fixed;
  bottom: -100px;
  right: 20px;
  background: #25d366;
  color: white;
  padding: 15px 20px;
  border-radius: 15px;
  border-bottom-right-radius: 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 2000;
  transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
#dagobert-push.active {
  bottom: 20px;
}
.push-avatar {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* Minigame Panels (Dialogue / Interactions) */
.game-panel {
  background: rgba(255, 255, 255, 0.95);
  border: 6px solid #000;
  border-radius: 20px;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.5);
  padding: 30px;
  width: 90%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #000;
  margin-top: 15vh; /* Push down to see characters from base plate above */
}
.game-panel h2 {
  color: var(--color-primary);
  margin-bottom: 10px;
}
.game-panel p {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 20px;
}
.controls {
  margin-top: auto;
  display: flex;
  gap: 15px;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 15px;
  border-radius: 15px;
}

/* Mechanical Slot Machine Overlay */
#slot-machine-screen {
  position: absolute;
  top: 35.2%;
  left: 33.7%;
  width: 33%;
  height: 25.5vh;
  --reel-h: 13vh; /* half above + full center + half below = 2× reel-h window */
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-radius: 15px;
}
.reel-window {
  width: 21%;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.reel-strip {
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.slot-icon {
  width: 100%;
  height: var(--reel-h); /* Each symbol is exactly one reel-h tall */
  object-fit: contain;
  padding: 1.5vh;
  box-sizing: box;
}

/* Slots Dashboard Bottom Area */
#slot-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(10, 15, 30, 0.95);
  padding: 20px;
  border-top: 6px solid #000;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.8);
  z-index: 10;
}
.slot-result-box {
  color: #fff;
  font-size: 1.8rem;
  font-family: var(--font-heading);
  margin-bottom: 20px;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}
.slot-btn-group {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
}
.slot-bet-display {
  background: #fff;
  border: 4px solid #000;
  border-radius: 15px;
  padding: 10px 40px;
  font-size: 2.5rem;
  font-family: var(--font-heading);
  color: #000;
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.5);
  margin: 0 10px;
}
.slot-ui-btn {
  cursor: pointer;
  height: 50px;
  transition:
    transform 0.1s,
    filter 0.1s;
  filter: drop-shadow(2px 2px 0 #000);
}
.slot-ui-btn:hover {
  transform: scale(1.05);
  filter: drop-shadow(3px 3px 0 #000);
}
.slot-ui-btn:active {
  transform: scale(0.95);
  filter: drop-shadow(1px 1px 0 #000);
}
.spin-btn {
  height: 90px;
  margin-top: -10px;
}
.slots-top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin-bottom: 20px;
}
.slots-top-bar .slot-result-box {
  margin-bottom: 0;
  flex: 1;
  text-align: center;
}
.slots-mute-btn {
  flex-shrink: 0;
  font-size: 1.5rem;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 3px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
  line-height: 1;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.1s,
    box-shadow 0.1s;
}
.slots-mute-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
.slots-mute-btn:active {
  transform: scale(0.92);
}
.bet-input {
  background: #0f152d;
  color: white;
  border: 2px solid var(--color-primary);
  padding: 10px;
  font-size: 1.2rem;
  font-family: var(--font-heading);
  border-radius: 5px;
  width: 100px;
  text-align: center;
}

/* ------------------------------------- */
/* SHELL GAME - HÜTCHENSPIEL ANIMATIONS  */
/* ------------------------------------- */

.shell-container {
  position: absolute;
  /* Top-Offset represents the perspective position on the table surface */
  top: calc((1050 / 1536) * 100%);
  left: var(--target-x);
  transform: translateX(-50%);
  width: calc((220 / 2752) * 100%);
  height: calc((250 / 1536) * 100%);
  cursor: pointer;
  z-index: 52;
  /* Smoothly animate between left values assigned by var(--target-x) via JS interpolation */
  transition:
    left 0.15s ease-in-out,
    transform 0.3s;
}

.shell-obj {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 52;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: bottom;
  filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.6));
}

.shell-ball {
  position: absolute;
  width: 35%;
  height: auto;
  bottom: 0%;
  left: 32.5%;
  z-index: 51;
  opacity: 0;
  transition: opacity 0.2s;
}

/* Animations Triggered by Classes */
.shell-lift .shell-obj {
  transform: translateY(-200px) rotate(-10deg);
}
.shell-lift .shell-ball {
  opacity: 1;
}

/* The marked visual for the beatable boss */
.shell-exposed .shell-obj {
  /* Lift it up slightly relative to others */
  transform: translateY(-50px);
}

@keyframes shell-wobble-anim {
  0%,
  20%,
  100% {
    transform: translateY(-50px) rotate(0deg);
  }
  4%,
  12% {
    transform: translateY(-50px) rotate(-5deg);
  }
  8%,
  16% {
    transform: translateY(-50px) rotate(5deg);
  }
}

.shell-wobble .shell-obj {
  animation: shell-wobble-anim 5s infinite;
}

/* ------------------------------------- */
/* CARD GAMES - POKER & BLACKJACK        */
/* ------------------------------------- */

.game-card {
  width: 160px;
  height: auto;
  border-radius: 8px;
  box-shadow: 2px 5px 15px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    filter 0.2s;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 4px 10px 20px rgba(0, 0, 0, 0.8);
}

.game-card.pk-held {
  /* Golden glowing border effect for held cards */
  box-shadow: 0 0 20px 8px rgba(241, 196, 15, 0.9);
  transform: translateY(-20px);
}

.game-card.pk-held:hover {
  transform: translateY(-25px);
}

/* Card deal-in animation (slide from above) */
.game-card.dealing {
  animation: cardDealIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes cardDealIn {
  from {
    transform: translateY(-80px) scale(0.85);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Card flip reveal animation (used when dealing face-down then flipping) */
.game-card {
  backface-visibility: hidden;
}
.game-card.flipping {
  animation: cardFlip 0.45s ease-in-out;
}
@keyframes cardFlip {
  0% {
    transform: rotateY(0deg) scaleX(1);
  }
  40% {
    transform: rotateY(90deg) scaleX(0.1);
  }
  60% {
    transform: rotateY(90deg) scaleX(0.1);
  }
  100% {
    transform: rotateY(0deg) scaleX(1);
  }
}
/* Held cards keep their lift even during flip */
.game-card.pk-held.flipping {
  animation: cardFlipHeld 0.45s ease-in-out;
}
@keyframes cardFlipHeld {
  0% {
    transform: translateY(-20px) rotateY(0deg) scaleX(1);
  }
  40% {
    transform: translateY(-20px) rotateY(90deg) scaleX(0.1);
  }
  60% {
    transform: translateY(-20px) rotateY(90deg) scaleX(0.1);
  }
  100% {
    transform: translateY(-20px) rotateY(0deg) scaleX(1);
  }
}

/* Wizzard Overlay Helpers */
.view.wizzard-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: saturate(0.5) brightness(0.7);
  z-index: 8000;
  pointer-events: auto; /* Block clicks! */
}

.hotspot.wizzard-highlight,
.wizzard-highlight {
  z-index: 8005 !important;
  pointer-events: none !important;
}

.wizzard-highlight * {
  pointer-events: none !important;
}

#hud.wizzard-dimmed {
  filter: brightness(0.4) saturate(0.5);
  pointer-events: none;
}

#hud.wizzard-highlight {
  z-index: 9995 !important;
  pointer-events: none !important;
  filter: none; /* remove dim */
}

/* Wizzard Registration UI */
#wizzard-registration {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: flex-end;
}

#wizz-reg-bouncer {
  position: fixed;
  left: 15%;
  bottom: 0;
  height: 90vh;
  max-height: 1000px;
  object-fit: contain;
  object-position: bottom left;
  pointer-events: none;
  z-index: 10;
}

.wizz-reg-box {
  position: relative;
  background: #1a1015;
  border: 3px solid #f1c40f;
  border-radius: 20px;
  padding: 30px 40px;
  max-width: 450px;
  width: 90%;
  color: #fff;
  box-shadow: 6px 6px 0 #000;
  z-index: 20;
  margin-right: 16%;
}

.wizz-reg-box h2 {
  font-family: var(--font-heading);
  color: #f1c40f;
  font-size: 2rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 0 #000;
}

.wizz-reg-box p {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.wizz-reg-box label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #f1c40f;
}

.wizz-reg-box .radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.wizz-reg-box input[type="text"],
.wizz-reg-box select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #555;
  background: #222;
  color: #fff;
  font-size: 1.1rem;
}

#wizz-error {
  color: #e74c3c;
  margin-bottom: 15px;
  font-weight: bold;
  display: none;
}

.wizz-reg-btn {
  background: #2ecc71;
  width: 100%;
  font-size: 1.2rem;
  padding: 12px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
}

/* Wizzard Overlay UI */
#wizzard-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.wizz-bouncer-container {
  position: absolute;
  bottom: 0px;
  right: 320px;
  pointer-events: none;
  z-index: 9001;
}

#wizz-bouncer-img {
  height: 400px;
  filter: drop-shadow(2px 4px 6px black);
}

#wizzard-dialog {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #110a0e;
  border: 4px solid #f1c40f;
  border-radius: 20px;
  padding: 25px 35px;
  max-width: 650px;
  width: 90%;
  color: #fff;
  box-shadow: 8px 8px 15px rgba(0, 0, 0, 0.9);
  pointer-events: auto;
  z-index: 9000;
  text-align: center;
}

#wizz-guide-text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.6;
  margin-bottom: 20px;
  text-shadow: 1px 1px 0 #000;
  color: #f1c40f;
}

#wizz-next-btn {
  background: #3498db;
  padding: 12px 25px;
  font-size: 1.3rem;
  border: 3px solid #2980b9;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
}

/* Card Games UI */
.card-push-msg {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  font-size: 4.5rem;
  color: var(--color-secondary);
  text-shadow:
    4px 4px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    0 8px 20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition:
    opacity 0.3s,
    top 0.3s;
  pointer-events: none;
  z-index: 100;
}

.card-bet-ui {
  position: absolute;
  bottom: 30px;
  left: 30px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 16px;
  border: 3px solid #000;
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transform-origin: bottom left;
}

.card-bet-display {
  color: var(--color-secondary);
  font-family: var(--font-heading);
  font-size: 2rem;
  text-shadow: 2px 2px 0 #000;
}

.card-bet-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.card-bet-btn {
  padding: 12px 10px;
  font-size: 1.2rem;
  flex: 1;
  text-align: center;
}

.card-bet-btn.minus {
  background: #e74c3c;
  border-color: #c0392b;
}
.card-bet-btn.plus {
  background: #3498db;
  border-color: #2980b9;
}
.card-bet-btn.special {
  background: #7f8c8d;
  border-color: #2c3e50;
}

.card-btn-start {
  padding: 15px;
  font-size: 1.5rem;
  background: #2ecc71;
  border-color: #27ae60;
}
.card-btn-cancel {
  padding: 10px;
  font-size: 1rem;
  background: #95a5a6;
  border-color: #7f8c8d;
}

/* Paytable Poker */
.poker-paytable {
  position: absolute;
  top: 15%;
  left: 30px;
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid #3498db;
  border-radius: 12px;
  padding: 15px;
  color: #fff;
  font-family: var(--font-body);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.poker-paytable h3 {
  margin: 0 0 10px 0;
  font-family: var(--font-heading);
  color: var(--color-secondary);
  text-align: center;
  font-size: 1.5rem;
}
.poker-paytable table {
  width: 100%;
  border-collapse: collapse;
}
.poker-paytable td {
  padding: 6px 10px;
  font-size: 1.2rem;
}
.poker-paytable td.mult {
  text-align: right;
  color: #3498db;
  font-weight: bold;
}
.poker-paytable tr.active td {
  color: #f1c40f;
  background: rgba(241, 196, 15, 0.2);
  border-radius: 4px;
}

/* Extracted Inline Styles */
#app-preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "
  Luckiest Guy", cursive;
}

.extracted-style-1 {
  font-size: 3rem;
  color: #f1c40f;
  margin-bottom: 20px;
}

.extracted-style-2 {
  width: 300px;
  height: 20px;
  border: 3px solid #555;
  border-radius: 10px;
  overflow: hidden;
}

#preloader-bar {
  width: 0%;
  height: 100%;
  background: #2ecc71;
  transition: width 0.2s;
}

#fullscreen-hint {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.93);
  display: none;
  align-items: center;
  justify-content: center;
}

.extracted-style-3 {
  background: #1a1015;
  border: 3px solid #f1c40f;
  border-radius: 20px;
  padding: 40px 50px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow:
    6px 6px 0 #000,
    0 0 40px rgba(241, 196, 15, 0.2);
}

.extracted-style-4 {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.extracted-style-5 {
  font-family: "Luckiest Guy", cursive;
  color: #f1c40f;
  font-size: 2rem;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.extracted-style-6 {
  color: #ddd;
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 10px;
}

.extracted-style-7 {
  color: #f1c40f;
}

.extracted-style-8 {
  color: #999;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.extracted-style-9 {
  background: #333;
  border: 1px solid #666;
  border-radius: 4px;
  padding: 2px 7px;
  font-family: monospace;
  color: #fff;
}

.extracted-style-10 {
  vertical-align: middle;
}

#fs-hint-ok {
  font-size: 1.3rem;
  padding: 14px 40px;
  background: #f1c40f;
  color: #000;
  font-weight: bold;
}

.extracted-style-11 {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #e74c3c;
  font-size: 1rem;
  padding: 10px 15px;
  z-index: 2000;
  box-shadow: 2px 2px 0 #000;
}

#welcome-content {
  position: absolute;
  z-index: 1005;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transition: opacity 0.5s;
}

#welcome-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

#btn-continue-game {
  display: none;
  background: #2ecc71;
  font-size: 1.5rem;
  padding: 15px 30px;
}

#btn-new-game {
  background: #e74c3c;
  font-size: 1.5rem;
  padding: 15px 30px;
}

.extracted-style-12 {
  margin: 20px 0;
}

.extracted-style-13 {
  margin-bottom: 15px;
}

.extracted-style-14 {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#wizz-duck {
  width: 20px;
  height: 20px;
}

#wizz-human {
  width: 20px;
  height: 20px;
}

.extracted-style-15 {
  margin-bottom: 25px;
}

.extracted-style-16 {
  position: relative;
}

.extracted-style-17 {
  height: 36px;
  object-fit: contain;
}

#coin-anim-container {
  position: absolute;
  top: 30px;
  left: 20px;
  z-index: 2000;
  pointer-events: none;
}

#hud-item-normal {
  cursor: pointer;
}

.extracted-style-18 {
  height: 36px;
  object-fit: contain;
}

#hud-item-micro {
  display: none;
  cursor: pointer;
}

.extracted-style-19 {
  height: 36px;
  object-fit: contain;
}

#hud-item-entry {
  display: none;
  cursor: pointer;
}

.extracted-style-20 {
  height: 36px;
  object-fit: contain;
}

.extracted-style-21 {
  display: flex;
  gap: 20px;
}

#inv-img-littleduck {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#inv-img-bigduck {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#inv-img-ticket {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.extracted-style-22 {
  display: flex;
  gap: 10px;
}

#reset-btn {
  padding: 10px 15px;
  border-radius: 12px;
  background-color: #8b0000;
  color: white;
  font-size: 0.8rem;
  opacity: 0.1;
  transition: opacity 0.3s;
}

#fullscreen-btn {
  padding: 10px 15px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#fs-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

#fs-icon-exit {
  display: none;
}

#scratchcard-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
}

.extracted-style-23 {
  background: transparent;
  border: none;
  border-radius: 16px;
  padding: 20px 24px;
  max-width: 580px;
  width: 96%;
  position: relative;
}

.extracted-style-24 {
  position: absolute;
  top: 4px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 12px;
  font-size: 1rem;
  z-index: 1;
}

#dj-laptop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(0, 0, 0, 0.75);
  align-items: center;
  justify-content: center;
}

.extracted-style-25 {
  background: #1a1a2e;
  border: 4px solid #f1c40f;
  border-radius: 20px;
  padding: 30px 40px;
  max-width: 460px;
  width: 90%;
  position: relative;
  box-shadow: 8px 8px 0 #000;
  text-align: center;
}

.extracted-style-26 {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #555;
  padding: 8px 14px;
}

.extracted-style-27 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: #f1c40f;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 8px;
}

.extracted-style-28 {
  color: #aaa;
  margin-bottom: 24px;
  font-size: 1rem;
}

#dj-tracks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#kt-hall-img {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.extracted-style-29 {
  position: absolute;
  left: 36%;
  top: 0%;
  width: 25%;
  height: 45%;
  pointer-events: auto;
  cursor: pointer;
}

.extracted-style-30 {
  position: absolute;
  left: 0%;
  top: 45%;
  width: 100%;
  height: 55%;
  pointer-events: auto;
  cursor: pointer;
}

.extracted-style-31 {
  background-image: url(../assets/images/bg/bg_bar.webp);
}

.extracted-style-32 {
  background-image: url(../assets/images/bg/bg_dj.webp);
}

.extracted-style-33 {
  background-image: url(../assets/images/bg/bg_shellgame.webp);
}

#shell-game-layer {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

#shell-result {
  position: absolute;
  left: calc((250 / 2752) * 100%);
  top: calc((500 / 1536) * 100%);
  width: calc((800 / 2752) * 100%);
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: #fff;
  text-shadow:
    3px 3px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    0 5px 15px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
  transform: rotate(-3deg);
}

#shell-container-1 {
  --target-x: 35%;
  pointer-events: auto;
}

#shell-container-2 {
  --target-x: 50%;
  pointer-events: auto;
}

#shell-container-3 {
  --target-x: 65%;
  pointer-events: auto;
}

.extracted-style-34 {
  background-image: url(../assets/images/bg/bg_card_table.webp);
}

#game-card-layer {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.extracted-style-35 {
  position: absolute;
  top: 30px;
  left: 30px;
  font-size: 1.2rem;
  padding: 10px 20px;
  background: #34495e;
  pointer-events: auto;
  z-index: 60;
}

#game-duckjack-area {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.extracted-style-36 {
  position: absolute;
  top: 15%;
  left: 30px;
  padding: 10px 20px;
  background: #f39c12;
  pointer-events: auto;
}

.extracted-style-37 {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.extracted-style-38 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 12px;
  text-shadow: 2px 2px 0 #000;
}

#bj-dealer-score {
  color: #aaa;
}

#bj-dealer-cards {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  min-height: 160px;
}

.extracted-style-39 {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: auto;
}

.extracted-style-40 {
  color: var(--color-secondary);
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 12px;
  text-shadow: 2px 2px 0 #000;
}

#bj-player-cards {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  min-height: 160px;
}

#bj-status {
  display: none;
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-top: 18px;
  padding: 10px 25px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 10px;
  color: var(--color-secondary);
  text-shadow: 2px 2px 0 #000;
}

#bj-controls {
  display: none;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  pointer-events: auto;
}

.extracted-style-41 {
  padding: 15px 40px;
  font-size: 1.8rem;
  background: #3498db;
}

.extracted-style-42 {
  padding: 15px 40px;
  font-size: 1.8rem;
  background: #e67e22;
}

#bj-post-controls {
  display: none;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  pointer-events: auto;
}

.extracted-style-43 {
  padding: 12px 25px;
  font-size: 1.4rem;
  background: #555;
}

.extracted-style-44 {
  padding: 12px 25px;
  font-size: 1.4rem;
  background: #2ecc71;
}

#game-poker-area {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#pk-bet-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-secondary);
  text-shadow: 2px 2px 0 #000;
  display: none;
}

.extracted-style-45 {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
  align-items: center;
  pointer-events: auto;
  /* Feste Breite: verhindert Layout-Shift beim Einblenden des Buttons */
  white-space: nowrap;
}

#pk-cards {
  /* 5 Karten × 160px + 4 Lücken × 15px = 860px – Karten wandern nicht beim Hinzufügen */
  display: flex;
  gap: 15px;
  width: 860px;
  flex-shrink: 0;
  pointer-events: auto;
}

#pk-btn-draw {
  /* visibility statt display, damit kein Layout-Shift beim Einblenden */
  visibility: hidden;
  padding: 25px 35px;
  font-size: 1.6rem;
  background: #3498db;
  pointer-events: none;
  flex-shrink: 0;
}

.extracted-style-46 {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: auto;
}

#pk-status {
  display: none;
  font-family: var(--font-heading);
  font-size: 2rem;
  padding: 10px 25px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 10px;
  color: var(--color-secondary);
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 15px;
}

#pk-post-controls {
  display: none;
  gap: 15px;
  justify-content: center;
  pointer-events: auto;
}

.extracted-style-47 {
  padding: 12px 25px;
  font-size: 1.4rem;
  background: #555;
}

.extracted-style-48 {
  padding: 12px 25px;
  font-size: 1.4rem;
  background: #2ecc71;
}

.extracted-style-49 {
  background-image: url(../assets/images/bg/bg_cashier.webp);
}

#view-dialog {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.extracted-style-50 {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 20px;
  box-shadow: none;
}

#dialog-panel {
  pointer-events: auto;
  position: relative;
  background: rgba(10, 10, 15, 0.95);
  border-top: 3px solid var(--color-secondary);
  padding: 30px 40px;
  margin: 0 auto;
  width: 60%;
  max-width: 900px;
  border-radius: 12px;
  min-height: 250px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

#dlg-name {
  color: var(--color-secondary);
  font-size: 2rem;
  margin-bottom: 15px;
  font-family: "Luckiest Guy", cursive;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#dlg-text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: #ffffff;
  margin-bottom: 25px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#dlg-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.extracted-style-51 {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
}

#dlg-close-btn {
  background-color: #555;
  font-size: 1.1rem;
  padding: 10px 20px;
}

/* #slot-machine-screen duplicate removed – consolidated above */

#slots-paytable {
  position: absolute;
  left: 1.5%;
  top: 18%;
  width: 18%;
  background: rgba(10, 8, 20, 0.92);
  border: 3px solid #f1c40f;
  border-radius: 14px;
  padding: 12px 10px;
  box-shadow:
    4px 4px 0 #000,
    0 0 20px rgba(241, 196, 15, 0.15);
  z-index: 10;
}

.extracted-style-52 {
  font-family: var(--font-heading);
  color: #f1c40f;
  font-size: 1rem;
  text-align: center;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

#slots-multiplier {
  font-family: var(--font-heading);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 8px;
  background: rgba(241, 196, 15, 0.12);
  border-radius: 6px;
  padding: 4px 0;
}

#pt-bet-display {
  color: #f1c40f;
}

/* Scratchcard & Paytable Overlay Styles */
#sc-paytable-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-paytable-box {
  background: #1a1015;
  border: 3px solid #f1c40f;
  border-radius: 20px;
  padding: 30px 36px;
  max-width: 440px;
  width: 92%;
  text-align: center;
  box-shadow:
    6px 6px 0 #000,
    0 0 30px rgba(241, 196, 15, 0.15);
}

.sc-paytable-title {
  font-family: var(--font-heading);
  color: #f1c40f;
  font-size: 1.8rem;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 18px;
}

.sc-paytable-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.sc-paytable-header-row {
  border-bottom: 2px solid #f1c40f44;
}

.sc-paytable-th-left {
  text-align: left;
  padding: 8px 6px;
  color: #f1c40f;
  font-family: var(--font-heading);
  font-size: 1rem;
}

.sc-paytable-th-right {
  text-align: right;
  padding: 8px 6px;
  color: #f1c40f;
  font-family: var(--font-heading);
  font-size: 1rem;
}

.sc-paytable-body {
  color: #ddd;
  font-size: 1.05rem;
}

.sc-paytable-row {
  border-bottom: 1px solid #ffffff11;
}

.sc-paytable-td-left {
  padding: 8px 6px;
  text-align: left;
}

.sc-paytable-td-right {
  padding: 8px 6px;
  text-align: right;
  font-family: var(--font-heading);
}

.text-gold {
  color: #f1c40f;
}
.text-orange {
  color: #f39c12;
}
.text-copper {
  color: #e67e22;
}
.text-gray {
  color: #aaa;
}

.sc-paytable-special-wrap {
  border-top: 2px solid #f1c40f33;
  padding-top: 14px;
  margin-bottom: 14px;
}

.sc-paytable-special-title {
  color: #f1c40f;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.sc-paytable-special-desc {
  color: #ddd;
  font-size: 0.95rem;
  line-height: 1.6;
}

.btn-close-paytable {
  background: #555;
  font-size: 1rem;
  padding: 10px 30px;
}

.sc-empty-title {
  font-family: var(--font-heading);
  color: var(--color-secondary);
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.sc-empty-desc {
  color: #aaa;
  margin-bottom: 20px;
}

.btn-close-sc {
  background: #555;
}

#sc-ticket-wrap {
  position: relative;
  margin: 0 auto;
  user-select: none;
}

#sc-ticket-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: 10px;
  display: block;
}

#sc-icon-layer {
  position: absolute;
  top: -20px;
  inset: 0;
  pointer-events: none;
}

.sc-ov-icon {
  position: absolute;
  object-fit: contain;
  display: none;
}

#sc-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  top: -13px;
  cursor: crosshair;
  touch-action: none;
  border-radius: 10px;
}

#sc-ov-result {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  min-height: 34px;
  color: var(--color-secondary);
  text-align: center;
  margin: 12px 0 8px;
}

.sc-controls-grid {
  display: grid;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.btn-sc-start {
  background: #2ecc71;
}

.btn-sc-info {
  background: #1a1a2e;
  border-color: #f1c40f;
  font-size: 1.1rem;
  padding: 10px 14px;
}
