:root {
  --pink: #ff2bd6;
  --cyan: #26e8ff;
  --violet: #8b45ff;
  --lime: #b6ff43;
  --ink: #080311;
  --panel: rgba(8, 3, 20, 0.86);
  --line: rgba(126, 231, 255, 0.55);
  --white: #f9f6ff;
  --stage-ratio: 1.7777778;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 15% 50%, rgba(255, 43, 214, 0.18), transparent 30%),
    radial-gradient(circle at 85% 50%, rgba(38, 232, 255, 0.16), transparent 30%),
    #05000b;
  font-family: Arial Black, Arial, Helvetica, sans-serif;
}

body.club-page {
  overflow-x: hidden;
  overflow-y: auto;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.stage-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: #090012;
  box-shadow: 0 0 70px rgba(255, 43, 214, 0.18);
}

.dance-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}

.stage-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 0, 10, 0.5), transparent 25%, transparent 70%, rgba(2, 0, 10, 0.34)),
    radial-gradient(circle at center, transparent 42%, rgba(2, 0, 10, 0.42) 100%);
}

.laser {
  position: absolute;
  top: 10%;
  width: 2px;
  height: 72%;
  opacity: 0.55;
  pointer-events: none;
  transform-origin: top;
  filter: blur(0.5px) drop-shadow(0 0 8px currentColor);
  animation: laser-sweep 5s ease-in-out infinite alternate;
}

.laser-a { left: 30%; color: var(--pink); background: currentColor; transform: rotate(24deg); }
.laser-b { right: 29%; color: var(--cyan); background: currentColor; transform: rotate(-24deg); animation-delay: -2.4s; }

.club-header {
  position: absolute;
  top: 3.3%;
  left: 3.8%;
  right: 3.8%;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  transform: skew(-4deg);
}

.brand-kicker {
  padding: 4px 8px;
  color: #110315;
  background: var(--lime);
  font: 800 clamp(7px, 0.7vw, 13px)/1 Arial, sans-serif;
  letter-spacing: 0.17em;
  box-shadow: 4px 4px 0 #200928;
}

.brand-name {
  display: block;
  margin-top: 7px;
  font-size: clamp(26px, 4.2vw, 78px);
  line-height: 0.86;
  letter-spacing: -0.07em;
  color: white;
  -webkit-text-stroke: clamp(1px, 0.15vw, 3px) #15001d;
  text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 rgba(38, 232, 255, 0.65), 0 0 24px var(--pink);
}

.brand-ticker {
  margin-top: 10px;
  color: var(--cyan);
  font-size: clamp(13px, 1.35vw, 26px);
  letter-spacing: 0.2em;
  text-shadow: 0 0 12px rgba(38, 232, 255, 0.9);
}

.page-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(4, 0, 14, 0.72);
  backdrop-filter: blur(10px);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  color: rgba(255,255,255,0.65);
  font: 800 clamp(9px, 0.8vw, 14px)/1 Arial, sans-serif;
  letter-spacing: 0.08em;
  transition: 160ms ease;
}

