:root {
    --bg-dark: #070a12;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(26, 36, 59, 0.85);
    --bg-darker: rgba(10, 15, 26, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 242, 254, 0.4);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    
    --cyan-primary: #00f2fe;
    --blue-primary: #4facfe;
    --emerald: #10b981;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --purple: #a855f7;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Orbs */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.18;
    animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 { width: 500px; height: 500px; background: #00f2fe; top: -100px; left: -100px; }
.orb-2 { width: 600px; height: 600px; background: #4facfe; bottom: -150px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 450px; height: 450px; background: #f59e0b; top: 40%; left: 60%; animation-delay: -10s; }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 80px) scale(1.15); }
    100% { transform: translate(-40px, 40px) scale(0.9); }
}

/* Header & Navigation */
.app-header {
    background: rgba(11, 16, 27, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.logo { display: flex; align-items: center; gap: 1.1rem; }

.brand-bdv {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800;
    letter-spacing: 1px; box-shadow: 0 0 25px rgba(245, 158, 11, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.brand-title-row { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.logo-text h1 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; }
.logo-text h1 span { background: linear-gradient(135deg, #f59e0b, #f43f5e); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.developer-badge {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    background: rgba(245, 158, 11, 0.15); color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4); padding: 0 0.85rem;
    height: 34px; box-sizing: border-box;
    border-radius: 30px; font-size: 0.82rem; font-weight: 600;
    letter-spacing: 0.3px; box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}
.developer-badge i { width: 14px; height: 14px; }
.logo-text p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Navigation Tabs */
.tool-nav { display: flex; gap: 0.5rem; background: rgba(0, 0, 0, 0.35); padding: 0.35rem; border-radius: 14px; border: 1px solid var(--border-color); }
.nav-btn {
    background: transparent; border: none; color: var(--text-muted); font-family: var(--font-heading);
    font-size: 0.95rem; font-weight: 500; padding: 0.65rem 1.2rem; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; gap: 0.6rem; transition: all 0.25s ease;
}
.nav-btn i { width: 18px; height: 18px; }
.nav-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.05); }
.nav-btn.active {
    color: #fff; background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(244, 63, 94, 0.25));
    border: 1px solid rgba(245, 158, 11, 0.5); box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

/* Main Container */
.main-container { max-width: 1100px; margin: 2.5rem auto; padding: 0 1.5rem 4rem 1.5rem; flex: 1; width: 100%; }
.tool-section { display: none; animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.tool-section.active { display: block; }

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

.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-family: var(--font-heading); font-size: 2.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 680px; margin: 0 auto; line-height: 1.5; }

/* Glass Cards & Containers */
.card-glass { background: var(--bg-card); backdrop-filter: blur(16px); border: 1px solid var(--border-color); border-radius: 20px; padding: 1.75rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); }

/* Dropzone */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.15); border-radius: 24px; background: rgba(15, 22, 38, 0.5);
    padding: 4rem 2rem; text-align: center; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--amber); background: rgba(245, 158, 11, 0.04); box-shadow: 0 0 30px rgba(245, 158, 11, 0.1); transform: translateY(-2px); }
.icon-pulse { width: 80px; height: 80px; border-radius: 50%; background: rgba(245, 158, 11, 0.1); color: var(--amber); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem auto; transition: transform 0.3s ease; }
.icon-pulse i { width: 38px; height: 38px; }
.dropzone:hover .icon-pulse { transform: scale(1.1); background: rgba(245, 158, 11, 0.2); }
.dropzone-content h3 { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 600; margin-bottom: 0.5rem; }
.dropzone-content h3 span { color: var(--amber); text-decoration: underline; }
.dropzone-content p { color: var(--text-muted); font-size: 0.95rem; }

/* Workspace Utility */
.workspace { margin-top: 2rem; }
.hidden { display: none !important; }

/* File Banner */
.file-banner { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.75rem; margin-bottom: 2rem; background: linear-gradient(90deg, rgba(25, 33, 50, 0.8), rgba(15, 23, 42, 0.9)); border-left: 4px solid var(--amber); }
.file-banner-info { display: flex; align-items: center; gap: 1.25rem; }
.file-banner-info i { width: 36px; height: 36px; color: var(--amber); }
.file-banner-info h4 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; }
.file-banner-info span { font-size: 0.9rem; color: var(--text-muted); }

/* SMART TOOLS BANNER & BLANK PAGE DETECTOR STYLES */
.smart-tools-banner {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem;
    padding: 1.5rem 1.75rem; background: linear-gradient(135deg, rgba(13, 27, 42, 0.85), rgba(27, 38, 59, 0.9));
}
.border-glow-cyan { border: 2px solid var(--cyan-primary); box-shadow: 0 0 30px rgba(0, 242, 254, 0.15); }
.border-glow-amber { border: 2px solid var(--amber); box-shadow: 0 0 35px rgba(245, 158, 11, 0.2); }

.smart-tools-info { display: flex; align-items: center; gap: 1.25rem; max-width: 650px; }
.badge-icon { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.badge-cyan { background: rgba(0, 242, 254, 0.15); color: var(--cyan-primary); }
.smart-tools-info h3 { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.smart-tools-info p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.45; }

.blank-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 1.25rem; }
.blank-controls { display: flex; align-items: center; gap: 0.6rem; }
.m-0 { margin: 0 !important; }

.results-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; background: rgba(0, 0, 0, 0.35); padding: 0.85rem 1.25rem; border-radius: 12px; font-size: 0.95rem; }
.flex-gap { display: flex; align-items: center; gap: 0.75rem; }

