:root {
  --bg-dark: #0a0a0a;
  --gold: #f7d115;
  --gold-strong: #ffbf00;
  --gold-soft: #f9e27a;
  --orange: #f26a00;
  --brown: #4a1f00;
  --brown-deep: #341400;
  --panel: #6a3c00;
  --panel-dark: #4a2b00;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", "Arial Black", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #0a0a0a 0%, #1b1204 35%, #3b1a00 100%);
  color: var(--white);
  display: flex;
  justify-content: center;
}

.page {
  width: 375px;
  min-height: 100vh;
  background: linear-gradient(180deg, #121212 0%, #2b1600 55%, #4a1f00 100%);
}

.hero {
  position: relative;
  height: 360px;
  padding: 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 220, 80, 0.15), transparent 50%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(15, 15, 15, 0.9) 60%, rgba(27, 15, 0, 0.95) 100%),
    url("assets/header-img.png") center/cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
}

.hero-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 700;
  font-style: italic;
  background: #0c0c0c;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.hero-left h1 {
  margin: 0 0 12px 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 1px;
}

.hero-badge {
  background: #111;
  border: 2px solid var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 8px;
}

.hero-badge span {
  color: var(--gold);
  font-size: 20px;
}

.hero-sub {
  background: #f4dd3b;
  color: #1b1204;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
}

.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  width: 150px;
  height: 190px;
  border: 2px solid var(--gold);
  border-radius: 16px;
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.2), transparent 60%),
    #302100;
  position: relative;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  background: url("assets/lose-img.png") center/cover no-repeat;
}

.hero-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--gold);
  color: #000;
  padding: 4px 8px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  transform: rotate(-6deg);
}

.ticker {
  background: #5c2e00;
  border-top: 1px solid #ffd400;
  border-bottom: 1px solid #ffd400;
  overflow: hidden;
  white-space: nowrap;
  height: 32px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: inline-flex;
  gap: 32px;
  animation: marquee 8s linear infinite;
}

.ticker-item {
  font-size: 12px;
}

.ticker-item span {
  color: var(--gold);
  font-weight: 700;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.card {
  margin: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #f1a500 0%, #d16600 100%);
  border-radius: 14px;
  box-shadow: inset 0 -10px 10px rgba(0, 0, 0, 0.4);
}

.card-title {
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 10px;
}

.sparkle {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #fff;
  margin: 0 6px;
}

.card-body {
  background: #6e3c00;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: center;
  position: relative;
}

.gift-box {
  position: relative;
  width: 110px;
  height: 90px;
  background: #3a2400;
  border-radius: 10px;
  border: 2px solid #a87700;
}

.gift-img {
  position: absolute;
  inset: 10px;
  background: url("assets/gift-img.png") center/contain no-repeat;
  border-radius: 8px;
}

.gift-deco {
  position: absolute;
  left: 4px;
  top: 2px;
  width: 70px;
  height: 70px;
  background: url("assets/left-img.png") center/contain no-repeat;
  opacity: 0.95;
}

.gift-deco-end {
  position: absolute;
  right: -6px;
  bottom: -8px;
  width: 70px;
  height: 70px;
  background: url("assets/left-img-end.png") center/contain no-repeat;
  opacity: 0.95;
}

.gift-100 {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: #f2d23b;
  color: #2b1900;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  transform: rotate(-8deg);
  font-size: 12px;
}

.card-text p {
  margin: 0 0 8px 0;
  font-size: 12px;
}

.cta {
  background: linear-gradient(180deg, #ff8f00 0%, #d15000 100%);
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 8px 16px;
  font-weight: 800;
  box-shadow: 0 2px 4px var(--shadow);
}

.hand {
  position: absolute;
  right: 6px;
  bottom: -10px;
  width: 52px;
  height: 52px;
  background: url("assets/cursor-icon.png") center/contain no-repeat;
}

.card-state-switch {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.card-state-switch button {
  background: #7c3c00;
  color: #fff;
  border: 1px solid #caa03a;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 10px;
}

#draw-card[data-state="lose"] .gift-img {
  background: url("assets/left-img.png") center/contain no-repeat;
}

#draw-card[data-state="lose"] .gift-deco,
#draw-card[data-state="lose"] .gift-deco-end {
  opacity: 0.35;
}

#draw-card[data-state="win"] .gift-100 {
  background: #ffe14d;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.rules {
  margin: 14px;
  padding: 12px;
  background: #5a2b00;
  border-radius: 14px;
  border: 1px solid #caa03a;
}

.rules-title {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  margin: 8px 0;
}

.rules-list {
  background: #4a2200;
  border-radius: 10px;
  padding: 8px 12px;
  list-style: none;
  margin: 0 0 12px 0;
}

.rules-list li {
  font-size: 10px;
  margin: 6px 0;
  position: relative;
  padding-left: 12px;
}

.rules-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 6px;
  height: 6px;
  background: #7ad000;
  border-radius: 50%;
}

.table {
  border: 1px solid #b3862a;
  border-radius: 8px;
  overflow: hidden;
  background: #3f1e00;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  padding: 8px 10px;
  font-size: 10px;
  border-bottom: 1px solid #6f4c12;
}

.table-row:last-child {
  border-bottom: none;
}

.table-head {
  background: #5a2b00;
  font-weight: 800;
}

.table-row.highlight {
  background: #6a3b00;
  font-weight: 800;
  color: var(--gold);
}

.history {
  text-align: center;
  margin-top: 8px;
  font-size: 11px;
  color: var(--gold-soft);
}

.join {
  padding: 18px 14px 24px 14px;
  background: linear-gradient(180deg, #a34b00 0%, #e98c00 100%);
}

.join-btn {
  width: 100%;
  background: linear-gradient(180deg, #fff7b0 0%, #f2c531 100%);
  color: #a34b00;
  font-weight: 800;
  border: none;
  padding: 10px 12px;
  border-radius: 20px;
  box-shadow: inset 0 -2px 2px rgba(0, 0, 0, 0.3);
}
