/* ================================================
   EASYPDFTOOLS - PSYCHOLOGICALLY ATTRACTIVE DESIGN
   Color Psychology: Trust + Energy + Calm
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Mode - Psychologically Optimized */
    --bg-primary: #f8fafc;
    /* Soft blue-gray - calming */
    --bg-secondary: #ffffff;
    /* Pure white - clean trust */
    --bg-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    /* Purple gradient - premium */

    --text-primary: #1e293b;
    /* Dark slate - easy to read */
    --text-secondary: #64748b;
    /* Slate gray - supports hierarchy */
    --text-muted: #94a3b8;
    /* Light slate - subtle hints */

    --accent-primary: #6366f1;
    /* Indigo - trust + intelligence */
    --accent-hover: #4f46e5;
    /* Deeper indigo - interaction */
    --accent-light: #eef2ff;
    /* Light indigo bg - subtle highlight */

    --success: #10b981;
    /* Green - achievement */
    --warning: #f59e0b;
    /* Amber - attention */
    --error: #ef4444;
    /* Red - alert */

    --border-light: #e2e8f0;
    /* Light border - subtle separation */
    --border-medium: #cbd5e1;
    /* Medium border - clear division */

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(99, 102, 241, 0.08);
    --shadow-lg: 0 10px 30px rgba(99, 102, 241, 0.12);
    --shadow-xl: 0 20px 50px rgba(99, 102, 241, 0.15);
}

body.dark-mode {
    /* Dark Mode - Reduced Eye Strain */
    --bg-primary: #0f172a;
    /* Deep navy - easier on eyes than pure black */
    --bg-secondary: #1e293b;
    /* Slate - layered depth */
    --bg-accent: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    /* Vibrant gradient */

    --text-primary: #f1f5f9;
    /* Almost white - high contrast */
    --text-secondary: #cbd5e1;
    /* Light slate - readable */
    --text-muted: #94a3b8;
    /* Medium slate */

    --accent-primary: #818cf8;
    /* Lighter indigo for dark bg */
    --accent-hover: #a5b4fc;
    /* Even lighter on hover */
    --accent-light: #312e81;
    /* Dark indigo bg */

    --border-light: #334155;
    --border-medium: #475569;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Minimal Header - Trust Building */
.minimal-header {
    padding: 20px 40px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.2));
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--bg-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.by-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.company-logo {
    height: 28px;
    width: auto;
    filter: brightness(0.9);
    transition: filter 0.2s;
}

.company-logo:hover {
    filter: brightness(1);
}

.theme-toggle {
    background: var(--accent-light);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    background: var(--accent-primary);
    transform: rotate(180deg) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Main Container - Welcoming & Spacious */
.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 60px;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-section {
    width: 100%;
    text-align: center;
}

.main-title {
    font-size: 56px;
    font-weight: 800;
    background: var(--bg-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 60px;
    font-weight: 400;
}

/* Upload Zone - Inviting & Interactive */
.upload-zone {
    background: var(--bg-secondary);
    border: 3px dashed var(--border-medium);
    border-radius: 24px;
    padding: 80px 60px;
    margin: 0 auto;
    max-width: 700px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-accent);
    opacity: 0;
    transition: opacity 0.4s;
}

.upload-zone:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.upload-zone:hover::before {
    opacity: 0.03;
}

.upload-zone.drag-over {
    border-color: var(--accent-primary);
    background: var(--accent-light);
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.upload-zone.drag-over::before {
    opacity: 0.05;
}

.upload-icon {
    font-size: 80px;
    margin-bottom: 28px;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.15));
    position: relative;
    z-index: 1;
}

