body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #1a1a1a;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

body,
body * {
  user-select: none;
  -webkit-user-select: none;
}

/* Setup Screen */
#setupScreen {
  text-align: center;
}

#setupScreen .player-row {
  align-items: center;
}

.setup-player-jumper {
  --skin-color: #f7caa3;
  --hair-color: #2c1b12;
  --top-color: #2e86de;
  --bottom-color: #34495e;
  --jump-delay: 0s;
  position: relative;
  width: 24px;
  height: 32px;
  flex: 0 0 24px;
  margin-right: -2px;
  animation: setupJumperIdle 1.7s ease-in-out infinite;
  animation-delay: var(--jump-delay);
  transform-origin: 50% 100%;
}

.setup-jumper-head {
  position: absolute;
  left: 8px;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--skin-color);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
}

.setup-jumper-hair {
  position: absolute;
  left: 7px;
  top: -1px;
  width: 10px;
  height: 5px;
  border-radius: 8px 8px 2px 2px;
  background: var(--hair-color);
}

.setup-jumper-body {
  position: absolute;
  left: 9px;
  top: 8px;
  width: 6px;
  height: 11px;
  border-radius: 2px;
  background: var(--top-color);
}

.setup-jumper-arm {
  position: absolute;
  top: 9px;
  width: 9px;
  height: 3px;
  border-radius: 999px;
  background: var(--skin-color);
}

.setup-jumper-arm-left {
  left: 1px;
  transform-origin: 100% 50%;
  transform: rotate(-36deg);
  animation: setupJumperArmLeft 1.7s ease-in-out infinite;
  animation-delay: var(--jump-delay);
}

.setup-jumper-arm-right {
  left: 14px;
  transform-origin: 0 50%;
  transform: rotate(36deg);
  animation: setupJumperArmRight 1.7s ease-in-out infinite;
  animation-delay: var(--jump-delay);
}

.setup-jumper-skirt {
  display: none;
  position: absolute;
  left: 7px;
  top: 17px;
  width: 10px;
  height: 5px;
  border-radius: 1px 1px 4px 4px;
  background: var(--top-color);
}

.setup-jumper-leg {
  position: absolute;
  top: 18px;
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: var(--bottom-color);
}

.setup-jumper-leg-left {
  left: 8px;
  transform: rotate(10deg);
}

.setup-jumper-leg-right {
  left: 11px;
  transform: rotate(-10deg);
}

.setup-jumper-femme .setup-jumper-hair {
  width: 11px;
  height: 7px;
  border-radius: 8px 8px 4px 4px;
}

.setup-jumper-femme .setup-jumper-skirt {
  display: block;
}

.setup-jumper-femme .setup-jumper-body {
  width: 7px;
  left: 8.5px;
}

.setup-player-jumper.is-waving .setup-jumper-arm-left {
  animation: setupJumperArmLeftWave 0.4s ease-in-out 2;
}

.setup-player-jumper.is-waving .setup-jumper-arm-right {
  animation: setupJumperArmRightWave 0.4s ease-in-out 2;
}

@keyframes setupJumperIdle {
  0%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-2px);
  }
  55% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-1px);
  }
}

@keyframes setupJumperArmLeft {
  0%,
  100% {
    transform: rotate(-36deg);
  }
  30% {
    transform: rotate(-25deg);
  }
  70% {
    transform: rotate(-40deg);
  }
}

@keyframes setupJumperArmRight {
  0%,
  100% {
    transform: rotate(36deg);
  }
  30% {
    transform: rotate(25deg);
  }
  70% {
    transform: rotate(40deg);
  }
}

@keyframes setupJumperArmLeftWave {
  0%,
  100% {
    transform: rotate(-36deg);
  }
  25% {
    transform: rotate(-92deg);
  }
  50% {
    transform: rotate(-70deg);
  }
  75% {
    transform: rotate(-104deg);
  }
}

@keyframes setupJumperArmRightWave {
  0%,
  100% {
    transform: rotate(36deg);
  }
  25% {
    transform: rotate(86deg);
  }
  50% {
    transform: rotate(60deg);
  }
  75% {
    transform: rotate(96deg);
  }
}

#menu h1 {
  font-size: 3rem;
  margin-bottom: 40px;
}

#startBtn {
  padding: 15px 40px;
  font-size: 1.5rem;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#startBtn:hover {
  background-color: #45a049;
}

