﻿/* PDF Page Picker - Main Styles */
/* Trust Blue Design System with Light/Dark Mode Support */

/* ========================================
   CSS Custom Properties - Light Mode (Default)
   ======================================== */
:root {
  /* Brand Colors - Trust Blue */
  --color-brand: #2563EB;
  --color-brand-dark: #1E40AF;
  --color-brand-deep: #1E3A8A;
  --color-brand-light: #60A5FA;
  --color-brand-subtle: #DBEAFE;
  --color-brand-ghost: #EFF6FF;

  /* Accent Colors */
  --color-accent: #06B6D4;          /* Cyan - actions */
  --color-success: #10B981;          /* Emerald */
  --color-warning: #F59E0B;          /* Amber */
  --color-error: #F43F5E;            /* Rose */

  /* Neutrals - Slate Palette */
  --color-text: #0F172A;             /* Slate 900 */
  --color-text-secondary: #475569;   /* Slate 600 */
  --color-text-tertiary: #94A3B8;    /* Slate 400 */
  --color-border: #E2E8F0;           /* Slate 200 */
  --color-bg: #FFFFFF;               /* Pure white */
  --color-bg-alt: #F8FAFC;           /* Slate 50 */
  --color-surface: #F1F5F9;          /* Slate 100 */

  /* Legacy Aliases (Deprecated - will be removed in future version) */
  --color-primary: var(--color-brand);
  --color-primary-dark: var(--color-brand-dark);
  --color-text-muted: var(--color-text-secondary);

  /* Gradients */
  --gradient-header: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #BFDBFE 100%);
  --gradient-button: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  --gradient-accent: linear-gradient(90deg, #2563EB 0%, #06B6D4 100%);

  /* Shadows with Blue Tint */
  --shadow-sm: 0 1px 2px 0 rgba(37, 99, 235, 0.05);
  --shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(37, 99, 235, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(37, 99, 235, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(37, 99, 235, 0.12);

  /* Spacing (8px Grid) */
  --spacing-xs: 0.5rem;     /* 8px */
  --spacing-sm: 0.75rem;    /* 12px */
  --spacing-md: 1rem;       /* 16px */
  --spacing-lg: 1.5rem;     /* 24px */
  --spacing-xl: 2rem;       /* 32px */
  --spacing-2xl: 3rem;      /* 48px */
  --spacing-3xl: 4rem;      /* 64px */

  /* Border Radius */
  --radius-sm: 0.5rem;      /* 8px */
  --radius: 0.75rem;        /* 12px */
  --radius-md: 0.75rem;     /* 12px */
  --radius-lg: 1rem;        /* 16px */
  --radius-xl: 1.5rem;      /* 24px */
  --radius-full: 9999px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
  --font-display: "Inter", var(--font-sans);

  /* Font Sizes */
  --text-xs: 0.75rem;       /* 12px */
  --text-sm: 0.875rem;      /* 14px */
  --text-base: 1rem;        /* 16px */
  --text-lg: 1.125rem;      /* 18px */
  --text-xl: 1.25rem;       /* 20px */
  --text-2xl: 1.5rem;       /* 24px */
  --text-3xl: 1.875rem;     /* 30px */
  --text-4xl: 2.25rem;      /* 36px */
  --text-5xl: 3rem;         /* 48px */

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1060;
}

/* ========================================
   Dark Mode Variables
   ======================================== */
@media (prefers-color-scheme: dark) {
  :root {
    /* Brand Colors - Adjusted for Dark */
    --color-brand: #3B82F6;
    --color-brand-light: #60A5FA;
    --color-brand-subtle: #1E3A8A;
    --color-brand-ghost: #172554;

    /* Accent Colors - Brighter */
    --color-accent: #22D3EE;
    --color-success: #34D399;
    --color-warning: #FBBF24;
    --color-error: #FB7185;

    /* Neutrals - Inverted */
    --color-text: #F1F5F9;             /* Slate 100 */
    --color-text-secondary: #CBD5E1;   /* Slate 300 */
    --color-text-tertiary: #64748B;    /* Slate 500 */
    --color-border: #334155;           /* Slate 700 */
    --color-bg: #0F172A;               /* Slate 900 */
    --color-bg-alt: #1E293B;           /* Slate 800 */
    --color-surface: #334155;          /* Slate 700 */

    /* Gradients - Dark Mode */
    --gradient-header: linear-gradient(135deg, #1E293B 0%, #172554 50%, #1E3A8A 100%);
    --gradient-button: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    --gradient-accent: linear-gradient(90deg, #3B82F6 0%, #22D3EE 100%);

    /* Shadows - Darker */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  }
}

/* Manual Dark Mode Override */
[data-theme="dark"] {
  --color-brand: #3B82F6;
  --color-brand-light: #60A5FA;
  --color-brand-subtle: #1E3A8A;
  --color-brand-ghost: #172554;
  --color-accent: #22D3EE;
  --color-success: #34D399;
  --color-warning: #FBBF24;
  --color-error: #FB7185;
  --color-text: #F1F5F9;
  --color-text-secondary: #CBD5E1;
  --color-text-tertiary: #64748B;
  --color-border: #334155;
  --color-bg: #0F172A;
  --color-bg-alt: #1E293B;
  --color-surface: #334155;
  --gradient-header: linear-gradient(135deg, #1E293B 0%, #172554 50%, #1E3A8A 100%);
  --gradient-button: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  --gradient-accent: linear-gradient(90deg, #3B82F6 0%, #22D3EE 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ========================================
   CSS Reset
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

/* ========================================
   Base Styles
   ======================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-display: optional;
  padding-top: 60px;
  transition: background-color var(--transition-base), color var(--transition-base);
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

/* ========================================
   Accessibility - Skip Link
   ======================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-brand);
  color: #FFFFFF;
  padding: var(--spacing-md) var(--spacing-lg);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: 0 0 var(--radius-md) 0;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-warning);
  outline-offset: 2px;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  margin-top: 0;
}

h1 {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

h4 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-brand-dark);
}

a:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

strong#privacy-badge-text {
  font-weight: 700;
  color: #FFFFFF;
}

em {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ========================================
   Navigation
   ======================================== */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .main-nav {
    background: rgba(15, 23, 42, 0.8);
    border-bottom-color: rgba(51, 65, 85, 0.8);
  }
}

[data-theme="dark"] .main-nav {
  background: rgba(15, 23, 42, 0.8);
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  background: transparent;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-logo:hover {
  color: var(--color-primary);
}

.nav-logo svg {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s;
  border-radius: 2px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  background: transparent;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--color-brand);
  text-decoration: none;
  background: transparent;
}

/* ========================================
   Typography
   ======================================== */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

small {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ========================================
   Header
   ======================================== */
header {
  text-align: center;
  padding: calc(var(--spacing-xl) * 2.5) var(--spacing-md) var(--spacing-xl);
  background: var(--gradient-header);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Option 1: Brand color with subtle shadow and underline accent (INACTIVE)
header h1 {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-5xl));
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-brand);
  text-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: var(--spacing-sm);
}

header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 2px;
}
*/

/* Option 2: Dark text with brand colored underline (ACTIVE) */
header h1 {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-5xl));
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text);
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: var(--spacing-md);
}

header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 4px;
  background: linear-gradient(90deg,
    var(--color-brand) 0%,
    var(--color-accent) 50%,
    var(--color-brand) 100%);
  background-size: 200% 100%;
  border-radius: 2px;
  box-shadow:
    0 0 2px rgba(37, 99, 235, 0.4),
    0 0 24px rgba(37, 99, 235, 0.2);
  animation: gradientShift 5s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Option 3: Dark text with layered underlines (comment out Options 1-2 and uncomment this)
header h1 {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-5xl));
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: var(--spacing-md);
}

