/* ==========================================================================
   YTSnapIt - Modern Design System & Component Stylesheet
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  
  --text-main: #0f172a;       /* Deep Slate Navy */
  --text-muted: #475569;      /* Slate Gray */
  --text-light: #64748b;
  --text-white: #ffffff;
  
  --primary: #2563eb;         /* Vibrant Royal Blue */
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-focus: rgba(37, 99, 235, 0.25);
  
  --accent: #0284c7;          /* Sky / Cyan Accent */
  --accent-light: #e0f2fe;
  
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  
  --border-color: #e2e8f0;
  --border-focus: #93c5fd;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Shadows & Elevation */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

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

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

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

/* Focus styles for accessible keyboard navigation */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Skip link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--text-main);
  color: var(--text-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: 1rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 38px;
  width: auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-main);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

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

.nav-link {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

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

.nav-link.active {
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-light);
}

/* ==========================================================================
   Converter Hero Section (Matches User Specification)
   ========================================================================== */

.converter-hero-section {
  padding: 3.5rem 1.5rem 2rem;
  background: #ffffff;
  text-align: center;
}

.converter-container {
  max-width: 820px;
  margin: 0 auto;
}

.converter-title {
  font-size: clamp(2rem, 3.5vw + 1rem, 2.75rem);
  font-weight: 800;
  color: #002244;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.converter-form-wrapper {
  max-width: 780px;
  margin: 0 auto;
}

