/* =============================================
   FontCompare — Modern, Strong & Realistic UI
   ============================================= */

:root {
    /* Light theme */
    --bg: #f6f7fb;
    --bg-elev: #ffffff;
    --bg-elev-2: #ffffff;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --text: #0b1220;
    --text-muted: #475569;
    --text-soft: #64748b;
    --primary: #3b5bff;
    --primary-hover: #2945e6;
    --primary-soft: rgba(59, 91, 255, 0.1);
    --accent: #8b5cf6;
    --gradient: linear-gradient(135deg, #3b5bff 0%, #8b5cf6 50%, #ec4899 100%);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.05), 0 10px 20px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 24px rgba(15, 23, 42, 0.08), 0 24px 48px rgba(15, 23, 42, 0.10);
    --shadow-glow: 0 8px 32px rgba(59, 91, 255, 0.18);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --header-h: 72px;
    --font-sans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

[data-theme="dark"] {
    --bg: #07090f;
    --bg-elev: #0e1320;
    --bg-elev-2: #131a2b;
    --surface: rgba(20, 26, 43, 0.6);
    --surface-strong: rgba(20, 26, 43, 0.9);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-soft: #64748b;
    --primary: #6b8aff;
    --primary-hover: #8aa3ff;
    --primary-soft: rgba(107, 138, 255, 0.15);
    --accent: #a78bfa;
    --gradient: linear-gradient(135deg, #6b8aff 0%, #a78bfa 50%, #f472b6 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 10px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.35), 0 24px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 8px 32px rgba(107, 138, 255, 0.25);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* =============================================
   AURORA BACKGROUND
   ============================================= */
.aurora {
    position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.aurora-blob {
    position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.45;
    will-change: transform;
}
.blob-1 {
    width: 520px; height: 520px; background: #3b5bff;
    top: -160px; left: -120px;
    animation: float1 22s ease-in-out infinite;
}
.blob-2 {
    width: 480px; height: 480px; background: #ec4899;
    top: 40%; right: -120px;
    animation: float2 26s ease-in-out infinite;
}
.blob-3 {
    width: 460px; height: 460px; background: #8b5cf6;
    bottom: -180px; left: 30%;
    animation: float3 28s ease-in-out infinite;
}
[data-theme="dark"] .aurora-blob { opacity: 0.28; }
.grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, rgba(15,23,42,0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15,23,42,0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
[data-theme="dark"] .grid-overlay {
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
}
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(80px,60px) scale(1.1);} }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(-100px,-40px) scale(1.05);} }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(60px,-80px) scale(1.08);} }

/* =============================================
   HEADER
   ============================================= */
.header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}
.header.scrolled {
    background: var(--surface-strong);
    box-shadow: var(--shadow-md);
}
.header-inner {
    height: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 19px; letter-spacing: -0.02em;
    transition: transform 0.2s ease;
}
.logo:hover { transform: translateY(-1px); }
.logo-mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: var(--gradient);
    color: white; border-radius: 10px;
    box-shadow: var(--shadow-glow);
}
.logo-mark svg { width: 22px; height: 22px; }
.logo-text { color: var(--text); }
.logo-accent {
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
    padding: 8px 14px; border-radius: 8px;
    font-size: 14px; font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    position: relative;
}
.nav-link:hover { color: var(--text); background: var(--primary-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    white-space: nowrap;
    user-select: none;
}
.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-glow);
    position: relative; overflow: hidden;
}
.btn-primary::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0; transition: opacity 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(59,91,255,0.32); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary svg { width: 16px; height: 16px; }
[dir="rtl"] .btn-primary svg, [dir="rtl"] .btn-ghost svg { transform: scaleX(-1); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
    backdrop-filter: blur(10px);
}
.btn-ghost:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}
.btn-ghost svg { width: 16px; height: 16px; }
.btn-icon {
    width: 42px; height: 42px; padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    backdrop-filter: blur(10px);
    color: var(--text);
    display: grid; place-items: center;
    transition: all 0.2s ease;
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-icon svg { width: 18px; height: 18px; }
.icon-sun { display: block; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-cta { padding-right: 18px; }

/* =============================================
   HERO
   ============================================= */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(10px);
    font-size: 13px; font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.hero-badge .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
    50% { box-shadow: 0 0 0 8px rgba(16,185,129,0.05); }
}
.hero-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.hero-subtitle {
    font-size: clamp(15px, 1.6vw, 19px);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.7;
}
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 64px; }
.hero-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 720px; margin: 0 auto;
    padding: 24px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}