header h1::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: var(--color-brand-light);
  border-radius: 1px;
}

header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 3px;
  background: var(--color-brand);
  border-radius: 2px;
}
*/

/* Option 4: Brand text with subtle glow (comment out Options 1-3 and uncomment this)
header h1 {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-5xl));
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-brand-dark);
  letter-spacing: -0.02em;
  text-shadow:
    0 0 20px rgba(37, 99, 235, 0.2),
    0 2px 4px rgba(37, 99, 235, 0.1);
}
*/

.tagline {
  font-size: clamp(var(--text-lg), 3vw, var(--text-xl));
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.6;
  font-weight: 400;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  background: linear-gradient(135deg, var(--color-brand-light) 0%, var(--color-brand) 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 600;
  box-shadow:
    0 2px 16px rgba(30, 64, 175, 0.2),
    var(--shadow-lg);
  border: 2px solid var(--color-brand-light);
  transition: all var(--transition-base);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.privacy-badge:hover {
  transform: translateY(-3px);
  box-shadow:
    0 6px 24px rgba(30, 64, 175, 0.4),
    var(--shadow-xl);
  border-color: rgb(117, 179, 255);
}

.privacy-badge svg {
  color: #FFFFFF;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.icon-lock {
  flex-shrink: 0;
}

/* ========================================
   Tool Section
   ======================================== */
.tool-section {
  margin-bottom: var(--spacing-2xl);
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: calc(var(--spacing-xl) * 1.5);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-slow);
  background: var(--color-bg-alt);
  margin-bottom: var(--spacing-lg);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.upload-zone:hover,
.upload-zone:focus {
  border-color: var(--color-brand);
  background: var(--color-brand-ghost);
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-md);
  transform: translateY(-2px);
}

.upload-zone.dragover {
  border-color: var(--color-brand);
  background: var(--color-brand-subtle);
  transform: scale(1.01);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.upload-prompt svg {
  color: var(--color-brand);
  opacity: 0.7;
  transition: all var(--transition-base);
}

.upload-zone:hover .upload-prompt svg {
  opacity: 1;
  transform: translateY(-4px);
}

.upload-prompt p {
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: 0;
  color: var(--color-text);
}

.upload-prompt small {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ========================================
   File Info
   ======================================== */
.file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-lg);
}

.file-details {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex: 1;
}

.text-muted {
  color: var(--color-text-muted);
  margin-left: var(--spacing-sm);
}

.btn-icon {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  cursor: pointer;
  padding: var(--spacing-xs);
  border-radius: var(--radius);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
}

.btn-icon:hover {
  background: var(--color-error);
  border-color: var(--color-error);
  color: #fff;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.btn-icon:active {
  transform: scale(0.95);
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.input-wrapper {
  position: relative;
}

.page-input {
  width: 100%;
  padding: var(--spacing-md);
  padding-right: 3rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.page-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.page-input[aria-invalid="true"] {
  border-color: var(--color-error);
}

.validation-icon {
  position: absolute;
  right: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  pointer-events: none;
}

.help-text {
  display: block;
  margin-top: var(--spacing-sm);
}

/* ========================================
   Validation Messages
   ======================================== */
.validation-message {
  margin-top: var(--spacing-sm);
  font-size: 0.875rem;
}

.validation-message.success {
  color: var(--color-success);
}

.validation-message.error {
  color: var(--color-error);
}

.validation-message.warning {
  color: var(--color-warning);
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--text-lg);
  font-weight: 600;
  color: white;
  background: var(--gradient-button);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  min-height: 48px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-primary:hover:not(:disabled)::before {
  opacity: 1;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 3px;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary svg {
  transition: transform var(--transition-base);
}

.btn-primary:hover:not(:disabled) svg {
  transform: scale(1.1);
}

/* Preset Buttons */
.btn-preset {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 44px;
  min-width: 44px;
}

.btn-preset:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  background: var(--color-brand-ghost);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-preset:active {
  transform: translateY(0);
}

.presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

/* ========================================
   Processing Status
   ======================================== */
.processing-status {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  text-align: center;
}

.processing-status.success {
  color: var(--color-success);
  background: #d1fae5;
}

.processing-status.error {
  color: var(--color-error);
  background: #fee2e2;
}

/* ========================================
   Content Sections
   ======================================== */
.content-section {
  margin-top: var(--spacing-2xl);
  padding: var(--spacing-2xl) 0;
}

.steps {
  list-style-position: inside;
  padding-left: 0;
}

.steps li {
  margin-bottom: var(--spacing-sm);
}

/* Section Intro */
.section-intro {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.7;
}

/* Why Use Section */
.why-use p {
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
}

/* Privacy & Security */
.privacy-security h3 {
  color: var(--color-brand-dark);
  margin-top: var(--spacing-xl);
}

.privacy-verification {
  background: var(--color-brand-ghost);
  padding: var(--spacing-xl);
  border-left: 4px solid var(--color-brand);
  border-radius: var(--radius-lg);
  margin-top: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
}

/* How It Works */
.how-it-works .step-detail {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-xl);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-brand);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.how-it-works .step-detail:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.how-it-works .step-detail h3 {
  margin-top: 0;
  color: var(--color-brand-dark);
  font-size: var(--text-xl);
}

/* Technology Note */
.technology-note {
  background: var(--color-brand-ghost);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  margin-top: var(--spacing-xl);
  border: 1px solid var(--color-brand-subtle);
  font-size: var(--text-base);
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

/* Use Cases */
.use-cases .use-case {
  margin-bottom: var(--spacing-2xl);
  padding-left: var(--spacing-xl);
  border-left: 3px solid var(--color-brand-subtle);
  transition: border-color var(--transition-base);
}

.use-cases .use-case:hover {
  border-left-color: var(--color-brand);
}

.use-cases .use-case h3 {
  color: var(--color-brand-dark);
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

.use-case-summary {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-xl);
  background: var(--color-brand-ghost);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-brand);
  font-style: italic;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

/* ========================================
   FAQ
   ======================================== */
.faq-intro {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.7;
}

.faq details {
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.faq details:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand-subtle);
}

.faq details[open] {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-md);
}

.faq summary {
  font-weight: 600;
  font-size: var(--text-lg);
  cursor: pointer;
  user-select: none;
  list-style: none;
  color: var(--color-text);
  transition: color var(--transition-base);
}

.faq summary:hover {
  color: var(--color-brand);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 12px solid var(--color-brand);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-right: var(--spacing-sm);
  transition: transform var(--transition-base);
}

.faq details[open] summary::before {
  transform: rotate(90deg);
}

.faq details p {
  margin-top: var(--spacing-md);
  color: var(--color-text-secondary);
  margin-bottom: 0;
  line-height: 1.7;
}

/* ========================================
   Ad Placeholders
   ======================================== */
.ad-placeholder {
  margin: var(--spacing-xl) auto;
  padding: var(--spacing-lg);
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.ad-placeholder:empty {
  display: none;
}

.ad-placeholder.ad-loaded {
  background: transparent;
  border: none;
  padding: 0;
}

/* ========================================
   Footer
   ======================================== */
footer {
  background: var(--color-surface);
  border-top: 2px solid var(--color-brand-subtle);
  margin-top: var(--spacing-3xl);
  padding: var(--spacing-2xl) 0 var(--spacing-xl);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0.5;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-2xl);
}

.footer-section h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.footer-section h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  color: var(--color-brand);
}

.footer-section p {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
  font-size: var(--text-base);
  position: relative;
}

.footer-section a:hover {
  color: var(--color-brand);
}

.footer-section a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-brand);
  transition: width var(--transition-base);
}

