/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #080810;
  --bg2:         #0f0f1a;
  --bg3:         #13131f;
  --card:        #111120;
  --border:      rgba(255,255,255,0.06);
  --border2:     rgba(255,255,255,0.1);
  --accent:      #7c3aed;
  --accent2:     #a855f7;
  --accent3:     #c084fc;
  --pink:        #ec4899;
  --cyan:        #06b6d4;
  --green:       #10b981;
  --amber:       #f59e0b;
  --text:        #ffffff;
  --text2:       #a1a1c7;
  --text3:       #4a4a6a;
  --r:           14px;
  --r-sm:        10px;
  --r-xs:        8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  border-bottom: 1px solid var(--border);
  background: rgba(8,8,16,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.02em;
}
.logo-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2px;
}
.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--text); background: rgba(124,58,237,0.15); font-weight: 600; }

/* hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: 1px solid var(--border2);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger span { display: block; height: 2px; background: var(--text2); border-radius: 2px; transition: .2s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: rgba(8,8,16,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 16px;
  z-index: 199;
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.nav-mobile a { display: block; padding: 11px 14px; color: var(--text2); text-decoration: none; font-size: 0.95rem; font-weight: 500; border-radius: 8px; transition: .15s; }
.nav-mobile a:hover, .nav-mobile a.active { color: var(--text); background: rgba(124,58,237,0.12); }

/* ─── HERO ─── */
.hero {
  position: relative;
  z-index: 1;
  padding: 140px 32px 100px;
  text-align: center;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
}

/* glow blobs */
.hero::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.2) 0%, rgba(236,72,153,0.08) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-bg-orbs, .orb { display: none; } /* removed in new design */

.hero-content { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  color: var(--accent3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
}
.badge-dot { width: 6px; height: 6px; background: var(--accent2); border-radius: 50%; box-shadow: 0 0 6px var(--accent2); }

h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -.04em;
  margin-bottom: 28px;
  color: #fff;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent3), var(--pink), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text2);
  margin-bottom: 48px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ─── HERO UPLOAD BOX ─── */
.hero-upload-box {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 40px;
  max-width: 640px;
  margin: 0 auto 60px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 1px rgba(124,58,237,0.1), 0 40px 80px rgba(0,0,0,0.5);
}
.hero-upload-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-upload-inner {
  border: 2px dashed rgba(124,58,237,0.25);
  border-radius: 12px;
  padding: 40px 24px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-bottom: 20px;
}
.hero-upload-inner:hover { border-color: var(--accent); background: rgba(124,58,237,0.04); }
.upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.upload-sub { color: var(--text2); font-size: 0.875rem; margin-bottom: 10px; }
.upload-formats {
  font-size: 0.72rem;
  color: var(--text3);
  background: rgba(255,255,255,0.04);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
}
.hero-upload-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-upload-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: .2s;
}
.hero-upload-link.primary {
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.hero-upload-link.primary:hover { opacity: 0.88; transform: translateY(-1px); }
.hero-upload-link.secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text2);
  border: 1px solid var(--border2);
}
.hero-upload-link.secondary:hover { color: var(--text); background: rgba(255,255,255,0.08); }

/* ─── TRUST ROW ─── */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text2);
  font-weight: 500;
}
.trust-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
}
.trust-icon.purple { background: rgba(124,58,237,0.2); color: var(--accent2); }
.trust-icon.pink   { background: rgba(236,72,153,0.2); color: var(--pink); }
.trust-icon.cyan   { background: rgba(6,182,212,0.2);  color: var(--cyan); }
.trust-icon.green  { background: rgba(16,185,129,0.2); color: var(--green); }

/* ─── SECTIONS ─── */
.features, .how, .tool-section { padding: 100px 32px; position: relative; z-index: 1; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.tool-page .section-inner { max-width: 1000px; }

.section-eyebrow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 14px;
}
.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -.035em;
  margin-bottom: 14px;
  line-height: 1.05;
}
.section-sub {
  text-align: center;
  color: var(--text2);
  font-size: 1rem;
  margin-bottom: 64px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ─── DIVIDER ─── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
  margin: 0 32px;
  position: relative;
  z-index: 1;
}