.upload-zone h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.upload-zone p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.upload-btn {
    background: var(--bg-accent);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-btn:active {
    transform: translateY(0);
}

/* File List - Clear & Organized */
.file-list-container {
    margin: 40px 0;
    max-width: 700px;
    width: 100%;
}

#fileList {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin: 8px 0;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.file-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.file-item span {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.file-item button {
    background: var(--error);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.file-item button:hover {
    transform: rotate(90deg);
    background: #dc2626;
}

/* Tool Selector - Organized & Scannable */
.tool-selector {
    margin-top: 48px;
    max-width: 900px;
    width: 100%;
    animation: fadeSlideIn 0.5s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-selector h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.tool-grid {
    display: grid;
    gap: 40px;
}

.tool-category h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.tool-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    padding: 20px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.tool-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: var(--accent-light);
}

.tool-btn:active {
    transform: translateY(-2px);
}

/* Results - Celebration & Clear */
.results-container {
    margin-top: 48px;
    max-width: 700px;
    width: 100%;
    animation: fadeSlideIn 0.5s ease;
}

.processing-status {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.processed-files {
    margin-top: 28px;
}

.result-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.result-item:hover {
    border-color: var(--success);
    box-shadow: var(--shadow-md);
}

.result-item button {
    background: var(--bg-accent);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.result-item button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Stats Footer - Subtle Reassurance */
.stats-footer {
    margin-top: 80px;
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stats-footer span {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
}

.stats-footer span:hover {
    color: var(--accent-primary);
}

/* Minimal Footer - Trust Reinforcement */
.minimal-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 32px 40px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.copyright {
    font-size: 14px;
    color: var(--text-muted);
}

/* Loading Animation - Engaging */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

/* Responsive - Mobile Friendly */
@media (max-width: 768px) {
    .main-title {
        font-size: 40px;
    }

    .subtitle {
        font-size: 18px;
    }

    .upload-zone {
        padding: 60px 32px;
    }

    .upload-zone h2 {
        font-size: 24px;
    }

    .tool-buttons {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .minimal-header {
        padding: 16px 24px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .stats-footer {
        gap: 32px;
    }
}

/* Accessibility - WCAG Compliant */
:focus-visible {
    outline: 3px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* ================================================
   COMPRESSION OPTIONS - UNIQUE PREMIUM DESIGN
   ================================================ */

.compression-selector {
    margin: 32px auto 48px;
    max-width: 700px;
    width: 100%;
    animation: fadeSlideIn 0.5s ease;
}

.compression-selector h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.compression-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.compression-option {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.compression-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.compression-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 24px 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.compression-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--bg-accent);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.compression-option:hover .compression-card {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.compression-option:hover .compression-card::before {
    height: 100%;
}

.compression-option input[type="radio"]:checked + .compression-card {
    border-color: var(--accent-primary);
    background: var(--accent-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.compression-option input[type="radio"]:checked + .compression-card::before {
    height: 100%;
}

.compression-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.compression-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--accent-light);
    transition: all 0.3s;
}

.compression-option:hover .compression-icon,
.compression-option input[type="radio"]:checked + .compression-card .compression-icon {
    transform: scale(1.1) rotate(5deg);
}

.compression-badge {
    background: var(--bg-accent);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.compression-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.compression-check {
    opacity: 0;
    transition: opacity 0.3s;
}

.compression-option input[type="radio"]:checked + .compression-card .compression-check {
    opacity: 1;
}

.compression-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.compression-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compression-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.compression-feature-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Responsive for compression options */
@media (max-width: 640px) {
    .compression-options-grid {
        grid-template-columns: 1fr;
    }
    
    .compression-card {
        padding: 20px;
    }
}


/* ================================================
   COMPRESSION BUTTONS - BOLD DESIGN
   ================================================ */

.compression-buttons-container {
    margin: 32px auto 48px;
    max-width: 700px;
    width: 100%;
    animation: fadeSlideIn 0.5s ease;
    text-align: center;
}

.compression-buttons-container h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.compression-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.compression-btn {
    background: var(--bg-secondary);
    border: 3px solid var(--border-light);
    padding: 24px 48px;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    min-width: 220px;
}

.compression-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.compression-btn:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.compression-btn:hover::before {
    opacity: 0.05;
}

.compression-btn.selected {
    border-color: var(--accent-primary);
    background: var(--accent-light);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
}

.compression-btn.selected::before {
    opacity: 0.1;
}

.compression-btn-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.compression-btn-title {
    font-size: 24px;
    font-weight: 800;
    display: block;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.compression-btn-desc {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.compression-btn:active {
    transform: translateY(-2px) scale(1.03);
}

@media (max-width: 640px) {
    .compression-buttons {
        flex-direction: column;
    }
    
    .compression-btn {
        width: 100%;
    }
}


/* ================================================
   PDF PAGE PREVIEW - DRAGGABLE THUMBNAILS
   ================================================ */

.page-preview-container {
    margin: 40px auto;
    max-width: 900px;
    width: 100%;
    animation: fadeSlideIn 0.5s ease;
}

.page-preview-container h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.page-thumbnail {
    position: relative;
    background: var(--bg-primary);
    border: 3px solid var(--border-light);
    border-radius: 12px;
    padding: 12px;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.page-thumbnail:active {
    cursor: grabbing;
}

.page-thumbnail.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.page-thumbnail.drag-over {
    border-color: var(--accent-primary);
    background: var(--accent-light);
    transform: scale(1.05);
}

.page-thumbnail:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.page-thumbnail.selected {
    border-color: var(--accent-primary);
    background: var(--accent-light);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.page-canvas {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: white;
    display: block;
}

.page-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--bg-accent);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.page-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    z-index: 2;
}

.page-info {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.preview-actions {
    margin-top: 24px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-actions button {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.preview-actions button:hover {
    border-color: var(--accent-primary);
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.preview-actions button.primary {
    background: var(--bg-accent);
    color: white;
    border-color: transparent;
}

@media (max-width: 640px) {
    .page-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}


/* ================================================
   LOCKED TOOL OVERLAY - COMING SOON
   ================================================ */

.tool-card.locked {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.tool-card.locked::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-secondary);
    opacity: 0.95;
    border-radius: 16px;
    z-index: 10;
}

.tool-card.locked::after {
    content: ' Coming Soon!';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 11;
    animation: pulse 2s ease-in-out infinite;
}

.tool-card.locked .tool-icon {
    filter: grayscale(1);
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.coming-soon-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    font-size: 15px;
    font-weight: 600;
    max-width: 350px;
    z-index: 1000;
    animation: slideInUp 0.5s ease;
}

.coming-soon-message::before {
    content: '';
    font-size: 24px;
    margin-right: 12px;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* ================================================
   INSTALL PROMPT - PWA
   ================================================ */

.install-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.install-modal.fade-out {
    animation: fadeOut 0.3s ease;
}

.install-modal-content {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.install-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.install-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.install-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.install-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    text-align: left;
}

.benefit {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
    padding-left: 8px;
}

.install-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.install-btn-primary,
.install-btn-secondary {
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.install-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.install-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5);
}

.install-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.install-btn-secondary:hover {
    border-color: var(--accent-primary);
    background: var(--accent-light);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

/* ================================================
   FILE SIZE PREVIEW
   ================================================ */

.size-preview-container {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    margin: 24px auto;
    max-width: 600px;
    box-shadow: var(--shadow-md);
    animation: fadeSlideIn 0.5s ease;
}

.size-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.size-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.size-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.size-arrow {
    font-size: 32px;
    color: var(--accent-primary);
    margin: 0 16px;
}

.size-savings {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.size-estimate-note {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}


/* ================================================
   MERGE PDF ENHANCEMENTS - FILE CONTROLS
   ================================================ */

.merge-file-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
    cursor: grab;
}

.merge-file-card:active {
    cursor: grabbing;
}

.merge-file-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.merge-file-card.drag-over {
    border-color: var(--accent-primary);
    background: var(--accent-light);
}

.file-drag-handle {
    font-size: 20px;
    color: var(--text-secondary);
    cursor: grab;
}

.file-thumbnail {
    width: 60px;
    height: 80px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: var(--shadow-sm);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-details {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.file-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    border-color: var(--accent-primary);
    background: var(--accent-light);
    transform: scale(1.1);
}

.control-btn.delete:hover {
    border-color: #ef4444;
    background: #fee2e2;
    color: #ef4444;
}

.add-more-btn {
    width: 100%;
    padding: 16px;
    border: 2px dashed var(--border-light);
    border-radius: 12px;
    background: transparent;
    color: var(--accent-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 16px;
}

.add-more-btn:hover {
    border-color: var(--accent-primary);
    background: var(--accent-light);
}
