/* vybecheck / serato-inspired design system */

:root {
  --black: #000; --bg: #000;
  --surface-1: #0a0a0a; --surface-2: #111; --surface-3: #1a1a1a;
  --border: rgba(255,255,255,0.08); --border-hover: rgba(255,255,255,0.2);
  --white: #f5f5f7; --text-primary: #f5f5f7; --text-secondary: #86868b; --text-tertiary: #6e6e73;
  --accent: #2997ff; --accent-green: #30d158; --accent-orange: #ff9f0a;
  --accent-red: #ff453a; --accent-purple: #bf5af2; --accent-pink: #ff375f;
  --gradient-hero: linear-gradient(135deg, #bf5af2 0%, #2997ff 50%, #30d158 100%);
  --font: -apple-system, 'SF Pro Display', 'Inter', 'Helvetica Neue', sans-serif;
  --radius: 20px; --radius-sm: 12px; --radius-xs: 8px;
  --nav-height: 52px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text-primary);
  min-height: 100vh; overflow-x: hidden; line-height: 1.47;
  font-size: 17px; letter-spacing: 0.02em;
  text-transform: lowercase;
}
h1,h2,h3,h4,h5,h6 { font-weight: 600; line-height: 1.08; }
a { color: inherit; text-decoration: none; }

/* ========== CANVAS PARTICLE BACKGROUND ========== */
.canvas-bg {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
}

/* ========== NAV (serato-style) ========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: transparent;
}
.nav__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
}
.nav__logo-icon {
  width: 20px; height: 20px; background: var(--gradient-hero);
  border-radius: 5px; display: inline-block;
}
.nav__links { display: flex; gap: 24px; }
.nav__link {
  font-family: var(--font); font-size: 14px; color: var(--text-secondary);
  background: none; border: none; cursor: pointer;
  transition: color 0.3s; text-transform: lowercase; letter-spacing: 0.02em;
}
.nav__link:hover { color: var(--text-primary); }
.nav__user { display: flex; align-items: center; gap: 16px; }
.nav__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.nav__avatar--placeholder { display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-secondary); font-weight: 600; font-size: 13px; }
.nav__name { font-size: 14px; color: var(--text-secondary); }

/* ========== BUTTONS (serato pill outline) ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 17px; font-weight: 400;
  border: none; cursor: pointer; transition: all 0.3s;
  border-radius: 980px; letter-spacing: 0.02em;
  text-transform: lowercase;
}
.btn--outline {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
  padding: 16px 36px; font-size: 18px;
}
.btn--outline:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.05);
}
.btn--primary { background: var(--accent); color: white; padding: 12px 24px; border: none; }
.btn--primary:hover { background: #0077ed; }
.btn--ghost-outlined { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); padding: 8px 18px; font-size: 14px; }
.btn--ghost-outlined:hover { border-color: var(--border-hover); color: var(--text-primary); }
.btn--sm { padding: 8px 16px; font-size: 14px; }

/* ========== CONTAINER ========== */
.container { max-width: 980px; margin: 0 auto; padding: 0 22px; }

/* ========== HERO (serato full-viewport) ========== */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.hero__title {
  font-size: clamp(56px, 10vw, 96px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.0;
  margin-bottom: 48px;
}
.hero__title-gradient { display: inline-block; }
.hero__cta { margin-bottom: 20px; }
.hero__formats {
  font-size: 13px; color: var(--text-tertiary);
  margin-top: 14px; letter-spacing: 0.05em;
}
.hero__hint {
  margin-top: 32px;
}
.hero__hint a {
  font-size: 14px; color: var(--text-secondary);
  text-decoration: underline; text-underline-offset: 4px;
  transition: color 0.3s;
}
.hero__hint a:hover { color: var(--white); }

/* ========== VIBE SELECTOR ========== */
.vibe-selector { margin-bottom: 32px; text-align: center; }
.vibe-selector__label {
  font-size: 15px; color: var(--text-secondary);
  margin-bottom: 16px; letter-spacing: 0.04em;
}
.vibe-pills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  max-width: 600px; margin: 0 auto;
}
.vibe-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); font-size: 14px;
  cursor: pointer; transition: all 0.3s ease;
  font-family: var(--font); text-transform: lowercase;
}
.vibe-pill span { font-size: 16px; }
.vibe-pill:hover {
  border-color: var(--border-hover); color: var(--text-primary);
  transform: translateY(-1px);
}
.vibe-pill--active {
  border-color: var(--accent-purple); color: var(--white);
  background: rgba(191, 90, 242, 0.12);
  box-shadow: 0 0 20px rgba(191, 90, 242, 0.2);
}
.btn[disabled] { opacity: 0.35; pointer-events: none; }
.btn--pulse { animation: btn-pulse 0.6s ease; }
@keyframes btn-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Vibe tag in analysis header */
.vibe-tag {
  background: rgba(191, 90, 242, 0.15);
  border-color: rgba(191, 90, 242, 0.3);
}

