:root {
    --bg: #0d0d12;
    --surface: #16161f;
    --surface2: #1e1e2a;
    --border: #2a2a3d;
    --accent: #7c6af7;
    --accent-dim: #6055d4;
    --text: #e2e2ee;
    --text-muted: #7878a0;
    --danger: #e05555;
    --radius: 10px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    height: 100vh;
    overflow: hidden;
}

.hidden { display: none !important; }

/* ── Login ─────────────────────────────── */
#login-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 40%, #1a1730 0%, var(--bg) 70%);
}

.login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 340px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.login-box h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.75rem;
    letter-spacing: -0.02em;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

input[type="password"] {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    padding: 0.7rem 1rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}
input[type="password"]:focus { border-color: var(--accent); }

button {
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.7rem 1rem;
    transition: all 0.15s;
    border: none;
}

#login-btn {
    background: var(--accent);
    color: #fff;
}
#login-btn:hover { background: var(--accent-dim); }
#login-btn:disabled { opacity: 0.6; cursor: default; }

.error {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

/* ── Header ─────────────────────────────── */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.75rem;
    height: 56px;
}

.logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
}
.btn-ghost:hover { border-color: var(--danger); color: var(--danger); }

/* ── Panels ─────────────────────────────── */
#main-screen { display: flex; flex-direction: column; height: 100vh; }

.panels {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    overflow: hidden;
}

.panel h2 {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.divider {
    width: 1px;
    background: var(--border);
    margin: 1rem 0;
    flex-shrink: 0;
}

/* ── Drop Zone ───────────────────────────── */
.drop-zone {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 1.5rem;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover, .drop-zone.dragging {
    border-color: var(--accent);
    background: var(--surface2);
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.drop-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
    justify-content: center;
}

.drop-icon {
    font-size: 1.1rem;
    color: var(--accent);
}

/* ── File List ───────────────────────────── */
.file-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.file-list::-webkit-scrollbar { width: 4px; }
.file-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.file-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    transition: border-color 0.15s;
}
.file-item:hover { border-color: #3d3d58; }

.file-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1;
}

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

.file-name {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 0.15rem;
}

.file-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    line-height: 1.4;
}

.btn-download:hover { border-color: var(--accent); color: var(--accent); }
.btn-delete:hover   { border-color: var(--danger);  color: var(--danger);  }
.btn-icon:disabled  { opacity: 0.4; cursor: default; }

.empty-state {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
    padding: 1.5rem 0;
}

@media (max-width: 640px) {
    body { overflow: auto; }
    .panels { flex-direction: column; }
    .divider { width: 100%; height: 1px; margin: 0; }
    .panel { height: auto; }
}
