/* ==========================================================================
   YTMATE.ONLINE - Modern, High-Performance Stylesheet
   Designed for speed, accessibility, high conversion & responsive media UI
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Dark Theme Palette (Default) */
  --bg-primary: #0a0c10;
  --bg-secondary: #12161f;
  --bg-tertiary: #1a202c;
  --bg-card: rgba(22, 27, 38, 0.75);
  --bg-card-hover: rgba(30, 38, 54, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text-primary: #f0f4fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0c10;

  --accent-red: #ff1a40;
  --accent-red-hover: #ff3355;
  --accent-red-glow: rgba(255, 26, 64, 0.35);
  --accent-gradient: linear-gradient(135deg, #ff1a40 0%, #ff5252 50%, #ff793f 100%);
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--accent-red-glow);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --accent-red: #e60026;
  --accent-red-hover: #ff1a40;
  --accent-red-glow: rgba(230, 0, 38, 0.2);
  --accent-gradient: linear-gradient(135deg, #e60026 0%, #ff2a55 50%, #ff6b3d 100%);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 26, 64, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 10% 30%, rgba(139, 92, 246, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 60%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  padding: 10px 18px;
  background: var(--accent-red);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top var(--transition-fast);
  text-decoration: none;
}
.skip-link:focus {
  top: 15px;
  outline: 3px solid #fff;
}

/* Focus Visible Styling */
:focus-visible {
  outline: 3px solid var(--accent-red);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--border-subtle);
  transition: background var(--transition-normal);
}
[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.88);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.logo-badge {
  background: var(--accent-gradient);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--accent-red-glow);
}

.logo-text span {
  color: var(--accent-red);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--border-subtle);
}

/* Nav Dropdown */
.nav-item-dropdown {
  position: relative;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  box-shadow: var(--shadow-lg);
  list-style: none;
  z-index: 110;
}
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
  display: block;
}
.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.dropdown-link:hover {
  background: var(--border-subtle);
  color: var(--accent-red);
}

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

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-tertiary);
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Hero & Downloader Section
   ========================================================================== */

.hero-section {
  padding-block: 3.5rem 2.5rem;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(255, 26, 64, 0.1);
  border: 1px solid rgba(255, 26, 64, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent-red);
  margin-block-end: 1.25rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-block-end: 1rem;
}
.hero-title .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin-inline: auto;
  margin-block-end: 2.25rem;
}

