/* ==========================================================================
   VidPeel — Monochrome Carbon & High-Contrast Volt Lime Design System
   Authentic, Minimalist, Utility-First Aesthetic (Zero AI Blobs)
   ========================================================================== */

:root {
  /* Carbon Neutral Foundation */
  --bg-dark: #090A0C;
  --bg-surface: #121418;
  --bg-card: #16191E;
  --bg-card-hover: #1E222A;
  --bg-input: #0E1014;

  /* Text Hierarchy */
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-subtle: #6B7280;

  /* Signature Accent: Volt Lime */
  --volt-primary: #CCFF00;
  --volt-hover: #B8E600;
  --volt-glow: rgba(204, 255, 0, 0.18);
  --volt-subtle: rgba(204, 255, 0, 0.1);

  /* Hairline Borders & Shadows */
  --border-glass: 1px solid rgba(255, 255, 255, 0.08);
  --border-glass-hover: 1px solid rgba(204, 255, 0, 0.35);
  --border-focus: 1px solid #CCFF00;
  
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.7);
  --shadow-volt: 0 4px 20px rgba(204, 255, 0, 0.22);

  /* Radii */
  --radius-full: 9999px;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;

  /* Fonts */
  --font-heading: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Hide legacy glowing blobs */
.bg-glow-container {
  display: none;
}

/* Base Typography */
h1, h2, h3, .brand-name {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--volt-primary);
}

/* ---------- Ad slots ---------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  margin: 20px auto;
  max-width: 1100px;
}
.ad-top, .ad-bottom { height: 90px; }
.ad-infeed { height: 250px; width: 300px; margin: 40px auto; }
.ad-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* ---------- Header ---------- */
.site-header {
  max-width: 1150px;
  margin: 20px auto 0;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: var(--border-glass);
  border-radius: var(--radius-full);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(204, 255, 0, 0.25));
  transition: transform 0.2s ease;
}
.brand:hover .brand-logo {
  transform: scale(1.05);
}
.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--volt-primary);
  letter-spacing: -0.03em;
  font-family: var(--font-heading);
}

.platform-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-muted);
  border: var(--border-glass);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: default;
}

.tag:hover {
  background: var(--bg-card-hover);
  color: var(--volt-primary);
  border-color: rgba(204, 255, 0, 0.3);
}

.tag-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: currentColor;
}

.tag-beta {
  opacity: 0.7;
  border-style: dashed;
}
.beta-suffix {
  font-size: 10px;
  opacity: 0.6;
}

/* ---------- Main Container ---------- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 800px;
  margin: 50px auto 0;
  text-align: center;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--volt-primary);
  background: var(--volt-subtle);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(204, 255, 0, 0.25);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--volt-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--volt-primary);
}

h1 {
  font-size: 50px;
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.peel-text {
  color: var(--volt-primary);
  display: inline-block;
  position: relative;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ---------- Paste Bar (Precision Utility Input) ---------- */
.paste-bar-wrap {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.paste-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  transition: all 0.2s ease;
}

.paste-bar:focus-within {
  border-color: var(--volt-primary);
  box-shadow: var(--shadow-lg), 0 0 0 3px var(--volt-glow);
}

.paste-icon {
  width: 20px;
  height: 20px;
  color: var(--text-subtle);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.paste-bar:focus-within .paste-icon {
  color: var(--volt-primary);
}

#url-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 15.5px;
  font-family: var(--font-body);
  outline: none;
  padding: 10px 0;
  width: 100%;
}

#url-input::placeholder {
  color: var(--text-subtle);
}

.paste-btn-quick {
  background: var(--bg-card);
  border: var(--border-glass);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.paste-btn-quick:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

#fetch-btn {
  border: none;
  border-radius: var(--radius-full);
  padding: 13px 28px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: #090A0C;
  background: var(--volt-primary);
  cursor: pointer;
  box-shadow: var(--shadow-volt);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

#fetch-btn:hover {
  background: var(--volt-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(204, 255, 0, 0.35);
}

#fetch-btn:active {
  transform: translateY(0);
}

#fetch-btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* Bulk Toggle */
.bulk-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-top: 18px;
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.bulk-toggle:hover {
  color: var(--volt-primary);
}

/* Bulk Panel */
.bulk-panel {
  margin-top: 20px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: left;
}

.bulk-textarea {
  width: 100%;
  background: var(--bg-input);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 16px;
  outline: none;
  resize: vertical;
  min-height: 120px;
}

.bulk-textarea:focus {
  border-color: var(--volt-primary);
}

.bulk-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

