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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    --header-height: 70px;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #eef2f6;
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
}

/* Header */
header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-link {
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo {
    height: 36px;
    width: auto;
}

.header-right h1 {
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(to right, #4f46e5, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

/* Main Content */
main {
    max-width: 900px;
    margin: 40px auto;
    /* Reduced top margin to account for hero */
    padding: 0 24px;
}

.hero-section {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Drop Zone */
.drop-zone {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px -5px rgba(99, 102, 241, 0.2);
}

.drop-zone-content {
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 6px rgba(99, 102, 241, 0.3));
}

.primary-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.secondary-text {
    color: #64748b;
    font-size: 1.1rem;
}

.file-types {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 16px;
    border-radius: 100px;
    font-weight: 500;
}

.note-text {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #94a3b8;
    font-style: italic;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    backdrop-filter: blur(10px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

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

/* Results */
.result-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 40px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.summary-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

.file-tag {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.controls-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #e2e8f0;
}

.controls-container label {
    font-weight: 600;
    color: #475569;
    min-width: 140px;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 2px;
}

.summary-content {
    line-height: 1.8;
    color: #334155;
    font-size: 1.1rem;
}

.summary-content ul {
    list-style: none;
    padding: 0;
}

.summary-content li {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: transform 0.2s;
}

.summary-content li:hover {
    transform: translateX(4px);
    border-color: var(--primary-color);
}

.page-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reset-btn {
    margin-top: 40px;
    width: 100%;
    padding: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: #f8fafc;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.hidden {
    display: none !important;
}