/* ============================================================
   ClipConverter — Premium YouTube Video Cutter & Downloader
   Design System & Component Styles
   ============================================================ */

/* ----- Google Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

/* ============================================================
   0. CSS Custom Properties
   ============================================================ */
:root {
  /* Colors */
  --bg-base: #0a0a1a;
  --bg-card: rgba(15, 15, 35, 0.85);
  --bg-glass: rgba(15, 15, 35, 0.7);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --gradient-accent: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-cta: linear-gradient(135deg, #f43f5e, #ec4899);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  --text-faint: #374151;

  /* Accents */
  --indigo: #6366f1;
  --purple: #a855f7;
  --cyan: #06b6d4;
  --blue: #3b82f6;
  --rose: #f43f5e;
  --pink: #ec4899;
  --green: #22c55e;
  --lavender: #a5b4fc;

  /* Glass panel */
  --glass-bg: rgba(15, 15, 35, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);

  /* Radii */
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-card: 0 25px 50px rgba(0, 0, 0, 0.5);

  /* Fonts */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
}

/* ============================================================
   1. @property for Conic Gradient Animation
   ============================================================ */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ============================================================
   2. Keyframe Animations
   ============================================================ */

/* Gradient background-position shift */
@keyframes gradientShift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

/* Fade in from below */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gentle pulse scale */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.7;
  }
}

/* Spinner rotation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* FAQ accordion expand */
@keyframes slideDown {
  from { max-height: 0; }
  to   { max-height: 500px; }
}

/* Loading skeleton shimmer */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Floating decorative elements */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Conic-gradient border rotation for tool-card */
@keyframes rotate {
  to {
    --angle: 360deg;
  }
}

/* Glow pulse for CTA */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(244, 63, 94, 0.0); }
  50%      { box-shadow: 0 0 30px rgba(244, 63, 94, 0.3); }
}

/* ============================================================
   3. Reset & Base Styles
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Decorative background orbs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(120px);
  opacity: 0.35;
}

body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent 70%);
  top: -200px;
  left: -150px;
}

body::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3), transparent 70%);
  bottom: -100px;
  right: -100px;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: var(--font-body);
  border: none;
  background: none;
  cursor: pointer;
}

input {
  font-family: var(--font-body);
}

/* ============================================================
   4. Typography
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h4 {
  font-size: 1.15rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.875rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  margin: 1rem auto 0;
  border-radius: 2px;
}

p {
  line-height: 1.6;
}

/* ============================================================
   5. Navigation
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  font-family: var(--font-heading);
  color: white;
  flex-shrink: 0;
}

.nav-brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
  border-radius: 1px;
}

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

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

/* Mobile menu toggle */
.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: all 0.2s ease;
}

.nav-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.nav-menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* ============================================================
   6. Hero Section
   ============================================================ */

.hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--lavender);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hero-title {
  margin-bottom: 1rem;
  line-height: 1.15;
}

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

.hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   7. Tool Card — Animated Gradient Border
   ============================================================ */

.tool-card {
  max-width: 780px;
  margin: 0 auto 4rem;
  position: relative;
  border-radius: 20px;
  padding: 2px;
  background: conic-gradient(
    from var(--angle),
    #6366f1,
    #a855f7,
    #06b6d4,
    #3b82f6,
    #6366f1
  );
  animation: rotate 4s linear infinite;
  box-shadow: var(--shadow-card);
}

.tool-card-inner {
  background: #0f0f23;
  border-radius: 18px;
  padding: 2rem;
  overflow: hidden;
  position: relative;
}

/* ============================================================
   8. Step Indicator
   ============================================================ */

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.2);
  color: var(--lavender);
  border: 1px solid rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
  font-family: var(--font-heading);
}

.step-number.active {
  background: var(--gradient-primary);
  color: white;
  border: none;
}

.step-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ============================================================
   9. URL Input
   ============================================================ */