.stat-num {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700; letter-spacing: -0.02em;
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.scroll-hint {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: 11px; color: var(--text-soft); letter-spacing: 0.1em; text-transform: uppercase;
    opacity: 0.7;
}
.scroll-line {
    width: 1px; height: 40px; background: var(--text-soft);
    position: relative; overflow: hidden;
}
.scroll-line::after {
    content: ''; position: absolute; top: -100%; left: 0; right: 0; height: 50%;
    background: var(--primary);
    animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown { 0% { top: -100%; } 100% { top: 200%; } }

/* =============================================
   SECTIONS
   ============================================= */
section { padding: 80px 0; position: relative; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag {
    display: inline-block;
    padding: 6px 14px; border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700; letter-spacing: -0.025em;
    margin-bottom: 12px;
}
.section-desc { color: var(--text-muted); font-size: 16px; max-width: 540px; margin: 0 auto; }

/* =============================================
   UPLOAD ZONE
   ============================================= */
.upload-zone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-xl);
    background: var(--surface);
    backdrop-filter: blur(10px);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.upload-zone::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at center, var(--primary-soft) 0%, transparent 70%);
    opacity: 0; transition: opacity 0.3s;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: var(--surface-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.upload-zone:hover::before, .upload-zone.dragover::before { opacity: 1; }
.upload-content { position: relative; z-index: 1; }
.upload-icon {
    width: 72px; height: 72px; margin: 0 auto 20px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-glow);
    animation: iconBounce 3s ease-in-out infinite;
}
.upload-icon svg { width: 32px; height: 32px; }
@keyframes iconBounce { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-6px);} }
.upload-content h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.upload-content p { color: var(--text-muted); margin-bottom: 18px; }
.upload-formats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.upload-formats span {
    padding: 4px 12px; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary);
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
}

/* =============================================
   CHIPS
   ============================================= */
.fonts-chips {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-top: 20px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}
.font-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 8px 6px 14px;
    border-radius: 999px;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    font-size: 13px; font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.font-chip:hover { border-color: var(--primary); }
.chip-remove {
    width: 22px; height: 22px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.chip-remove:hover { background: #ef4444; color: white; }
.chip-remove svg { width: 12px; height: 12px; }

/* =============================================
   CONTROLS
   ============================================= */
.controls {
    margin-top: 24px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}
.control-text { margin-bottom: 20px; }
.control-group label {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.control-value {
    font-family: var(--font-mono); font-size: 12px;
    color: var(--primary); font-weight: 600;
    padding: 2px 8px; border-radius: 6px;
    background: var(--primary-soft);
}
.controls-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    align-items: end;
}
textarea, input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--bg-elev);
    color: var(--text);
    font-family: inherit; font-size: 14px;
    transition: all 0.2s ease;
    resize: vertical;
}
textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px;
    background: var(--border);
    border-radius: 3px; cursor: pointer;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--gradient);
    border: 3px solid var(--bg-elev);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform 0.15s ease;
}
input[type="range"]::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--primary); border: 3px solid var(--bg-elev);
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

.color-pickers { display: flex; gap: 10px; }
.color-item {
    flex: 1;
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--bg-elev);
    transition: all 0.2s ease;
}
.color-item:hover { border-color: var(--primary); }
.color-item input[type="color"] {
    -webkit-appearance: none; appearance: none;
    width: 32px; height: 32px;
    border: none; border-radius: 6px;
    background: none; cursor: pointer; padding: 0;
}
.color-item input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-item input[type="color"]::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 6px; }
.color-item span { font-size: 13px; color: var(--text-muted); }

.action-buttons { display: flex; gap: 8px; }
.action-buttons .btn-primary, .action-buttons .btn-ghost { flex: 1; }

