/* ========================================
   CSS Variables & Custom Properties
======================================== */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);

  --accent-primary: #ff3366;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #06b6d4;

  --gradient-primary: linear-gradient(
    135deg,
    #ff3366 0%,
    #7c3aed 50%,
    #06b6d4 100%
  );
  --gradient-accent: linear-gradient(90deg, #ff3366, #7c3aed);
  --gradient-glow: radial-gradient(
    circle at center,
    rgba(255, 51, 102, 0.3),
    transparent 70%
  );

  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(255, 51, 102, 0.3);

  /* Spacing */
  --container-width: 1200px;
  --section-padding: 100px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ========================================
   Reset & Base Styles
======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ========================================
   Animated Background
======================================== */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(
      ellipse at 20% 20%,
      rgba(255, 51, 102, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(124, 58, 237, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(6, 182, 212, 0.08) 0%,
      transparent 60%
    );
  animation: gradientShift 20s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
  transform: translateZ(0);
}

@keyframes gradientShift {
  0% {
    transform: scale(1) rotate(0deg) translateZ(0);
  }
  50% {
    transform: scale(1.08) rotate(3deg) translateZ(0);
  }
  100% {
    transform: scale(1) rotate(0deg) translateZ(0);
  }
}

.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 25s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform, opacity;
  transform: translateZ(0);
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0) translateZ(0);
    opacity: 0.2;
  }
  25% {
    transform: translateY(-50px) translateX(25px) translateZ(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-100px) translateX(50px) translateZ(0);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-50px) translateX(25px) translateZ(0);
    opacity: 0.4;
  }
  100% {
    transform: translateY(0) translateX(0) translateZ(0);
    opacity: 0.2;
  }
}

/* ========================================
   Container & Layout
======================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Header & Navigation
======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-text .accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width var(--transition-normal);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* ========================================
   Hero Section
======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* ========================================
   Converter Card
======================================== */
.converter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  gap: 12px;
  transition: all var(--transition-normal);
  margin-bottom: 20px;
}

.input-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(255, 51, 102, 0.1);
}

.input-icon {
  color: var(--text-muted);
}

.input-icon svg {
  width: 22px;
  height: 22px;
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  padding: 12px 0;
}

.url-input::placeholder {
  color: var(--text-muted);
}

.btn-paste {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-paste:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: scale(1.05);
}

.btn-paste svg {
  width: 18px;
  height: 18px;
}

/* Quality Selector */
.quality-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.quality-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.quality-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.quality-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quality-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-light);
}

.quality-btn.active {
  background: var(--gradient-accent);
  border-color: transparent;
  color: white;
}

.quality-btn.premium {
  position: relative;
}

.quality-btn.premium::after {
  content: "★";
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--gradient-primary);
  color: white;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 8px;
}

/* Convert Button */
.btn-convert {
  width: 100%;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 32px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-convert::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-convert:hover::before {
  left: 100%;
}

.btn-convert:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-convert:active {
  transform: translateY(0);
}

.btn-convert.loading .btn-text,
.btn-convert.loading .btn-icon {
  opacity: 0;
}

.btn-convert.loading .btn-loader {
  opacity: 1;
}

.btn-icon {
  width: 22px;
  height: 22px;
  transition: opacity var(--transition-fast);
}

.btn-loader {
  position: absolute;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error Message */
.error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
  color: #f87171;
  font-size: 0.95rem;
}

.error-message svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.error-message.hidden {
  display: none;
}

/* ========================================
   Video Preview
======================================== */
.video-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 32px;
  backdrop-filter: blur(20px);
  animation: slideUp 0.4s ease;
}

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

.video-preview.hidden {
  display: none;
}

.preview-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}

.preview-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

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