/* ─── FEATURE GRID ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.feature-card {
  background: var(--card);
  padding: 32px 28px;
  transition: background .2s;
}
.feature-card:hover { background: var(--bg2); }
.feat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 18px;
  background: var(--bg3);
  border: 1px solid var(--border2);
}
.feature-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.feature-card p { color: var(--text2); font-size: 0.85rem; line-height: 1.65; }

/* ─── STEPS ─── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  position: relative;
  transition: border-color .2s, transform .2s;
}
.step:hover { border-color: rgba(124,58,237,0.3); transform: translateY(-3px); }
.step-num {
  display: inline-flex;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 10px;
  background: rgba(124,58,237,0.15);
  color: var(--accent2);
  margin-bottom: 16px;
  border: 1px solid rgba(124,58,237,0.2);
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -.01em; }
.step p { color: var(--text2); font-size: 0.85rem; line-height: 1.65; }
.step-arrow { display: none; }

/* ─── TOOL CARDS ─── */
.tool-cards-section { padding: 0 32px 100px; position: relative; z-index: 1; }
.tool-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tool-card-link { text-decoration: none; color: inherit; display: block; }
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s, transform .2s;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--pink));
  opacity: 0;
  transition: opacity .2s;
}
.tool-card:hover { border-color: rgba(124,58,237,0.3); transform: translateY(-3px); }
.tool-card:hover::before { opacity: 1; }
.tool-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 4px;
}
.tool-card h3 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.tool-card p { color: var(--text2); font-size: 0.85rem; flex: 1; line-height: 1.65; }
.tool-card-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px; font-size: 0.82rem; font-weight: 700;
  color: var(--accent2);
  transition: gap .2s;
}
.tool-card:hover .tool-card-btn { gap: 10px; }

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  color: #fff; border: none;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 0.9rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: opacity .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
  letter-spacing: -.01em;
  font-family: inherit;
}
.btn-primary:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(124,58,237,0.5); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--text2); border: 1px solid var(--border2);
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; transition: .2s; text-decoration: none;
  font-family: inherit;
}
.btn-secondary:hover { color: var(--text); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }

/* ─── UPLOAD / PROGRESS / RESULTS CARDS ─── */
.upload-card, .progress-card, .results-card, .error-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.drop-zone {
  border: 2px dashed rgba(124,58,237,0.2);
  border-radius: 12px;
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-bottom: 24px;
  background: rgba(124,58,237,0.02);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(124,58,237,0.05);
}
.drop-icon { font-size: 2.5rem; margin-bottom: 14px; }
.drop-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.drop-sub { color: var(--text2); font-size: 0.875rem; margin-bottom: 12px; }
.drop-formats {
  font-size: 0.72rem; color: var(--text3);
  background: rgba(255,255,255,0.04);
  display: inline-block; padding: 4px 12px;
  border-radius: 100px; border: 1px solid var(--border);
}

.file-selected {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 24px;
}
.file-info { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; min-width: 0; }
.file-name-icon { font-size: 1.1rem; flex-shrink: 0; }
.file-name-text { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { color: var(--text3); font-size: 0.76rem; margin-left: 4px; flex-shrink: 0; }
.btn-clear {
  background: none; border: none; color: var(--text3);
  cursor: pointer; font-size: 1rem; padding: 4px 8px;
  border-radius: 6px; transition: .15s; flex-shrink: 0;
}
.btn-clear:hover { color: var(--text); background: rgba(255,255,255,0.07); }

.options-row { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.option-group { flex: 1; min-width: 200px; }
.option-label {
  display: block; font-size: 0.72rem; font-weight: 700;
  color: var(--text3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px;
}
.select-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 11px 40px 11px 14px;
  border-radius: 10px; font-size: 0.875rem; font-family: inherit;
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5a7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color .15s, box-shadow .15s;
}
.select-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.select-input optgroup { background: var(--bg2); }
.select-input option { background: var(--bg2); }

.btn-process { width: 100%; justify-content: center; padding: 14px; border-radius: 10px; font-size: 0.95rem; }

/* ─── PROGRESS ─── */
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.progress-song { font-weight: 700; font-size: 0.95rem; }
.progress-status { font-size: 0.82rem; color: var(--accent2); font-weight: 600; }
.progress-bar-track {
  height: 5px; background: var(--bg3); border-radius: 100px;
  overflow: hidden; margin-bottom: 14px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--pink));
  background-size: 200% 100%;
  border-radius: 100px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  animation: shimmer 2s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: 0% center; }
}
.progress-hint { font-size: 0.82rem; color: var(--text3); }