/* Grid of Blank Page Thumbnails */
.blank-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    max-height: 520px;
    overflow-y: auto;
    padding: 0.5rem;
}

.blank-card {
    background: rgba(11, 16, 27, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    cursor: pointer;
    user-select: none;
}

.blank-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); border-color: rgba(245, 158, 11, 0.4); }

.blank-card:has(input:checked) {
    border-color: var(--rose);
    background: rgba(244, 63, 94, 0.08);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.25);
}

.blank-card-thumb {
    width: 100%;
    height: 180px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blank-card-thumb canvas, .blank-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    transition: transform 0.3s ease;
}

.blank-card-thumb:hover img {
    transform: scale(1.04);
}

.zoom-overlay-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: var(--amber);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: all 0.25s ease;
    pointer-events: none;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.blank-card-thumb:hover .zoom-overlay-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.blank-card-badge {
    position: absolute; top: 8px; right: 8px; background: rgba(244, 63, 94, 0.85);
    color: #fff; font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 20px;
    backdrop-filter: blur(4px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.blank-card-meta {
    padding: 0.85rem; display: flex; align-items: center; gap: 0.6rem;
    background: rgba(7, 10, 18, 0.9); border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.blank-card-meta input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--rose); cursor: pointer; }
.blank-card-meta label { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 600; cursor: pointer; color: #fff; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Grid Layouts */
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
@media (max-width: 850px) { .grid-2-col { grid-template-columns: 1fr; } }

/* Tool Cards inside Workspace */
.tool-card { display: flex; flex-direction: column; height: 100%; }
.card-title { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.title-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.badge-red { background: rgba(244, 63, 94, 0.15); color: var(--rose); }
.badge-green { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: var(--blue-primary); }
.badge-yellow { background: rgba(245, 158, 11, 0.15); color: var(--amber); }

.card-title h3 { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 600; }
.card-title p { font-size: 0.85rem; color: var(--text-muted); }

/* Forms & Inputs */
.form-group { margin-bottom: 1.5rem; flex: 1; }
.form-group label { display: block; font-size: 0.95rem; font-weight: 500; margin-bottom: 0.5rem; color: #e5e7eb; }
.form-control, .form-control-file, select.form-control {
    width: 100%; background: rgba(7, 10, 18, 0.8); border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px; padding: 0.85rem 1rem; color: #fff; font-family: var(--font-body);
    font-size: 0.95rem; transition: all 0.25s ease;
}

.form-control:focus, select.form-control:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }
.form-hint { display: block; margin-top: 0.5rem; font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }
.form-hint code { background: rgba(255, 255, 255, 0.1); padding: 0.1rem 0.3rem; border-radius: 4px; color: var(--amber); }

.radio-group { display: flex; flex-wrap: wrap; gap: 1rem; }
.flex-col { flex-direction: column; }
.radio-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; cursor: pointer; user-select: none; }
.radio-label input[type="radio"] { accent-color: var(--amber); width: 18px; height: 18px; cursor: pointer; }

.w-100 { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.p-3 { padding: 1rem; }
.bg-darker { background: rgba(0, 0, 0, 0.3); }
.rounded { border-radius: 12px; }
.text-center { text-align: center; }
.text-amber { color: var(--amber) !important; }
.text-sm { font-size: 0.88rem; }
.text-muted { color: var(--text-muted); }

/* Buttons */
button { font-family: var(--font-heading); cursor: pointer; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.btn-primary {
    background: linear-gradient(135deg, var(--amber), #f43f5e); color: #fff; border: none; font-weight: 600;
    font-size: 1rem; padding: 0.9rem 1.5rem; border-radius: 14px; display: inline-flex; align-items: center;
    justify-content: center; gap: 0.6rem; box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45); }

.btn-danger { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; box-shadow: 0 4px 20px rgba(244, 63, 94, 0.3); }
.btn-danger:hover { box-shadow: 0 8px 25px rgba(244, 63, 94, 0.45); }

.badge-green-btn { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3); }
.badge-green-btn:hover { box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45); }

.badge-blue-btn { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3); }
.badge-purple-btn { background: linear-gradient(135deg, #a855f7, #7e22ce); color: #fff; box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3); }
.badge-yellow-btn { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3); }

.btn-secondary { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid rgba(255, 255, 255, 0.15); font-weight: 500; font-size: 0.95rem; padding: 0.65rem 1.25rem; border-radius: 10px; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-md { padding: 0.8rem 1.4rem; font-size: 0.98rem; font-weight: 600; border-radius: 12px; }
.btn-lg { padding: 1.1rem 2.4rem; font-size: 1.1rem; font-weight: 700; border-radius: 16px; }

.btn-glow { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; border: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; box-shadow: 0 0 35px rgba(245, 158, 11, 0.4); }
.btn-glow:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 0 50px rgba(245, 158, 11, 0.65); }

/* Action Bar Footer */
.action-footer { margin-top: 2.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; background: rgba(13, 19, 33, 0.85); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-summary { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; }
.text-success { color: var(--emerald); }

/* Merge File List Container */
.list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.file-list-container { display: flex; flex-direction: column; gap: 0.85rem; max-height: 400px; overflow-y: auto; padding-right: 0.5rem; }
.merge-file-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg-card); border: 1px solid var(--border-color); padding: 1rem 1.5rem; border-radius: 16px; transition: all 0.25s ease; }
.merge-file-item:hover { border-color: rgba(245, 158, 11, 0.4); background: var(--bg-card-hover); }
.merge-file-item-left { display: flex; align-items: center; gap: 1rem; }
.item-index { width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--amber); }
.item-actions { display: flex; align-items: center; gap: 0.4rem; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); color: #fff; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.15); }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.icon-btn.delete:hover { background: rgba(244, 63, 94, 0.2); border-color: var(--rose); color: var(--rose); }

