/* ============================================
   FILE CONVERTER SUITE - MAIN STYLES
   ============================================ */

:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --primary-light: #8B83FF;
    --primary-bg: rgba(108, 99, 255, 0.08);
    --secondary: #FF6584;
    --success: #00C9A7;
    --success-dark: #00A88B;
    --warning: #FFB84D;
    --danger: #FF6B6B;
    --info: #4D9AFF;
    
    --bg: #F6F8FC;
    --bg-card: #FFFFFF;
    --bg-hover: #F0F2F6;
    --bg-alt: #F8FAFE;
    --bg-elevated: #FFFFFF;
    
    --text: #1A1A2E;
    --text-secondary: #4A4A6A;
    --text-muted: #8A8AA8;
    --text-inverse: #FFFFFF;
    
    --border: #E4E6F0;
    --border-light: #F0F2F6;
    --border-hover: #C8CAE0;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 40px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.10);
    --shadow-xl: 0 30px 80px rgba(0,0,0,0.15);
    
    --radius: 16px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1440px;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

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

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-spinner {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 60px;
}

.preloader-spinner div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 48px;
    height: 48px;
    margin: 6px;
    border: 4px solid var(--primary);
    border-radius: 50%;
    animation: preloaderSpin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--primary) transparent transparent transparent;
}

.preloader-spinner div:nth-child(1) { animation-delay: -0.45s; }
.preloader-spinner div:nth-child(2) { animation-delay: -0.3s; }
.preloader-spinner div:nth-child(3) { animation-delay: -0.15s; }

