/* ============================================
   Universal Image Converter — Premium Stylesheet
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Colors - Dark Theme (default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a24;
    --bg-card: #13131d;
    --bg-card-hover: #1a1a28;
    --bg-elevated: #1e1e2e;
    --bg-input: #16161f;

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-tertiary: #6b6b80;
    --text-inverse: #0a0a0f;

    --border-primary: rgba(255, 255, 255, 0.06);
    --border-secondary: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.15);

    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-tertiary: #ec4899;

    --gradient-primary: linear-gradient(135deg, #6366f1, #a855f7);
    --gradient-secondary: linear-gradient(135deg, #a855f7, #ec4899);
    --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.1));

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --nav-height: 72px;
    --container-max: 1200px;
    --container-narrow: 800px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f8fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f0f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5fa;
    --bg-elevated: #ffffff;
    --bg-input: #f0f0f5;

    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-tertiary: #8888a0;
    --text-inverse: #f0f0f5;

    --border-primary: rgba(0, 0, 0, 0.06);
    --border-secondary: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.1);

    --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.08), rgba(236, 72, 153, 0.05));
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--accent-secondary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Animated Background ---------- */
.bg-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-primary);
    transition: background var(--transition-base), border-color var(--transition-base);
}

[data-theme="light"] .navbar {
    background: rgba(248, 248, 252, 0.8);
}

.nav-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: width var(--transition-base);
}

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

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-secondary);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.moon-icon {
    display: block;
}

.sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: block;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: calc(var(--nav-height) + 80px) 24px 80px;
    text-align: center;
    overflow: hidden;
}

.hero-container {
    max-width: var(--container-narrow);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 56px;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-secondary);
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    transform: translate(-50%, -60%);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.06) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

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

/* ---------- Section Common ---------- */
.section-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ---------- Converter Section ---------- */
.converter-section {
    padding: 100px 0;
    position: relative;
}

.converter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.converter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

.converter-card:hover {
    border-color: var(--border-hover);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-secondary);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    background: var(--bg-input);
}

.drop-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-zone.drag-over {
    border-color: var(--accent-primary);
    transform: scale(1.01);
}

.drop-zone.drag-over::before {
    opacity: 0.05;
}

.drop-zone-content {
    position: relative;
    z-index: 1;
}

.drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    margin-bottom: 16px;
    transition: transform var(--transition-base);
}

.drop-zone:hover .drop-icon {
    transform: translateY(-4px);
}

.drop-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.drop-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 8px;
}

.drop-formats {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* File List */
.file-list-wrapper {
    margin-top: 24px;
}

.file-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.file-list-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-list-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.file-list::-webkit-scrollbar {
    width: 4px;
}

.file-list::-webkit-scrollbar-track {
    background: transparent;
}

.file-list::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 2px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-primary);
    transition: all var(--transition-fast);
    animation: slideIn 0.3s ease-out backwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
}

.file-item:hover {
    border-color: var(--border-hover);
}

