:root {
    /* Color Palette requested by user */
    --c-darkest: #011E3A;  /* Very dark blue */
    --c-dark: #003666;     /* Dark Navy blue */
    --c-med: #005391;      /* Mid blue */
    --c-lightmed: #6292B4; /* Light-mid slate blue */
    --c-lightest: #A6C2D6; /* Lightest pastel blue */
    
    /* Semantic Colors */
    --primary: var(--c-med);
    --primary-hover: var(--c-dark);
    --bg-color: #f8fafc;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --success: #65a30d; /* Brand green */
    --success-bg: #ecfccb;
}

/* --- Header Navigation --- */
.site-header {
    background: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e5e7eb;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--c-darkest);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.header-logo svg {
    color: var(--primary);
}
.header-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}
.header-nav a {
    color: var(--c-darkest);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.header-nav a:hover, .header-nav a.active {
    color: var(--primary);
}
@media (max-width: 600px) {
    .header-nav { gap: 15px; }
    .header-nav a { font-size: 0.9rem; }
}

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

body {
    font-family: 'Jost', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Header */
.header {
    background-color: white;
    padding: 15px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--c-darkest); display: flex; align-items: center; gap: 8px; }
.logo-icon { color: var(--primary); display: flex; align-items: center; }
.nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; margin-left: 30px; transition: color 0.2s; }
.nav a:hover { color: var(--primary); }
.btn-login { background: var(--c-darkest); color: white; padding: 8px 24px; border-radius: 6px; font-weight: 600;}
.btn-login:hover { background: var(--c-dark); }

.btn-nav-login {
    background: white;
    color: var(--primary);
    border: 1px solid #e5e7eb;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}
.btn-nav-login:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-nav-signup {
    background: var(--primary);
    color: white !important;
    border: 1px solid var(--primary);
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.1s, background 0.2s;
    display: inline-block;
}
.btn-nav-signup:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Main layout setup */
.main { flex: 1; display: flex; flex-direction: column; }

/* Top Upload Section with Blue background */
.upload-section {
    background: linear-gradient(135deg, var(--c-darkest), var(--c-dark));
    padding: 60px 0 80px 0;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid var(--c-med);
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 900px) {
    .upload-grid { grid-template-columns: 1fr; text-align: center; }
}

.hero { color: white; }
.hero .badge { 
    display: inline-block; 
    background: rgba(255, 255, 255, 0.15); 
    border: 1px solid rgba(255,255,255,0.3);
    color: white; 
    padding: 6px 16px; 
    border-radius: 20px; 
    font-weight: 600; 
    margin-bottom: 20px; 
    font-size: 0.85rem; 
}
.hero h1 { font-size: 3rem; font-weight: 700; line-height: 1.1; margin-bottom: 20px; color: white; }
.hero p { font-size: 1.15rem; color: var(--c-lightest); margin: 0 auto; }

/* Dropzone & Card inside Header */
.app-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    padding: 10px;
}
.dropzone {
    padding: 60px 20px 40px;
    text-align: center;
    border: 3px dashed var(--c-lightest);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-color);
}
.dropzone.dragover {
    border-color: var(--primary);
    background: #e0f2fe;
}
.drop-icon { color: var(--c-lightmed); margin-bottom: 15px; }
.dropzone h2 { font-size: 1.6rem; margin-bottom: 5px; color: var(--c-darkest); }
.dropzone p { color: var(--text-muted); margin-bottom: 30px; }

.btn-browse {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.1s, background 0.2s;
}
.btn-browse:hover { background: var(--primary-hover); transform: translateY(-2px); }

/* Toggle & Options */
.app-controls {
    margin-top: 30px;
    padding: 15px 15px 0;
    border-top: 1px solid #e5e7eb;
}
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.toggle-text { font-weight: 600; color: var(--c-darkest); font-size: 1rem; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--c-lightest); transition: .3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(20px); }

/* Format Pills */
.format-pills {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.pill { cursor: pointer; position: relative; user-select: none; }
.pill input { display: none; }
.pill-text {
    display: inline-block;
    padding: 6px 14px;
    background: white;
    border: 1px solid var(--c-lightest);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-lightmed);
    transition: all 0.2s;
}
.pill input:checked + .pill-text {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
}
.btn-select-all {
    background: none; border: none; font-size: 0.8rem; font-weight: 700; color: var(--primary); cursor: pointer; padding: 6px 10px;
}
.btn-select-all:hover { color: var(--primary-hover); }


