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

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --success: #059669;
    --danger: #dc2626;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Main */
.main-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px;
}

.hero {
    text-align: center;
    margin-bottom: 36px;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Card */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    margin-bottom: 24px;
}

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

.drop-icon { font-size: 2.5rem; margin-bottom: 12px; }
.drop-zone h3 { font-size: 1.1rem; margin-bottom: 8px; }
.drop-zone p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

/* File list */
.file-list {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

#fileItems { list-style: none; }

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.file-item:last-child { border-bottom: none; }

.file-item-icon { font-size: 1.2rem; flex-shrink: 0; }
.file-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0; }

.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--danger);
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.remove-btn:hover { background: #fee2e2; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* Progress */
.progress-bar {
    background: var(--border);
    border-radius: 100px;
    height: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    border-radius: 100px;
    width: 0%;
    transition: width 0.4s ease;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.progress-label {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Actions */
.actions { text-align: center; margin-top: 8px; }

/* Download section */
.download-section {
    text-align: center;
    padding: 24px 0 8px;
}
.success-icon { font-size: 3rem; margin-bottom: 12px; }
.download-section h3 { margin-bottom: 20px; }
.download-section .btn { margin: 0 8px 12px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: #eef2ff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-large { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; text-align: center; }

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.feature-icon { font-size: 1.75rem; display: block; margin-bottom: 8px; }
.feature h4 { font-size: 0.95rem; margin-bottom: 6px; }
.feature p { font-size: 0.85rem; color: var(--text-muted); }

/* Login */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    padding: 24px;
}

.login-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
}

.login-icon { font-size: 3rem; margin-bottom: 12px; }
.login-card h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.login-subtitle { color: var(--text-muted); margin-bottom: 28px; }

.form-group { margin-bottom: 18px; text-align: left; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--primary); }

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
    .features { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.75rem; }
    .card { padding: 20px; }
    .navbar { padding: 12px 16px; }
}