/* Game Screen */
#gameScreen {
  width: 100%;
  max-width: 900px;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 14%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 26%),
    radial-gradient(circle at 82% 78%, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 24%),
    linear-gradient(135deg, #120d0c 0%, #1a1311 16%, #241916 33%, #181110 48%, #2b1f1b 66%, #120d0c 100%);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 0 0 1px rgba(255,255,255,0.03),
    0 18px 40px rgba(0,0,0,0.38);
}

#playerDisplay {
  font-size: 1.4rem;
  margin-bottom: 20px;
  text-align: center;
}

#boardContainer {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 10px, rgba(201,165,109,0.14) 10px 22px, rgba(255,255,255,0.04) 22px 34px),
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(128,92,45,0.12)),
    linear-gradient(90deg, #f6ebc9 0%, #eeddb3 12%, #e5ca93 27%, #f2e3bf 43%, #dcb87a 60%, #efddb1 77%, #f7edd0 100%);
  border: 3px solid rgba(139,103,58,0.78);
  border-radius: 18px;
  padding: 0;
  margin: 0 auto 30px;
  min-height: 400px;
  width: min(100%, 920px);
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -10px 18px rgba(0,0,0,0.24),
    0 18px 34px rgba(0,0,0,0.34);
}

.board {
  display: grid;
  margin: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, #0f0f10, #161617 58%, #0e0e0f 100%);
  padding: 0;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  position: relative;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.34);
}

.tile.multiplier {
  background:
    linear-gradient(145deg, rgba(120,162,206,0.96) 0%, rgba(98,164,136,0.96) 50%, rgba(112,94,176,0.97) 100%);
  border-color: #4e678f;
  color: #f3f7ff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -3px 8px rgba(25,35,66,0.28),
    0 6px 12px rgba(13,24,44,0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.tile.multiplier:hover {
  transform: translateY(-1px);
  filter: brightness(1.06) saturate(1.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -4px 10px rgba(29,38,79,0.34),
    0 8px 14px rgba(10,20,39,0.42);
}

.tile.multiplier .share {
  font-size: 15px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(9,16,28,0.65);
}

.tile.multiplier .type,
.tile.multiplier .arrow {
  display: none;
}

.jenny-route-choice {
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.jenny-route-choice:hover,
.jenny-route-choice:focus-visible {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.03);
  box-shadow: 0 7px 18px rgba(0,0,0,0.28);
  outline: none;
}

.jenny-choice-target {
  outline: 3px solid rgba(111,140,214,0.92);
  outline-offset: 2px;
  box-shadow:
    0 0 0 2px rgba(100,190,170,0.32) inset,
    0 0 14px rgba(126,107,210,0.32);
}

#controls {
  display: flex;
  gap: 20px;
  justify-content: center;
}

button {
  padding: 12px 30px;
  font-size: 1.2rem;
  cursor: pointer;
  border: none;
  border-radius: 6px;
}

#rollBtn {
  background-color: #2196F3;
  color: white;
}

#passBtn {
  background-color: #ff9800;
  color: white;
}

.tile {
  background-color: #1f1f1f;
  border: 2px solid #555;
  border-radius: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  text-align: center;
  color: #fff;
  cursor: pointer;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), inset 0 -2px 4px rgba(0,0,0,0.25);
  user-select: none;
  -webkit-user-select: none;
}

.tile.hover-expanded {
  transform: scale(2);
  transform-origin: center center;
  z-index: 5000;
  overflow: visible;
  filter: brightness(1.06) saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -6px 12px rgba(0,0,0,0.28),
    0 18px 30px rgba(0,0,0,0.42);
}

.tile.multiplier.hover-expanded {
  transform: scale(2) !important;
  transform-origin: center center;
}

.tile.hover-expanded .tile-hover-expanded-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.tile.hover-expanded .tile-hover-expanded-line {
  font-size: 12px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.45);
}

.price-slot-column {
  position: relative;
  border-radius: 8px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.price-slot-column.hover-expanded {
  transform: scale(2);
  transform-origin: center center;
  z-index: 5200;
  background: linear-gradient(180deg, rgba(40,52,64,0.98), rgba(23,34,45,0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -4px 10px rgba(0,0,0,0.34),
    0 16px 28px rgba(0,0,0,0.44);
  filter: brightness(1.04) saturate(1.06);
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 7px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.12) 38%, rgba(0,0,0,0.26) 100%),
    linear-gradient(160deg, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0.14) 100%);
}