.tab:hover, .tab:focus-visible { color: white; background: rgba(255,255,255,0.09); outline: none; }
.tab.is-active { color: #120018; background: var(--cyan); box-shadow: 0 0 18px rgba(38, 232, 255, 0.65); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }

.sound-button {
  position: absolute;
  top: 12%;
  right: 3.8%;
  left: auto;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  color: #16001b;
  background: var(--white);
  box-shadow: 0 0 20px rgba(255,255,255,0.45), 0 8px 24px rgba(0,0,0,0.32);
  transform: none;
  cursor: pointer;
  font: 900 clamp(9px, 0.85vw, 15px)/1 Arial, sans-serif;
  letter-spacing: 0.08em;
  transition: transform 160ms ease, background 160ms ease;
}

.sound-button:hover { transform: scale(1.04); }
.sound-button.is-on { color: #130014; background: var(--lime); box-shadow: 0 0 24px rgba(182,255,67,0.7); }
.sound-icon { font-size: 1.2em; }

.dj-overlay { position: absolute; inset: 0; z-index: 7; pointer-events: none; }

.deck-panel, .mixer-panel { position: absolute; pointer-events: auto; }
.deck-panel { top: 73.5%; width: 22%; }
.deck-left { left: 7%; }
.deck-right { right: 7%; }

.deck-label {
  display: block;
  margin-bottom: 4px;
  color: rgba(255,255,255,0.58);
  font: 700 clamp(6px, 0.5vw, 10px)/1 Arial, sans-serif;
  letter-spacing: 0.22em;
  text-align: center;
}

.pad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.neon-pad {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: clamp(32px, 3.3vw, 56px);
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,0.38);
  border-radius: 8px;
  color: white;
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(5,1,16,0.86));
  box-shadow: inset 0 0 12px rgba(255,255,255,0.07), 0 4px 12px rgba(0,0,0,0.4);
  font: 900 clamp(7px, 0.65vw, 12px)/1 Arial, sans-serif;
  letter-spacing: 0.04em;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.neon-pad:hover, .neon-pad:focus-visible { transform: translateY(-2px); outline: none; border-color: white; }
.neon-pad svg { width: clamp(14px, 1.3vw, 22px); height: clamp(14px, 1.3vw, 22px); fill: currentColor; flex: 0 0 auto; }
.pad-x:hover { box-shadow: 0 0 20px rgba(255,255,255,0.5); }
.pad-tg { color: #78e8ff; }
.pad-tg:hover { box-shadow: 0 0 20px rgba(38,232,255,0.7); }
.pad-pump { color: #bfff52; }
.pad-pump:hover { box-shadow: 0 0 20px rgba(182,255,67,0.7); }
.pad-dex { color: #ff83e5; }
.pad-dex:hover { box-shadow: 0 0 20px rgba(255,43,214,0.7); }

.pump-mark, .dex-mark {
  display: grid;
  place-items: center;
  min-width: clamp(17px, 1.45vw, 24px);
  height: clamp(17px, 1.45vw, 24px);
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.7em;
}

.mixer-panel {
  left: 50%;
  bottom: 3.2%;
  width: 48%;
  transform: translateX(-50%);
}

.equalizer {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  height: clamp(16px, 2vw, 34px);
  margin-bottom: 5px;
}

.equalizer i { width: clamp(3px, 0.35vw, 6px); height: 25%; background: var(--cyan); box-shadow: 0 0 8px currentColor; animation: eq 680ms ease-in-out infinite alternate; }
.equalizer i:nth-child(2n) { color: var(--pink); background: currentColor; animation-delay: -220ms; }
.equalizer i:nth-child(3n) { animation-delay: -410ms; }
.equalizer i:nth-child(4n) { color: var(--lime); background: currentColor; animation-delay: -90ms; }

.ca-display {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: clamp(44px, 4.3vw, 70px);
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: white;
  background: linear-gradient(180deg, rgba(17,5,35,0.94), rgba(4,2,14,0.94));
  box-shadow: inset 0 0 18px rgba(38,232,255,0.1), 0 0 20px rgba(38,232,255,0.16);
  cursor: pointer;
}

.ca-title, .copy-hint { color: var(--cyan); font: 800 clamp(6px, 0.58vw, 10px)/1 Arial, sans-serif; letter-spacing: 0.12em; }
.ca-value { overflow: hidden; color: white; font: 700 clamp(9px, 0.9vw, 15px)/1.1 Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.copy-hint { color: var(--pink); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 99;
  padding: 11px 16px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  color: white;
  background: rgba(5,0,14,0.94);
  box-shadow: 0 0 22px rgba(38,232,255,0.4);
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
  font: 900 12px/1 Arial, sans-serif;
  letter-spacing: 0.12em;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.dex-page { min-height: 100vh; overflow: auto; }
.dex-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(rgba(5,0,16,0.5), rgba(5,0,16,0.9)),
    url("assets/club-bg.jpg") center/cover no-repeat;
}

.dex-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(115,50,255,0.28), transparent 36%),
    radial-gradient(circle at center, transparent 28%, rgba(2,0,8,0.66) 100%);
  pointer-events: none;
}
.dex-background { position: fixed; inset: 0; z-index: -2; background: linear-gradient(rgba(5,0,16,0.38), rgba(5,0,16,0.86)), url("assets/club-bg.jpg") center/cover; }
.dex-background::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 20%, rgba(2,0,8,0.66) 100%); }
.dex-header { position: fixed; top: 24px; left: 30px; right: 30px; }
.compact-brand .brand-name { font-size: clamp(24px, 3vw, 52px); }
.compact-brand .brand-ticker { margin-top: 6px; }

.dex-main { min-height: 100vh; display: grid; place-items: center; padding: 120px 32px 34px; }
.chart-console { width: min(1240px, 94vw); padding: 18px; border: 1px solid rgba(113,232,255,0.6); border-radius: 16px; background: rgba(7,2,19,0.9); box-shadow: 0 0 0 5px rgba(15,5,30,0.65), 0 0 46px rgba(255,43,214,0.32); backdrop-filter: blur(14px); }
.console-topline, .console-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.console-topline { margin-bottom: 14px; }
.console-label { color: var(--pink); font: 800 10px/1 Arial, sans-serif; letter-spacing: 0.2em; }
.console-topline h1, .console-topline h2 { margin: 5px 0 0; font-size: clamp(20px, 2.6vw, 42px); line-height: 1; }
.chart-actions { display: flex; align-items: center; gap: 18px; }
.floor-link { padding: 10px 14px; border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; color: var(--cyan); font: 900 10px/1 Arial, sans-serif; letter-spacing: 0.08em; background: rgba(7,2,19,0.74); }
.floor-link:hover { border-color: var(--cyan); box-shadow: 0 0 16px rgba(38,232,255,0.35); }
.console-lights { display: flex; gap: 8px; }
.console-lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px currentColor; animation: blink 1s steps(2) infinite; }
.console-lights i:nth-child(2n) { color: var(--pink); background: currentColor; animation-delay: -0.4s; }