.preview-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.preview-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.preview-channel {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 4px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.meta-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Preview Metadata */
.preview-metadata {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.metadata-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
}

.metadata-label {
  color: var(--text-muted);
  font-weight: 500;
  min-width: 50px;
}

.metadata-value {
  color: var(--text-secondary);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Preview Badges */
.preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge svg {
  width: 12px;
  height: 12px;
}

.badge-quality {
  background: linear-gradient(
    135deg,
    rgba(255, 51, 102, 0.2),
    rgba(124, 58, 237, 0.2)
  );
  color: #ff6b8a;
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.badge-format {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-art {
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

/* Preview Actions */
.preview-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.btn-download {
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 32px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-normal);
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-download:active {
  transform: translateY(0);
}

.btn-download svg {
  width: 20px;
  height: 20px;
}

/* Auto-Trim Toggle */
.auto-trim-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-top: 16px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-md);
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  transition: all var(--transition-normal);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all var(--transition-normal);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--gradient-accent);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.toggle-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Trim Option Container */
.trim-option-container {
  margin-top: 16px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.trim-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.trim-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 20px 20px;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  padding-top: 16px;
}

.trim-inputs.hidden {
  display: none;
}

.trim-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trim-input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.trim-input-group input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: "Inter", monospace;
  text-align: center;
  transition: all var(--transition-fast);
}

.trim-input-group input:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.trim-input-group input::placeholder {
  color: var(--text-muted);
}

.trim-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.trim-duration {
  grid-column: 1 / -1;
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.trim-duration span {
  color: var(--accent-primary);
  font-weight: 600;
}

/* ========================================
   Audio Player Preview
======================================== */
.audio-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 32px;
  backdrop-filter: blur(20px);
  animation: slideUp 0.4s ease;
}

.audio-preview.hidden {
  display: none;
}

.audio-player-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.audio-player-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

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

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

.player-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.audio-player-controls {
  margin-bottom: 20px;
}

.audio-player-controls audio {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-md);
  outline: none;
}

.audio-player-controls audio::-webkit-media-controls-panel {
  background: rgba(255, 255, 255, 0.1);
}

/* Trim Info */
.trim-info {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.trim-info.hidden {
  display: none;
}

.trim-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #10b981;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.trim-badge svg {
  width: 18px;
  height: 18px;
}

.trim-segments {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trim-segments li {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Version Toggle */
.audio-player-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.version-toggle {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}

.version-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.version-btn svg {
  width: 16px;
  height: 16px;
}

.version-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.version-btn.active {
  background: var(--gradient-accent);
  color: white;
}

.download-actions {
  display: flex;
  justify-content: center;
}

.btn-download-main {
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 40px;
  color: white;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-normal);
}

.btn-download-main:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-download-main svg {
  width: 22px;
  height: 22px;
}

/* Responsive Video Preview */
@media (max-width: 600px) {
  .preview-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .preview-thumbnail {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .preview-info {
    text-align: center;
  }

  .preview-meta {
    justify-content: center;
  }

  .preview-badges {
    justify-content: center;
  }
}

/* ========================================
   Progress Bar
======================================== */
.progress-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  backdrop-filter: blur(20px);
  animation: slideUp 0.4s ease;
}

.progress-container.hidden {
  display: none;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progress-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-percent {
  color: var(--accent-primary);
  font-weight: 600;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-status {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  text-align: center;
}

/* ========================================
   Features Section
======================================== */
.features {
  padding: var(--section-padding) 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(124, 58, 237, 0.05) 100%
  );
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 64px;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: white;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========================================
   How It Works Section
======================================== */
.how-it-works {
  padding: var(--section-padding) 0;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.step {
  text-align: center;
  max-width: 250px;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-glow);
}

.step-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.step-connector {
  color: var(--text-muted);
  padding-top: 16px;
}

.step-connector svg {
  width: 24px;
  height: 24px;
}

/* ========================================
   Footer
======================================== */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.3);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.footer-tagline {
  color: var(--text-secondary);
  margin-top: 16px;
  font-size: 0.95rem;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 400px;
  line-height: 1.7;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.orcid-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a6ce39; /* ORCID green */
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.orcid-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.orcid-icon {
  width: 18px;
  height: 18px;
}

/* ========================================
   Terminal Progress Card
======================================== */
.progress-terminal {
  margin-top: 24px;
  background: #1e1e1e;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  position: relative;
}

.terminal-header {
  background: #2d2d2d;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-dots {
  display: flex;
  gap: 6px;
  margin-right: 16px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f56;
}
.dot.yellow {
  background: #ffbd2e;
}
.dot.green {
  background: #27c93f;
}

.terminal-title {
  color: #9ca3af;
  font-size: 0.8rem;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.7;
}

.terminal-body {
  padding: 20px;
  color: #e5e7eb;
  background: rgba(0, 0, 0, 0.5);
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: #6b7280;
  transition: all 0.3s ease;
}

.step-item.active {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.step-item.done {
  color: #34d399;
}

.step-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-item.waiting .step-icon::before {
  content: "○";
}
.step-item.active .step-icon::before {
  content: "⟳";
  display: inline-block;
  animation: spin 1s linear infinite;
}
.step-item.done .step-icon::before {
  content: "✓";
  font-weight: bold;
}

.terminal-progress-wrapper {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.terminal-progress-bar {
  flex: 1;
  height: 6px;
  background: #374151;
  border-radius: 3px;
  overflow: hidden;
}

.terminal-progress-fill {
  height: 100%;
  background: #34d399;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.terminal-percent {
  font-size: 0.85rem;
  color: #34d399;
  min-width: 40px;
  font-weight: bold;
  text-align: right;
}

.terminal-status-line {
  margin-top: 16px;
  font-size: 0.85rem;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  display: flex;
  align-items: center;
}

.prompt {
  color: #818cf8;
  margin-right: 10px;
}
.cursor {
  animation: blink 1s step-end infinite;
  color: #34d399;
  margin-left: 2px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* ========================================
   Utility Classes
======================================== */
.hidden {
  display: none !important;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .converter-card {
    padding: 24px;
  }

  .video-preview {
    flex-direction: column;
    text-align: center;
  }

  .preview-info {
    text-align: center;
  }

  .preview-meta {
    justify-content: center;
  }

  .preview-thumbnail {
    width: 100%;
    height: 180px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    transform: rotate(90deg);
    padding: 12px 0;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-disclaimer {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .quality-options {
    width: 100%;
  }

  .quality-btn {
    flex: 1;
    min-width: calc(50% - 4px);
  }
}