.converter-input {
  width: 100%;
  padding: 1.1rem 1.5rem;
  font-size: 1.05rem;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #dbeafe;
  border-radius: 14px;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.converter-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.converter-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-action-download {
  background: #007bff;
  color: #ffffff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8rem 2.5rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.btn-action-download:hover {
  background: #0062cc;
  transform: translateY(-1px);
}

.btn-action-clear {
  background: #e0f2fe;
  color: #0284c7;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8rem 2.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-action-clear:hover {
  background: #bae6fd;
}

/* ==========================================================================
   Converter Results Section & Download Table (Screenshots 2 & 3)
   ========================================================================== */

.converter-results-section {
  max-width: 1080px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
}

.converter-card-wrapper {
  display: none;
}

.converter-card-wrapper.visible {
  display: block;
}

.converter-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: flex-start;
  background: #ffffff;
  padding: 1.75rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Left Column: Media Thumbnail & Title */
.converter-media-info {
  display: flex;
  flex-direction: column;
}

.thumbnail-frame {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.media-video-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.45;
  margin-top: 1rem;
}

/* Right Column: Switcher Tabs & Download Table */
.converter-download-table-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.converter-tabs-row {
  display: flex;
  gap: 0.75rem;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: 10px;
  width: fit-content;
}

.tab-pill-btn {
  background: transparent;
  border: none;
  padding: 0.55rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.tab-pill-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.tab-icon.icon-audio {
  color: #f43f5e;
}

.tab-icon.icon-video {
  color: #0284c7;
}

/* Format Table */
.converter-table-container {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

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

.converter-table thead {
  background: #fcfdfe;
  border-bottom: 1px solid #e2e8f0;
}

.converter-table th {
  padding: 0.85rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #64748b;
  text-transform: uppercase;
}

.converter-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition-fast);
}

.converter-table tbody tr:last-child {
  border-bottom: none;
}

.converter-table tbody tr:hover {
  background: #f8fafc;
}

.converter-table td {
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  color: #0f172a;
  vertical-align: middle;
}

.td-filetype {
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
}

.badge-hd {
  background: #ff7a00;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  letter-spacing: 0.02em;
}

.td-format {
  color: #64748b;
  font-weight: 500;
}

.td-action {
  text-align: right;
}

/* Green Download Button */
.btn-download-green {
  background: #00a86b;
  color: #ffffff;
  border: none;
  padding: 0.55rem 1.35rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}

.btn-download-green:hover {
  background: #008f5a;
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-download-green svg {
  flex-shrink: 0;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: table-row-group;
}

/* Skeleton Loading */
.converter-skeleton {
  display: none;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  padding: 1.75rem;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

.converter-skeleton.active {
  display: grid;
}

.sk-thumb-col {
  width: 100%;
  height: 220px;
  border-radius: 12px;
}

.sk-table-col {
  width: 100%;
  height: 380px;
  border-radius: 12px;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Inline feedback message */
.feedback-msg {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  display: none;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.feedback-msg.visible {
  display: block;
}

.feedback-msg.error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #fecaca;
}

.feedback-msg.info {
  background: var(--accent-light);
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Quick Examples */
.quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tag-label {
  font-weight: 500;
}

.tag-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Adsterra Banner Slots
   ========================================================================== */

.ad-slot-wrapper {
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
}

.ad-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.ad-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94a3b8;
  background: #f8fafc;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.ad-slot-title {
  font-size: 0.75rem;
  color: #94a3b8;
}

.ad-placeholder-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-light);
}

.ad-placeholder-text {
  text-align: left;
}

.ad-placeholder-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ad-placeholder-text small {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ==========================================================================
   Media Preview Card & Results
   ========================================================================== */

.results-section {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.media-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-light);
}

.empty-state-icon {
  margin: 0 auto 1.25rem;
  color: #cbd5e1;
}

.empty-state h3 {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.95rem;
  max-width: 440px;
  margin: 0 auto;
}

/* Skeleton Loading State */
.skeleton-wrapper {
  padding: 2rem;
  display: none;
}

.skeleton-wrapper.active {
  display: block;
}

.skeleton-box {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sk-thumb {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.sk-title {
  height: 24px;
  width: 80%;
  margin-bottom: 0.75rem;
}

.sk-meta {
  height: 16px;
  width: 45%;
  margin-bottom: 1.5rem;
}

.sk-tabs {
  height: 40px;
  width: 100%;
  border-radius: var(--radius-sm);
}

/* Active Result View */
.media-result-wrapper {
  display: none;
}

.media-result-wrapper.visible {
  display: block;
}

.media-header {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding: 1.75rem;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

.thumbnail-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.thumb-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.media-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.source-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.source-pill {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.media-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.media-author {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.media-author a {
  color: var(--text-main);
  font-weight: 600;
}

/* Embed Player Container */
.player-container {
  display: none;
  background: #000000;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.player-container.active {
  display: block;
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Permissions Alert Box */
.permissions-alert {
  margin: 1.5rem 1.75rem 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--warning-bg);
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.permissions-alert.authorized {
  background: var(--success-bg);
  border-color: #a7f3d0;
}

.permissions-icon {
  color: var(--warning-text);
  flex-shrink: 0;
  margin-top: 2px;
}

.permissions-alert.authorized .permissions-icon {
  color: var(--success-text);
}

.permissions-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--warning-text);
  margin-bottom: 0.25rem;
}

.permissions-alert.authorized .permissions-text h4 {
  color: var(--success-text);
}

.permissions-text p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--warning-text);
}

.permissions-alert.authorized .permissions-text p {
  color: var(--success-text);
}

/* Tabs Navigation */
.tabs-navigation {
  display: flex;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.75rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.9rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #ffffff;
}

/* Resource Section Lists */
.tab-content {
  display: none;
  padding: 1.75rem;
}

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

.resource-grid {
  display: grid;
  gap: 1rem;
}

.resource-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.resource-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.resource-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.resource-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.format-pill {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.resource-desc {
  font-size: 0.85rem;
  color: var(--text-light);
}

.action-btn {
  background: var(--primary);
  color: var(--text-white);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background var(--transition-fast);
  text-decoration: none;
}

.action-btn:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.action-btn.secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
  background: var(--bg-hover);
}

/* ==========================================================================
   Features & Value Proposition Section
   ========================================================================== */

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

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

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

.feature-box {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

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

/* ==========================================================================
   Content & Legal Pages (Privacy, Terms, FAQ, How It Works, Contact)
   ========================================================================== */

.content-page {
  max-width: 860px;
  margin: 3rem auto 5rem;
  padding: 0 1.5rem;
}

.page-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.prose-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
}

.prose-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.prose-card h2:first-of-type {
  margin-top: 0;
}

.prose-card p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.prose-card ul, .prose-card ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.prose-card li {
  margin-bottom: 0.5rem;
}

.info-callout {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
  color: #1e3a8a;
  font-size: 0.95rem;
}

/* FAQ Accordion */
.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question:hover {
  background: var(--bg-subtle);
}

.faq-arrow {
  transition: transform var(--transition-fast);
  color: var(--text-light);
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  display: block;
}

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

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-logo {
  height: 34px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 360px;
  margin-bottom: 1.25rem;
}

.footer-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.footer-nav {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.legal-note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.75rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.disclaimer-text {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .media-header {
    grid-template-columns: 1fr;
  }

  .thumbnail-container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 1rem;
  }

  .primary-nav.nav-open {
    display: block;
  }

  .primary-nav .nav-list {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 1rem;
  }

  .url-input-wrapper {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .input-icon {
    display: none;
  }

  .input-controls {
    justify-content: flex-end;
  }

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

  .resource-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .action-btn {
    text-align: center;
    justify-content: center;
  }
}

/* Accessibility: Reduced Motion */
@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;
  }
}

/* ==========================================================================
   Download Modal Styles
   ========================================================================== */

.download-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.download-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: #0f172a;
}

.modal-spinner {
  width: 48px;
  height: 48px;
  border: 3.5px solid #e2e8f0;
  border-top-color: #007bff;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  animation: spin 0.8s linear infinite;
}

.modal-success-icon,
.modal-error-icon {
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.modal-progress-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 1rem;
}

.modal-progress-bar {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #007bff, #06b6d4);
  border-radius: 9999px;
  animation: modalProgressAnim 1.6s infinite ease-in-out;
}

@keyframes modalProgressAnim {
  0% { transform: translateX(-100%); width: 30%; }
  50% { width: 70%; }
  100% { transform: translateX(350%); width: 30%; }
}