.file-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.file-remove {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.file-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Controls */
.converter-controls {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.format-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.format-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-secondary);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.format-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.format-btn.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Quality Slider */
.quality-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    outline: none;
    transition: all var(--transition-fast);
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: transform var(--transition-fast);
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Resize */
.control-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.control-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* Resize Mode Selector */
.resize-mode-selector {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.resize-mode-btn {
    flex: 1;
    padding: 8px 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: calc(var(--radius-sm) - 2px);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.resize-mode-btn:hover {
    color: var(--text-primary);
}

.resize-mode-btn.active {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

/* Resize Panels */
.resize-panel {
    margin-top: 12px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.resize-inputs {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.resize-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.resize-field-label {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resize-input {
    width: 110px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-secondary);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.875rem;
    transition: border-color var(--transition-fast);
}

.resize-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.resize-x {
    color: var(--text-tertiary);
    font-weight: 600;
    padding-bottom: 10px;
}

.aspect-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding-bottom: 10px;
}

.aspect-label svg {
    opacity: 0.6;
}

.aspect-label:has(input:checked) svg {
    color: var(--accent-primary);
    opacity: 1;
}

/* Percentage Mode */
.percentage-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.percentage-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-primary);
    min-width: 52px;
    text-align: right;
}

.percentage-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    padding: 0 2px;
}

.percentage-marks span {
    font-size: 0.625rem;
    color: var(--text-tertiary);
}

/* Preset Mode */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    border: 1px solid var(--border-primary);
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.preset-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.preset-btn.active {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.preset-size {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.preset-label {
    font-size: 0.625rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Output Preview */
.output-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--accent-primary);
}

.output-preview svg {
    flex-shrink: 0;
}

/* File Dimension Info */
.file-dims {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 3px;
}

.file-dims svg {
    opacity: 0.5;
}

/* Convert Button */
.btn-convert {
    width: 100%;
    padding: 16px 28px;
    font-size: 1.0625rem;
    border-radius: var(--radius-md);
}

.btn-convert:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Progress */
.progress-section {
    margin-top: 24px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Results */
.results-section {
    margin-top: 28px;
    text-align: center;
}

.results-header {
    margin-bottom: 24px;
}

.results-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    margin-bottom: 12px;
}

.results-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.results-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    max-height: 200px;
    overflow-y: auto;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-primary);
    text-align: left;
}

.result-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.result-download {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.result-download:hover {
    background: var(--accent-primary);
    color: #fff;
}

.results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Features Section ---------- */
.features-section {
    padding: 100px 0;
    background: var(--bg-secondary);
    transition: background var(--transition-base);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--icon-color), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--icon-color) 10%, transparent);
    color: var(--icon-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- Formats Section ---------- */
.formats-section {
    padding: 100px 0;
}

.formats-table-wrapper {
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    background: var(--bg-card);
}

.formats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.formats-table th,
.formats-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
}

.formats-table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
}

.formats-table tr:last-child td {
    border-bottom: none;
}

.formats-table tr:hover td {
    background: var(--bg-card-hover);
}

.format-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.format-jpg { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.format-png { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.format-webp { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.format-bmp { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.format-tiff { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.format-ico { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.format-gif { background: rgba(20, 184, 166, 0.1); color: #14b8a6; }

.check {
    color: #22c55e;
    font-weight: 700;
    font-size: 1.125rem;
}

/* ---------- FAQ Section ---------- */
.faq-section {
    padding: 100px 0;
    background: var(--bg-secondary);
    transition: background var(--transition-base);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.faq-item.active {
    border-color: var(--accent-primary);
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--accent-primary);
}

.faq-chevron {
    flex-shrink: 0;
    transition: transform var(--transition-base);
    color: var(--text-tertiary);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 20px 18px;
}

.faq-answer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
    padding: 60px 0 0;
    border-top: 1px solid var(--border-primary);
    transition: border-color var(--transition-base);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    padding-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-tagline {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-top: 12px;
    line-height: 1.6;
}

.footer-links-grid {
    display: flex;
    gap: 60px;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--border-primary);
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.social-link {
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.social-link:hover {
    color: var(--text-primary);
}

/* ---------- Toast ---------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out;
    max-width: 380px;
    font-size: 0.875rem;
}

.toast.success {
    border-left: 3px solid #22c55e;
}

.toast.error {
    border-left: 3px solid #ef4444;
}

.toast.info {
    border-left: 3px solid var(--accent-primary);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-primary);
        padding: 8px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        padding: 12px 24px;
        width: 100%;
    }

    .nav-link::after {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 24px;
    }

    .converter-card {
        padding: 20px;
    }

    .format-selector {
        gap: 6px;
    }

    .format-btn {
        padding: 6px 14px;
        font-size: 0.75rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links-grid {
        gap: 32px;
        flex-wrap: wrap;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: calc(var(--nav-height) + 48px) 16px 48px;
    }

    .converter-section {
        padding: 60px 0;
    }

    .features-section,
    .formats-section,
    .faq-section {
        padding: 60px 0;
    }

    .section-container {
        padding: 0 16px;
    }

    .drop-zone {
        padding: 32px 16px;
    }

    .resize-input {
        width: 80px;
    }

    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .resize-mode-selector {
        flex-wrap: wrap;
    }

    .resize-mode-btn {
        font-size: 0.6875rem;
    }
}

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