.chart-frame-wrap { position: relative; height: min(68vh, 680px); overflow: hidden; border: 1px solid rgba(255,255,255,0.2); border-radius: 10px; background: #070411; }
.chart-frame { position: relative; z-index: 2; width: 100%; height: 100%; border: 0; background: #070411; }
.chart-fallback { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; align-content: center; gap: 18px; color: rgba(255,255,255,0.62); font-size: 13px; letter-spacing: 0.12em; }
.chart-fallback a { padding: 11px 18px; border: 1px solid var(--cyan); border-radius: 5px; color: var(--cyan); }
.chart-fallback.is-hidden { display: none; }

.console-bottom { margin-top: 14px; }
.mini-ca { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; padding: 10px 14px; border: 1px solid rgba(38,232,255,0.42); border-radius: 8px; color: white; background: #0b0616; cursor: pointer; }
.mini-ca span, .mini-ca em { color: var(--cyan); font: 800 10px/1 Arial, sans-serif; letter-spacing: 0.12em; font-style: normal; }
.mini-ca b { overflow: hidden; flex: 1; font: 700 12px/1 Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.mini-ca em { color: var(--pink); }
.mini-links { display: flex; gap: 7px; }
.mini-links a { min-width: 48px; padding: 11px 12px; border: 1px solid rgba(255,255,255,0.28); border-radius: 7px; text-align: center; font: 900 10px/1 Arial, sans-serif; }
.mini-links a:hover { border-color: var(--pink); box-shadow: 0 0 15px rgba(255,43,214,0.35); }

@keyframes eq { to { height: 100%; } }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes laser-sweep { to { transform: rotate(10deg); opacity: 0.25; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media (max-aspect-ratio: 4/3) {
  .stage-shell { width: 100vw; height: 100svh; min-height: 700px; }
  .dance-video { object-fit: cover; object-position: center; }
  .club-header { top: 18px; left: 18px; right: 18px; }
  .brand-name { font-size: clamp(34px, 10vw, 56px); }
  .brand-kicker { display: none; }
  .page-tabs { position: fixed; top: 16px; right: 16px; }
  .tab { min-height: 34px; padding: 0 10px; }
  .sound-button { top: 88px; right: 16px; left: auto; transform: none; }
  .sound-button:hover { transform: scale(1.03); }
  .deck-panel { top: auto; bottom: 118px; width: 42%; }
  .deck-left { left: 5%; }
  .deck-right { right: 5%; }
  .mixer-panel { bottom: 22px; width: 90%; }
  .ca-display { grid-template-columns: 1fr auto; }
  .ca-title { display: none; }
  .copy-hint { font-size: 8px; }
  .deck-label { font-size: 7px; }
  .neon-pad { min-height: 48px; font-size: 8px; }
  .dex-header { top: 16px; left: 18px; right: 18px; }
  .dex-main { padding: 105px 14px 20px; }
  .chart-console { width: 100%; padding: 11px; }
  .chart-frame-wrap { height: 62vh; }
  .console-bottom { align-items: stretch; flex-direction: column; }
  .mini-links a { flex: 1; }
  .mini-links { width: 100%; }
  .chart-actions { align-items: flex-end; flex-direction: column; gap: 8px; }
  .console-lights { display: none; }
}
