/* yt-dlp Client Website Stylesheet */

:root {
  --bg-main: #090a0f;
  --bg-surface: #11141d;
  --bg-surface-elevated: #161b26;
  --bg-card: rgba(17, 20, 29, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(56, 189, 248, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #8292a7;
  --text-accent: #38bdf8;

  --accent-sky: #38bdf8;
  --accent-blue: #0284c7;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.1);
  --accent-amber: #f59e0b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 50px -10px rgba(56, 189, 248, 0.15);

  --container-max: 1180px;
}

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

/* Accessible focus visible ring */
:focus-visible {
  outline: 2px solid var(--accent-sky);
  outline-offset: 3px;
}

/* Skip to Content Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--accent-sky);
  color: #041019;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 10000;
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
}

.skip-link:focus {
  top: 16px;
}

/* Offset anchor scrolling under sticky header */
.section,
.hero-section {
  scroll-margin-top: 84px;
}

/* Modern text balancing */
h1,
h2,
h3,
.section-title,
.hero-title {
  text-wrap: balance;
}

.hero-subtitle,
.section-desc,
.setup-desc-text,
.feature-desc {
  text-wrap: pretty;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  overflow-x: hidden;
  position: relative;
}

/* Subtle background illumination (non-generic, clean ambient light) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 480px;
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.07) 0%, rgba(99, 102, 241, 0.03) 45%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(9, 10, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color 0.2s ease;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

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

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

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-github:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
}

/* Mobile Navigation Hamburger Toggle */
.nav-toggle {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.nav-toggle:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 72px 0 54px;
  text-align: center;
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Solid status pill (NO pulsing dot) */
.pill-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-sky);
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.hero-title {
  font-size: clamp(1.85rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.14;
  margin-bottom: 20px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 34px;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: #38bdf8;
  color: #041019;
  font-weight: 700;
  font-size: 0.98rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.25);
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: #7dd3fc;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.hero-meta-text {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.hero-meta-text strong {
  color: var(--text-secondary);
}

/* ==========================================================================
   Desktop Window Mockup
   ========================================================================== */
.hero-mockup-wrapper {
  margin: 48px auto 0;
  max-width: 980px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  overflow: hidden;
  text-align: left;
}

.mockup-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #0d0f15;
  border-bottom: 1px solid var(--border-subtle);
}

.mockup-controls {
  display: flex;
  gap: 8px;
}

.mockup-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2b3040;
}

.mockup-title {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mockup-body {
  padding: 24px;
  background: #10131b;
}

/* App Search Bar Simulation */
.mockup-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #0b0d13;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.mockup-url {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mockup-analyze-btn {
  padding: 5px 12px;
  background: var(--accent-sky);
  color: #041019;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* App Active Download Card */
.mockup-card {
  background: #141824;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.mockup-thumbnail {
  width: 120px;
  height: 68px;
  background: #1b2030;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.mockup-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mockup-thumb-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.75);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 3px;
  color: #fff;
}

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

.mockup-video-title {
  font-size: clamp(0.9rem, 1.2vw, 0.96rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mockup-tags {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.mockup-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: #1d2233;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.mockup-tag.active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-sky);
  border-color: rgba(56, 189, 248, 0.3);
}

.mockup-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mockup-progress-bar {
  width: 100%;
  height: 6px;
  background: #1b2030;
  border-radius: 999px;
  overflow: hidden;
}

.mockup-progress-fill {
  width: 78%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 999px;
}

.mockup-stats {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 6px;
}

/* ==========================================================================
   Comparison: Tauri vs Electron
   ========================================================================== */
.section {
  padding: 84px 0;
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-sky);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  color: var(--text-secondary);
}

.benchmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
}

.benchmark-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.benchmark-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.benchmark-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.benchmark-val-our {
  font-size: clamp(1.75rem, 4.5vw, 2.2rem);
  font-weight: 800;
  color: var(--accent-emerald);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.benchmark-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.benchmark-comparison {
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.benchmark-comparison strong {
  color: #f87171;
}

/* ==========================================================================
   Interactive CLI Command Previewer Widget
   ========================================================================== */
.cli-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.cli-widget-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
}

.cli-config-panel {
  padding: 32px;
  border-right: 1px solid var(--border-subtle);
  background: #0d1017;
}

.cli-config-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.cli-config-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cli-option-group {
  margin-bottom: 20px;
}

.cli-option-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cli-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cli-pill-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cli-pill-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.cli-pill-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-sky);
  border-color: rgba(56, 189, 248, 0.4);
}

.cli-terminal-panel {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #090b10;
}

.cli-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cli-terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-copy-cli {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-cli:hover {
  background: #252b3d;
  border-color: var(--border-strong);
}

.cli-command-box {
  background: #040508;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: #38bdf8;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  min-height: 140px;
}

.cli-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   16:9 vs 1:1 Album Art Comparison
   ========================================================================== */
.crop-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 24px;
}

.crop-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.crop-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.crop-badge-bad {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
}

.crop-badge-good {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
}

.crop-preview-box {
  width: 100%;
  height: 220px;
  background: #090b10;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

/* Visual showing distorted/letterboxed audio player */
.player-art-letterboxed {
  width: 180px;
  height: 180px;
  background: #141824;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.letterbox-thumb {
  width: 100%;
  height: 101px;
  background: linear-gradient(135deg, #2d3748, #4a5568);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #a0aec0;
  font-family: var(--font-mono);
}

.letterbox-bars {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.bar-top,
.bar-bottom {
  height: 39px;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: #ef4444;
}

/* Visual showing 1:1 square crop */
.player-art-square {
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 2px solid var(--accent-emerald);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.square-content {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 12px;
}

.square-tag {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: var(--accent-emerald);
  color: #041019;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.crop-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Core Features Grid (Pragmatic & Concrete)
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-sky);
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex: 1;
}

.feature-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feature-code-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: #090b10;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ==========================================================================
   Quick Setup / WinGet Terminal
   ========================================================================== */
.setup-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.setup-desc-title {
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.setup-desc-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.setup-terminal {
  background: #08090d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.setup-terminal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0e1118;
  border-bottom: 1px solid var(--border-subtle);
}

.setup-terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.setup-terminal-body {
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #38bdf8;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.setup-command-text {
  user-select: all;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ==========================================================================
   Downloads Hub
   ========================================================================== */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 24px;
}

.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  text-align: left;
  position: relative;
  transition: all 0.2s ease;
}

.download-card.primary-card {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.05) 0%, var(--bg-surface) 100%);
}

.download-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.download-type {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-sky);
  margin-bottom: 8px;
}

