/* ============================================
   DPITCH TOOL — LIGHT MODE (EPIC RADIO)
   ============================================ */

:root {
  --base: #0E2845;
  --base-light: #1D4570;
  --base-lighter: #2a5a8a;
  --base-dark: #0C1F36;
  --base-darker: #091a2e;
  --base-shadow: #071526;
  --base-deep: #050f1c;
  --white-05: rgba(255,255,255,0.05);
  --white-08: rgba(255,255,255,0.08);
  --white-10: rgba(255,255,255,0.10);
  --white-15: rgba(255,255,255,0.15);
  --white-20: rgba(255,255,255,0.20);
  --white-30: rgba(255,255,255,0.30);
  --white-50: rgba(255,255,255,0.50);
  --white-70: rgba(255,255,255,0.70);
  --white-90: rgba(255,255,255,0.90);
  --black-05: rgba(0,0,0,0.05);
  --black-10: rgba(0,0,0,0.10);
  --black-15: rgba(0,0,0,0.15);
  --black-20: rgba(0,0,0,0.20);
  --accent: #C8A44E;
  --accent-glow: rgba(200, 164, 78, 0.25);
  --teal: #2D8B78;
  --red: #E53E3E;
  --font-display: 'Futura', 'Trebuchet MS', Arial, sans-serif;
  --font-body: 'DM Sans', 'Trebuchet MS', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font: var(--font-body);
}

@font-face {
  font-family: 'Futura';
  font-weight: 700;
  font-display: swap;
  src: local('Futura Bold'), local('Futura-Bold'), local('FuturaBT-Bold'), local('Futura Std Bold');
}
@font-face {
  font-family: 'Futura';
  font-weight: 500;
  font-display: swap;
  src: local('Futura Medium'), local('Futura-Medium'), local('FuturaBT-Medium'), local('Futura Std Medium');
}
@font-face {
  font-family: 'Futura';
  font-weight: 400;
  font-display: swap;
  src: local('Futura Book'), local('Futura-Book'), local('FuturaBT-Book'), local('Futura Light'), local('Futura-Light');
}
@font-face {
  font-family: 'Futura';
  font-weight: 800;
  font-display: swap;
  src: local('Futura ExtraBold'), local('Futura-ExtraBold'), local('FuturaBT-ExtraBold'), local('Futura Heavy'), local('Futura-Heavy');
}

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

body {
  background: var(--base);
  color: var(--white-90);
  font-family: var(--font);
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.player-active {
  display: flex;
  flex-direction: column;
}

/* ============================================
   NAV
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(14, 40, 69, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}


.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-socials a {
  color: var(--white-30);
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.nav-socials a:hover {
  color: var(--accent);
}

.nav-logo-d {
  color: var(--accent);
}

.nav-logo-pitch {
  color: var(--white-90);
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--white-30);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 8px;
  transition: all 0.2s;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--white-70);
  background: rgba(255,255,255,0.05);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(200, 164, 78, 0.1);
}

/* Burger */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-direction: column;
  gap: 4px;
}

.nav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white-70);
  border-radius: 1px;
  transition: all 0.3s;
}

.nav-burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}
.nav-burger.open span:nth-child(2) {
  opacity: 0;
}
.nav-burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 49;
  background: rgba(14, 40, 69, 0.95);
  backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  padding: 16px 0 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-menu.open {
  display: flex;
}

.mobile-link {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--white-50);
  text-decoration: none;
  padding: 12px 32px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color 0.2s;
  width: 100%;
  text-align: center;
}

.mobile-link:hover,
.mobile-link.active {
  color: var(--accent);
}

/* ============================================
   GEOMETRIC CANVAS
   ============================================ */

.geo-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.geo-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================
   STEP 1 — PASTE YOUR LINK
   ============================================ */

.step-1 {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 60px;
  position: relative;
  z-index: 1;
  transition: all 0.5s ease;
}

.step-1.collapsed {
  height: auto;
  padding: 0;
  justify-content: flex-start;
  display: none;
}

.hero-top {
  margin-bottom: 12px;
}

.hero-presents {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 6px;
  color: var(--white-70);
  text-transform: uppercase;
}

