/* Vidistill — Dark Theme */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; background: #0f0f0f; color: #e0e0e0; min-height: 100vh; }

/* Login */
.login-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #1a1a1a; padding: 40px; border-radius: 16px; width: 100%; max-width: 380px; border: 1px solid #222; }
.login-logo { font-size: 28px; font-weight: 700; color: #6366f1; text-align: center; }
.login-sub { text-align: center; color: #888; font-size: 13px; margin: 4px 0 24px; }
.alert-error { background: #7f1d1d; color: #fca5a5; padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.form-group { margin-bottom: 12px; }
.form-group input, .modal-input { width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid #333; background: #111; color: #e0e0e0; font-size: 14px; outline: none; }
.form-group input:focus, .modal-input:focus { border-color: #6366f1; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; text-decoration: none; transition: background 0.2s; }
.btn-primary { background: #6366f1; color: #fff; }
.btn-primary:hover { background: #4f46e5; }
.btn-outline { background: transparent; color: #ccc; border: 1px solid #333; }
.btn-outline:hover { background: #1a1a1a; }
.btn-danger { background: #991b1b; color: #fca5a5; }
.btn-danger:hover { background: #7f1d1d; }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }

/* App layout */
.app-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #222; margin-bottom: 24px; }
.header-left { display: flex; align-items: center; gap: 8px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 20px; font-weight: 700; color: #6366f1; }
.disk-info { font-size: 12px; color: #888; background: #1a1a1a; padding: 4px 10px; border-radius: 6px; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-section { background: #1e1b4b; color: #a5b4fc; }
.badge-success { background: #14532d; color: #86efac; }
.badge-pending { background: #422006; color: #fbbf24; }
.badge-processing { background: #1e1b4b; color: #a5b4fc; }
.badge-error { background: #7f1d1d; color: #fca5a5; }

/* Dashboard */
.section-block { margin-bottom: 32px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-header h2 { font-size: 18px; color: #ccc; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.collection-card { display: block; background: #1a1a1a; padding: 20px; border-radius: 12px; border: 1px solid #222; text-decoration: none; color: inherit; transition: border-color 0.2s; }
.collection-card:hover { border-color: #6366f1; }
.collection-card h3 { font-size: 16px; color: #e0e0e0; margin-bottom: 6px; }
.video-count { font-size: 13px; color: #888; }
.empty-text { color: #555; font-size: 14px; padding: 12px 0; }

/* Collection table */
.video-table { width: 100%; border-collapse: collapse; }
.video-table th { text-align: left; padding: 10px 12px; font-size: 12px; color: #888; border-bottom: 1px solid #222; }
.video-table td { padding: 12px; border-bottom: 1px solid #111; }
.video-name { font-weight: 500; }
.video-actions { display: flex; gap: 6px; align-items: center; }
.process-controls { display: flex; gap: 6px; align-items: center; }
.mode-select { padding: 4px 8px; border-radius: 6px; border: 1px solid #333; background: #111; color: #ccc; font-size: 12px; }

/* Progress bar */
.progress-bar { width: 100%; height: 6px; background: #222; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: #6366f1; border-radius: 3px; transition: width 0.3s; }
.upload-progress { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.upload-progress .progress-bar { flex: 1; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-card { background: #1a1a1a; padding: 28px; border-radius: 12px; width: 100%; max-width: 400px; border: 1px solid #333; }
.modal-card h3 { margin-bottom: 16px; color: #e0e0e0; }
.modal-input { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Responsive */
@media (max-width: 768px) {
    .app-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .collection-grid { grid-template-columns: 1fr; }
    .video-actions { flex-wrap: wrap; }
}
