/* ⚖️ LawVoice AI Dark Sovereign Legal Design System */
:root {
    --bg-dark: #090d16;
    --card-bg: rgba(15, 23, 42, 0.8);
    --border-color: rgba(251, 191, 36, 0.25);
    --gold-glow: #fbbf24;
    --blue-glow: #3b82f6;
    --emerald-glow: #10b981;
    --ruby-glow: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', 'Do Hyeon', sans-serif;
    --font-body: 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.12), transparent 70%),
                      radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.1), transparent 60%);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 16px;
}

.app-container {
    width: 100%; max-width: 1320px;
    display: flex; flex-direction: column; gap: 16px;
}

/* HEADER */
.app-header {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 24px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
}

.header-brand { display: flex; flex-direction: column; gap: 4px; }
.brand-badge {
    align-self: flex-start;
    background: linear-gradient(135deg, var(--gold-glow), var(--blue-glow));
    color: #000; font-size: 0.7rem; font-weight: 900; padding: 3px 8px; border-radius: 6px;
}
.brand-logo {
    font-family: var(--font-heading); font-size: 1.8rem; font-weight: 900;
    background: linear-gradient(135deg, #ffffff, var(--gold-glow));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-sub { font-size: 0.85rem; color: var(--text-muted); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.legal-hotline {
    display: flex; align-items: center; gap: 8px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 6px 12px; border-radius: 10px;
}

.hotline-lbl { font-size: 0.7rem; color: #fde68a; display: block; }
.hotline-num { font-size: 0.95rem; font-weight: 900; color: var(--gold-glow); }

.hdr-btn { padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 0.85rem; cursor: pointer; border: none; }
.btn-gold { background: var(--gold-glow); color: #000; }

/* FEATURE TABS */
.feature-tabs { display: flex; gap: 8px; overflow-x: auto; }
.tab-btn {
    flex: 1; min-width: 180px; padding: 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted); border-radius: 12px;
    font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: all 0.3s ease;
}
.tab-btn.active, .tab-btn:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(59, 130, 246, 0.2));
    border-color: var(--gold-glow); color: #fff;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.suite-card {
    background: var(--card-bg); backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: 16px;
    padding: 24px; display: flex; flex-direction: column; gap: 20px;
}

.card-header-row {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 14px;
}
.card-header-row h3 { font-size: 1.2rem; font-weight: 800; color: var(--gold-glow); }

.legal-cat-chips, .doc-type-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    padding: 6px 12px; background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 20px;
    color: var(--text-muted); font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.chip.active, .chip:hover { background: var(--gold-glow); color: #000; border-color: var(--gold-glow); }

/* VOICE COUNSELOR LAYOUT */
.voice-counselor-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; }
@media (max-width: 900px) { .voice-counselor-layout { grid-template-columns: 1fr; } }

.voice-interface-card {
    background: rgba(15, 23, 42, 0.9); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 16px;
}

