/* ============================================================
   SnackDown – Design System
   ============================================================ */

/* CSS Variables – Light Mode */
:root {
    --radius: 0.625rem;
    --background: oklch(1 0 0);
    --foreground: oklch(0.141 0.005 285.823);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.141 0.005 285.823);
    --popover: oklch(1 0 0);
    --popover-foreground: oklch(0.141 0.005 285.823);
    --primary: oklch(0.21 0.006 285.885);
    --primary-foreground: oklch(0.985 0 0);
    --secondary: oklch(0.967 0.001 286.375);
    --secondary-foreground: oklch(0.21 0.006 285.885);
    --muted: oklch(0.967 0.001 286.375);
    --muted-foreground: oklch(0.552 0.016 285.938);
    --accent: oklch(0.967 0.001 286.375);
    --accent-foreground: oklch(0.21 0.006 285.885);
    --destructive: oklch(0.637 0.237 25.331);
    --destructive-foreground: oklch(0.637 0.237 25.331);
    --border: oklch(0.92 0.004 286.32);
    --input: oklch(0.871 0.006 286.286);
    --ring: oklch(0.871 0.006 286.286);
    --success: oklch(0.723 0.191 142.542);
    --success-foreground: oklch(0.985 0 0);
    --navbar-height: 3.5rem;
    /* Pages.css Compatibility */
    --text-primary: var(--foreground);
    --text-secondary: var(--muted-foreground);
    --surface-elevated: var(--card);
    --border-subtle: var(--border);
    --border-default: var(--border);
    --surface-base: var(--background);
    --accent-primary: var(--primary);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* CSS Variables – Dark Mode */
.dark {
    --background: oklch(0.141 0.005 285.823);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.141 0.005 285.823);
    --card-foreground: oklch(0.985 0 0);
    --popover: oklch(0.141 0.005 285.823);
    --popover-foreground: oklch(0.985 0 0);
    --primary: oklch(0.985 0 0);
    --primary-foreground: oklch(0.21 0.006 285.885);
    --secondary: oklch(0.274 0.006 286.033);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.21 0.006 285.885);
    --muted-foreground: oklch(0.65 0.01 286);
    --accent: oklch(0.21 0.006 285.885);
    --accent-foreground: oklch(0.985 0 0);
    --destructive: oklch(0.396 0.141 25.723);
    --destructive-foreground: oklch(0.637 0.237 25.331);
    --border: oklch(0.274 0.006 286.033);
    --input: oklch(0.274 0.006 286.033);
    --ring: oklch(0.442 0.017 285.786);
    --success: oklch(0.65 0.18 142);
    --success-foreground: oklch(0.985 0 0);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Container
   ======================================== */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(1.875rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); }
h3 { font-size: 1.125rem; }

p {
    color: var(--muted-foreground);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    height: 2.25rem;
    padding: 0 1rem;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid transparent;
    cursor: pointer;
    outline: none;
    transition: color 0.15s, box-shadow 0.15s, background-color 0.15s;
    text-decoration: none;
}

.btn:focus-visible {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent);
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.btn svg {
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    flex-shrink: 0;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.btn-primary:hover {
    background-color: color-mix(in oklch, var(--primary) 90%, transparent);
}

.btn-outline {
    background: var(--background);
    color: var(--foreground);
    border-color: var(--input);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.btn-ghost {
    background: transparent;
    color: var(--foreground);
}

.btn-ghost:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.btn-lg {
    height: 2.5rem;
    padding: 0 2rem;
}

.btn-sm {
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: color-mix(in oklch, var(--background) 80%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    text-decoration: none;
}

.logo svg {
    width: 1.25rem;
    height: 1.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    height: 2rem;
    padding: 0 0.75rem;
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: calc(var(--radius) - 2px);
    transition: color 0.15s, background-color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--foreground);
    background-color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--foreground);
    border-radius: calc(var(--radius) - 2px);
}

.mobile-menu-btn:hover {
    background-color: var(--accent);
}

.nav-drawer-header {
    display: none;
}

.nav-drawer-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--muted-foreground);
    border-radius: calc(var(--radius) - 2px);
    display: flex;
    align-items: center;
}

.nav-drawer-close:hover {
    background-color: var(--accent);
    color: var(--foreground);
}

.nav-drawer-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.theme-toggle {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground);
    border-radius: calc(var(--radius) - 2px);
    transition: background-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
    background-color: var(--accent);
    color: var(--foreground);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 7rem 0 0;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.hero-content h1 {
    margin-bottom: 1rem;
    color: var(--foreground);
}

.hero-description {
    font-size: 1rem;
    color: var(--muted-foreground);
    max-width: 480px;
    margin: 0 auto 1.75rem;
    line-height: 1.6;
}

/* ========================================
   Section Styles
   ======================================== */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--muted);
}