/* 3D Title */
.title-block {
  text-align: center;
  margin-bottom: 24px;
}

.title-3d {
  font-family: var(--font-display);
  font-size: clamp(100px, 20vw, 240px);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -2px;
  color: var(--accent);
  display: inline-block;
  transition: font-size 0.6s ease;
  position: relative;
}

.title-line-1 {
  display: block;
  text-shadow:
    0 1px 0 #a8873e,
    0 2px 0 #a8873e,
    0 3px 0 #8f7234,
    0 4px 0 #8f7234,
    0 5px 0 #7a612c,
    0 6px 0 #7a612c,
    0 7px 0 #665024,
    0 8px 0 #665024,
    0 9px 0 #55421e,
    0 10px 0 #55421e,
    0 12px 20px rgba(0,0,0,0.3);
  -webkit-text-stroke: 0.5px #d4b45e;
}

/* Highlight top of letters */
.title-3d::before {
  display: none;
}

.title-sub {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 70px);
  font-weight: 500;
  letter-spacing: 12px;
  color: var(--white-20);
  text-shadow:
    0 1px 0 #1a3a5c,
    0 2px 0 #1a3a5c,
    0 3px 0 #163256,
    0 4px 0 #163256,
    0 5px 0 #122a4a,
    0 6px 0 #122a4a,
    0 7px 0 #0e2240,
    0 8px 15px rgba(0,0,0,0.3);
  -webkit-text-stroke: 0.5px #2a5a8a;
  margin-top: -8px;
  transition: font-size 0.6s ease;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--white-40, rgba(255,255,255,0.4));
  letter-spacing: 1px;
  margin-bottom: 40px;
  text-align: center;
}

/* Input */
.user-input {
  max-width: 560px;
  width: 100%;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: var(--black-10);
  border: 1px solid var(--black-05);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
}

.input-wrap:focus-within {
  border-color: var(--white-20);
  background: var(--black-15);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.05);
}

.url-input {
  flex: 1;
  background: none;
  border: none;
  padding: 16px 20px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--white-90);
  outline: none;
}

.url-input::placeholder {
  color: var(--white-30);
}

.url-btn {
  background: none;
  border: none;
  padding: 16px 20px;
  color: var(--white-30);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.url-btn:hover { color: var(--accent); }

.search-results {
  display: none;
  margin-top: 10px;
  background: rgba(7,21,38,0.94);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  max-height: 246px;
  overflow-y: auto;
  box-shadow: 0 18px 50px rgba(0,0,0,0.3);
}

.search-results.visible {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-result + .search-result {
  border-top: 1px solid rgba(255,255,255,0.05);
}

.search-result:hover {
  background: rgba(255,255,255,0.04);
}

.search-result-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--base-light), var(--accent));
  background-size: cover;
  background-position: center;
}

.search-result-meta {
  min-width: 0;
}

.search-result-title {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.3;
  color: var(--white-90);
  margin-bottom: 4px;
}

.search-result-artist {
  font-size: 11px;
  color: var(--white-30);
  line-height: 1.5;
}

.search-result-duration {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-20);
  white-space: nowrap;
}

.input-status {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--white-30);
  margin-top: 8px;
  min-height: 16px;
}

.input-status.ready { color: var(--accent); }
.input-status.error { color: var(--red); }

/* Loading bar */
.loading-section {
  max-width: 560px;
  width: 100%;
  margin-top: 20px;
  display: none;
}

.loading-section.visible {
  display: block;
}

.loading-bar {
  height: 3px;
  background: var(--black-10);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.loading-info {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--white-50);
  margin-top: 12px;
}

/* ============================================
   STEP 2 — PLAYER
   ============================================ */

.step-2 {
  display: none;
  position: relative;
  z-index: 1;
}

.step-2.visible {
  display: flex;
  height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 92px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.player-panel {
  max-width: 1180px;
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)), rgba(7,21,38,0.72);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 0;
  backdrop-filter: blur(20px);
  box-shadow:
    0 24px 70px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
}

/* Panel header — logo + live BPM */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
}

.panel-logo {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  display: flex;
  align-items: baseline;
}