.footer-section a:hover::after {
  width: 100%;
}

.text-link {
  background: none;
  border: none;
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

.text-link:hover {
  color: var(--color-primary-dark);
}

.footer-bottom {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md) 0;
  margin-top: var(--spacing-2xl);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

/* ========================================
   Blog Posts
   ======================================== */
.blog-post {
  margin-bottom: var(--spacing-3xl);
  padding-bottom: var(--spacing-2xl);
  border-bottom: 2px solid var(--color-brand-subtle);
}

.blog-post:last-of-type {
  border-bottom: none;
}

.post-header {
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
}

.post-header h2 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.post-meta {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.post-meta time {
  font-weight: 500;
  color: var(--color-brand);
}

.reading-time {
  opacity: 0.7;
}

.post-content {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-text);
  max-width: 720px;
}

.post-content h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-lg);
  color: var(--color-text);
  letter-spacing: -0.01em;
  position: relative;
  padding-left: var(--spacing-md);
}

.post-content h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 4px;
  height: 1.2em;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.post-content p {
  margin-bottom: var(--spacing-lg);
}

.post-content strong {
  color: var(--color-text);
  font-weight: 600;
}

.post-content em {
  color: var(--color-text-secondary);
  font-style: italic;
}

.post-content hr {
  margin: var(--spacing-2xl) 0;
  border: none;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0.3;
  border-radius: 1px;
}

.post-content ul,
.post-content ol {
  margin-bottom: var(--spacing-lg);
  padding-left: var(--spacing-xl);
}

.post-content li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.7;
}

.post-content a {
  color: var(--color-brand);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-brand-subtle);
  transition: all var(--transition-base);
}

.post-content a:hover {
  color: var(--color-brand-dark);
  text-decoration-color: var(--color-brand);
}

/* ========================================
   Privacy Modal
   ======================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  position: relative;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: var(--spacing-xl);
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--spacing-xs);
  border-radius: var(--radius);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.modal-close:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  padding-right: var(--spacing-xl);
}

.modal-content h3 {
  margin-top: var(--spacing-xl);
}

.modal-content ul,
.modal-content ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.modal-content li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Focus States (Keyboard Navigation)
   ======================================== */
*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