/* Downloader Search Form */
.downloader-box {
  max-width: 820px;
  margin-inline: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.2);
  position: relative;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.downloader-box:focus-within {
  border-color: var(--accent-red);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.downloader-form {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.url-input {
  width: 100%;
  height: 58px;
  padding-left: 3rem;
  padding-right: 5.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: all var(--transition-fast);
}
.url-input:focus {
  border-color: var(--accent-red);
  background: var(--bg-primary);
}
.url-input::placeholder {
  color: var(--text-muted);
}

.input-action-btns {
  position: absolute;
  right: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-paste, .btn-clear {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.btn-paste:hover, .btn-clear:hover {
  background: var(--border-strong);
  color: var(--text-primary);
}
.btn-clear {
  display: none;
}

.btn-download-action {
  height: 58px;
  padding: 0 1.85rem;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  box-shadow: 0 4px 18px var(--accent-red-glow);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}
.btn-download-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.btn-download-action:active {
  transform: translateY(0);
}

/* Quick Example Links */
.quick-samples {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sample-pill {
  padding: 0.25rem 0.65rem;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sample-pill:hover {
  background: var(--border-strong);
  color: var(--accent-red);
}

/* Feedback & Status Message */
.status-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}
.status-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.status-message.info {
  display: block;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* ==========================================================================
   Video Result & Quality Selector Box
   ========================================================================== */

.result-container {
  display: none;
  max-width: 880px;
  margin-inline: auto;
  margin-top: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  text-align: left;
  animation: slideUp 0.3s ease-out;
}

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

.video-overview {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  margin-block-end: 1.5rem;
  align-items: center;
}

.video-thumb-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow-md);
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.video-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-block-end: 0.5rem;
  color: var(--text-primary);
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.video-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Live Converter Widget Box */
.live-widget-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-block: 1.25rem;
  text-align: center;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
.widget-badge-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-red);
  margin-block-end: 0.75rem;
}
.live-widget-iframe-container {
  width: 100%;
  min-height: 75px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: transparent;
}

/* Quality Matrix Tabs */
.format-tabs {
  display: flex;
  gap: 0.5rem;
  border-block-end: 1px solid var(--border-subtle);
  padding-block-end: 0.5rem;
  margin-block-end: 1.25rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
}
.tab-btn.active {
  color: #fff;
  background: var(--accent-red);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* Resolution Table / List */
.quality-table {
  width: 100%;
  border-collapse: collapse;
}

.quality-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-block-end: 1px solid var(--border-subtle);
}

.quality-table td {
  padding: 0.85rem 1rem;
  border-block-end: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.quality-badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-8k { background: #8b5cf6; color: #fff; }
.badge-4k { background: #3b82f6; color: #fff; }
.badge-2k { background: #06b6d4; color: #fff; }
.badge-1080p { background: #10b981; color: #fff; }
.badge-720p { background: #f59e0b; color: #fff; }
.badge-sd { background: #64748b; color: #fff; }
.badge-mp3 { background: #ec4899; color: #fff; }

.btn-table-download {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}
.btn-table-download:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

/* Download Action Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s ease-out;
  position: relative;
}
@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}
.modal-close-btn:hover {
  background: var(--accent-red);
  color: #fff;
}

.modal-server-widget {
  width: 100%;
  height: 70px;
  border: none;
  margin-block: 1rem;
  border-radius: var(--radius-sm);
  background: transparent;
}

.modal-mirror-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.mirror-btn {
  padding: 0.65rem 0.85rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.mirror-btn:hover {
  background: var(--border-strong);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* ==========================================================================
   Features Grid
   ========================================================================== */

.section-title-wrap {
  text-align: center;
  margin-block: 4rem 2.5rem;
}
.section-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-red);
  margin-block-end: 0.5rem;
}
.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-block-end: 0.75rem;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-inline: auto;
}

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

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(255, 26, 64, 0.12);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block-end: 1.25rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-block-end: 0.65rem;
}

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

/* ==========================================================================
   How It Works (Steps)
   ========================================================================== */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-block: 2.5rem;
}

.step-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  position: relative;
  text-align: center;
}

.step-number {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px var(--accent-red-glow);
}

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.75rem;
  margin-block-end: 0.75rem;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ==========================================================================
   Comparison Table Section
   ========================================================================== */

.table-responsive-wrapper {
  overflow-x: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-block: 2rem;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.specs-table th {
  padding: 1.15rem 1.25rem;
  background: var(--bg-tertiary);
  font-weight: 700;
  font-size: 0.9rem;
  border-block-end: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.specs-table td {
  padding: 1rem 1.25rem;
  border-block-end: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.specs-table tr:hover td {
  background: var(--border-subtle);
  color: var(--text-primary);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq-list {
  max-width: 860px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.faq-item[open] {
  border-color: var(--border-strong);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-icon {
  transition: transform var(--transition-fast);
  color: var(--accent-red);
}
.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ==========================================================================
   Tools Hub Grid (Sub-pages Links)
   ========================================================================== */

.tools-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-block: 2rem;
}

.tool-hub-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-fast);
}
.tool-hub-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.tool-hub-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-block-end: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tool-hub-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex: 1;
}
.tool-hub-card .learn-more {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-red);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Legal & Content Pages
   ========================================================================== */

.content-article {
  max-width: 860px;
  margin-inline: auto;
  padding-block: 3rem 4rem;
}

.article-header {
  margin-block-end: 2.5rem;
  border-block-end: 1px solid var(--border-subtle);
  padding-block-end: 1.5rem;
}
.article-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-block-end: 0.5rem;
}
.article-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.prose h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-block: 2rem 1rem;
  letter-spacing: -0.02em;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-block: 1.5rem 0.75rem;
}
.prose p, .prose ul, .prose ol {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-block-end: 1.25rem;
}
.prose ul, .prose ol {
  padding-left: 1.5rem;
}
.prose li {
  margin-block-end: 0.5rem;
}
.prose blockquote {
  border-left: 4px solid var(--accent-red);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--text-primary);
  margin-block: 1.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-block-start: 1px solid var(--border-subtle);
  padding-block: 4rem 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-block-end: 3rem;
}

.footer-brand p {
  margin-block: 1rem 1.5rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  margin-block-end: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-links a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--accent-red);
}

.footer-bottom {
  border-block-start: 1px solid var(--border-subtle);
  padding-block-start: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .video-overview {
    grid-template-columns: 1fr;
  }
  .modal-mirror-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 99;
  }
  .nav-menu.active {
    display: flex;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .downloader-form {
    flex-direction: column;
  }
  .btn-download-action {
    width: 100%;
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