.format-select {
    margin-top: 18px; padding-top: 18px;
    border-top: 1px dashed var(--border-strong);
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    font-size: 13px; color: var(--text-muted);
}
.format-select label {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    cursor: pointer; transition: all 0.2s ease;
}
.format-select label:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}
.format-select input[type="radio"] { accent-color: var(--primary); }
.quality-info {
    margin-inline-start: auto;
    font-family: var(--font-mono); font-size: 12px;
    color: var(--text-soft);
}

/* =============================================
   COMPARISON BOX
   ============================================= */
.comparison-box {
    margin-top: 24px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 320px;
    transition: all 0.3s ease;
}
.empty-state {
    padding: 80px 24px;
    text-align: center;
    color: var(--text-soft);
}
.empty-state svg { width: 56px; height: 56px; margin: 0 auto 14px; opacity: 0.5; }
.empty-state p { font-size: 14px; }

.comparison-grid {
    display: grid; gap: 1px;
    background: var(--border);
}
.font-row {
    background: var(--bg-elev);
    padding: 24px 28px;
    display: grid; grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: center;
    transition: background-color 0.2s ease;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.font-row:hover { background: var(--surface-strong); }
.font-info {
    display: flex; flex-direction: column; gap: 4px;
    padding-inline-end: 16px;
    border-inline-end: 2px solid var(--border);
}
.font-name {
    font-size: 14px; font-weight: 600;
    color: var(--text);
    word-break: break-word;
}
.font-meta {
    font-family: var(--font-mono); font-size: 11px;
    color: var(--text-soft);
}
.font-preview {
    font-size: 48px; line-height: 1.4;
    word-break: break-word;
    transition: all 0.2s ease;
    overflow-wrap: break-word;
}

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

/* =============================================
   FEATURES
   ============================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.feature-card {
    padding: 28px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; inset: 0;
    background: var(--gradient);
    opacity: 0; transition: opacity 0.3s;
    z-index: -1;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: var(--gradient);
    color: white;
    margin-bottom: 18px;
    box-shadow: var(--shadow-glow);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* =============================================
   STEPS
   ============================================= */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    counter-reset: step;
}
.step {
    padding: 32px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
}
.step:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.step-num {
    font-family: var(--font-mono);
    font-size: 44px; font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1; margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.step h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-muted); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
    margin-top: 80px;
    padding: 56px 0 24px;
    background: var(--surface-strong);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}
.footer-brand p {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 14px; max-width: 320px;
}
.footer-col h4 {
    font-size: 14px; font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted);
}
.socials, .footer-links { display: flex; flex-direction: column; gap: 8px; }
.social-link, .footer-link {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px; font-weight: 500;
    transition: all 0.2s ease;
    width: fit-content; max-width: 100%;
}
.social-link svg, .footer-link svg {
    width: 18px; height: 18px;
    color: var(--text-muted);
    transition: color 0.2s ease;
    flex-shrink: 0;
}
.social-link:hover, .footer-link:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    transform: translateX(-3px);
}
.social-link:hover svg, .footer-link:hover svg { color: var(--primary); }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
    gap: 12px;
    font-size: 13px; color: var(--text-muted);
}
.footer-bottom a { color: var(--primary); font-weight: 600; }

/* =============================================
   TOAST
   ============================================= */
.toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(120px);
    padding: 12px 20px;
    background: var(--text);
    color: var(--bg);
    border-radius: 12px;
    font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.error { background: #ef4444; color: white; }
.toast.success { background: #10b981; color: white; }

/* =============================================
   REVEAL ANIMATIONS
   ============================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.exit { opacity: 0.3; transform: translateY(-20px); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .nav { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .font-row { grid-template-columns: 1fr; gap: 12px; }
    .font-info { border-inline-end: none; border-bottom: 2px solid var(--border); padding-bottom: 10px; padding-inline-end: 0; }
    .controls-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    section { padding: 60px 0; }
    .hero { padding: 60px 0 50px; }
    .hero-actions .btn-primary, .hero-actions .btn-ghost { width: 100%; }
    .header-actions .btn-cta span { display: none; }
    .header-actions .btn-cta { padding: 10px 12px; }
    .upload-zone { padding: 32px 16px; }
    .font-row { padding: 18px 16px; }
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Selection */
::selection { background: var(--primary); color: white; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