.section-header {
    text-align: center;
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

.section-header h2 {
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.section-header p {
    font-size: 0.9375rem;
}

/* ========================================
   Downloader Tool Section
   ======================================== */
.compressor-section {
    padding: 0 0 4rem;
}

.compressor-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Upload / URL input area */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0 0 1rem;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform-origin: top center;
}

/* Row: input grows, button stays fixed width */
.url-input-row {
    display: flex;
    gap: 0.625rem;
    align-items: stretch;
}

/* URL input wrapper takes all remaining space */
.url-input-row .url-input-wrapper {
    flex: 1;
    min-width: 0;
}

/* URL input row */
.url-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: calc(var(--radius) + 6px);
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    gap: 0.5rem;
}

.url-input-wrapper:focus-within {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 10%, transparent);
}

.url-input-wrapper svg {
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
    flex-shrink: 0;
}

.url-input-wrapper input {
    flex: 1;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--foreground);
    outline: none;
    min-width: 0;
}

.url-input-wrapper input::placeholder {
    color: var(--muted-foreground);
}

.search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.125rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: color 0.15s;
    flex-shrink: 0;
}

.search-clear:hover {
    color: var(--foreground);
}

.search-clear svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Inline paste button inside the URL input wrapper */
.url-paste-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    padding: 0.4rem 0.75rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--muted);
    color: var(--muted-foreground);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.url-paste-btn:hover {
    background: var(--accent);
    color: var(--foreground);
}

/* Big primary fetch button */
.btn-add-files {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: #FAD500;
    color: #000;
    border: none;
    border-radius: calc(var(--radius) + 6px);
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.btn-add-files:hover {
    opacity: 0.88;
}

.btn-add-files:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-add-files svg {
    width: 1rem;
    height: 1rem;
}

.upload-hint {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    text-align: center;
}

/* ========================================
   Error Banner
   ======================================== */
.error-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: color-mix(in oklch, var(--destructive) 10%, var(--background));
    border: 1px solid color-mix(in oklch, var(--destructive) 40%, transparent);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    animation: fadeIn 0.2s ease;
}

.error-banner svg {
    width: 1rem;
    height: 1rem;
    color: var(--destructive);
    flex-shrink: 0;
}

.error-banner span {
    flex: 1;
    font-size: 0.875rem;
    color: var(--destructive);
    font-weight: 500;
}

.error-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--destructive);
    opacity: 0.7;
    display: flex;
    align-items: center;
    padding: 0.125rem;
    border-radius: calc(var(--radius) - 2px);
    transition: opacity 0.15s;
}

.error-close:hover {
    opacity: 1;
}

.error-close svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* ========================================
   Loading Section
   ======================================== */
.loading-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 1rem;
    animation: fadeIn 0.2s ease;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2.5px solid var(--muted);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loading-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--foreground);
}

.loading-sub {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

/* ========================================
   Comp Toolbar
   ======================================== */
.comp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    animation: compSlideDown 0.3s ease both;
}

@keyframes compSlideDown {
    0%   { opacity: 0; transform: translateY(-12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.comp-toolbar-left,
.comp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Shared pill button base */
.comp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: opacity 0.15s, background 0.15s;
}

.comp-btn svg { width: 15px; height: 15px; }

.comp-btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}
.comp-btn-primary:hover { opacity: 0.88; }

.comp-btn-danger {
    background: transparent;
    color: var(--destructive);
    border-color: var(--destructive);
}
.comp-btn-danger:hover { background: color-mix(in oklch, var(--destructive) 10%, transparent); }

.comp-btn-outline {
    background: transparent;
    color: var(--foreground);
    border-color: var(--border);
}
.comp-btn-outline:hover { background: var(--muted); }

.comp-btn-snack {
    background: #FAD500;
    color: #000;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(250, 213, 0, 0.35);
}
.comp-btn-snack:hover { opacity: 0.9; box-shadow: 0 4px 18px rgba(250, 213, 0, 0.45); }

.comp-btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border-color: var(--border);
}
.comp-btn-secondary:hover { opacity: 0.88; }

.comp-btn-icon {
    padding: 0.5rem;
    background: transparent;
    color: var(--muted-foreground);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
}
.comp-btn-icon:hover { background: var(--muted); color: var(--foreground); }

.comp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Result Card
   ======================================== */
.result-wrap {
    animation: fadeIn 0.3s ease;
}

.result-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
    margin-bottom: 1rem;
}

.result-thumb-row {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--muted);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-thumb-row video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: var(--muted);
}

.dark .result-thumb-row video {
    background: #000;
}

.result-thumb-row.no-image video {
    display: none;
}

.thumb-placeholder-icon {
    color: var(--muted-foreground);
    opacity: 0.35;
}

.thumb-placeholder-icon svg {
    width: 3.5rem;
    height: 3.5rem;
}

.result-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.result-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    background: var(--muted);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.result-meta-chip svg {
    width: 0.75rem;
    height: 0.75rem;
}

.result-post-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--foreground);
    line-height: 1.45;
}