.panel-logo-d {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.panel-logo-pitch {
  font-size: 22px;
  font-weight: 700;
  color: var(--white-90);
}

.panel-logo-dot {
  font-size: 16px;
  font-weight: 400;
  color: var(--white-20);
}

.panel-logo-rest {
  font-size: 15px;
  font-weight: 500;
  color: var(--white-70);
  letter-spacing: 1px;
}

.panel-bpm-live {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.panel-bpm-original {
  font-size: 16px;
  color: var(--white-30);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  display: none;
}

.panel-bpm-original.visible {
  display: inline;
}

.panel-bpm-arrow {
  font-size: 13px;
  color: var(--white-20);
  display: none;
}

.panel-bpm-arrow.visible {
  display: inline;
}

.panel-bpm-current {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent-glow);
}

.panel-bpm-unit {
  font-size: 9px;
  color: var(--white-30);
  letter-spacing: 1px;
  font-weight: 600;
}

/* Inner content */
.player-panel-inner {
  padding: 18px 26px 26px;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 180px minmax(280px, 0.95fr);
  gap: 20px;
  align-items: stretch;
}

.tool-column {
  min-width: 0;
}

.tool-column-player {
  display: flex;
  flex-direction: column;
}

.tool-column-pitch {
  display: flex;
  justify-content: center;
}

.tool-column-search {
  display: flex;
}

/* Track info */
.player-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
  min-height: 108px;
}

.player-cover-wrap {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--base-dark);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

.player-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-meta {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--white-90);
  line-height: 1.08;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.player-artist {
  font-size: 15px;
  font-weight: 400;
  color: var(--white-40);
  margin-bottom: 14px;
}

.player-bpm-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.player-bpm-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 0 20px var(--accent-glow);
}

.player-bpm-unit {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--white-30);
}

/* Progress bar */
.player-progress {
  margin-bottom: 24px;
}

.player-waveform {
  position: relative;
  width: 100%;
  height: 72px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(5,15,28,0.9), rgba(5,15,28,0.72));
  border: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
  cursor: pointer;
}

.player-waveform-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.player-times {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--white-30);
  font-variant-numeric: tabular-nums;
}

/* Controls */
.player-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.ctrl-btn {
  background: var(--black-10);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 50%;
}

.ctrl-btn svg { fill: var(--white-70); }
.ctrl-btn:hover { background: var(--black-20); }
.ctrl-btn:active { transform: scale(0.95); }

.ctrl-play {
  width: 72px;
  height: 72px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 12px 26px rgba(0,0,0,0.18);
}

.ctrl-play svg { fill: var(--white-90); }

.ctrl-play.active {
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.28), rgba(255,255,255,0.12));
}

/* ============================================
   PITCH FADER
   ============================================ */

.pitch-fader {
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.04);
}

.pitch-fader-vertical {
  width: 100%;
  height: 100%;
  min-height: 460px;
  margin: 0;
  padding: 18px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.pitch-fader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pitch-fader-header-vertical {
  width: 100%;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
}

.pitch-fader-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--white-30);
}

.pitch-range-btns {
  display: flex;
  gap: 4px;
}

.pitch-range-btns-vertical {
  justify-content: center;
}

.pitch-range-btn {
  background: var(--black-10);
  border: 1px solid var(--black-05);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  color: var(--white-30);
  cursor: pointer;
  transition: all 0.15s;
}

.pitch-range-btn:hover {
  color: var(--white-50);
}

.pitch-range-btn.active {
  color: var(--accent);
  border-color: var(--accent-glow);
  background: rgba(226, 255, 94, 0.1);
}

.pitch-fader-track {
  height: 40px;
  background: rgba(5,15,28,0.78);
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 6px;
}

.pitch-fader-track-wrap {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 20px 1fr 20px;
  gap: 10px;
  align-items: stretch;
}

.pitch-fader-track-vertical {
  width: 56px;
  height: 100%;
  min-height: 320px;
  margin: 0 auto;
  border-radius: 28px;
}

.pitch-fader-track:hover {
  background: var(--black-15);
}

.pitch-fader-side-label {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 18px;
  font-weight: 300;
  color: var(--white-20);
  padding-top: 8px;
}