/* Split Options */
.split-options .option-card { display: block; background: var(--bg-darker); border: 2px solid var(--border-color); border-radius: 16px; padding: 1.5rem; cursor: pointer; transition: all 0.25s ease; }
.split-options .option-card:hover { border-color: rgba(168, 85, 247, 0.4); }
.split-options .option-card:has(input:checked) { border-color: var(--purple); background: rgba(168, 85, 247, 0.08); }
.option-card input[type="radio"] { display: none; }
.option-content { display: flex; align-items: flex-start; gap: 1.25rem; }
.opt-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(168, 85, 247, 0.15); color: var(--purple); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* COMPRESS OPTIONS UPGRADE */
.compress-options-grid { display: flex; flex-direction: column; gap: 0.85rem; }
.compress-opt-card { display: block; background: rgba(12, 18, 30, 0.6); border: 2px solid rgba(255, 255, 255, 0.07); border-radius: 16px; padding: 1.25rem 1.5rem; cursor: pointer; transition: all 0.25s ease; }
.compress-opt-card:hover { border-color: rgba(245, 158, 11, 0.4); background: rgba(20, 28, 46, 0.7); }
.compress-opt-card.active, .compress-opt-card:has(input:checked) { border-color: var(--amber); background: rgba(245, 158, 11, 0.08); box-shadow: 0 0 20px rgba(245, 158, 11, 0.12); }
.compress-opt-card input[type="radio"] { display: none; }
.comp-opt-content { display: flex; align-items: flex-start; gap: 1.25rem; }
.comp-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.comp-title-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.35rem; }
.comp-title-row h4 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; }
.comp-opt-content p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.45; }
.tag-rec { background: rgba(59, 130, 246, 0.2); color: #60a5fa; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 20px; border: 1px solid rgba(59, 130, 246, 0.4); }
.tag-extreme { background: rgba(244, 63, 94, 0.2); color: #fb7185; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 20px; border: 1px solid rgba(244, 63, 94, 0.4); }

/* Custom Sliders */
.custom-controls-box { background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.08); padding: 1.25rem; border-radius: 12px; }
.slider-row { display: flex; flex-direction: column; gap: 0.6rem; }
.slider-label { display: flex; justify-content: space-between; font-size: 0.92rem; color: #e5e7eb; }
.slider-label strong { color: var(--amber); }
.range-slider { -webkit-appearance: none; width: 100%; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); outline: none; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--amber); cursor: pointer; box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); transition: transform 0.2s; }
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Progress Box */
.progress-box { background: rgba(15, 23, 42, 0.85); border: 1px solid var(--amber); padding: 1.5rem; border-radius: 16px; }
.progress-info { display: flex; justify-content: space-between; font-size: 1rem; }
.progress-info strong { color: var(--amber); font-family: var(--font-heading); }
.progress-track { width: 100%; height: 10px; background: rgba(255, 255, 255, 0.08); border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); border-radius: 5px; transition: width 0.25s ease; box-shadow: 0 0 15px rgba(245, 158, 11, 0.6); }
.progress-sub { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.85rem; }

