@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
    --bg-primary: #0F0F14;
    --bg-card: #1A1A24;
    --bg-card-elev: #22223A;
    --border-subtle: #2A2A3E;
    --border-strong: #3A3A52;
    --primary-blue: #5B5FEF;
    --accent-cyan: #00D4FF;
    --accent-lavender: #A78BFA;
    --accent-pink: #F472B6;
    --success-green: #00C896;
    --alert-orange: #FF9500;
    --error-red: #FF4757;
    --text-primary: #FFFFFF;
    --text-secondary: #8A8FA8;
    --text-muted: #5C6175;
    --gradient-primary: linear-gradient(135deg, #5B5FEF 0%, #00D4FF 100%);
    --gradient-rainbow: linear-gradient(135deg, #5B5FEF 0%, #A78BFA 35%, #F472B6 65%, #00D4FF 100%);
    --font-sans: "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-sans); }
body { padding: 24px 0 60px; }
.hidden { display: none !important; }

.bg-stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.orb-1 { width: 420px; height: 420px; background: radial-gradient(circle, #5B5FEF, transparent 70%); top: -100px; left: -100px; }
.orb-2 { width: 380px; height: 380px; background: radial-gradient(circle, #00D4FF, transparent 70%); top: 50%; right: -120px; }
.orb-3 { width: 340px; height: 340px; background: radial-gradient(circle, #A78BFA, transparent 70%); bottom: -80px; left: 35%; }

.shell { position: relative; z-index: 1; display: flex; justify-content: center; padding: 0 16px; }
.card {
    width: 100%; max-width: 520px;
    background: rgba(26,26,36,0.78);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(91,95,239,0.18);
    border-radius: 22px; padding: 32px 28px;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 60px -20px rgba(91,95,239,0.25);
}

.logo-wrap { text-align: center; margin-bottom: 22px; }
.logo-circle { width: 72px; height: 72px; margin: 0 auto 12px; position: relative; display: flex; align-items: center; justify-content: center; }
.logo-circle::before {
    content: ''; position: absolute; inset: -8px; border-radius: 50%;
    background: var(--gradient-rainbow); filter: blur(20px); opacity: 0.6; z-index: 0;
}
.logo-circle img { width: 72px; height: 72px; border-radius: 50%; position: relative; z-index: 1; filter: drop-shadow(0 4px 16px rgba(91,95,239,0.5)); }
.brand { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; margin-bottom: 4px; }
.brand-sub { font-size: 12px; color: var(--text-secondary); letter-spacing: 0.3px; }

.stepper { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 24px; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); transition: all 220ms; }
.step-dot.active { background: var(--gradient-primary); width: 22px; border-radius: 5px; }
.step-dot.done { background: var(--success-green); }

.section { animation: fadeSlideIn 380ms cubic-bezier(0.2,0.8,0.2,1); }
.section + .section { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border-subtle); }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.section-title .n { width: 20px; height: 20px; border-radius: 50%; background: var(--gradient-primary); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.section-hint { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; }

.field { margin-bottom: 14px; }
.field-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; display: block; }
.field-input, .field-select {
    width: 100%; height: 46px; padding: 0 14px;
    background: rgba(34,34,58,0.6); border: 1px solid var(--border-subtle); border-radius: 12px;
    color: var(--text-primary); font-size: 14px; font-family: var(--font-sans);
    transition: all 200ms cubic-bezier(0.2,0.8,0.2,1);
}
.field-input:focus, .field-select:focus {
    outline: none; border-color: var(--primary-blue); background: rgba(34,34,58,0.9);
    box-shadow: 0 0 0 4px rgba(91,95,239,0.15);
}
.field-input::placeholder { color: var(--text-muted); }
.field-error { font-size: 11px; color: var(--error-red); margin-top: 5px; display: none; }
.field-error.show { display: block; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; margin-bottom: 14px; }
.field-row .field.w-sm { flex: 0 0 100px; }
.field-row .field.w-lg { flex: 3; }

.btn-primary {
    width: 100%; height: 48px; margin-top: 6px;
    background: var(--gradient-primary); color: #fff; border: none; border-radius: 12px;
    font-size: 14px; font-weight: 700; cursor: pointer; position: relative;
    transition: all 220ms cubic-bezier(0.2,0.8,0.2,1);
    box-shadow: 0 8px 24px -8px rgba(91,95,239,0.5);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 32px -8px rgba(91,95,239,0.65); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary .btn-content { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary .spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 700ms linear infinite; display: none; }
.btn-primary.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-outline {
    width: 100%; height: 44px; background: transparent; color: var(--text-primary);
    border: 1px solid var(--border-strong); border-radius: 12px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 180ms;
}
.btn-outline:hover { border-color: var(--primary-blue); background: rgba(91,95,239,0.08); }
.btn-link { display: block; width: 100%; text-align: center; background: transparent; color: var(--text-secondary); padding: 10px; border: none; font-size: 12px; cursor: pointer; }
.btn-link:hover { color: var(--text-primary); }

.alert { padding: 12px 14px; border-radius: 10px; font-size: 12px; line-height: 1.5; margin-bottom: 16px; border: 1px solid; display: none; }
.alert.show { display: block; }
.alert.error { background: rgba(255,71,87,0.1); color: #FF6B7A; border-color: rgba(255,71,87,0.35); }
.alert.info { background: rgba(0,212,255,0.1); color: var(--accent-cyan); border-color: rgba(0,212,255,0.35); }
.alert.success { background: rgba(0,200,150,0.1); color: var(--success-green); border-color: rgba(0,200,150,0.35); }
.alert.warn { background: rgba(255,149,0,0.1); color: var(--alert-orange); border-color: rgba(255,149,0,0.35); }

.doc-card {
    border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 14px;
    display: flex; align-items: center; gap: 12px; margin-bottom: 12px; transition: all 180ms; cursor: pointer;
    background: rgba(34,34,58,0.35);
}
.doc-card:hover { border-color: var(--primary-blue); }
.doc-card.filled { border-style: solid; border-color: var(--success-green); background: rgba(0,200,150,0.06); }
.doc-icon {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    background: rgba(91,95,239,0.15); color: var(--accent-cyan);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.doc-card.filled .doc-icon { background: rgba(0,200,150,0.15); color: var(--success-green); }
.doc-body { flex: 1; min-width: 0; }
.doc-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.doc-sub { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.doc-check { color: var(--success-green); font-size: 18px; flex-shrink: 0; display: none; }
.doc-card.filled .doc-check { display: block; }
.doc-input { display: none; }

.recorder-box { border: 1px solid var(--border-subtle); border-radius: 14px; overflow: hidden; margin-bottom: 12px; background: #000; display: none; }
.recorder-box.show { display: block; }
.recorder-video { width: 100%; max-height: 320px; display: block; background: #000; }
.recorder-controls { display: flex; gap: 8px; padding: 10px; background: var(--bg-card); }
.recorder-time { font-family: var(--font-mono); font-size: 12px; color: var(--error-red); display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.recorder-time .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--error-red); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

.progress-bar-wrap { height: 6px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; margin: 10px 0 16px; display: none; }
.progress-bar-wrap.show { display: block; }
.progress-bar { height: 100%; background: var(--gradient-primary); width: 0%; transition: width 300ms; }

.footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border-subtle); text-align: center; font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

.success-screen { text-align: center; padding: 20px 0; }
.success-emoji { font-size: 48px; margin-bottom: 12px; }
.success-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.success-text { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

@media (max-width: 480px) {
    .card { padding: 24px 18px; border-radius: 18px; }
}