.pitch-fader-side-label-minus {
  align-items: flex-end;
  padding-top: 0;
  padding-bottom: 8px;
}

.pitch-fader-ticks {
  position: absolute;
  left: 36px;
  right: 36px;
  top: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}

.pitch-fader-ticks-vertical {
  top: 26px;
  bottom: 26px;
  left: 50%;
  right: auto;
  width: 100%;
  transform: translateX(-50%);
  flex-direction: column;
}

.tick {
  width: 1px;
  height: 8px;
  background: var(--white-10);
  border-radius: 1px;
}

.tick-zero {
  width: 2px;
  height: 14px;
  background: var(--white-30);
}

.pitch-fader-ticks-vertical .tick {
  width: 8px;
  height: 1px;
}

.pitch-fader-ticks-vertical .tick-zero {
  width: 14px;
  height: 2px;
}

.pitch-fader-fill {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 0%;
  background: var(--accent);
  opacity: 0.2;
  border-radius: 12px;
  z-index: 1;
}

.pitch-fader-fill-vertical {
  left: 6px;
  right: 6px;
  top: 50%;
  bottom: auto;
  width: auto;
  height: 0%;
  border-radius: 14px;
}

.pitch-fader-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(255,255,255,0.75));
  box-shadow:
    0 1px 4px rgba(0,0,0,0.2),
    0 0 0 1px rgba(255,255,255,0.3),
    inset 0 1px 0 rgba(255,255,255,0.9);
  z-index: 4;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pitch-fader-thumb-vertical {
  left: 50%;
  top: 50%;
}

.pitch-fader-thumb:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.25),
    0 0 16px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.pitch-fader-thumb-grip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--black-15);
}

.pitch-fader-display {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
}

.pitch-fader-display-vertical {
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 0;
}

.pitch-fader-pct {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--white-50);
}

.pitch-fader-pct.active {
  color: var(--accent);
}

.pitch-fader-bpm {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--white-30);
}

/* Bottom buttons */
.player-bottom-btns {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-share {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 18px;
  background: linear-gradient(180deg, rgba(200, 164, 78, 0.16), rgba(200, 164, 78, 0.09));
  border: 1px solid rgba(200, 164, 78, 0.24);
  border-radius: 16px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-share:hover {
  background: linear-gradient(180deg, rgba(200, 164, 78, 0.22), rgba(200, 164, 78, 0.12));
  border-color: rgba(200, 164, 78, 0.36);
}

.btn-share.copied {
  background: rgba(45, 139, 120, 0.15);
  border-color: rgba(45, 139, 120, 0.3);
  color: var(--teal);
}

/* New track button */
.btn-new-track {
  display: block;
  width: 100%;
  padding: 12px;
  background: none;
  border: 1px solid var(--white-15);
  border-radius: 10px;
  color: var(--white-50);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-new-track:hover {
  border-color: var(--white-30);
  color: var(--white-70);
}

.tool-search-card {
  width: 100%;
  min-height: 100%;
  padding: 20px;
  border-radius: 22px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
}

.tool-search-kicker {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--white-30);
  margin-bottom: 14px;
}

.tool-search-title {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: var(--white-90);
  margin-bottom: 10px;
}

.tool-search-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--white-50);
  margin-bottom: 18px;
}

.tool-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(5,15,28,0.78);
  border: 1px solid rgba(255,255,255,0.06);
}

.tool-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white-90);
  font-family: var(--font);
  font-size: 15px;
}

.tool-search-input::placeholder {
  color: var(--white-30);
}

.tool-search-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(200, 164, 78, 0.18), rgba(200, 164, 78, 0.1));
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tool-search-status {
  min-height: 20px;
  margin: 12px 0 10px;
  font-size: 13px;
  color: var(--white-40);
}

.tool-search-status.visible.ready {
  color: var(--teal);
}

.tool-search-status.visible.error {
  color: #ff6464;
}

.search-results-side {
  position: static;
  width: 100%;
  margin-top: 0;
  max-height: 246px;
  flex: 1;
  overflow-y: auto;
}

.btn-new-track-secondary {
  margin-top: 14px;
}