/* Compress Results */
.border-glow-yellow { border: 2px solid var(--amber); box-shadow: 0 0 40px rgba(245, 158, 11, 0.25); }
.result-badge { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(245, 158, 11, 0.15); color: var(--amber); padding: 0.45rem 1.2rem; border-radius: 30px; font-weight: 700; font-size: 0.95rem; }
.size-comparison { display: flex; align-items: center; justify-content: center; gap: 2rem; }
.size-box { display: flex; flex-direction: column; background: rgba(0, 0, 0, 0.35); padding: 1.1rem 1.75rem; border-radius: 14px; min-width: 150px; border: 1px solid rgba(255, 255, 255, 0.05); }
.size-box span { font-size: 0.85rem; color: var(--text-muted); }
.size-box strong { font-size: 1.6rem; font-family: var(--font-heading); margin-top: 0.25rem; }
.size-box.old strong { text-decoration: line-through; color: var(--rose); }
.size-box.new strong { color: var(--emerald); }
.size-arrow { color: var(--amber); font-size: 1.5rem; display: flex; align-items: center; }
.saved-text { font-size: 1.15rem; }
.saved-text strong { color: var(--amber); font-size: 1.3rem; }

/* App Footer */
.app-footer { margin-top: auto; background: rgba(7, 10, 18, 0.95); border-top: 1px solid var(--border-color); padding: 1.5rem 0; z-index: 10; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; color: var(--text-muted); }
.dev-tag { display: inline-flex; align-items: center; gap: 0.5rem; color: #e5e7eb; background: rgba(255, 255, 255, 0.05); padding: 0.4rem 0.9rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.08); }
.dev-tag i { width: 16px; height: 16px; color: var(--amber); }

/* Loading Overlay */
.loading-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(7, 10, 18, 0.9); backdrop-filter: blur(14px); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.spinner-box { position: relative; width: 80px; height: 80px; margin-bottom: 1.5rem; }
.spinner-ring { position: absolute; width: 100%; height: 100%; border: 4px solid rgba(245, 158, 11, 0.15); border-top-color: var(--amber); border-radius: 50%; animation: spin 1s linear infinite; }
.spinner-icon { position: absolute; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--amber); }