.download-name {
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.download-meta {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.download-features {
  list-style: none;
  margin-bottom: 28px;
  flex: 1;
}

.download-features li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-features li svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

/* Verification link box */
.verification-box {
  margin-top: 32px;
  text-align: center;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.verification-box a {
  color: var(--accent-sky);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ==========================================================================
   Footer (Slim, Low-Profile & Clean)
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #06070a;
  padding: 22px 0;
  margin-top: 52px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-icon {
  border-radius: 4px;
  opacity: 0.85;
}

.footer-copy a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-copy a:hover {
  color: var(--accent-sky);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent-sky);
}

.footer-credits a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credits a:hover {
  color: var(--text-secondary);
}

.footer-divider {
  color: var(--border-strong);
  font-size: 0.7rem;
}

.footer-disclaimer {
  width: 100%;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: 2px;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #181d2a;
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

/* Tablet & Mobile (<= 860px) */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  /* Slide-down mobile navigation drawer */
  .nav-links {
    display: flex;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(11, 13, 20, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 24px 20px;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 99;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links .nav-link {
    display: block;
    padding: 12px 8px;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links li:last-child .nav-link {
    border-bottom: none;
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link:active {
    color: var(--accent-sky);
  }

  .cli-widget-grid {
    grid-template-columns: 1fr;
  }

  .cli-config-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 24px 20px;
  }

  .cli-terminal-panel {
    padding: 24px 20px;
  }

  .crop-demo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .setup-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .setup-box {
    padding: 28px 22px;
  }

  .mockup-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px;
  }

  .mockup-thumbnail {
    width: 110px;
    height: 62px;
    flex-shrink: 0;
  }

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

  .mockup-video-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.88rem;
    line-height: 1.3;
  }

  .mockup-title {
    min-width: 0;
  }

  .mockup-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Medium Phones & Compact Viewports (<= 640px) */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .hero-section {
    padding: 52px 0 36px;
  }

  .hero-cta-group {
    gap: 12px;
    margin-bottom: 18px;
  }

  .btn-primary {
    padding: 10px 20px;
    font-size: 0.90rem;
    gap: 8px;
    box-shadow: 0 3px 12px rgba(56, 189, 248, 0.2);
  }

  .btn-secondary {
    padding: 10px 18px;
    font-size: 0.90rem;
    gap: 8px;
  }

  .section {
    padding: 60px 0;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .hero-mockup-wrapper {
    margin-top: 36px;
    border-radius: var(--radius-md);
  }

  .mockup-body {
    padding: 16px;
  }

  .mockup-searchbar {
    padding: 7px 11px;
    gap: 8px;
    margin-bottom: 14px;
  }

  .mockup-url {
    font-size: 0.78rem;
  }

  .mockup-analyze-btn {
    font-size: 0.70rem;
    padding: 3px 8px;
  }

  .mockup-card {
    gap: 12px;
    padding: 12px;
    align-items: flex-start;
  }

  .mockup-thumbnail {
    width: 88px;
    height: 50px;
    flex-shrink: 0;
  }

  .mockup-thumb-duration {
    font-size: 0.58rem;
    padding: 1px 3px;
    bottom: 3px;
    right: 3px;
  }

  .mockup-video-title {
    font-size: 0.78rem;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    line-height: 1.25;
  }

  .mockup-tags {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 7px;
    padding-bottom: 2px;
  }

  .mockup-tags::-webkit-scrollbar {
    display: none;
  }

  .mockup-tag {
    font-size: 0.65rem;
    padding: 2px 5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mockup-stats {
    font-size: 0.66rem;
    gap: 4px;
  }

  .feature-card {
    padding: 22px 18px;
  }

  .download-card {
    padding: 24px 20px;
  }

  .crop-card {
    padding: 20px 18px;
  }

  .setup-box {
    padding: 22px 16px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
  }
}

/* Small Smartphone Viewports (<= 480px) */
@media (max-width: 480px) {
  .navbar {
    height: 62px;
  }

  .nav-brand {
    font-size: 1.02rem;
    gap: 8px;
  }

  .brand-icon {
    width: 28px;
    height: 28px;
  }

  .brand-tag {
    display: none;
    /* Hide 'Windows' tag on small screens to prevent title wrapping */
  }

  .btn-github-text {
    display: none;
    /* Display compact icon-only star button */
  }

  .btn-github {
    padding: 8px 10px;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
    gap: 9px;
  }

  .hero-cta-group .btn-primary,
  .hero-cta-group .btn-secondary,
  .download-card .btn-primary,
  .download-card .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 8px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    gap: 7px;
  }

  .hero-cta-group .btn-primary,
  .download-card .btn-primary {
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
  }

  .hero-cta-group .btn-primary svg,
  .hero-cta-group .btn-secondary svg {
    width: 15px;
    height: 15px;
  }

  #exe-size,
  #zip-size {
    font-size: 0.72rem !important;
  }

  .section {
    padding: 48px 0;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .release-pill {
    font-size: 0.74rem;
    padding: 4px 10px;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .mockup-titlebar {
    padding: 8px 10px;
  }

  .mockup-titlebar > div:last-child {
    display: none;
  }

  .mockup-title {
    font-size: 0.72rem;
    gap: 6px;
  }

  .mockup-dot {
    width: 9px;
    height: 9px;
  }

  .mockup-controls {
    gap: 5px;
  }

  .mockup-body {
    padding: 10px;
  }

  .mockup-searchbar {
    padding: 6px 9px;
    margin-bottom: 10px;
    gap: 6px;
  }

  .mockup-url {
    font-size: 0.72rem;
  }

  .mockup-analyze-btn {
    font-size: 0.66rem;
    padding: 2px 7px;
  }

  .mockup-card {
    padding: 8px 10px;
    gap: 10px;
  }

  .mockup-thumbnail {
    width: 76px;
    height: 43px;
  }

  .mockup-thumb-duration {
    font-size: 0.54rem;
    padding: 0 3px;
    bottom: 2px;
    right: 2px;
  }

  .mockup-video-title {
    font-size: 0.72rem;
    line-height: 1.2;
    margin-bottom: 3px;
    -webkit-line-clamp: 2;
  }

  .mockup-tag {
    font-size: 0.60rem;
    padding: 1px 4px;
  }

  .mockup-stats {
    font-size: 0.62rem;
    gap: 2px;
  }

  .cli-command-box {
    padding: 12px;
    font-size: 0.78rem;
  }

  .cli-config-panel,
  .cli-terminal-panel {
    padding: 18px 14px;
  }

  .setup-box {
    padding: 20px 14px;
    border-radius: var(--radius-md);
  }

  .cli-widget {
    border-radius: var(--radius-md);
  }

  .setup-terminal-body {
    padding: 12px;
    font-size: 0.78rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-divider {
    display: none;
  }
}

/* Reduced Motion User Preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}