/* ══ Hero theme — deep blue/indigo ══ */
.pdf-page {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    min-height: 65vh;
    padding: 28px 8px 64px;
    position: relative;
    overflow: hidden;
}
.pdf-page::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px; pointer-events: none;
}
.pdf-page::after {
    content: ''; position: absolute;
    bottom: -2px; left: 0; right: 0; height: 60px;
    background: #f8fafc;
    clip-path: ellipse(55% 100% at 50% 100%);
}

/* ══ Drop zone ══ */
.drop-zone {
    border: 2.5px dashed rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.25s;
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
}
.drop-zone:hover,
.drop-zone.drag-over {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.12);
    transform: scale(1.01);
}
.drop-zone.drag-over { border-style: solid; }

/* ══ File list cards ══ */
.file-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1.5px solid #e2e8f0;
    cursor: grab;
    transition: all 0.15s;
    user-select: none;
}
.file-card:hover          { box-shadow: 0 6px 20px rgba(0,0,0,0.1); border-color: #6366f1; }
.file-card.dragging       { opacity: 0.4; cursor: grabbing; }
.file-card.drag-target    { border-color: #6366f1; background: #eff0ff; }

.file-icon {
    width: 40px; height: 48px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 900; color: #fff;
    flex-shrink: 0; letter-spacing: 0.5px;
    position: relative;
}
.file-icon::after {
    content: '';
    position: absolute; top: 0; right: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent rgba(255,255,255,0.4) transparent transparent;
}
.file-name   { font-size: 14px; font-weight: 600; color: #1e293b; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size   { font-size: 12px; color: #94a3b8; flex-shrink: 0; }
.file-pages  { font-size: 11px; font-weight: 700; color: #6366f1; background: #eff0ff; padding: 3px 8px; border-radius: 6px; flex-shrink: 0; }
.file-drag   { color: #94a3b8; font-size: 18px; flex-shrink: 0; cursor: grab; }
.file-remove { width: 28px; height: 28px; border-radius: 8px; background: #fef2f2; color: #dc2626; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all 0.15s; flex-shrink: 0; }
.file-remove:hover { background: #dc2626; color: #fff; }

/* ══ Merge button ══ */
.merge-btn {
    width: 100%; padding: 16px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; font-weight: 800; font-size: 16px;
    border-radius: 14px; border: none; cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
    font-family: inherit;
}
.merge-btn:hover  { background: linear-gradient(135deg, #4f46e5, #4338ca); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(99,102,241,0.45); }
.merge-btn:active { transform: translateY(0); }
.merge-btn:disabled { background: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }

/* ══ Progress ══ */
.progress-wrap { background: rgba(255,255,255,0.15); border-radius: 999px; height: 8px; overflow: hidden; }
.progress-bar  { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #818cf8, #6366f1); transition: width 0.4s ease; }

/* ══ Download card ══ */
.download-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    display: none;
    animation: popIn 0.3s ease;
}
.download-card.show { display: block; }
@keyframes popIn { from{opacity:0;transform:scale(0.95)} to{opacity:1;transform:scale(1)} }
.dl-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #16a34a; color: #fff;
    font-weight: 700; font-size: 15px;
    padding: 12px 32px; border-radius: 12px;
    text-decoration: none; transition: background 0.2s;
    border: none; cursor: pointer; font-family: inherit;
}
.dl-btn:hover { background: #15803d; color: #fff; text-decoration: none; }

/* ══ Stats bar ══ */
.stats-bar {
    display: flex; flex-wrap: wrap; gap: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px; padding: 12px 16px;
    margin-bottom: 12px;
}
.stat-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,0.75); }
.stat-num  { font-weight: 800; color: #fff; font-family: 'Courier New', monospace; }

/* ══ Order hint ══ */
.order-hint {
    background: rgba(255,255,255,0.08);
    border-radius: 10px; padding: 8px 12px;
    font-size: 12px; color: rgba(255,255,255,0.6);
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 10px;
}

/* ══ Spin ══ */
.spin-anim { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }