:root {
  --bg: #070b14;
  --card: #0f1628;
  --card-border: #1c2740;
  --input: #141d32;
  --text: #eef2ff;
  --muted: #8b9dc3;
  --accent: #3b82f6;
  --accent-2: #8b5cf6;
  --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --success: #22c55e;
  --error: #f87171;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59,130,246,0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139,92,246,0.1), transparent);
  pointer-events: none;
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--card-border);
  background: rgba(7,11,20,0.85);
  backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  border-radius: 10px;
  font-size: 1.1rem;
}

.tagline {
  color: var(--muted);
  font-size: 0.85rem;
}

.main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
-webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.upload-card,
.progress-card,
.result-card,
.error-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.hidden { display: none !important; }

.dropzone {
  border: 2px dashed var(--card-border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1.25rem;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(59,130,246,0.06);
}

.dropzone-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.dropzone-title { font-weight: 600; font-size: 1.1rem; margin-bottom: 0.25rem; }
.dropzone-hint { color: var(--muted); font-size: 0.9rem; }

.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--input);
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.file-info { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.file-icon { font-size: 1.5rem; flex-shrink: 0; }
.file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { color: var(--muted); font-size: 0.85rem; }

.btn-primary,
.btn-secondary,
.btn-text {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: var(--gradient);
  color: #fff;
  font-size: 1rem;
}

.btn-primary:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-secondary {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--card-border);
  text-decoration: none;
  text-align: center;
}

.btn-secondary:hover { color: var(--text); border-color: var(--accent); }
.btn-text { background: none; color: var(--accent); font-size: 0.9rem; padding: 0.25rem; }

.progress-header { margin-bottom: 1rem; }
.progress-header h2 { font-size: 1.2rem; margin-bottom: 0.25rem; }
#progress-status { color: var(--muted); font-size: 0.95rem; }

.progress-bar {
  height: 8px;
  background: var(--input);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.progress-percent {
  text-align: right;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.steps {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.step {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--input);
}

.step.active { color: var(--text); border-left: 3px solid var(--accent); }
.step.done { color: var(--success); }

.result-card,
.error-card { text-align: center; }

.players {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
  text-align: left;
}

.player-block {
  background: var(--input);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem;
}

.player-block.enhanced {
  border-color: rgba(139,92,246,0.5);
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.08));
}

.player-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.player-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.player-badge.before { background: rgba(139,157,195,0.18); color: var(--muted); }
.player-badge.after { background: var(--gradient); color: #fff; }

.player-block audio {
  width: 100%;
  height: 40px;
  display: block;
}

@media (min-width: 640px) {
  .players { grid-template-columns: 1fr 1fr; }
}

.result-icon,
.error-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.result-card h2,
.error-card h2 { margin-bottom: 0.5rem; }

.result-meta { color: var(--muted); margin-bottom: 1.25rem; }
#error-message { color: var(--muted); margin-bottom: 1rem; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.feature {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.feature-icon { font-size: 1.5rem; display: block; margin-bottom: 0.5rem; }
.feature h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.feature p { color: var(--muted); font-size: 0.9rem; }

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--card-border);
}

.footer-note { margin-top: 0.35rem; font-size: 0.8rem; }

@media (max-width: 600px) {
  .nav-container { flex-direction: column; align-items: flex-start; }
  .tagline { display: none; }
}
