:root {
  --void: #05040a;
  --ink: #0b0906;
  --gold: #d4af37;
  --gold-soft: #f3e5ab;
  --gold-deep: #7a5c16;
  --ivory: #f4ecd8;
  --frame: #c9a227;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, #2a1c08 0%, var(--void) 55%),
    var(--void);
  color: var(--ivory);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 4;
}

#dust {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #f3e5ab 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 76%, #d4af37 50%, transparent 51%),
    radial-gradient(1px 1px at 71% 18%, #fff6d4 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 64%, #d4af37 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 54% 44%, #f8e7a0 50%, transparent 51%);
  z-index: 0;
}

#stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cabinet {
  position: relative;
  box-sizing: content-box;
  width: 960px;
  padding: 14px 18px 16px;
  background:
    linear-gradient(180deg, #1a140c 0%, #0c0a08 40%, #120e08 100%);
  border: 1px solid #e6c56a;
  box-shadow:
    0 0 0 3px #5a4310,
    0 0 0 6px #d4af37,
    0 0 0 8px #3a2a0a,
    0 30px 80px rgba(0, 0, 0, 0.65),
    0 0 120px rgba(212, 175, 55, 0.16);
  transform-origin: center center;
}

#cabinet::before {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(243, 229, 171, 0.18);
}

.ornament {
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 3;
  background:
    linear-gradient(135deg, #f8e7a0, #d4af37 40%, #7a5c16);
  clip-path: polygon(0 0, 100% 0, 100% 18%, 18% 18%, 18% 100%, 0 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.55);
}

.ornament.top-right { top: 0; right: 0; transform: rotate(90deg); }
.ornament.top-left { top: 0; left: 0; }
.ornament.bot-right { bottom: 0; right: 0; transform: rotate(180deg); }
.ornament.bot-left { bottom: 0; left: 0; transform: rotate(270deg); }

#marquee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 36px;
  margin-bottom: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-shadow: 0 0 16px rgba(243, 229, 171, 0.35);
}

#marquee p {
  font-family: Cinzel, "Noto Serif SC", serif;
  font-size: 12px;
  font-weight: 700;
}

.gem {
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at 35% 30%, #fff6d4, #d4af37 45%, #5a4310);
  transform: rotate(45deg);
  box-shadow: 0 0 10px #d4af37;
}

#bezel {
  position: relative;
  background: #000;
  border: 2px solid #8a6d1f;
  box-shadow:
    inset 0 0 0 1px #1a1408,
    inset 0 0 40px rgba(0, 0, 0, 0.65),
    0 0 24px rgba(212, 175, 55, 0.12);
}

#game {
  display: block;
  width: 960px;
  height: 720px;
  background: #07060a;
  outline: none;
  cursor: none;
}

#scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: overlay;
  opacity: 0.35;
}

#ledge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  color: #cbb888;
  font-size: 12px;
  letter-spacing: 0.08em;
}

#ledge i {
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.7;
}

noscript {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 10;
}

@media (max-width: 1000px), (max-height: 860px) {
  #ledge { font-size: 10px; letter-spacing: 0.04em; gap: 8px; }
}