/* ─── RESULTS ─── */
.results-header { margin-bottom: 24px; }
.results-header h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 4px; letter-spacing: -.02em; }
.result-song-name { font-size: 0.82rem; color: var(--text2); }

.stems-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 24px; }

.stem-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px;
  border-left: 3px solid transparent;
  transition: border-color .2s;
}
.stem-card:hover { border-color: rgba(255,255,255,0.1); }
.stem-card.vocals { border-left-color: var(--accent2); }
.stem-card.drums  { border-left-color: var(--pink); }
.stem-card.bass   { border-left-color: var(--cyan); }
.stem-card.guitar { border-left-color: var(--amber); }
.stem-card.piano  { border-left-color: #f472b6; }
.stem-card.other  { border-left-color: var(--green); }

.stem-card-header { display: flex; align-items: center; gap: 10px; }
.stem-emoji { font-size: 1.2rem; }
.stem-name { font-weight: 700; font-size: 0.9rem; text-transform: capitalize; letter-spacing: -.01em; }
.stem-badge {
  margin-left: auto; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 100px;
}
.stem-badge.vocals  { background: rgba(168,85,247,0.12); color: var(--accent2); }
.stem-badge.drums   { background: rgba(236,72,153,0.12); color: var(--pink); }
.stem-badge.bass    { background: rgba(6,182,212,0.12);  color: var(--cyan); }
.stem-badge.guitar  { background: rgba(245,158,11,0.12); color: var(--amber); }
.stem-badge.piano   { background: rgba(244,114,182,0.12); color: #f472b6; }
.stem-badge.other   { background: rgba(16,185,129,0.12); color: var(--green); }
.stem-badge.default { background: rgba(255,255,255,0.07); color: var(--text2); }

/* ─── PLAYER ─── */
.player-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,0.3); border-radius: 8px;
  padding: 10px 12px; min-width: 0;
  border: 1px solid var(--border);
  height: 58px; /* fixed height — never jumps */
  box-sizing: border-box;
}
.play-btn {
  width: 34px; height: 34px; min-width: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  border: none; color: #fff; font-size: 0.78rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 10px rgba(124,58,237,0.4);
}
.play-btn:hover { transform: scale(1.1); box-shadow: 0 4px 18px rgba(124,58,237,0.55); }
.waveform-wrap {
  flex: 1;
  min-width: 0;
  position: relative;   /* children are absolutely contained */
  height: 36px;
  overflow: hidden;
  cursor: pointer;
}
.waveform-el {
  /* Absolutely fill the wrap — WaveSurfer can never push it wider */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 36px;
  overflow: hidden;
}
.waveform-el wave {
  overflow: hidden !important;
  max-width: 100% !important;
}
.waveform-el canvas {
  display: block;
  max-width: 100%;
}
.time-display {
  font-size: 0.68rem; color: var(--text3); font-variant-numeric: tabular-nums;
  white-space: nowrap; width: 90px; min-width: 90px; text-align: right; flex-shrink: 0; font-weight: 500;
}

.btn-download {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  color: #fff; border: none;
  padding: 10px 18px; border-radius: 8px;
  font-size: 0.84rem; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: opacity .2s, transform .2s;
  box-shadow: 0 2px 12px rgba(124,58,237,0.3);
}
.btn-download:hover { opacity: 0.86; transform: translateY(-1px); }

/* ─── ORIGINAL / CHORD / DIVIDER ─── */
.original-section {
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.orig-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.orig-title { font-weight: 700; font-size: 0.9rem; }
.analysis-badges { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--text2); flex-wrap: wrap; }
.analysis-badges strong { color: var(--accent3); font-weight: 700; }
.badge-sep { color: var(--text3); }

.chord-timeline-wrap { display: flex; flex-direction: column; gap: 6px; }
.chord-timeline-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text3); }
.chord-timeline { display: flex; border-radius: 8px; overflow: hidden; height: 40px; scrollbar-width: none; }
.chord-timeline::-webkit-scrollbar { display: none; }
.chord-block {
  flex-shrink: 0; min-width: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,58,237,0.08);
  border-right: 1px solid rgba(255,255,255,0.03);
  cursor: default; transition: background .15s;
}
.chord-block:last-child { border-right: none; }
.chord-block.active { background: rgba(124,58,237,0.38); }
.chord-block.active .chord-name { color: #fff; }
.chord-name { font-size: 0.74rem; font-weight: 700; color: var(--accent3); white-space: nowrap; padding: 0 7px; pointer-events: none; }

.stems-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text3); font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; margin: 4px 0;
}
.stems-divider::before, .stems-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ─── INSTRUMENTS INFO ─── */
.instruments-info {
  background: rgba(124,58,237,0.07); border: 1px solid rgba(124,58,237,0.15);
  border-radius: 10px; padding: 16px 20px; margin-bottom: 24px;
  font-size: 0.875rem; color: var(--text2); line-height: 1.6;
}
.instruments-info strong { color: var(--text); }
.instruments-stems-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.instruments-stems-preview span {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border2);
  padding: 4px 12px; border-radius: 100px; font-size: 0.78rem; font-weight: 500; color: var(--text);
}

/* ─── ANALYZE STATS ─── */
.analyze-stats { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 120px;
  background: rgba(124,58,237,0.07); border: 1px solid rgba(124,58,237,0.15);
  border-radius: 12px; padding: 20px 16px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.stat-icon { font-size: 1.5rem; }
.stat-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text3); }
.stat-value {
  font-size: 1.5rem; font-weight: 900; letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--accent3), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── ERROR ─── */
.error-card { text-align: center; border-color: rgba(239,68,68,0.2); background: rgba(239,68,68,0.03); }
.error-icon { font-size: 2.5rem; margin-bottom: 12px; }
.error-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.error-card p { color: var(--text2); font-size: 0.875rem; margin-bottom: 20px; white-space: pre-wrap; max-height: 200px; overflow-y: auto; }

/* ─── TOOL PAGE ─── */
.tool-page { position: relative; min-height: 100vh; padding-top: 96px; }
.tool-page-header { text-align: center; margin-bottom: 44px; position: relative; z-index: 1; }
.tool-page-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900; letter-spacing: -.04em; margin-bottom: 12px;
}
.tool-page-sub { color: var(--text2); font-size: 1rem; max-width: 480px; margin: 0 auto; line-height: 1.7; }

/* ─── WAVEFORM DEMO (landing) ─── */
.hero-visual { display: none; }
.waveform-demo { display: none; }

/* ─── HERO CTA GROUP (tool pages fallback) ─── */
.hero-cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }

/* ─── FOOTER ─── */
.footer {
  text-align: center; padding: 40px 32px;
  color: var(--text3); font-size: 0.82rem;
  border-top: 1px solid var(--border); position: relative; z-index: 1;
}
.footer a { color: var(--accent2); text-decoration: none; transition: color .15s; }
.footer a:hover { color: var(--accent3); }

/* ─── TOOL TABS (legacy) ─── */
.tool-tabs {
  display: flex; gap: 4px; margin-bottom: 32px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; width: fit-content;
  margin-left: auto; margin-right: auto;
}
.tool-tab {
  background: transparent; border: none; color: var(--text2);
  padding: 8px 22px; border-radius: 9px; font-size: 0.875rem;
  font-weight: 600; cursor: pointer; transition: .15s; font-family: inherit;
}
.tool-tab:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.tool-tab.active { background: linear-gradient(135deg, var(--accent), #5b21b6); color: #fff; box-shadow: 0 2px 12px rgba(124,58,237,0.35); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero { padding: 110px 24px 80px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .tool-cards-grid { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 700px) {
  h1 { font-size: 2.8rem; }
  .upload-card, .progress-card, .results-card, .error-card { padding: 22px 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .time-display { display: none; }
  .stem-badge { display: none; }
  .stat-card { padding: 14px 10px; }
  .stat-value { font-size: 1.2rem; }
  .features, .how, .tool-section { padding: 64px 16px; }
  .tool-cards-section { padding: 0 16px 64px; }
  .hero-upload-box { padding: 24px 16px; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 480px) {
  .hero { padding: 90px 16px 60px; }
  .options-row { flex-direction: column; }
  .play-btn { width: 30px; height: 30px; min-width: 30px; font-size: 0.72rem; }
  .player-row { padding: 8px 10px; gap: 8px; }
  .hero-upload-links { flex-direction: column; align-items: stretch; }
  .hero-upload-link { justify-content: center; }
}

/* ═══════════════════════════════════════════════
   POINTS & AUTH SYSTEM
   ═══════════════════════════════════════════════ */

/* ─── Navbar additions ─── */
.nav-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.points-badge {
  display: flex; align-items: center; gap: 5px;
  background: rgba(124,58,237,0.18); border: 1px solid rgba(124,58,237,0.4);
  border-radius: 20px; padding: 4px 12px;
  color: #c4b5fd; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: background .15s, border-color .15s;
  cursor: pointer;
}
.points-badge:hover { background: rgba(124,58,237,0.3); border-color: var(--accent); }
.points-icon { font-size: 0.9rem; }
.nav-user-link {
  color: var(--text2); font-size: 0.85rem; font-weight: 500;
  text-decoration: none; padding: 4px 8px; border-radius: 6px;
  transition: color .15s;
}
.nav-user-link:hover, .nav-user-link.active { color: #fff; }
.nav-login-link {
  color: var(--text2); font-size: 0.85rem; font-weight: 500;
  text-decoration: none; padding: 4px 8px; border-radius: 6px;
  transition: color .15s;
}
.nav-login-link:hover, .nav-login-link.active { color: #fff; }
.nav-logout-btn {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text3); font-size: 0.78rem; padding: 4px 10px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.nav-logout-btn:hover { border-color: #f87171; color: #f87171; }
@media (max-width: 600px) {
  .nav-right { display: none; }
}

/* ─── Modals ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 36px 32px; max-width: 420px; width: 100%;
  text-align: center; display: flex; flex-direction: column; gap: 14px;
}
.modal-icon { font-size: 2.4rem; }
.modal-box h3 { font-size: 1.25rem; font-weight: 700; color: #fff; margin: 0; }
.modal-box p  { color: var(--text2); line-height: 1.6; margin: 0; font-size: 0.92rem; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }

/* ─── Auth page ─── */
.auth-section { max-width: 460px; }
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 36px 32px;
}
.auth-tabs { display: flex; gap: 0; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text3); font-size: 0.92rem; font-weight: 600; padding: 10px 0;
  cursor: pointer; margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.auth-tab.active { color: #fff; border-bottom-color: var(--accent); }
.auth-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0 0 6px; }
.auth-sub   { color: var(--text3); font-size: 0.85rem; margin: 0 0 22px; }
.auth-form  { display: flex; flex-direction: column; gap: 0; }
.auth-error {
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35);
  border-radius: 8px; padding: 10px 14px;
  color: #fca5a5; font-size: 0.84rem; margin-bottom: 16px;
}
.form-group   { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label   { color: var(--text2); font-size: 0.82rem; font-weight: 600; letter-spacing: .03em; }
.form-input   {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; color: #fff; font-size: 0.92rem;
  outline: none; transition: border-color .15s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }
.btn-full { width: 100%; margin-top: 4px; }
.auth-terms { color: var(--text3); font-size: 0.74rem; text-align: center; margin-top: 12px; }
.form-remember { display: flex; align-items: center; margin-bottom: 14px; }
.remember-label {
  display: flex; align-items: center; gap: 8px;
  color: var(--text2); font-size: 0.84rem; cursor: pointer; user-select: none;
}
.remember-label input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer;
}

/* ─── Dashboard ─── */
.dashboard-section { max-width: 640px; display: flex; flex-direction: column; gap: 20px; }
.dashboard-hero {
  background: linear-gradient(135deg, rgba(124,58,237,0.2) 0%, rgba(236,72,153,0.12) 100%);
  border: 1px solid rgba(124,58,237,0.3); border-radius: var(--r);
  padding: 36px 28px; text-align: center;
}
.dashboard-points-wrap {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin-bottom: 10px;
}
.dashboard-points-icon { font-size: 2rem; }
.dashboard-points-num  { font-size: 4rem; font-weight: 800; color: #fff; line-height: 1; }
.dashboard-points-label{ font-size: 1rem; color: var(--text3); font-weight: 500; }
.dashboard-sub { color: var(--text2); font-size: 0.88rem; margin: 0 0 20px; }
.dashboard-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dashboard-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px 24px;
}
.dashboard-card-title { font-size: 1rem; font-weight: 700; color: #fff; margin: 0 0 6px; }
.dashboard-card-sub   { color: var(--text2); font-size: 0.86rem; line-height: 1.6; margin: 0 0 16px; }

/* Referral box */
.referral-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 12px;
}
.referral-link-text {
  flex: 1; font-size: 0.8rem; color: var(--text2); word-break: break-all;
  font-family: 'Courier New', monospace;
}
.referral-copy-btn {
  background: none; border: none; cursor: pointer; font-size: 1.1rem; flex-shrink: 0;
  transition: transform .15s;
}
.referral-copy-btn:hover { transform: scale(1.15); }
.referral-share { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-block; padding: 8px 16px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 600; text-decoration: none; transition: opacity .15s;
}
.share-btn:hover { opacity: .85; }
.share-btn.whatsapp { background: #25d366; color: #000; }
.share-btn.facebook { background: #1877f2; color: #fff; }

/* Transaction list */
.tx-list   { display: flex; flex-direction: column; gap: 0; }
.tx-row    {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tx-row:last-child { border-bottom: none; }
.tx-info   { display: flex; flex-direction: column; gap: 2px; }
.tx-desc   { font-size: 0.86rem; color: var(--text2); }
.tx-date   { font-size: 0.73rem; color: var(--text3); }
.tx-amount { font-size: 0.9rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.tx-positive { color: #4ade80; }
.tx-negative { color: #f87171; }
.tx-empty  { color: var(--text3); font-size: 0.88rem; }

/* ─── Earn page ─── */
.earn-section { max-width: 560px; display: flex; flex-direction: column; gap: 20px; }
.earn-hero    { text-align: center; padding: 16px 0 8px; }
.earn-title   { font-size: 1.8rem; font-weight: 800; color: #fff; margin: 0 0 8px; }
.earn-sub     { color: var(--text2); font-size: 0.92rem; margin: 0 0 14px; }
.earn-balance {
  display: inline-block; background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.35); border-radius: 20px;
  padding: 6px 18px; font-size: 0.9rem; color: #c4b5fd; font-weight: 600;
}
.earn-balance-num { font-size: 1.1rem; font-weight: 800; color: #fff; }

.earn-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.earn-card-icon  { font-size: 2rem; }
.earn-card-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0; }
.earn-card-desc  { color: var(--text2); font-size: 0.88rem; line-height: 1.6; margin: 0; }
.btn-earn-ad     { align-self: flex-start; }

.ad-status {
  padding: 10px 14px; border-radius: 8px; font-size: 0.84rem; font-weight: 500;
}
.ad-status-success { background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.3); color: #4ade80; }
.ad-status-warn    { background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.3); color: #fbbf24; }
.ad-status-error   { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.3);  color: #f87171; }
.ad-status-info    { background: rgba(96,165,250,0.12); border: 1px solid rgba(96,165,250,0.3); color: #60a5fa; }

.earn-hint      { color: var(--text3); font-size: 0.78rem; line-height: 1.5; }
.earn-hint-warn { color: #fbbf24; background: rgba(251,191,36,0.08); padding: 8px 12px; border-radius: 6px; }
.earn-hint code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; font-size: 0.78rem; }

/* Countdown ring */
.ad-countdown-wrap {
  position: relative; width: 80px; height: 80px;
  margin: 0 auto 12px; display: flex; align-items: center; justify-content: center;
}
.ad-countdown-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ad-countdown-track {
  fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 4;
}
.ad-countdown-progress {
  fill: none; stroke: var(--accent); stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.ad-countdown-num {
  font-size: 1.6rem; font-weight: 800; color: #fff; z-index: 1;
}
