/* Global Styles */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #10b981;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --text-color: #f3f4f6;
    --text-muted: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --radius-lg: 16px;
    --radius-md: 8px;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text-color);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo,
.btn {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 900px;
}

.container-text {
    max-width: 800px;
}

.hidden {
    display: none !important;
}

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 8px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Navbar */
.navbar {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:not(.btn):hover {
    color: var(--text-color);
}

/* Hero Section */
/* Hero Section */
/* Hero Section */
.hero-section {
    padding: 80px 0 100px;
    text-align: center;
    background: #0f172a;
    /* Fallback */
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--card-border);
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* ULTRA BRANDABLE: Aurora Mesh Gradient Animation */
.hero-animation-bg {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(at 0% 0%, #312e81 0px, transparent 50%),
        radial-gradient(at 100% 0%, #4338ca 0px, transparent 50%),
        radial-gradient(at 100% 100%, #1e1b4b 0px, transparent 50%),
        radial-gradient(at 0% 100%, #3730a3 0px, transparent 50%),
        radial-gradient(at 50% 50%, #0f172a 0px, transparent 50%);
    background-size: 100% 100%;
    filter: blur(60px);
    opacity: 0.6;
    animation: rotateMesh 20s linear infinite alternate;
    z-index: 1;
}

/* Add a technological grid overlay for "Precision" feel */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    pointer-events: none;
}

@keyframes rotateMesh {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(10deg) scale(1.1);
    }
}

/* Particles removed for Cleaner Mesh Look */

.hero-section h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    /* Shimmering Text Gradient */
    background: linear-gradient(90deg, #ffffff 0%, #818cf8 25%, #c084fc 50%, #818cf8 75%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1.5px;
    line-height: 1.1;
    animation: textShimmer 6s linear infinite;
    position: relative;
    z-index: 2;
}

@keyframes textShimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 56px;
    flex-wrap: wrap;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.hero-features svg {
    color: var(--secondary-color);
}

/* Tool Interface */
.tool-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--card-border);
    border-radius: var(--radius-md);
    padding: 60px 20px;
    text-align: center;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.2);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    margin-bottom: 24px;
    color: var(--text-muted);
    opacity: 0.7;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.upload-area p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.small-note {
    font-size: 0.8rem !important;
    opacity: 0.6;
    margin-top: 16px;
    margin-bottom: 0 !important;
}

/* Files Container */
.files-container {
    width: 100%;
    text-align: left;
}

.files-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-text:hover {
    color: #ef4444;
}

.file-list {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 20px;
    display: grid;
    gap: 8px;
    padding-right: 5px;
}

.file-list::-webkit-scrollbar {
    width: 6px;
}

.file-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.file-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.file-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 12px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: grab;
}

.file-item:active {
    cursor: grabbing;
    background: rgba(255, 255, 255, 0.06);
}

.file-info-group {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
    width: 100%;
    overflow: hidden;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Inputs and Buttons in File Item */
.page-range-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    width: 100px;
    font-size: 0.8rem;
    text-align: center;
}

.page-range-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.remove-file:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.duplicate-file:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

.add-more-area {
    text-align: center;
    padding: 12px;
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: 0.2s;
}

.add-more-area:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* Options & Actions */
.tool-options-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.checkbox-container:hover {
    color: var(--text-color);
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

.checkbox-container input:checked~.checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input {
    display: none;
}

.checkbox-container input:checked~.checkmark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: block;
}

.tool-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filename-input {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
}

.filename-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Result and Loader */
.result-area {
    text-align: center;
    animation: fadeIn 0.5s;
}

.success-icon {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.result-area h3 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: var(--radius-lg);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Sections */
.content-section {
    padding: 80px 0;
    border-top: 1px solid var(--card-border);
}

.bg-alt {
    background: var(--bg-darker);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.step-card {
    text-align: center;
    padding: 20px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.step-card h3 {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.step-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Text Content */
.container-text p,
.container-text ul {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 24px;
    line-height: 1.8;
}

.container-text h2 {
    font-size: 2.25rem;
    margin-bottom: 32px;
    color: white;
}

.container-text h3 {
    font-size: 1.5rem;
    margin-top: 48px;
    margin-bottom: 20px;
    color: white;
}

.container-text .benefit-list li {
    margin-bottom: 16px;
    position: relative;
    padding-left: 24px;
}

.container-text .benefit-list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1.2rem;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.use-case {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    transition: 0.3s;
}

.use-case:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.use-case h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: white;
}

.use-case p {
    font-size: 1rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

/* FAQ & Footer */
/* FAQ Accordion */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.faq-question {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    line-height: 1;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-item.active .faq-question {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background: rgba(0, 0, 0, 0.1);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    /* Arbitrary large height */
    transition: max-height 0.5s ease-in-out;
}

.faq-text {
    padding: 24px;
    padding-top: 16px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    border-top: 1px solid var(--card-border);
}

/* Legacy overrides removed - not needed as HTML was fully replaced */

.footer-links-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 40px;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 16px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: 0.3s;
}

.tool-link:hover {
    background: white;
    color: black;
    transform: scale(1.05);
}

.main-footer {
    background: #000;
    border-top: 1px solid #1e293b;
    padding-top: 80px;
    padding-bottom: 40px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.brand-col p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 300px;
    margin-top: 16px;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #64748b;
}

.social-links a:hover {
    color: white;
}

@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .tool-wrapper {
        padding: 20px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }

    .tool-link {
        width: 100%;
        justify-content: center;
    }
}