.tile > * {
  position: relative;
  z-index: 1;
}

.player-marker {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.92);
  background-image:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.24) 34%, rgba(255,255,255,0.06) 56%, rgba(0,0,0,0.32) 100%),
    linear-gradient(160deg, rgba(255,255,255,0.32) 0%, rgba(0,0,0,0.16) 72%);
  box-shadow:
    inset 0 1.5px 0.75px rgba(255,255,255,0.38),
    inset 0 -3px 5.25px rgba(0,0,0,0.4),
    0 3px 6px rgba(0,0,0,0.55),
    0 0 0 1px rgba(0,0,0,0.35);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16.5px;
  font-weight: bold;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.95);
  pointer-events: none;
  overflow: hidden;
  transform-style: preserve-3d;
}

.player-marker.ghost-player-marker {
  width: 38px;
  height: 40px;
  border: 1px solid rgba(200,235,255,0.9);
  border-radius: 52% 52% 40% 40%;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.95) 0%, rgba(232,247,255,0.9) 48%, rgba(168,214,238,0.9) 100%);
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,0.65),
    inset 0 -5px 8px rgba(39,79,110,0.25),
    0 6px 11px rgba(7,28,45,0.45);
  color: transparent;
  text-shadow: none;
  clip-path: polygon(50% 2%, 74% 7%, 89% 21%, 93% 38%, 92% 58%, 87% 73%, 92% 90%, 82% 82%, 74% 95%, 66% 82%, 57% 95%, 48% 82%, 39% 95%, 30% 82%, 20% 94%, 12% 81%, 6% 90%, 10% 74%, 7% 58%, 8% 38%, 12% 21%, 27% 7%);
  filter: saturate(1.05);
}

.player-marker.ghost-player-marker::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 39% 40%, rgba(7,20,35,0.95) 0 2.2px, transparent 2.3px),
    radial-gradient(circle at 61% 40%, rgba(7,20,35,0.95) 0 2.2px, transparent 2.3px),
    radial-gradient(circle at 50% 56%, rgba(31,74,106,0.55) 0 3px, transparent 3.1px),
    radial-gradient(circle at 34% 20%, rgba(255,255,255,0.6) 0 16%, transparent 17%);
  opacity: 1;
  filter: none;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
}

.player-marker.ghost-player-marker::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 68% 76%, rgba(18,53,82,0.24) 0%, rgba(18,53,82,0.02) 48%, rgba(0,0,0,0) 68%);
}

.player-marker::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4.5px;
  width: 15px;
  height: 10.5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.66);
  filter: blur(0.2px);
  opacity: 0.9;
}

.player-marker::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 70% 78%, rgba(0,0,0,0.26) 0%, rgba(0,0,0,0.03) 45%, rgba(0,0,0,0) 68%);
}

#diceDisplay {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.dice-face,
.dice-total-box {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(244,244,244,0.98) 50%, rgba(224,224,224,0.98) 100%);
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,0.78),
    inset 0 -5px 7px rgba(0,0,0,0.12),
    0 6px 12px rgba(0,0,0,0.32);
}

.dice-face::before,
.dice-total-box::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,0.35), rgba(255,255,255,0));
  pointer-events: none;
}

.dice-pip {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4b4b4b 0%, #121212 75%, #000 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.18), 0 0 1px rgba(0,0,0,0.35);
}

.dice-total-box {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.tile .share {
  font-weight: bold;
  font-size: 14px;
  line-height: 1.1;
}

.tile .type {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}

.tile .arrow {
  position: relative;
  z-index: 3200;
  pointer-events: none;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.2px;
  margin-top: 1px;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.95),
    0 0 6px rgba(0,0,0,0.55);
}

.tile.broker .arrow {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  margin-top: 1px;
  line-height: 1.0;
}

.tile.broker .type {
  display: none;
}

.tile.broker .share {
  margin-bottom: 2px;
  line-height: 1.0;
}

.tile.broker .broker-text {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.0;
  margin-top: 1px;
  white-space: nowrap;
}

.tile.start .arrow {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  margin-top: 2px;
}

.tile.broker { border-color: #ff5555; }
.tile.sell_all { border-color: #55ff55; }
.tile.start { border-color: #ffcc00; }