.mic-visualizer-box { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mic-ring {
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(59, 130, 246, 0.2); border: 4px solid var(--blue-glow);
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
}
.mic-ring.listening {
    border-color: var(--ruby-glow); background: rgba(239, 68, 68, 0.2);
    animation: pulseRing 1.5s infinite;
}
@keyframes pulseRing { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }

.btn-mic { background: none; border: none; font-size: 3rem; cursor: pointer; }
.waveform-anim { display: flex; gap: 4px; height: 20px; align-items: center; }
.waveform-anim span { width: 4px; height: 100%; background: var(--gold-glow); border-radius: 2px; }

.mic-status-text { font-size: 0.8rem; color: #fbbf24; text-align: center; font-weight: 700; }
.sample-questions-box { width: 100%; display: flex; flex-direction: column; gap: 8px; font-size: 0.8rem; }
.sample-btn-group { display: flex; flex-direction: column; gap: 6px; }
.btn-sample { padding: 8px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); color: #cbd5e1; border-radius: 6px; text-align: left; font-size: 0.78rem; cursor: pointer; }

/* LEGAL ANALYSIS CARD */
.legal-analysis-card {
    background: rgba(15, 23, 42, 0.9); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.analysis-hdr { display: flex; justify-content: space-between; align-items: center; }
.win-prob-badge { padding: 4px 10px; background: rgba(16, 185, 129, 0.2); color: var(--emerald-glow); border: 1px solid var(--emerald-glow); border-radius: 6px; font-size: 0.8rem; font-weight: 900; }

.recognized-text-box, .statute-box { background: rgba(255, 255, 255, 0.03); padding: 10px; border-radius: 8px; font-size: 0.83rem; }
.action-plan-box ol { margin-left: 18px; font-size: 0.82rem; color: #e2e8f0; display: flex; flex-direction: column; gap: 6px; }

/* POLICE COPILOT */
.police-copilot-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .police-copilot-layout { grid-template-columns: 1fr; } }
.rights-card, .interrogation-sim-card { background: rgba(15, 23, 42, 0.9); border: 1px solid rgba(255,255,255,0.1); padding: 20px; border-radius: 14px; display: flex; flex-direction: column; gap: 14px; }
.rights-grid { display: flex; flex-direction: column; gap: 8px; }
.r-item { display: flex; gap: 10px; font-size: 0.82rem; background: rgba(255,255,255,0.03); padding: 8px; border-radius: 8px; }
.r-num { width: 24px; height: 24px; background: var(--gold-glow); color: #000; font-weight: 900; border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }

.response-choices-box { display: flex; flex-direction: column; gap: 8px; }
.btn-choice { padding: 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem; text-align: left; cursor: pointer; color: #fff; background: rgba(255,255,255,0.04); }
.btn-choice.correct:hover { border-color: var(--emerald-glow); background: rgba(16,185,129,0.1); }
.btn-choice.wrong:hover { border-color: var(--ruby-glow); background: rgba(239,68,68,0.1); }

/* LAWSUIT FLOW TRACK */
.lawsuit-flow-track { display: flex; gap: 12px; overflow-x: auto; padding: 10px 0; }
.step-node { flex: 1; min-width: 200px; background: rgba(15, 23, 42, 0.9); border: 1px solid rgba(255,255,255,0.1); padding: 16px; border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.step-node.active { border-color: var(--gold-glow); background: rgba(251,191,36,0.1); }
.s-num { font-size: 0.75rem; color: var(--gold-glow); font-weight: 900; }

/* DOCUMENT DRAFTER */
.doc-drafter-layout { display: grid; grid-template-columns: 1fr 260px; gap: 20px; }
@media (max-width: 900px) { .doc-drafter-layout { grid-template-columns: 1fr; } }
.doc-paper-preview { background: #fff; color: #0f172a; padding: 24px; border-radius: 12px; font-family: 'Noto Sans KR', sans-serif; display: flex; flex-direction: column; gap: 12px; }
.doc-title-hdr { text-align: center; font-size: 1.4rem; font-weight: 900; border-bottom: 2px solid #0f172a; padding-bottom: 8px; }
.doc-party-info { font-size: 0.85rem; border-bottom: 1px dashed #cbd5e1; padding-bottom: 8px; }
.doc-body-text { font-size: 0.85rem; line-height: 1.6; color: #334155; }

/* REFERRAL */
.referral-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ref-card { background: rgba(15,23,42,0.9); border: 1px solid rgba(255,255,255,0.1); padding: 20px; border-radius: 14px; display: flex; flex-direction: column; gap: 10px; }
.btn-call { padding: 12px; background: #3b82f6; color: #fff; font-weight: 900; border-radius: 8px; text-decoration: none; text-align: center; }

.btn-primary-full { padding: 14px; background: var(--gold-glow); color: #000; font-weight: 900; border: none; border-radius: 10px; cursor: pointer; }

/* MODALS */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 9999; }
.overlay.active { display: flex; }
.modal-box { background: #0f172a; border: 1px solid var(--gold-glow); padding: 24px; border-radius: 16px; max-width: 480px; width: 90%; display: flex; flex-direction: column; gap: 14px; }
.modal-hdr { display: flex; justify-content: space-between; align-items: center; }
.btn-close { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