/* upload zone on homepage is invisible wrapper */
.hero .upload-zone {
  border: none; background: none; padding: 0; cursor: default;
}

/* ========== PROGRESS OVERLAY (checking virality) ========== */
.progress-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
}
.progress-overlay--active { opacity: 1; pointer-events: auto; }
.progress-overlay__content { text-align: center; max-width: 400px; width: 100%; padding: 0 24px; }

.progress-waveform {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 32px; height: 48px;
}
.progress-waveform__bar {
  width: 5px; border-radius: 3px;
  background: var(--gradient-hero); height: 16px;
  animation: waveformPulse 1.2s ease-in-out infinite;
}
.progress-waveform__bar:nth-child(1) { animation-delay: 0.0s; }
.progress-waveform__bar:nth-child(2) { animation-delay: 0.1s; }
.progress-waveform__bar:nth-child(3) { animation-delay: 0.2s; }
.progress-waveform__bar:nth-child(4) { animation-delay: 0.3s; }
.progress-waveform__bar:nth-child(5) { animation-delay: 0.2s; }
.progress-waveform__bar:nth-child(6) { animation-delay: 0.1s; }
.progress-waveform__bar:nth-child(7) { animation-delay: 0.0s; }
@keyframes waveformPulse {
  0%, 100% { height: 12px; opacity: 0.4; }
  50% { height: 44px; opacity: 1; }
}

.progress-overlay__title {
  font-size: 24px; font-weight: 600; margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.progress-bar { max-width: 320px; margin: 0 auto 20px; }
.progress-bar__track {
  width: 100%; height: 4px; border-radius: 2px;
  background: var(--surface-3); overflow: hidden;
}
.progress-bar__fill {
  width: 0%; height: 100%; border-radius: 2px;
  background: var(--gradient-hero);
  transition: width 0.4s ease;
}
.progress-bar__pct {
  display: block; text-align: right;
  font-size: 13px; color: var(--text-tertiary);
  margin-top: 8px; font-variant-numeric: tabular-nums;
}

.progress-overlay__step {
  font-size: 14px; color: var(--text-secondary);
  min-height: 20px;
}

/* ========== STAGGERED FADE-IN ========== */
.anim-fade { opacity: 0; transform: translateY(16px); animation: fadeUp 0.7s ease forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ========== GRADIENT TEXT ========== */
.anim-gradient {
  background: linear-gradient(90deg, #bf5af2, #2997ff, #30d158, #ff9f0a, #bf5af2);
  background-size: 300% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* ========== SCROLL REVEAL ========== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========== HOW IT WORKS PANEL (slide-up overlay) ========== */
.hiw-panel {
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none;
}
.hiw-panel--open { pointer-events: auto; }
.hiw-panel__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0; transition: opacity 0.4s ease;
}
.hiw-panel--open .hiw-panel__backdrop { opacity: 1; }
.hiw-panel__content {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 48px 32px 64px;
  max-width: 720px; margin: 0 auto;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
.hiw-panel--open .hiw-panel__content { transform: translateY(0); }
.hiw-panel__close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: var(--text-tertiary);
  cursor: pointer; transition: color 0.3s;
}
.hiw-panel__close:hover { color: var(--text-primary); }
.hiw-panel__title {
  font-size: 28px; font-weight: 600; margin-bottom: 36px; text-align: center;
}
.hiw-steps { display: flex; flex-direction: column; gap: 28px; }
.hiw-step {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 20px 0; border-bottom: 0.5px solid var(--border);
}
.hiw-step:last-child { border-bottom: none; }
.hiw-step__num {
  font-size: 32px; font-weight: 700;
  background: var(--gradient-hero);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; flex-shrink: 0; width: 48px;
}
.hiw-step__title { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.hiw-step__text { font-size: 15px; color: var(--text-secondary); line-height: 1.5; }

/* ========== LOADER ========== */
.loader { display: flex; justify-content: center; gap: 5px; margin-bottom: 16px; }
.loader__bar { width: 4px; height: 28px; border-radius: 2px; background: var(--accent); animation: loaderPulse 1s ease-in-out infinite; }
.loader__bar:nth-child(2) { animation-delay: 0.12s; }
.loader__bar:nth-child(3) { animation-delay: 0.24s; }
.loader__bar:nth-child(4) { animation-delay: 0.36s; }
.loader__bar:nth-child(5) { animation-delay: 0.48s; }
@keyframes loaderPulse { 0%,100% { transform: scaleY(0.35); opacity: 0.35; } 50% { transform: scaleY(1); opacity: 1; } }

/* ========== DEV AUTH ========== */
.dev-banner { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 980px; font-size: 12px; color: var(--accent-orange); background: rgba(255,159,10,0.08); border: 1px solid rgba(255,159,10,0.15); margin-bottom: 24px; }
.dev-login, .locked-login { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.dev-login__input { padding: 14px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary); font-size: 17px; font-family: var(--font); width: 280px; outline: none; transition: border-color 0.3s; }
.dev-login__input:focus { border-color: var(--accent); }
.dev-login__input::placeholder { color: var(--text-tertiary); }

/* ========== DASHBOARD ========== */
.dashboard {
  padding-top: calc(var(--nav-height) + 48px); padding-bottom: 80px;
  max-width: 980px; margin: 0 auto; padding-left: 22px; padding-right: 22px;
  position: relative; z-index: 1;
}
.dashboard__header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; padding-bottom: 24px; border-bottom: 0.5px solid var(--border); }
.dashboard__title { font-size: 40px; font-weight: 700; }
.dashboard__subtitle { color: var(--text-secondary); font-size: 17px; margin-top: 6px; }
.dashboard__quota { display: flex; align-items: center; gap: 16px; }
.quota-ring { position: relative; width: 52px; height: 52px; }
.quota-ring__svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.quota-ring__bg { fill: none; stroke: var(--surface-3); stroke-width: 3; }
.quota-ring__fill { fill: none; stroke: url(#quota-gradient); stroke-width: 3; stroke-linecap: round; }
.quota-ring__count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; }
.quota-label__num { display: block; font-weight: 600; font-size: 15px; }
.quota-label__text { font-size: 12px; color: var(--text-tertiary); }

/* dashboard upload */
.dashboard .upload-zone {
  border: 1.5px dashed rgba(255,255,255,0.1); border-radius: var(--radius);
  padding: 72px 40px; text-align: center; cursor: pointer;
  transition: all 0.4s ease; background: var(--surface-1);
  margin-bottom: 56px;
}
.dashboard .upload-zone:hover { border-color: var(--accent); background: rgba(41,151,255,0.03); }
.upload-zone--disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.upload-zone--drag { border-color: var(--accent-green); background: rgba(48,209,88,0.04); }
.upload-zone__icon { color: var(--text-tertiary); margin-bottom: 20px; }
.upload-zone__title { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.upload-zone__text { font-size: 15px; color: var(--text-tertiary); }
.upload-zone__hint { font-size: 13px; color: var(--accent); margin-top: 12px; }

/* -- History -- */
.history__title { font-size: 24px; font-weight: 600; margin-bottom: 20px; }
.history__grid { display: flex; flex-direction: column; gap: 1px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.history-card { display: flex; align-items: center; gap: 16px; padding: 18px 24px; background: var(--surface-1); transition: background 0.3s; }
.history-card:hover { background: var(--surface-2); }
.history-card__score { width: 44px; height: 44px; border-radius: var(--radius-xs); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; flex-shrink: 0; }
.history-card__score--high { background: rgba(48,209,88,0.1); color: var(--accent-green); }
.history-card__score--mid { background: rgba(255,159,10,0.1); color: var(--accent-orange); }
.history-card__score--low { background: rgba(255,69,58,0.1); color: var(--accent-red); }
.history-card__info { flex: 1; min-width: 0; }
.history-card__name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-card__date { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.history-card__arrow { color: var(--text-tertiary); transition: transform 0.3s; flex-shrink: 0; }
.history-card:hover .history-card__arrow { transform: translateX(3px); color: var(--text-secondary); }

/* ========== ANALYSIS ========== */
.analysis { padding-top: calc(var(--nav-height) + 48px); padding-bottom: 80px; max-width: 980px; margin: 0 auto; padding-left: 22px; padding-right: 22px; position: relative; z-index: 1; }
.analysis__header { text-align: center; margin-bottom: 64px; }
.analysis__filename { font-size: 32px; font-weight: 700; margin-bottom: 16px; word-break: break-word; }
.analysis__meta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.meta-tag { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 980px; font-size: 13px; font-weight: 500; color: var(--text-secondary); background: var(--surface-2); }

/* -- Gauge -- */
.gauge-section { text-align: center; padding: 48px 0 64px; margin-bottom: 48px; border-bottom: 0.5px solid var(--border); }
.gauge { position: relative; width: 240px; height: 240px; margin: 0 auto 28px; }
.gauge__svg { width: 100%; height: 100%; }
.gauge__track { fill: none; stroke: var(--surface-2); stroke-width: 6; }
.gauge__progress { fill: none; stroke: url(#gauge-grad); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray 2s cubic-bezier(0.4, 0, 0.2, 1); }
.gauge__inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge__score { font-size: 72px; font-weight: 700; background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gauge__label { font-size: 13px; color: var(--text-tertiary); margin-top: -8px; letter-spacing: 0.08em; }
.gauge__verdict { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: 980px; font-size: 15px; font-weight: 500; }
.gauge__verdict--high { background: rgba(48,209,88,0.1); color: var(--accent-green); }
.gauge__verdict--moderate { background: rgba(255,159,10,0.1); color: var(--accent-orange); }
.gauge__verdict--low { background: rgba(255,69,58,0.1); color: var(--accent-red); }

/* -- Waveform -- */
.waveform-section { margin-bottom: 64px; }
.section-title { font-size: 24px; font-weight: 600; margin-bottom: 20px; }
.waveform-container { background: var(--surface-1); border-radius: var(--radius); padding: 28px; overflow: hidden; }
#waveform-canvas { width: 100%; height: 120px; display: block; }

/* -- Metrics -- */
.metrics-section { margin-bottom: 64px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.metric-card { background: var(--surface-1); border-radius: var(--radius); padding: 28px; transition: background 0.3s; }
.metric-card:hover { background: var(--surface-2); }
.metric-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.metric-card__icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.metric-card__icon--purple { background: rgba(191,90,242,0.1); color: var(--accent-purple); }
.metric-card__icon--red { background: rgba(255,69,58,0.1); color: var(--accent-red); }
.metric-card__icon--amber { background: rgba(255,159,10,0.1); color: var(--accent-orange); }
.metric-card__icon--cyan { background: rgba(41,151,255,0.1); color: var(--accent); }
.metric-card__icon--emerald { background: rgba(48,209,88,0.1); color: var(--accent-green); }
.metric-card__icon--pink { background: rgba(255,55,95,0.1); color: var(--accent-pink); }
.metric-card__value { font-size: 36px; font-weight: 700; }
.metric-card__title { font-size: 15px; font-weight: 500; color: var(--text-secondary); margin-bottom: 12px; }
.metric-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-bottom: 12px; }
.metric-bar__fill { height: 100%; border-radius: 2px; transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.metric-bar__fill--purple { background: var(--accent-purple); }
.metric-bar__fill--red { background: var(--accent-red); }
.metric-bar__fill--amber { background: var(--accent-orange); }
.metric-bar__fill--cyan { background: var(--accent); }
.metric-bar__fill--emerald { background: var(--accent-green); }
.metric-bar__fill--pink { background: var(--accent-pink); }
.metric-card__desc { font-size: 12px; color: var(--text-tertiary); }

/* -- Insights -- */
.insights-section { margin-bottom: 64px; }
.insights-list { display: flex; flex-direction: column; gap: 0; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.insight-card { display: flex; align-items: flex-start; gap: 14px; padding: 20px 24px; background: var(--surface-1); }
.insight-card__icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.insight-card__text { font-size: 15px; color: var(--text-secondary); line-height: 1.5; }

/* ========== LOCKED / PREVIEW ========== */
.locked-section { position: relative; margin-top: 48px; }
.locked-blur { filter: blur(8px); pointer-events: none; user-select: none; opacity: 0.5; }
.locked-overlay { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; }
.locked-overlay__content {
  text-align: center; padding: 48px;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius); border: 1px solid var(--border);
  max-width: 480px; width: 100%;
}
.locked-overlay__content svg { color: var(--text-tertiary); margin-bottom: 16px; }
.locked-overlay__title { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.locked-overlay__text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 24px; }

/* ========== FOOTER ========== */
.analysis__actions { text-align: center; padding: 24px 0; }
.footer { position: relative; z-index: 1; text-align: center; padding: 20px 22px; border-top: 0.5px solid var(--border); color: var(--text-tertiary); font-size: 12px; }
.footer--transparent { border-top: none; position: fixed; bottom: 0; left: 0; right: 0; }

/* ========== TOAST ========== */
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(100px); padding: 14px 24px; border-radius: var(--radius-sm); font-size: 14px; z-index: 1000; transition: transform 0.4s ease; max-width: 90%; background: rgba(255,69,58,0.12); color: var(--accent-red); border: 1px solid rgba(255,69,58,0.2); backdrop-filter: blur(20px); }
.toast--visible { transform: translateX(-50%) translateY(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 734px) {
  .hero__title { font-size: 48px; }
  .btn--outline { padding: 14px 28px; font-size: 16px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .dashboard__header { flex-direction: column; align-items: flex-start; gap: 20px; }
  .gauge { width: 200px; height: 200px; } .gauge__score { font-size: 56px; }
  .hiw-panel__content { padding: 36px 20px 48px; }
  .nav__inner { padding: 0 16px; }
}
