@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #475569;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --border: rgba(226, 232, 240, 1);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
}

a.navbar-brand img {
    width: 200px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    transition: color 0.3s ease;
}

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

/* Breadcrumbs */
.breadcrumb-container {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 0;
}

.breadcrumb {
    margin-bottom: 0;
    font-size: 0.85rem;
    font-weight: 500;
}

.breadcrumb-item a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "\F285";
    /* bi-chevron-right */
    font-family: "bootstrap-icons";
    font-size: 0.65rem;
    vertical-align: middle;
    color: #94a3b8;
    margin-top: 3px;
}

/* Hero Section */
.hero {
    padding: 40px 0;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtext {
    font-size: 1.125rem;
    color: var(--secondary);
    margin-bottom: 2rem;
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
}

/* Cards */
.tool-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
    background: var(--primary);
    color: var(--white);
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tool-description {
    color: var(--secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Features */
.feature-item {
    padding: 40px 20px;
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* CTA */
.cta-section {
    background: var(--dark);
    padding: 100px 0;
    border-radius: 30px;
    color: var(--white);
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

/* Footer */
footer {
    padding: 60px 0 30px;
    background-color: var(--white);
    border-top: 1px solid var(--border);
}

.footer-link {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

/* Tool Components */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: #eff6ff;
}

.upload-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.result-card {
    border-radius: 24px;
    overflow: hidden;
    border: none;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 40px;
}

.saving-badge {
    background: #dcfce7;
    color: #166534;
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.875rem;
}

/* Control Elements */
.quality-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lock-btn {
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    padding: 10px;
    color: var(--secondary);
    transition: all 0.2s;
}

.lock-btn.active {
    color: var(--primary);
    background: #eff6ff;
}

.aspect-ratio-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
}

.aspect-ratio-btn.active,
.aspect-ratio-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Format & Selection Cards */
.selection-card {
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 18px 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    background: var(--white);
    position: relative;
    height: 100%;
}

.selection-card:hover {
    border-color: var(--primary);
    background: #f8faff;
    transform: translateY(-5px);
}

.selection-card.active {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.1);
}

.selection-card input[type="radio"],
.selection-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.selection-card .icon {
    font-size: 1.4rem;
    color: var(--secondary);
    display: block;
    transition: all 0.3s ease;
}

.selection-card .x-small {
    font-size: .8rem;
}

.selection-card.active .icon {
    color: var(--primary);
}

/* OCR & Languages */
.lang-badge {
    padding: 8px 16px;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--secondary);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.lang-badge.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* List Items (PDF Merge) */
.pdf-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.pdf-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    cursor: grab;
    transition: all 0.2s;
}

.pdf-item:active {
    cursor: grabbing;
}

.pdf-item:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.pdf-item .handle {
    color: #cbd5e1;
    margin-right: 15px;
}

.pdf-item .file-name {
    flex-grow: 1;
    font-weight: 600;
    font-size: 0.95rem;
}

.pdf-item .remove-btn {
    color: #ef4444;
    border: none;
    background: none;
    font-size: 1.1rem;
}

/* Processing Overlays */
.processing-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Calculator & Unit Toggles */
.small-unit-toggle {
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    display: inline-flex;
    font-size: 0.75rem;
}

.small-unit-btn {
    padding: 5px 15px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--secondary);
    transition: all 0.2s;
}

.small-unit-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.simple-section {
    padding: 50px 0;
}

.main-title {
    font-size: 26px;
    margin-bottom: 10px;
    font-weight: 500;
}

.convert-item {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 6px;
    display: flex;
    align-content: center;
    justify-content: space-between;
}