.result-stats {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.result-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

.result-stat svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* ========================================
   Quality Selector
   ======================================== */
.quality-section {
    margin-bottom: 1rem;
}

.quality-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.quality-btns-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.quality-btn {
    padding: 0.4rem 0.875rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--muted);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.quality-btn:hover:not(.active) {
    background: var(--accent);
}

.quality-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* ========================================
   Download Actions
   ======================================== */
.download-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.download-actions .comp-btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
    padding: 0.625rem 1rem;
}

/* ========================================
   Progress Section
   ======================================== */
.progress-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.2s ease;
}

.progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
}

.progress-pct {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background: var(--muted);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-steps {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    transition: color 0.2s;
}

.progress-step.active {
    color: var(--primary);
    font-weight: 600;
}

.progress-step.done {
    color: var(--success);
}

.progress-step svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* ========================================
   Success Row
   ======================================== */
.success-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: color-mix(in oklch, var(--success) 10%, var(--background));
    border: 1px solid color-mix(in oklch, var(--success) 30%, transparent);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    animation: fadeIn 0.25s ease;
}

.success-row svg {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--success);
    flex-shrink: 0;
}

.success-row span {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--success);
}

.success-dl-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    transition: background 0.15s;
}

.success-dl-link:hover {
    background: var(--accent);
}

/* ========================================
   Features Section
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: var(--ring);
}

.feature-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--muted);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.feature-icon svg {
    width: 1rem;
    height: 1rem;
    opacity: 0.6;
}

.feature-card h3 {
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: var(--foreground);
}

.feature-card p {
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* ========================================
   How It Works
   ======================================== */
.how-to-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.how-to-card {
    position: relative;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    transition: all 0.2s ease;
}

.how-to-card:hover {
    border-color: var(--ring);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.how-to-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--muted);
    line-height: 1;
}

.how-to-content {
    position: relative;
    z-index: 1;
}

.how-to-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    color: var(--primary-foreground);
}

.how-to-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.how-to-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.how-to-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-container {
    max-width: 672px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
}

.dark .faq-container {
    border-color: oklch(0.32 0.006 286.033);
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    text-align: left;
    outline: none;
    transition: background-color 0.15s;
    gap: 0.75rem;
}

.faq-trigger:hover {
    background-color: color-mix(in oklch, var(--accent) 50%, transparent);
}

.faq-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: var(--muted-foreground);
    transition: transform 0.2s;
}

.faq-item[data-state="open"] .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    overflow: hidden;
    transition: grid-template-rows 0.2s ease, opacity 0.2s ease;
}

.faq-item[data-state="open"] .faq-content {
    grid-template-rows: 1fr;
    opacity: 1;
}

.faq-content > p {
    min-height: 0;
    padding: 0 1.25rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--muted-foreground);
    overflow: hidden;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 3rem 0 1.5rem;
    background: var(--muted);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.25fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand .logo {
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.8125rem;
    max-width: 280px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.footer-column h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.375rem;
}

.footer-column a {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-column a:hover {
    color: var(--foreground);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 0.75rem;
}

/* ========================================
   Utility
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   Animations
   ======================================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        height: 100vh;
        background: var(--background);
        flex-direction: column;
        display: flex;
        padding: 0 0 1rem;
        gap: 0;
        border-right: 1px solid var(--border);
        box-shadow: 4px 0 24px rgba(0,0,0,0.12);
        z-index: 1001;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-drawer-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }

    .nav-drawer-backdrop.active {
        display: block;
    }

    .nav-links li {
        width: 100%;
        padding: 0 0.5rem;
    }

    .nav-links a {
        width: 100%;
        justify-content: flex-start;
        height: auto;
        padding: 0.625rem 0.75rem;
    }

    .nav-drawer-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        list-style: none;
        padding: 1.25rem 1rem;
        border-bottom: 1px solid var(--border);
        width: 100%;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .how-to-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-actions {
        flex-direction: column;
    }

    .download-actions .comp-btn {
        min-width: unset;
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .how-to-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .url-input-row {
        flex-direction: column;
    }

    .btn-add-files {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        border-radius: var(--radius);
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
}

/* ========================================
   SEO Content Section
   ======================================== */
.seo-content-section .section-header {
    margin-bottom: 2.5rem;
}

.seo-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.seo-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    padding: 1.5rem;
}

.seo-block h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

.seo-block p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   Contact Page Extras
   ======================================== */
.contact-email-link {
    color: #FAD500;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.contact-email-link:hover {
    text-decoration: underline;
}

.contact-reply-time {
    font-size: 0.78rem;
    color: var(--muted-foreground);
    margin: 0.3rem 0 0;
}

.contact-card-highlight {
    border-color: color-mix(in srgb, #FAD500 35%, transparent);
}

.page-meta a {
    color: #FAD500;
    font-weight: 500;
    text-decoration: none;
}

.page-meta a:hover {
    text-decoration: underline;
}