.url-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.25rem;
  transition: all 0.3s ease;
}

.url-input-wrapper:focus-within {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.url-icon {
  padding: 0.75rem;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

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

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.75rem 0.5rem;
  font-family: var(--font-body);
  min-width: 0;
}

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

.url-clear {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.url-input-wrapper.has-value .url-clear {
  display: flex;
}

.url-clear:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--rose);
}

.url-clear svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   10. Mode Tabs (Cut / Download)
   ============================================================ */

.mode-tabs {
  display: flex;
  margin: 1.5rem 0;
  border-radius: var(--radius-input);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.mode-tab {
  flex: 1;
  padding: 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.mode-tab svg {
  width: 18px;
  height: 18px;
}

.mode-tab.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--lavender);
}

.mode-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================================
   11. Player Section
   ============================================================ */

.player-section {
  margin-bottom: 1.5rem;
  display: none;
}

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

.player-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}

.player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-dim);
}

.player-placeholder .ph-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.player-placeholder .ph-text {
  font-size: 0.9rem;
}

/* ============================================================
   12. Timeline / Range Slider Section
   ============================================================ */

.timeline-section {
  display: none;
  margin-bottom: 1.5rem;
}

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

.timeline-track-wrapper {
  position: relative;
  height: 48px;
  margin-bottom: 1rem;
  cursor: pointer;
  touch-action: none;
}

.timeline-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: visible;
}

.timeline-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-pill);
  /* width & left set by JS — no CSS transition to keep drag responsive */
}

.timeline-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: grab;
  z-index: 2;
  transition: box-shadow 0.2s ease;
}

.timeline-handle:hover {
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.5);
}

.timeline-handle:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.15);
}

.timeline-handle.start {
  background: var(--indigo);
}

.timeline-handle.end {
  background: var(--purple);
}

.timeline-time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   13. Time Controls (Manual Input)
   ============================================================ */

.time-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.time-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.time-field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.time-inputs-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.time-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.time-input-group span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.time-input {
  width: 54px;
  padding: 0.6rem 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  text-align: center;
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: all 0.2s ease;
}

.time-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.time-colon {
  color: var(--text-dim);
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0 0.1rem;
  user-select: none;
}

.set-pos-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  color: var(--lavender);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  white-space: nowrap;
}

.set-pos-btn svg {
  width: 14px;
  height: 14px;
}

.set-pos-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}

.clip-duration {
  text-align: center;
  padding: 0.75rem;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 10px;
  color: var(--lavender);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   13b. Preview Loop Toggle
   ============================================================ */

.preview-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  cursor: pointer;
  user-select: none;
}

.preview-toggle input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  width: 42px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.preview-toggle input:checked + .toggle-slider {
  background: rgba(99, 102, 241, 0.4);
}

.preview-toggle input:checked + .toggle-slider::after {
  transform: translateX(18px);
  background: var(--indigo);
}

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

/* ============================================================
   14. Format Selection
   ============================================================ */

.format-section {
  display: none;
  margin-bottom: 1.5rem;
}

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

.format-pills {
  display: flex;
  gap: 0.5rem;
}

.format-pill {
  flex: 1;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-input);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
}

.format-pill .format-icon {
  font-size: 1.3rem;
}

.format-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.format-pill.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--lavender);
}

/* ============================================================
   15. CTA Button
   ============================================================ */

.btn-cta {
  width: 100%;
  padding: 1rem;
  border-radius: 14px;
  border: none;
  background: var(--gradient-cta);
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  transition: all 0.3s ease;
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
}

.btn-cta:not(:disabled) {
  animation: glowPulse 3s ease-in-out infinite;
}

.btn-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(244, 63, 94, 0.3);
}

.btn-cta:active:not(:disabled) {
  transform: translateY(0);
}

.btn-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

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

/* Loader spinner inside CTA */
.btn-cta .btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Loading state */
.btn-cta.loading .btn-text {
  display: none;
}

