*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f1923;
    --bg-card: #1a2736;
    --bg-hover: #223344;
    --accent: #00e676;
    --accent-hover: #00c853;
    --accent-dim: rgba(0, 230, 118, 0.1);
    --text: #e8eaed;
    --text-muted: #8899a6;
    --border: #2d3f50;
    --radius: 10px;
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
.app { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
.app-header { text-align: center; margin-bottom: 40px; }
.header-left { display: flex; align-items: center; justify-content: center; gap: 12px; }
.logo { font-size: 36px; }
.app-header h1 { font-size: 28px; font-weight: 700; }
.subtitle { color: var(--text-muted); margin-top: 8px; font-size: 14px; }
.section { margin-bottom: 32px; }

/* Upload */
.upload-area {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 60px 32px; text-align: center; cursor: pointer;
    transition: all 0.2s; background: var(--bg-card);
}
.upload-area:hover { border-color: var(--accent); background: var(--accent-dim); }
.upload-icon { font-size: 48px; margin-bottom: 16px; }
.upload-area h3 { font-size: 18px; margin-bottom: 8px; }
.upload-area p { color: var(--text-muted); font-size: 13px; }
.file-info {
    background: var(--bg-card); border: 1px solid var(--accent);
    border-radius: var(--radius); padding: 14px 20px; margin-top: 16px;
    font-weight: 500; color: var(--accent);
}

/* Feature Selection */
.feature-selection { margin-top: 24px; }
.feature-selection > h3 { margin-bottom: 20px; font-size: 18px; }

.feature-group {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
}
.feature-group-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.group-icon { font-size: 20px; }
.feature-group-header h4 { flex: 1; font-size: 14px; font-weight: 600; }
.select-all { font-size: 12px; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 4px; }

.feature-options { padding: 8px 12px; }
.feature-option {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 6px; cursor: pointer;
    transition: background 0.15s;
}
.feature-option:hover { background: var(--bg-hover); }
.feature-option.disabled { opacity: 0.6; cursor: default; }
.feature-option input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer;
}
.feature-label { font-size: 13px; font-weight: 500; min-width: 180px; }
.feature-desc { font-size: 12px; color: var(--text-muted); }
.core-features .feature-option { opacity: 0.7; }

/* Action Bar */
.action-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
    border: none; border-radius: 6px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 8px 16px; }
.btn-ghost:hover { color: var(--accent); }

/* Progress */
.progress-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 60px 32px; text-align: center;
}
.progress-card h3 { margin-top: 20px; }
.text-muted { color: var(--text-muted); font-size: 13px; margin-top: 8px; }
.spinner {
    width: 48px; height: 48px; border: 3px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-features {
    margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.progress-features .tag {
    background: var(--accent-dim); color: var(--accent);
    padding: 4px 12px; border-radius: 12px; font-size: 11px; font-weight: 500;
}

/* Results */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; text-align: center;
}
.stat-card .value { font-size: 24px; font-weight: 700; color: var(--accent); }
.stat-card .label { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

.video-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
.video-container h3 { margin-bottom: 12px; font-size: 16px; }
.video-container video { width: 100%; border-radius: 6px; background: #000; }

/* Responsive */
@media (max-width: 768px) {
    .feature-label { min-width: auto; }
    .feature-desc { display: none; }
    .action-bar { flex-direction: column; gap: 12px; }
}

/* Login */
.login-screen {
    display: none; min-height: 100vh;
    align-items: center; justify-content: center; padding: 20px;
}
.login-screen.active { display: flex; }
.login-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 48px 40px; width: 100%; max-width: 400px; text-align: center;
}
.login-card .logo { font-size: 48px; display: block; margin-bottom: 12px; }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card .subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }
.input-group { margin-bottom: 16px; text-align: left; }
.input-group label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.8px; }
.input-group input {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 14px; background: var(--bg); color: var(--text);
    outline: none; font-family: inherit;
}
.input-group input:focus { border-color: var(--accent); }
.btn-full { width: 100%; justify-content: center; margin-top: 8px; }
.error-text { color: #ef4444; font-size: 13px; margin-top: 12px; }
.app-content { display: block; }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-badge { font-size: 12px; color: var(--accent); background: var(--accent-dim); padding: 4px 12px; border-radius: 4px; font-weight: 600; }
.app-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.app-header .subtitle { display: none; }