/* Results Area */
.results-container {
    display: none;
    margin-top: -40px;
    margin-bottom: 60px;
    position: relative;
    z-index: 10;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    overflow: hidden;
}

.results-header {
    background: white;
    border-bottom: 2px solid #e5e7eb;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.results-header h3 {
    font-size: 1.4rem;
    color: var(--success); /* Green text matching inspiration */
    font-weight: 700;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.btn-download-all {
    background: var(--success); /* Lime green */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}
.btn-download-all:hover { background: #4d7c0f; }

.results-list {
    background: white;
    padding: 0;
}

/* Horizontal Result Rows */
.result-row {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #f3f4f6;
}
.result-row:last-child { border-bottom: none; }

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 35%;
}
.file-icon {
    width: 50px; height: 50px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #94a3b8; font-size: 0.8rem;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.file-details {
    display: flex; flex-direction: column;
}
.file-name {
    font-weight: 600; color: var(--c-darkest);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px;
}
.file-orig-size { font-size: 0.85rem; color: #6b7280; font-weight: 500; }
.file-orig-size span { background: #e0f2fe; color: var(--primary); padding: 2px 6px; border-radius: 4px; font-weight: 700; font-size: 0.75rem; margin-right: 5px; }


/* The Horizontal Downloads Area */
.format-results {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
    flex-wrap: wrap;
}

.dl-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-right: -5px;
}

.dl-stats {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
}
.dl-savings { font-weight: 800; color: var(--text-main); font-size: 0.95rem; }
.dl-size { font-size: 0.8rem; color: var(--text-muted); }

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid #e0e7ff;
    transition: 0.2s;
    cursor: pointer;
    position: relative;
    border-radius: 8px;
}

/* Format Pastel Colors */
.dl-btn.format-avif { background: #fdf2f8 !important; color: #db2777 !important; border-color: #fbcfe8 !important; }
.dl-btn.format-jxl { background: #eef2ff !important; color: #4f46e5 !important; border-color: #c7d2fe !important; }
.dl-btn.format-webp { background: #f5f3ff !important; color: #7c3ae9 !important; border-color: #ede9fe !important; }
.dl-btn.format-jpeg { background: #f0fdfa !important; color: #0d9488 !important; border-color: #ccfbf1 !important; }
.dl-btn.format-png { background: #eff6ff !important; color: #2563eb !important; border-color: #bfdbfe !important; }

.dl-btn:hover:not(.processing):not(.error) {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.dl-btn.processing { cursor: not-allowed; opacity: 0.7; }
.dl-btn.error { background: #fee2e2 !important; color: #ef4444 !important; border-color: #fca5a5 !important; }
.dl-btn.downloaded:hover { background: #4d7c0f; }

.dl-btn.processing {
    background: #f1f5f9; color: #94a3b8; box-shadow: none; cursor: wait;
}
.dl-btn.error {
    background: #fef2f2; color: #dc2626; box-shadow: none;
}


/* Content & FAQ layout */
.content-section { margin-top: 60px; margin-bottom: 80px; }
.faq-layout {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}
.sidebar {
    width: 250px;
    flex-shrink: 0;
}
.sidebar-menu {
    list-style: none;
}
.sidebar-menu li {
    padding: 12px 20px;
    margin-bottom: 5px;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}
.sidebar-menu li a { color: inherit; text-decoration: none; display: block; }
.sidebar-menu li.active {
    background: var(--primary);
    color: white;
}

.content-body { flex: 1; }
.section-title {
    font-size: 2rem;
    color: var(--c-darkest);
    margin-bottom: 30px;
}
.faq-accordion {
    border-top: 1px solid #e5e7eb;
}
.faq-item {
    border-bottom: 1px solid #e5e7eb;
}
.faq-item summary {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--c-dark);
    padding: 20px 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--c-lightmed);
}
.faq-item[open] summary::after { content: '-'; }
.faq-answer {
    padding-bottom: 20px;
    color: #4b5563;
}
.faq-answer p { margin-bottom: 15px; }

/* --- Pricing Section --- */
.pricing-section { margin-top: 80px; margin-bottom: 100px; padding: 40px 0; border-top: 1px solid #e5e7eb; }
.pricing-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; 
    align-items: end; /* Aligns visually like the screenshot */
}
.pricing-card {
    background: white; border: 1px solid #e5e7eb; border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); text-align: center;
    position: relative; overflow: hidden; padding-bottom: 30px;
    height: 100%; display: flex; flex-direction: column;
}
.pricing-card.recommended {
    border-color: var(--primary); box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transform: translateY(-15px); /* Elevated active look */
}
.pricing-badge {
    background: var(--primary); color: white; padding: 8px 0; font-weight: 700;
    text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px;
}
.pricing-header { padding: 30px 20px; border-bottom: 1px solid #e5e7eb; }
.pro-header { background: var(--c-dark); color: white; }
.pro-header h3 { color: white !important; }
.pro-header .price { color: white !important; }

.sub-pill {
    display: inline-block; background: var(--c-lightest); color: var(--c-darkest);
    padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 10px;
}
.pricing-header h3 { font-size: 1.4rem; color: var(--c-darkest); margin-bottom: 10px; }
.price { font-size: 2.8rem; font-weight: 800; color: var(--text-main); line-height: 1.1; }

.pricing-features { list-style: none; padding: 0; margin-bottom: auto; }
.pricing-features li {
    padding: 15px 20px; border-bottom: 1px solid #f3f4f6;
    display: flex; justify-content: space-between; align-items: center;
    text-align: left; font-size: 0.9rem;
}
.pricing-features li span { font-weight: 700; color: var(--c-darkest); flex: 1; }
.pricing-features li div { color: var(--text-muted); font-size: 0.85rem; flex: 1; text-align: right; }

.btn-upgrade {
    display: inline-block; margin: 25px 20px 0; padding: 12px 0;
    background: var(--primary); color: white; text-decoration: none;
    border-radius: 8px; font-weight: 700; font-size: 1.05rem; transition: 0.2s;
}
.btn-upgrade:hover { background: var(--primary-hover); }
.btn-outline { background: white; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

/* Upgrade Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(1, 30, 58, 0.8); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}
.modal-box {
    background: white; padding: 40px; border-radius: 16px;
    max-width: 450px; width: 90%; text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalPop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.btn-cancel {
    background: #f1f5f9; color: var(--text-muted); border: none; padding: 10px 20px;
    border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.btn-cancel:hover { background: #e2e8f0; color: var(--text-main); }
.btn-upgrade-now {
    background: var(--primary); color: white; border: none; padding: 10px 24px;
    border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 10px rgba(0,83,145,0.3);
}
.btn-upgrade-now:hover { background: var(--primary-hover); transform: translateY(-1px); }

@media (max-width: 900px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-card.recommended { transform: none; }
}

/* --- Comparison Slider --- */
.comparison-slider {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 500px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    user-select: none;
    touch-action: pan-y;
    --reveal: 50%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.slider-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.img-back { z-index: 1; }
.img-front { z-index: 2; clip-path: polygon(var(--reveal) 0, 100% 0, 100% 100%, var(--reveal) 100%); }

.slider-label {
    position: absolute;
    bottom: 40px;
    color: white;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 3;
}
.label-left { left: 40px; }
.label-right { right: 40px; }
.label-title { font-weight: 800; font-size: 1.4rem; }
.label-size { font-size: 1rem; color: rgba(255,255,255,0.8); }

.label-pointer {
    font-family: inherit;
    font-size: 0.9rem;
    color: #38bdf8;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    margin-top: 15px;
    text-transform: none;
    font-weight: 500;
}
.label-pointer svg { margin-bottom: 5px; }

.slider-handle {
    position: absolute;
    top: 0; bottom: 0;
    left: var(--reveal);
    width: 4px;
    background: white;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
}
.slider-handle::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.slider-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 0; height: 0;
    border-style: solid;
    z-index: 11;
}
.arrow-left {
    left: -10px;
    border-width: 6px 8px 6px 0;
    border-color: transparent var(--c-darkest) transparent transparent;
}
.arrow-right {
    right: -10px;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent var(--c-darkest);
}

/* Footer */
.site-footer {
    background: var(--c-darkest);
    color: var(--c-lightest);
    padding: 50px 0;
    margin-top: auto;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.footer-logo {
    font-size: 1.5rem; font-weight: 700; color: white; display: flex; align-items: center; gap: 8px; margin-bottom: 20px;
}
.footer-links {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}
.footer-links a {
    color: var(--c-lightest);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: white; }
.footer-copy {
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .faq-layout { flex-direction: column; gap: 30px; }
    .sidebar { width: 100%; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}