/* ============================================
   SPA PAGES
   ============================================ */

.page {
  display: none;
  position: relative;
  z-index: 1;
}

.page.active {
  display: block;
}

.page-tool {
  height: 100vh;
}

.page-scroll {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 32px 40px;
}

/* Page header */
.page-header {
  margin-bottom: 48px;
}

.page-logo {
  font-family: var(--font-display);
  display: flex;
  align-items: baseline;
  margin-bottom: 12px;
}

.page-logo-d { font-size: 36px; font-weight: 700; color: var(--accent); }
.page-logo-pitch { font-size: 36px; font-weight: 700; color: var(--white-90); }
.page-logo-dot { font-size: 28px; font-weight: 400; color: var(--white-20); margin: 0 1px; }
.page-logo-section { font-size: 28px; font-weight: 500; color: var(--white-70); letter-spacing: 1px; }

.page-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  color: var(--white-30);
}

.section { margin-bottom: 48px; }

.section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--white-20);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* RADIO */
.featured-show {
  display: flex;
  gap: 32px;
  align-items: center;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 28px;
}

.featured-cover {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--base-light), var(--accent));
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.featured-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

.featured-ep {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: rgba(0,0,0,0.3);
  letter-spacing: 3px;
}

.featured-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.featured-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--white-90);
  margin-bottom: 10px;
  line-height: 1.2;
}

.featured-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
  margin-bottom: 16px;
}

.featured-meta {
  display: flex; gap: 16px; margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-20);
}

.btn-listen {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--base-dark);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-listen:disabled { opacity: 0.4; cursor: default; }

.episode-empty {
  text-align: center;
  padding: 48px 24px;
  background: rgba(0,0,0,0.08);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 16px;
  color: var(--white-20);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
}

/* NEWS */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.article-card {
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}

.article-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.article-cover { height: 140px; width: 100%; }

.article-body { padding: 20px; }

.article-tag {
  font-family: var(--font-display);
  font-size: 9px; font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.article-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: var(--white-90);
  line-height: 1.3;
  margin-bottom: 10px;
}

.article-excerpt {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 300;
  color: var(--white-30);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-15);
}

.article-back {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--white-30);
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 16px;
  transition: color 0.2s;
  display: inline-block;
}

.article-back:hover {
  color: var(--accent);
}

.article-full {
  max-width: 760px;
  margin: 0 auto 120px;
}

.article-tag-full {
  margin-bottom: 14px;
}

.article-title-full {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--white-90);
  margin-bottom: 14px;
}

.article-subtitle-full {
  max-width: 62ch;
  font-size: 18px;
  line-height: 1.7;
  color: var(--white-40);
  margin-bottom: 22px;
}

.article-meta-full {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-20);
  margin-bottom: 28px;
}

.article-cover-full {
  width: 100%;
  height: 280px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 28px;
  background-size: cover;
  background-position: center;
}

.article-content {
  color: var(--white-55);
  font-size: 17px;
  line-height: 1.95;
}

.article-content p {
  margin-bottom: 1.2em;
}

.article-content strong {
  color: var(--white-90);
  font-weight: 700;
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  color: var(--white-90);
  margin: 1.8em 0 0.7em;
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  color: var(--white-80);
  margin: 1.5em 0 0.55em;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.4em 1.3em;
}

.article-content li {
  margin-bottom: 0.75em;
}

.article-content blockquote {
  margin: 1.6em 0;
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  background: rgba(255,255,255,0.03);
  color: var(--white-80);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  text-align: center;
  padding: 10px 32px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.footer-tagline {
  font-size: 13px;
  color: var(--white-70);
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  font-size: 11px;
  color: var(--white-40, rgba(255,255,255,0.4));
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white-70);
}

.footer-dot {
  color: var(--white-20);
  font-size: 10px;
}

body.player-active .footer {
  left: 50%;
  right: auto;
  bottom: 18px;
  transform: translateX(-50%);
  width: auto;
  min-width: 320px;
  max-width: calc(100vw - 32px);
  padding: 10px 16px 12px;
  border-radius: 18px;
  background: rgba(5, 15, 28, 0.84);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}

body.player-active .footer-tagline {
  display: none;
}