@keyframes spin { to { transform: rotate(360deg); } }
#loading-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600; color: #fff; }
#loading-subtitle { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.35rem; }

/* Toast Notifications */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 10000; display: flex; flex-direction: column; gap: 0.75rem; }
.toast { background: rgba(17, 24, 39, 0.95); backdrop-filter: blur(16px); border: 1px solid var(--border-color); border-left: 4px solid var(--amber); color: #fff; padding: 1rem 1.5rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); display: flex; align-items: center; gap: 0.85rem; min-width: 280px; max-width: 420px; animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.toast.toast-error { border-left-color: var(--rose); }
.toast.toast-success { border-left-color: var(--emerald); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ================== HEADER TOGGLE BUTTONS ================== */
.header-right { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.header-toggles { display: flex; align-items: center; gap: 0.75rem; }
.header-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0 0.85rem;
    height: 34px;
    box-sizing: border-box;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.header-toggle-btn i { width: 16px; height: 16px; color: var(--amber); }
.header-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    border-color: var(--cyan-primary);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

/* ================= PRODUCTS DROPDOWN ================= */
.products-dropdown-wrapper { position: relative; display: inline-block; }
.products-dropdown-menu {
    position: absolute; top: calc(100% + 10px); right: 0; width: 310px;
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(20px);
    border: 1px solid var(--border-color); border-radius: 16px; padding: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); z-index: 1000;
    display: flex; flex-direction: column; gap: 0.35rem;
}
.dropdown-item {
    display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.75rem 1rem;
    border-radius: 12px; text-decoration: none; color: var(--text-main);
    transition: all 0.2s ease; border: 1px solid transparent;
}
.dropdown-item:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(245, 158, 11, 0.3); }
.dropdown-item.active { background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(244, 63, 94, 0.15)); border-color: rgba(245, 158, 11, 0.5); }
.dropdown-item .item-icon { font-size: 1.4rem; line-height: 1; margin-top: 2px; }
.dropdown-item strong { display: block; font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.dropdown-item p { margin: 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.3; }

/* ================== LIGHT MODE OVERRIDES ================== */
body.light-mode {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(241, 245, 249, 0.95);
    --bg-darker: rgba(226, 232, 240, 0.9);
    --border-color: rgba(0, 0, 0, 0.12);
    --border-glow: rgba(0, 150, 255, 0.35);
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    background-color: #f1f5f9;
    color: #1e293b;
}

body.light-mode .app-header { background: rgba(255, 255, 255, 0.85); border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
body.light-mode .tool-nav { background: rgba(226, 232, 240, 0.8); border-color: rgba(0, 0, 0, 0.1); }
body.light-mode .nav-btn { color: #64748b; }
body.light-mode .nav-btn:hover { color: #0f172a; background: rgba(0, 0, 0, 0.05); }
body.light-mode .nav-btn.active { color: #0f172a; background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(244, 63, 94, 0.2)); border-color: rgba(245, 158, 11, 0.5); }
body.light-mode .products-dropdown-menu { background: rgba(255, 255, 255, 0.95); border-color: rgba(0, 0, 0, 0.15); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); }
body.light-mode .dropdown-item { color: #0f172a; }
body.light-mode .dropdown-item:hover { background: rgba(0, 0, 0, 0.05); }

body.light-mode .dropzone { background: rgba(255, 255, 255, 0.6); border-color: rgba(0, 0, 0, 0.15); }
body.light-mode .dropzone:hover { background: rgba(245, 158, 11, 0.08); }

body.light-mode .file-banner,
body.light-mode .smart-tools-banner,
body.light-mode .action-footer,
body.light-mode .progress-box,
body.light-mode .size-box {
    background: rgba(255, 255, 255, 0.85);
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .smart-tools-info h3,
body.light-mode .card-title h3,
body.light-mode .list-header h4,
body.light-mode .file-banner-info h4,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4 { color: #0f172a; }

body.light-mode .results-toolbar,
body.light-mode .form-control,
body.light-mode .form-control-file,
body.light-mode .custom-controls-box {
    background: #ffffff;
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .blank-card { background: #ffffff; border-color: rgba(0, 0, 0, 0.15); }
body.light-mode .blank-card-meta { color: #1e293b !important; }
body.light-mode .blank-card-meta span { color: #1e293b !important; }

body.light-mode .header-toggle-btn { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.15); color: #1e293b; }
body.light-mode .header-toggle-btn:hover { background: rgba(0, 0, 0, 0.1); }

body.light-mode #blank-scan-settings-panel { background: rgba(226, 232, 240, 0.95) !important; border-color: rgba(0, 0, 0, 0.1) !important; }
body.light-mode .form-hint { color: #475569 !important; }

body.light-mode .merge-file-item,
body.light-mode .split-options .option-card,
body.light-mode .compress-opt-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
}
body.light-mode .merge-file-item:hover,
body.light-mode .split-options .option-card:hover,
body.light-mode .compress-opt-card:hover { background: #f8fafc; border-color: var(--amber); }

body.light-mode .app-footer { background: rgba(255, 255, 255, 0.95); border-top: 1px solid rgba(0, 0, 0, 0.1); color: #64748b; }
body.light-mode .dev-tag { background: rgba(0, 0, 0, 0.05); color: #1e293b; border-color: rgba(0, 0, 0, 0.1); }

/* ================== SEGMENTED LANGUAGE SWITCHER PILL ================== */
.lang-switcher-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    padding: 0 0.25rem;
    height: 34px;
    box-sizing: border-box;
    border-radius: 30px;
}
.lang-switcher-pill i {
    margin-left: 0.4rem;
    margin-right: 0.15rem;
    color: var(--amber);
}
.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0 0.65rem;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.lang-btn:hover {
    color: var(--text-main);
}
.lang-btn.active {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

body.light-mode .lang-switcher-pill {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}
body.light-mode .lang-btn {
    color: #64748b;
}
body.light-mode .lang-btn:hover {
    color: #0f172a;
}
body.light-mode .lang-btn.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.3);
}

/* ================= CONVERT & ESIGN TABS STYLING ================= */
.badge-cyan { background: rgba(0, 242, 254, 0.15); color: #00f2fe; }
.border-glow-cyan { border-color: rgba(0, 242, 254, 0.3); }
.badge-cyan-btn { background: linear-gradient(135deg, #00f2fe, #4facfe); color: #070a12; font-weight: 700; }
.badge-cyan-btn:hover { box-shadow: 0 0 25px rgba(0, 242, 254, 0.5); }

.convert-mode-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (max-width: 768px) {
    .convert-mode-selector { grid-template-columns: 1fr; }
}

.convert-mode-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 14px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.25s ease;
}
.convert-mode-card input[type="radio"] { display: none; }
.convert-mode-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }
.convert-mode-card.active {
    background: rgba(0, 242, 254, 0.08);
    border-color: #00f2fe;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.15);
}
.convert-mode-card .mode-icon {
    width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.convert-mode-card .mode-text h4 { font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 0.25rem; color: var(--text-main); }
.convert-mode-card .mode-text p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

/* eSign Grid */
.esign-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 992px) {
    .esign-grid { grid-template-columns: 1fr; }
}

.sign-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.sign-tab-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sign-tab-btn.active {
    background: var(--amber);
    color: #070a12;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

body.light-mode .convert-mode-card { background: rgba(255, 255, 255, 0.8); }
body.light-mode .convert-mode-card.active { background: rgba(0, 242, 254, 0.15); border-color: #0284c7; }
body.light-mode .sign-tabs { background: rgba(0, 0, 0, 0.05); }
body.light-mode .sign-tab-btn.active { color: #ffffff; }
