@font-face {
  font-family: "VT323";
  src: url("assets/fonts/VT323-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #070b07;
  --panel: #121812;
  --metal: #2a332a;
  --metal-hi: #3d4a3d;
  --neon: #39ff14;
  --neon-dim: #1fa80a;
  --amber: #ffd166;
  --cream: #e8f5e0;
  --danger: #ff4d6d;
  --radius: 14px;
  --font-display: "VT323", "Courier New", monospace;
  --font-ui: "Montserrat", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--cream);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar,
.stage,
.ca-bar,
.footer {
  position: relative;
  z-index: 2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
}

.copied-pill {
  position: absolute;
  left: 50%;
  top: -0.35rem;
  transform: translate(-50%, -100%) scale(0.85);
  background: var(--neon);
  color: #041004;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.copied-pill.show {
  opacity: 1;
  transform: translate(-50%, -110%) scale(1);
}

.socials {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--cream);
  background: linear-gradient(180deg, var(--metal-hi), var(--metal));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 6px 0 #0b100b,
    0 10px 20px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  transition: transform 0.12s ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
}

.icon-btn:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 2px 0 #0b100b;
}

.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 1rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #041004;
  background: linear-gradient(180deg, #b8ff7a, var(--neon));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 6px 0 #1a5a0a,
    0 10px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease;
}

.buy-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.buy-btn:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 0 #1a5a0a;
}

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0.5rem 1rem 1.5rem;
}

.speaker {
  display: none;
}

@media (min-width: 900px) {
  .speaker {
    display: block;
  }
}

.speaker-face {
  width: 120px;
  padding: 1.1rem 0.85rem 1rem;
  border-radius: 18px;
  background: linear-gradient(160deg, #3a4438, #1a211a 55%, #101510);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.cone {
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #6a7568, #2a322a 45%, #0c100c 70%),
    #1a1f1a;
  box-shadow:
    inset 0 0 0 6px #252d25,
    inset 0 0 18px rgba(0, 0, 0, 0.7),
    0 0 0 2px #0a0e0a;
}

.cone.small {
  width: 42px;
  height: 42px;
}

.cone.big {
  width: 78px;
  height: 78px;
}

body.spinning .cone {
  animation: thump 0.28s ease-in-out infinite;
}

@keyframes thump {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

.speaker-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.35);
}

.cabinet {
  width: min(520px, 100%);
  margin: 0 auto;
}

.screen-frame {
  background: linear-gradient(180deg, #2f392f, #161c16);
  border-radius: 22px;
  padding: 0.85rem 0.85rem 0.65rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 20px 50px rgba(0, 0, 0, 0.45);
}

.screen {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #0d1f0d;
  border: 3px solid #0a120a;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
}

.cat-still,
.cat-spin {
  width: 88%;
  height: 88%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.cat-spin {
  position: absolute;
  inset: 6%;
  width: 88%;
  height: 88%;
  opacity: 0;
  pointer-events: none;
}

.cat-rave {
  display: none;
}

body.rave .cat-rave {
  display: block;
}

body.rave #catSpin:not(.cat-rave) {
  display: none;
}

body.spinning .cat-still {
  opacity: 0;
}

body.spinning .cat-spin {
  opacity: 1;
}

body.rave.spinning {
  animation: raveFlash 0.18s linear infinite;
}

@keyframes raveFlash {
  0% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(40deg) saturate(1.4);
  }
  100% {
    filter: hue-rotate(0deg);
  }
}

.screen-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 28%,
    transparent 70%,
    rgba(255, 255, 255, 0.05) 100%
  );
  pointer-events: none;
}

.ticker {
  margin-top: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--neon);
  background: #050805;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  border: 2px solid #1a241a;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.45);
  min-height: 2.2rem;
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

.toggles {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.toggle {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b7c7b2;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #1a221a;
  border: 1px solid #2d3a2d;
  position: relative;
  transition: background 0.2s ease;
}

.switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #dfeadf, #9aaa96);
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.toggle input:checked + .switch {
  background: var(--neon-dim);
  border-color: var(--neon);
}

.toggle input:checked + .switch i {
  transform: translateX(20px);
  background: linear-gradient(180deg, #eaffea, var(--neon));
}

.speed {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b7c7b2;
}

.speed input {
  accent-color: var(--neon);
  width: 100%;
}

.spin-btn {
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: #041004;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.05;
  letter-spacing: 0.04em;
  background: radial-gradient(circle at 35% 30%, #b8ff7a, var(--neon) 45%, var(--neon-dim));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 0 0 6px #1a2814,
    0 10px 0 #0c1608,
    0 16px 28px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(57, 255, 20, 0.25);
  transition: transform 0.08s ease;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.spin-btn:active,
.spin-btn.held {
  transform: translateY(6px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    0 0 0 6px #1a2814,
    0 3px 0 #0c1608,
    0 8px 16px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(57, 255, 20, 0.45);
}

.spin-label {
  position: relative;
  z-index: 1;
}

.orbit {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(4, 16, 4, 0.35);
  animation: orbit 8s linear infinite;
  opacity: 0.5;
}

body.spinning .orbit {
  animation-duration: 1.2s;
  opacity: 1;
  border-color: rgba(4, 16, 4, 0.7);
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.ca-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  padding: 0 1rem 1.5rem;
}

.ca-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(10, 16, 10, 0.85);
  border: 1px solid #2a3a2a;
  border-radius: 999px;
  padding: 0.45rem 0.45rem 0.45rem 0.9rem;
  backdrop-filter: blur(8px);
  max-width: 100%;
}

.ca-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--neon);
  letter-spacing: 0.08em;
}

.ca-value {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.5vw, 1.45rem);
  color: var(--cream);
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: var(--neon);
  color: #041004;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.copy-btn:hover {
  filter: brightness(1.08);
}

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--cream);
  background: rgba(10, 16, 10, 0.85);
  border: 1px solid #2a3a2a;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.action-chip:hover {
  border-color: var(--neon);
  color: var(--neon);
}

.buy-chip {
  color: #041004;
  background: var(--neon);
  border-color: var(--neon);
  font-weight: 800;
}

.buy-chip:hover {
  color: #041004;
  filter: brightness(1.08);
  border-color: #9dff7a;
}

.footer {
  margin-top: auto;
  border-top: 1px solid #1c261c;
  background: rgba(5, 8, 5, 0.75);
  padding: 1.25rem;
}

.footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto 0.75rem;
}

.footer-brand img {
  border-radius: 8px;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}

.footer-brand p {
  margin: 0.15rem 0 0;
  color: #9aab96;
  font-size: 0.88rem;
}

.legal {
  max-width: 900px;
  margin: 0 auto;
  color: #6f7d6c;
  font-size: 0.78rem;
}

.tap-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.5rem;
  background:
    radial-gradient(circle at 50% 40%, rgba(57, 255, 20, 0.18), transparent 45%),
    rgba(4, 8, 4, 0.92);
  cursor: pointer;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.tap-gate.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-cat {
  width: min(180px, 42vw);
  border-radius: 16px;
  border: 3px solid rgba(57, 255, 20, 0.35);
  box-shadow: 0 0 40px rgba(57, 255, 20, 0.2);
  animation: floaty 2.4s ease-in-out infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.gate-title {
  margin: 0.6rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4rem);
  letter-spacing: 0.14em;
  color: var(--neon);
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.45);
}

.gate-sub {
  margin: 0;
  color: #c4d6bf;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .controls {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .toggles {
    width: 100%;
  }

  .spin-btn {
    width: 132px;
    height: 132px;
  }
}