body.player-active .footer-links {
  gap: 6px;
}

body.player-active .footer-links a {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.player-active .footer-dot {
  font-size: 8px;
}

/* Legal modal */
.legal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.legal-overlay.open {
  display: flex;
}

.legal-modal {
  background: #fff;
  border-radius: 16px;
  width: 560px;
  max-width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  color: #222;
}

.legal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
}

.legal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.legal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.legal-body {
  padding: 24px;
  font-size: 13px;
  line-height: 1.7;
  color: #444;
}

.legal-body h3 {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-body h3:first-child {
  margin-top: 0;
}

.legal-body p {
  margin-bottom: 12px;
}

.legal-body ul {
  margin-bottom: 12px;
  padding-left: 20px;
}

.legal-body li {
  margin-bottom: 6px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .step-2.visible { padding: 20px 16px; }
  .player-panel { max-width: 100%; }
  .tool-grid { grid-template-columns: 1fr; gap: 18px; }
  .tool-column-pitch { order: 2; }
  .tool-column-search { order: 3; }
  .pitch-fader-vertical { min-height: 220px; }
  .pitch-fader-track-wrap { grid-template-columns: 1fr; justify-items: center; }
  .pitch-fader-side-label { display: none; }
  .pitch-fader-track-vertical { width: 100%; max-width: 72px; min-height: 220px; }
  .featured-show { flex-direction: column; gap: 20px; padding: 20px; }
  .featured-cover { width: 100%; height: 180px; }
  .featured-title { font-size: 22px; }
}

@media (max-width: 640px) {
  .step-1 { padding: 40px 16px; }
  .step-2.visible { padding: 16px 12px 90px; gap: 12px; }
  .player-panel { border-radius: 16px; }
  .player-panel-inner { padding: 16px; }
  .tool-grid { gap: 14px; }
  .player-cover-wrap { width: 64px; height: 64px; border-radius: 10px; }
  .player-title { font-size: 16px; }
  .player-artist { font-size: 12px; margin-bottom: 6px; }
  .player-bpm-num { font-size: 22px; }
  .title-3d { letter-spacing: -2px; }
  .panel-logo { font-size: 16px; }
  .panel-bpm-current { font-size: 18px; }
  .nav { padding: 12px 16px; }
  .nav-logo { font-size: 17px; }
  .nav-center { display: none; }
  .nav-socials { display: none; }
  .nav-burger { display: flex; }
  .articles-grid { grid-template-columns: 1fr; }
  .page-scroll { padding: 70px 16px 40px; }
  .page-logo-d, .page-logo-pitch { font-size: 28px; }
  .page-logo-dot { font-size: 22px; }
  .page-logo-section { font-size: 22px; }
  .ctrl-play { width: 48px; height: 48px; }
  .pitch-fader-vertical { min-height: 200px; padding: 14px 12px; }
  .pitch-fader-track-vertical { min-height: 170px; }
  .pitch-fader-thumb { width: 24px; height: 24px; }
  .pitch-fader-pct { font-size: 15px; }
  .tool-search-card { padding: 16px; }
  .tool-search-title { font-size: 22px; }
  .footer { padding: 8px 16px; }
  .footer-tagline { font-size: 11px; }
  body.player-active .footer {
    min-width: 0;
    width: calc(100vw - 24px);
    bottom: 12px;
    padding: 8px 12px 10px;
    border-radius: 16px;
  }
}

@media (max-height: 700px) {
  .step-2.visible { padding: 12px 20px 82px; gap: 16px; }
  .player-top { margin-bottom: 10px; gap: 12px; }
  .player-cover-wrap { width: 64px; height: 64px; }
  .player-progress { margin-bottom: 8px; }
  .player-controls { margin-bottom: 12px; }
  .ctrl-play { width: 44px; height: 44px; }
  .pitch-fader-vertical { min-height: 320px; }
  .pitch-fader-track-vertical { min-height: 220px; }
  .btn-new-track { padding: 8px; font-size: 12px; }
  .footer { padding: 6px 16px; }
  .panel-header { padding: 12px 18px 10px; }
  .panel-logo { font-size: 18px; }
}