@keyframes preloaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preloader p {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.logo-text span {
    color: var(--primary);
}

.logo-text span:last-child {
    color: var(--secondary);
}

.logo-badge {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Navigation */
.nav ul {
    display: flex;
    gap: 4px;
    list-style: none;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav a:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.nav a.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav a i {
    font-size: 0.9rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle,
.header-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--bg-hover);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.theme-toggle:hover,
.header-btn:hover {
    background: var(--border);
    color: var(--text);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 40px 0 30px;
    text-align: center;
    background: linear-gradient(180deg, rgba(108, 99, 255, 0.04) 0%, transparent 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-badge i {
    margin-right: 6px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -1px;
    margin-bottom: 12px;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 24px;
}

.hero p strong {
    color: var(--primary);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}

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

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

/* ============================================
   CONVERSION SELECTOR
   ============================================ */
.conversion-selector {
    padding: 20px 0 30px;
}

.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.selector-btn {
    padding: 14px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.selector-btn i {
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.selector-btn span {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.selector-btn small {
    font-size: 0.55rem;
    color: var(--text-muted);
}

.selector-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.selector-btn.active {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.selector-btn.active i {
    color: var(--primary);
}

.selector-btn.active span {
    color: var(--primary);
}

/* ============================================
   CONVERTER AREA
   ============================================ */
.converter-area {
    padding-bottom: 30px;
}

.converter-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    min-height: 500px;
    border: 1px solid var(--border-light);
}

/* ============================================
   LEFT PANEL
   ============================================ */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
    position: relative;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.08);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 8px;
    transition: var(--transition);
}

.upload-zone:hover .upload-icon {
    transform: translateY(-3px) scale(1.05);
}

.upload-zone h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.upload-zone p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.upload-zone .browse-link {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.upload-zone .browse-link:hover {
    text-decoration: underline;
}

.upload-formats {
    margin-top: 8px;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* File List */
.file-list {
    background: var(--bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex: 1;
    min-height: 120px;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-card);
}

.file-list-header i {
    color: var(--primary);
}

.file-list-actions {
    display: flex;
    gap: 6px;
}

.clear-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.clear-btn:hover {
    background: rgba(255, 107, 107, 0.1);
}

.file-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 12px;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 4px;
    opacity: 0.3;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: var(--transition);
}

.file-list-item:hover {
    background: var(--bg-hover);
}

.file-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.file-icon.pdf { background: #FFE8E8; color: #E74C3C; }
.file-icon.docx { background: #E3F2FD; color: #1A73E8; }
.file-icon.xlsx { background: #E8F5E9; color: #2E7D32; }
.file-icon.png, .file-icon.jpg { background: #F3E5F5; color: #7B1FA2; }
.file-icon.csv { background: #FFF3E0; color: #E65100; }
.file-icon.html { background: #FFF8E1; color: #F57C00; }
.file-icon.json { background: #E0F7FA; color: #006064; }

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

.file-item-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.file-item-size {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.file-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
}

.file-item-remove:hover {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.1);
}

/* Settings Panel */
.settings-panel {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    border: 1px solid var(--border-light);
}

.settings-panel h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.settings-panel h4 i {
    color: var(--primary);
}

.setting-group {
    margin-bottom: 12px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.setting-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.setting-group select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    background: var(--bg-card);
    color: var(--text);
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A8AA8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.setting-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quality-control input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.quality-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.quality-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.quality-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.quality-control span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
}

/* Advanced Options */
.advanced-options details {
    cursor: pointer;
}

.advanced-options summary {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 4px 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.advanced-options summary::-webkit-details-marker {
    display: none;
}

.advanced-options summary i {
    color: var(--primary);
}

.advanced-options details[open] summary i {
    transform: rotate(90deg);
}

.advanced-content {
    padding-top: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
}

.adv-option label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
}

.adv-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Actions */
.actions-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-primary {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.35);
}

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

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

.btn-secondary {
    padding: 10px 16px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* ============================================
   PREVIEW PANEL
   ============================================ */
.preview-panel {
    display: flex;
    flex-direction: column;
}

.preview-container {
    flex: 1;
    background: var(--bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    min-height: 400px;
    max-height: 520px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    flex-wrap: wrap;
    gap: 6px;
}

.preview-header i {
    color: var(--primary);
}

.conversion-badge {
    background: var(--primary-bg);
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary);
}

.preview-grid {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 250px;
    max-height: 400px;
    overflow: auto;
    background: var(--bg);
}

.preview-empty {
    text-align: center;
    color: var(--text-muted);
}

.preview-empty i {
    font-size: 4rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.3;
}

.preview-empty h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.preview-empty p {
    font-size: 0.8rem;
}

.preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
}

.preview-image {
    max-width: 90%;
    max-height: 320px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    background: white;
    padding: 4px;
}

.preview-file-info {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.preview-content {
    width: 100%;
    max-height: 320px;
    overflow: auto;
    background: white;
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 0.8rem;
    line-height: 1.8;
    border: 1px solid var(--border-light);
}

.preview-content pre {
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 0.7rem;
}

.preview-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.preview-content th,
.preview-content td {
    border: 1px solid var(--border);
    padding: 4px 8px;
    text-align: left;
}

.preview-content th {
    background: var(--bg-hover);
    font-weight: 600;
}

/* Preview Footer */
.preview-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    flex-wrap: wrap;
}

.preview-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-nav-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.preview-nav-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.preview-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.preview-info {
    flex: 1;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.file-size-info {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.download-all-btn {
    padding: 4px 14px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.download-all-btn:hover:not(:disabled) {
    background: var(--success-dark);
    transform: translateY(-1px);
}

.download-all-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   FEATURES
   ============================================ */
.features {
    padding: 40px 0 20px;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text);
}

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

.feature-card {
    background: var(--bg-card);
    padding: 28px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.4rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.feature-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.footer-brand .logo {
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 300px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.footer-links h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 4px;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-bottom i {
    margin: 0 2px;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-container {
    background: var(--bg-card);
    padding: 40px 48px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.loading-container p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.loading-progress {
    margin-top: 16px;
}

.loading-progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

.loading-progress-text {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.loading-details {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    width: 100%;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.4s ease;
    border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-icon.success { color: var(--success); }
.toast-icon.error { color: var(--danger); }
.toast-icon.warning { color: var(--warning); }
.toast-icon.info { color: var(--info); }

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-content strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text);
}

.toast-content p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .converter-grid {
        grid-template-columns: 380px 1fr;
    }
}

@media (max-width: 992px) {
    .converter-grid {
        grid-template-columns: 1fr;
    }
    .left-panel {
        order: 2;
    }
    .preview-panel {
        order: 1;
        min-height: 350px;
    }
    .preview-container {
        max-height: 420px;
        min-height: 350px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
    .selector-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
    .selector-btn {
        padding: 10px 8px;
    }
    .selector-btn i {
        font-size: 1.1rem;
    }
    .selector-btn span {
        font-size: 0.65rem;
    }
    .converter-grid {
        padding: 16px;
        border-radius: var(--radius-md);
    }
    .header-inner {
        flex-wrap: wrap;
    }
    .nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }
    .nav ul {
        gap: 2px;
    }
    .nav a {
        padding: 6px 12px;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    .nav a span {
        display: none;
    }
    .preview-container {
        max-height: 360px;
        min-height: 300px;
    }
    .preview-grid {
        min-height: 200px;
        max-height: 320px;
        padding: 12px;
    }
    .preview-image {
        max-height: 200px;
    }
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-links {
        grid-template-columns: 1fr 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .toast-container {
        max-width: 340px;
        right: 12px;
        top: 70px;
    }
    .loading-container {
        padding: 30px 24px;
    }
    .advanced-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    .hero-stats {
        gap: 10px;
    }
    .stat-number {
        font-size: 1rem;
    }
    .selector-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 6px;
    }
    .selector-btn {
        padding: 8px 6px;
    }
    .selector-btn i {
        font-size: 0.9rem;
    }
    .selector-btn span {
        font-size: 0.55rem;
    }
    .selector-btn small {
        font-size: 0.45rem;
    }
    .converter-grid {
        padding: 12px;
    }
    .upload-zone {
        padding: 20px 16px;
    }
    .upload-icon {
        font-size: 2.2rem;
    }
    .preview-container {
        max-height: 300px;
        min-height: 250px;
    }
    .preview-grid {
        min-height: 150px;
        max-height: 260px;
        padding: 8px;
    }
    .preview-image {
        max-height: 150px;
    }
    .preview-empty i {
        font-size: 2.5rem;
    }
    .preview-empty h3 {
        font-size: 0.85rem;
    }
    .preview-empty p {
        font-size: 0.7rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .footer-links {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .file-list {
        max-height: 140px;
        min-height: 80px;
    }
    .settings-panel {
        padding: 10px 12px;
    }
    .btn-primary {
        font-size: 0.85rem;
        padding: 12px 16px;
    }
    .btn-secondary {
        font-size: 0.7rem;
        padding: 8px 12px;
    }
    .preview-footer {
        gap: 6px;
        padding: 6px 10px;
        font-size: 0.65rem;
    }
    .download-all-btn {
        font-size: 0.6rem;
        padding: 3px 10px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header,
    .hero,
    .footer,
    .conversion-selector,
    .left-panel,
    .preview-footer,
    .features {
        display: none !important;
    }
    .converter-grid {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }
    .preview-panel {
        min-height: auto !important;
    }
    .preview-container {
        border: none !important;
        background: white !important;
        max-height: none !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

/* ============================================
   UTILITY
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.w-full { width: 100%; }
.h-full { height: 100%; }