:root {
  --brass-dark: #785318;
  --brass-mid: #d4af37;
  --brass-light: #fef0a5;
  --chrome-light: #ffffff;
  --chrome-mid: #b8c0c8;
  --chrome-dark: #4a545e;
  --cabinet-wood: #21130d;
  --cabinet-finish: #3a1f14;
  --bezel-gold: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
  --chrome-gradient: linear-gradient(180deg, #f0f0f0 0%, #b8c0c8 30%, #505c68 60%, #e0e8f0 100%);
  --led-red: #ff2222;
  --led-off: #330808;
  --reel-h: 170px;
  --cell-h: 56px;
}

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

body {
  font-family: 'Cinzel', serif, Georgia;
  background-color: #0c0806;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  padding: 20px 10px;
}

/* Authentic Las Vegas Casino Carpet Texture */
.casino-carpet {
  position: fixed;
  inset: 0;
  background-color: #1a0808;
  background-image: 
    radial-gradient(#4a1015 15%, transparent 16%),
    radial-gradient(#2d0a0d 15%, transparent 16%),
    linear-gradient(45deg, rgba(200, 150, 50, 0.05) 25%, transparent 25%, transparent 75%, rgba(200, 150, 50, 0.05) 75%),
    linear-gradient(-45deg, rgba(200, 150, 50, 0.05) 25%, transparent 25%, transparent 75%, rgba(200, 150, 50, 0.05) 75%);
  background-size: 60px 60px, 60px 60px, 30px 30px, 30px 30px;
  background-position: 0 0, 30px 30px, 0 0, 0 0;
  filter: blur(0.5px);
  z-index: 0;
}

/* Vegas Slot Machine Container */
.vegas-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 520px;
  width: 100%;
}

/* Top Crown Marquee */
.machine-crown {
  width: 92%;
  background: linear-gradient(180deg, #1b0d07 0%, #3d2012 100%);
  border: 4px solid #b38728;
  border-bottom: none;
  border-radius: 40px 40px 0 0;
  box-shadow: 0 -4px 15px rgba(212, 175, 55, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  padding: 12px 16px 8px 16px;
  text-align: center;
  position: relative;
}

.crown-lights {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.chase-bulb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffeb3b;
  box-shadow: 0 0 8px #ffeb3b, 0 0 14px #ff9800;
  animation: bulbChase 1s infinite alternate;
}

.chase-bulb:nth-child(even) {
  animation-delay: 0.5s;
  background: #ff5722;
  box-shadow: 0 0 8px #ff5722;
}

@keyframes bulbChase {
  0% { opacity: 0.3; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.15); }
}

.marquee-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 3px;
  background: var(--bezel-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.jackpot-counter {
  background: #000;
  border: 2px solid #b38728;
  padding: 4px 8px;
  margin-top: 4px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jackpot-label {
  font-size: 0.55rem;
  font-family: 'Roboto Mono', monospace;
  color: #ff9800;
  letter-spacing: 1px;
}

.jackpot-digits {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ff2222;
  text-shadow: 0 0 8px rgba(255, 34, 34, 0.8);
}

/* Cabinet & Lever Container */
.cabinet-container {
  display: flex;
  align-items: flex-start;
  position: relative;
  width: 100%;
}

/* Main Chassis */
.cabinet-chassis {
  background: linear-gradient(90deg, #180d09 0%, #301a11 25%, #422518 50%, #301a11 75%, #180d09 100%);
  border: 6px solid;
  border-image: var(--bezel-gold) 1;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.9), 
    inset 0 0 20px rgba(0, 0, 0, 0.8),
    inset 2px 2px 4px rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

/* Backlit Glass Paytable */
.paytable-glass {
  background: linear-gradient(180deg, #120803 0%, #201007 100%);
  border: 3px solid #8e6c1e;
  border-radius: 6px;
  padding: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.15), 0 2px 6px rgba(0,0,0,0.8);
}

.glass-glare {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.paytable-title {
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: #f7d070;
  font-weight: bold;
  margin-bottom: 6px;
  text-shadow: 0 1px 2px #000;
}

.pay-matrix {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(179, 135, 40, 0.3);
  padding: 3px 8px;
  font-size: 0.75rem;
  border-radius: 2px;
}

.pay-row.jackpot-highlight {
  background: rgba(179, 135, 40, 0.25);
  border-color: #ffd700;
}

.pay-syms {
  font-size: 0.95rem;
}

.pay-desc {
  font-size: 0.65rem;
  color: #e6c887;
  letter-spacing: 1px;
}

.pay-win {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffde59;
}

/* Mechanical Drum Reel Casing */
.reel-casing {
  background: var(--chrome-gradient);
  padding: 10px;
  border-radius: 8px;
  border: 3px solid #2a3036;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.9), inset 0 1px 3px #fff;
  position: relative;
}

.reels-aperture {
  background: #fbfbfc;
  height: var(--reel-h);
  border-radius: 4px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 
    inset 0 25px 25px -10px rgba(0, 0, 0, 0.8),
    inset 0 -25px 25px -10px rgba(0, 0, 0, 0.8),
    0 0 5px rgba(0,0,0,0.5);
}

/* 3D Cylindrical Reflection over Glass */
.glass-reflection-horizontal {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    180deg, 
    rgba(0, 0, 0, 0.65) 0%, 
    rgba(255, 255, 255, 0.15) 30%, 
    rgba(255, 255, 255, 0) 50%, 
    rgba(0, 0, 0, 0.1) 70%, 
    rgba(0, 0, 0, 0.65) 100%
  );
  pointer-events: none;
  z-index: 10;
}

.payline-laser {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(220, 20, 60, 0.7);
  box-shadow: 0 0 4px rgba(220, 20, 60, 0.9);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 11;
}

.payline-laser::before,
.payline-laser::after {
  content: '♦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #dc143c;
  font-size: 10px;
}
.payline-laser::before { left: 4px; }
.payline-laser::after { right: 4px; }

.drum-divider {
  width: 6px;
  height: 100%;
  background: var(--chrome-gradient);
  box-shadow: inset -1px 0 2px #000, inset 1px 0 2px #fff;
  z-index: 5;
}

/* Individual Drum Viewport */
.drum-viewport {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  perspective: 400px;
}

.drum-cylinder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.drum-cylinder.spinning {
  filter: blur(2px);
}

.reel-cell {
  height: var(--cell-h);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  user-select: none;
  transition: transform 0.1s;
}

/* 3D Drum Curvature Effect for Classic Mechanical Feel */
.reel-cell.prev {
  opacity: 0.55;
  transform: rotateX(32deg) scale(0.85);
  filter: brightness(0.7);
}

.reel-cell.center {
  opacity: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.reel-cell.next {
  opacity: 0.55;
  transform: rotateX(-32deg) scale(0.85);
  filter: brightness(0.7);
}

/* LED Digital Readouts */
.led-meters-panel {
  display: flex;
  gap: 8px;
  background: #080402;
  border: 2px solid #573c12;
  border-radius: 4px;
  padding: 8px 12px;
}

.meter-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meter-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.6rem;
  color: #bfa15f;
  margin-bottom: 2px;
  letter-spacing: 1px;
}

.led-display {
  background: #050101;
  border: 1px solid #331515;
  width: 100%;
  text-align: center;
  font-family: 'Roboto Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ff2222;
  padding: 2px 0;
  border-radius: 3px;
  text-shadow: 0 0 6px rgba(255, 34, 34, 0.6);
  box-shadow: inset 0 0 5px #000;
}

.led-display.highlight-win {
  color: #39ff14;
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.7);
}

/* Slanted Push Button Deck */
.button-deck {
  background: linear-gradient(180deg, #30190f 0%, #150904 100%);
  border: 3px solid #785318;
  border-radius: 6px;
  padding: 10px 14px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.15), 0 3px 6px #000;
}

.deck-surface {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

/* Heavy Mechanical Plastic/Metal Buttons */
.push-button {
  flex: 1;
  background: linear-gradient(180deg, #e0e0e0 0%, #999999 50%, #666666 100%);
  border: 2px solid #333;
  border-radius: 6px;
  padding: 12px 6px;
  cursor: pointer;
  box-shadow: 0 5px 0 #222, 0 8px 6px rgba(0, 0, 0, 0.6);
  transition: all 0.08s ease;
  user-select: none;
}

.push-button:hover:not(:disabled) {
  filter: brightness(1.1);
}

.push-button:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #222, 0 3px 3px rgba(0, 0, 0, 0.6);
}

.push-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-cap {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 900;
  color: #111;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Distinct Action Button Colors */
.bet-one {
  background: linear-gradient(180deg, #fff 0%, #f39c12 50%, #b76800 100%);
}
.bet-max {
  background: linear-gradient(180deg, #fff 0%, #3498db 50%, #1d6fa5 100%);
}
.spin-action {
  flex: 1.4;
  background: linear-gradient(180deg, #fff 0%, #e74c3c 50%, #9e1c0f 100%);
}
.spin-action .btn-cap {
  color: #fff;
  text-shadow: 0 1px 2px #000;
  font-size: 0.85rem;
}

/* Metal Coin Win Basin */
.coin-tray {
  background: var(--chrome-gradient);
  border: 3px solid #2c353d;
  border-radius: 6px;
  padding: 6px 12px 10px 12px;
  box-shadow: inset 0 2px 4px #fff, 0 5px 10px #000;
}

.tray-lip {
  text-align: center;
  margin-bottom: 4px;
}

.tray-label {
  font-size: 0.55rem;
  color: #2c353d;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.tray-basin {
  background: #111518;
  height: 28px;
  border-radius: 3px;
  border: 2px solid #000;
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.95);
  position: relative;
  overflow: hidden;
}

.coin-reflection {
  position: absolute;
  bottom: 0; left: 15%; right: 15%;
  height: 8px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
}

/* Realistic Vegas Pull-Lever Assembly */
.lever-assembly {
  position: relative;
  width: 55px;
  margin-top: 140px;
  margin-left: 2px;
  display: flex;
  align-items: center;
}

.lever-socket {
  position: relative;
  width: 100%;
}

.socket-plate {
  width: 24px;
  height: 50px;
  background: var(--chrome-gradient);
  border: 2px solid #222;
  border-radius: 4px;
  box-shadow: 2px 2px 8px #000, inset 0 1px 2px #fff;
}

.lever-shaft {
  position: absolute;
  top: 18px;
  left: 12px;
  width: 10px;
  height: 120px;
  background: linear-gradient(90deg, #e8e8e8 0%, #999 40%, #555 80%, #ccc 100%);
  border-radius: 5px;
  transform-origin: top center;
  transform: rotate(0deg);
  transition: transform 0.25s ease-out;
  cursor: pointer;
  box-shadow: 3px 3px 6px rgba(0,0,0,0.6);
}

.lever-ball {
  position: absolute;
  bottom: -18px;
  left: -13px;
  width: 36px;
  height: 36px;
  background: radial-gradient(circle at 35% 35%, #ff5252 0%, #d50000 50%, #5f0000 100%);
  border-radius: 50%;
  border: 2px solid #800000;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.8), inset -2px -2px 6px rgba(0,0,0,0.6);
  cursor: pointer;
}

.lever-ball:hover {
  filter: brightness(1.15);
}

/* Animated Arm Pull Down */
.lever-shaft.pulled {
  transform: rotate(65deg) scaleY(0.85);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
