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

:root {
  --bg: #0a0a0f;
  --gold: #d4a84b;
  --gold-dim: #8a6e2f;
  --gold-glow: rgba(212, 168, 75, 0.3);
  --text: #e8e4dc;
  --text-dim: #6a665e;
  --reel-bg: rgba(212, 168, 75, 0.04);
  --reel-border: rgba(212, 168, 75, 0.12);
  --font: 'Space Grotesk', system-ui, sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  max-width: min(calc(100vw - 2rem), 900px);
}

/* Slot Machine */
.slot-machine {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: min(calc(100vw - 2rem), 900px);
}

.reels {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  width: 100%;
  max-width: min(calc(100vw - 2rem), 900px);
}

.reel-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex: 1 1 0;
  min-width: 0;
}

.reel-letter {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  height: 1.2rem;
  display: flex;
  align-items: center;
}

.reel-window {
  width: 100%;
  max-width: 200px;
  height: 3.2rem;
  overflow: hidden;
  position: relative;
  background: var(--reel-bg);
  border: 1px solid var(--reel-border);
  border-radius: 6px;
}

.reel-window::before,
.reel-window::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 30%;
  z-index: 2;
  pointer-events: none;
}

.reel-window::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg), transparent);
}

.reel-window::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg), transparent);
}

.reel-strip {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  transition: none;
}

.reel-item {
  height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.85rem, 2.5vw, 1.15rem);
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
  padding: 0 0.5rem;
}

.reel-item.landed {
  color: var(--gold);
  font-weight: 500;
}

.dot-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8px;
  flex-shrink: 0;
  padding-top: 1.45rem;
}

.dot-separator::after {
  content: '.';
  color: var(--gold-dim);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 3px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.25s ease;
}

.mode-btn:hover {
  color: var(--text);
}

.mode-btn.active {
  background: rgba(212, 168, 75, 0.1);
  color: var(--gold);
}

/* Tagline */
.tagline {
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  color: var(--text-dim);
  letter-spacing: 0.05em;
  min-height: 1.5rem;
  text-align: center;
  transition: opacity 0.4s ease;
}

/* Spin Button */
.spin-btn {
  background: transparent;
  border: 1px solid var(--reel-border);
  color: var(--gold-dim);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.spin-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
}

.spin-btn:active {
  transform: scale(0.92);
}

.spin-btn.spinning svg {
  animation: spin-icon 0.6s linear infinite;
}

@keyframes spin-icon {
  to { transform: rotate(360deg); }
}

/* Footer */
.footer {
  position: fixed;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
}

.footer-text {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  opacity: 0.4;
  display: block;
}

.footer-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 168, 75, 0.2);
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: var(--gold);
  border-color: var(--gold);
  opacity: 1;
}

.footer-subtext {
  display: block;
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  opacity: 0.25;
  margin-top: 0.3rem;
}

/* Touch device: larger targets */
@media (hover: none) {
  .spin-btn {
    width: 52px;
    height: 52px;
  }
}

/* Small screens */
@media (max-width: 420px) {
  .reels {
    gap: 0.2rem;
  }

  .dot-separator {
    width: 4px;
  }

  .dot-separator::after {
    font-size: 1rem;
  }

  .reel-window {
    height: 2.6rem;
  }

  .reel-item {
    height: 2.6rem;
    font-size: clamp(0.6rem, 2.2vw, 0.8rem);
    padding: 0 0.15rem;
  }

  .reel-letter {
    font-size: 0.65rem;
  }
}