.btn-cta.loading .btn-loader {
  display: inline-block;
}

.btn-cta.loading .btn-loading-text {
  display: inline;
}

.btn-loading-text {
  display: none;
}

/* ============================================================
   15b. Keyboard Shortcuts Hint
   ============================================================ */

.shortcuts-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.shortcuts-hint span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-family: 'Inter', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  min-width: 24px;
  text-align: center;
}

/* ============================================================
   16. Progress Section
   ============================================================ */

.progress-section {
  display: none;
  margin-top: 1rem;
}

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

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

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

.status-text {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================================
   17. How It Works Section
   ============================================================ */

.how-section {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: var(--radius-card);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.step-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.25);
}

.step-card-number {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-card);
  background: var(--gradient-primary);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin: 0 auto 1.25rem;
  font-family: var(--font-heading);
}

.step-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.how-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

/* ============================================================
   18. Features Section
   ============================================================ */

.features-section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 1.75rem;
  border-radius: var(--radius-card);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.2);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.12);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ============================================================
   19. FAQ Accordion Section
   ============================================================ */

.faq-section {
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 0.75rem;
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--lavender);
}

.faq-chevron {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--lavender);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  transition: max-height 0.4s ease-in;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================================
   20. Footer
   ============================================================ */

.footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--lavender);
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.footer-disclaimer {
  color: var(--text-faint);
  font-size: 0.75rem;
  max-width: 600px;
  margin: 1rem auto 0;
  line-height: 1.5;
}

/* ============================================================
   21. Utility Classes
   ============================================================ */

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.glass-panel {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

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

/* Shimmer / Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

/* Float animation utility */
.float {
  animation: float 3s ease-in-out infinite;
}

/* Fade-in-up animation utility */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out both;
}

/* Staggered animation delays for lists */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ============================================================
   22. Scrollbar Styling
   ============================================================ */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #1e293b var(--bg-base);
}

/* ============================================================
   23. Text Selection
   ============================================================ */

::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

/* ============================================================
   24. Responsive — Mobile (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {
  /* Navigation — hamburger menu */
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.98);
    padding: 1rem;
    gap: 1rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-menu-toggle {
    display: flex;
  }

  /* Hero */
  .hero {
    padding: 3rem 1.5rem 2rem;
  }

  /* Tool card */
  .tool-card-inner {
    padding: 1.25rem;
  }

  /* Time controls — stack on mobile */
  .time-controls {
    grid-template-columns: 1fr;
  }

  /* How It Works grid */
  .how-grid {
    grid-template-columns: 1fr;
  }

  /* Features grid */
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Format pills — wrap */
  .format-pills {
    flex-wrap: wrap;
  }

  .format-pill {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
  }

  /* Step card */
  .step-card {
    padding: 1.5rem;
  }

  /* Footer links */
  .footer-links {
    gap: 1rem;
  }

  /* Shortcuts hint */
  .shortcuts-hint {
    gap: 0.75rem;
  }
}

/* ============================================================
   25. Responsive — Small Screens (max-width: 480px)
   ============================================================ */

@media (max-width: 480px) {
  .nav {
    padding: 0.75rem 1rem;
  }

  .hero {
    padding: 2.5rem 1rem 1.5rem;
  }

  .tool-card {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .tool-card-inner {
    padding: 1rem;
  }

  .url-input {
    font-size: 0.9rem;
  }

  .time-input {
    width: 48px;
    padding: 0.5rem 0.3rem;
    font-size: 0.9rem;
  }

  .btn-cta {
    font-size: 0.95rem;
    padding: 0.85rem;
  }

  .how-section,
  .features-section,
  .faq-section {
    padding: 3rem 1rem;
  }

  .step-card,
  .feature-card {
    padding: 1.25rem;
  }
}

/* ============================================================
   26. Reduced Motion Preferences
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