/* Hints & Status */
.hint {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-subtle);
  line-height: 1.6;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.status {
  margin-top: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: var(--volt-subtle);
  border: 1px solid rgba(204, 255, 0, 0.3);
  color: var(--volt-primary);
  display: inline-block;
  animation: fadeIn 0.2s ease;
}

.status.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #F87171;
}

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

/* ---------- Result Card ---------- */
.result-card {
  margin-top: 36px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 24px;
  align-items: flex-start;
  text-align: left;
  animation: slideUp 0.3s ease;
}

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

.result-thumb {
  width: 220px;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: var(--border-glass);
  flex-shrink: 0;
  background: #000000;
}

.result-meta {
  flex: 1;
  min-width: 0;
}

.result-meta h3 {
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-main);
  word-break: break-word;
}

.result-sub {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Quality Picker */
.quality-picker-wrap {
  margin-bottom: 20px;
}

.quality-picker {
  background: var(--bg-input);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
  cursor: pointer;
  width: 100%;
  max-width: 260px;
  transition: border-color 0.2s ease;
}

.quality-picker:hover, .quality-picker:focus {
  border-color: var(--volt-primary);
}

/* Result Actions */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.download-btn {
  background: var(--volt-primary);
  color: #090A0C;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 22px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-volt);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.download-btn:hover {
  background: var(--volt-hover);
  transform: translateY(-1px);
}

.transcript-btn {
  background: var(--bg-surface);
  border: var(--border-glass);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 11px 18px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transcript-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Transcript & QR Panels */
.transcript-panel {
  margin-top: 24px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: left;
}

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

.transcript-label {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.transcript-actions {
  display: flex;
  gap: 8px;
}

.transcript-action-btn {
  background: var(--bg-surface);
  border: var(--border-glass);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.transcript-action-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.transcript-text {
  background: var(--bg-input);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* QR Code Section */
.qr-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.qr-code-container {
  background: #FFFFFF;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.qr-fallback-link {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- History Section & Queue ---------- */
.history-section {
  margin-top: 48px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: left;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.history-title-label {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
}

.history-clear {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}
.history-clear:hover { color: var(--volt-primary); }

.history-note {
  font-size: 12px;
  color: var(--text-subtle);
  margin-bottom: 18px;
}

.history-list, .queue-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 12px;
  transition: all 0.2s ease;
}

.history-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.history-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.history-meta {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-subtle);
}

.history-redo {
  background: var(--bg-card);
  border: var(--border-glass);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.history-redo:hover {
  background: var(--volt-primary);
  color: #090A0C;
  border-color: transparent;
}

/* ---------- How It Works Section ---------- */
.how {
  margin-top: 90px;
  text-align: center;
}

.how h2 {
  font-size: 30px;
  margin-bottom: 36px;
  color: var(--text-main);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 28px 22px;
  text-align: left;
  position: relative;
  transition: all 0.2s ease;
}

.step:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.step-mark {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--volt-primary);
  background: var(--volt-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 16px;
}

.step p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.step em {
  font-style: normal;
  color: var(--text-main);
  font-weight: 600;
}

/* ---------- Standalone Pages (About, Contact, Terms, DMCA, Privacy) ---------- */
.page {
  max-width: 760px;
  margin: 60px auto;
  padding: 40px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.page h1 {
  font-size: 34px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.page p, .page li {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 15.5px;
  margin-bottom: 16px;
}

.page h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.page ol, .page ul {
  padding-left: 24px;
  margin-bottom: 20px;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 100px;
  padding: 40px 20px;
  border-top: var(--border-glass);
  text-align: center;
  font-size: 13.5px;
  color: var(--text-subtle);
}

.site-footer p {
  max-width: 680px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--volt-primary);
}

.copy {
  font-family: var(--font-mono);
  font-size: 12.5px;
  opacity: 0.6;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    gap: 16px;
    border-radius: var(--radius-xl);
    padding: 16px 20px;
  }
  
  h1 { font-size: 34px; }
  .hero-subtitle { font-size: 15px; }

  .paste-bar {
    flex-direction: column;
    border-radius: var(--radius-xl);
    padding: 10px;
  }

  .paste-icon { display: none; }
  
  #url-input {
    width: 100%;
    padding: 8px;
    text-align: center;
  }

  .paste-btn-quick {
    width: 100%;
    justify-content: center;
  }

  #fetch-btn {
    width: 100%;
    justify-content: center;
  }

  .result-card {
    flex-direction: column;
    padding: 18px;
  }

  .result-thumb {
    width: 100%;
    height: 180px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 24px 18px;
    margin: 30px 14px;
  }
}
