/* ===================================
   中医智能健康顾问 V3 · 对话式界面
   =================================== */

/* === CSS Variables === */
:root {
    --bg-primary: #0C0A1A;
    --bg-secondary: #151228;
    --bg-card: rgba(30, 24, 60, 0.6);
    --bg-card-solid: #1E183C;
    --purple-primary: #8B5CF6;
    --purple-secondary: #A78BFA;
    --purple-glow: rgba(139, 92, 246, 0.15);
    --purple-border: rgba(139, 92, 246, 0.2);
    --green-primary: #10B981;
    --text-primary: #F1EDFF;
    --text-secondary: #C4B5FD;
    --text-muted: rgba(196, 181, 253, 0.5);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --font-main: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }

/* === Page System === */
.page {
    display: none;
    min-height: 100vh;
    padding: 24px 20px;
    position: relative;
}
.page.active { display: flex; flex-direction: column; }

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.8); opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes typing {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.animate-in { animation: slideIn 0.5s ease-out; }

/* === Welcome Page === */
.welcome-bg-pattern {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.welcome-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

/* Logo */
.logo-badge {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-primary), #6D28D9);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    animation: float 3s ease-in-out infinite;
    margin-bottom: 16px;
}
.logo-icon { font-size: 32px; }

.welcome-title {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--purple-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Agent Brand */
.agent-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--purple-border);
    border-radius: 24px;
    padding: 6px 16px;
    margin-bottom: 20px;
    font-size: 13px;
}
.agent-badge { font-size: 16px; }
.agent-brand-name { color: var(--purple-secondary); font-weight: 500; }

/* === Chat Bubbles === */
.chat-container {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    scrollbar-width: none;
}
.chat-container::-webkit-scrollbar { display: none; }

.chat-bubble {
    display: flex;
    gap: 10px;
    max-width: 95%;
}

.ai-bubble { align-self: flex-start; }
.user-bubble { align-self: flex-end; flex-direction: row-reverse; }

.bubble-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-primary), #6D28D9);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}
.user-avatar {
    background: linear-gradient(135deg, #10B981, #059669);
}

.bubble-content {
    background: var(--bg-card);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
}
.bubble-content p { margin-bottom: 8px; }
.bubble-content p:last-child { margin-bottom: 0; }
.bubble-content strong { color: var(--purple-secondary); }

.user-bubble .bubble-content {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
    border-color: rgba(139, 92, 246, 0.3);
}

.bubble-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* === Quick Tags === */
.quick-tags {
    width: 100%;
    margin-bottom: 16px;
}
.tags-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: center;
}
.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.tag-btn {
    background: var(--bg-card);
    border: 1px solid var(--purple-border);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.tag-btn:hover, .tag-btn:active {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--purple-primary);
    color: var(--text-primary);
}
.tag-btn.selected {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--purple-primary);
    color: var(--purple-secondary);
}

/* === Input Area === */
.input-area {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-md);
    padding: 12px;
    transition: border-color 0.2s;
}
.input-area:focus-within {
    border-color: var(--purple-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.user-textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-main);
    line-height: 1.6;
    resize: none;
    outline: none;
}
.user-textarea::placeholder { color: var(--text-muted); }

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.char-count {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-send {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-primary), #7C3AED);
    border: none;
    color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
}
.btn-send:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
}
.btn-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.welcome-disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

/* === Analyzing Page === */
.analyzing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.analyzing-animation {
    position: relative;
    width: 100px; height: 100px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 32px;
}

.pulse-ring {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid var(--purple-primary);
    animation: pulse 2s ease-in-out infinite;
}
.delay-1 { animation-delay: 0.4s; }
.delay-2 { animation-delay: 0.8s; }

.analyzing-icon {
    font-size: 42px;
    animation: float 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.analyzing-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary), var(--purple-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.analyzing-text {
    color: var(--text-secondary);
    font-size: 14px;
    transition: opacity 0.2s;
}

/* === Chat Page (Multi-round Inquiry) === */
.chat-page-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0;
}

.inquiry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.inquiry-round-badge {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid var(--purple-border);
}

.btn-end-inquiry {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-primary);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-end-inquiry:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--green-primary);
}
.btn-end-inquiry:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Inquiry Progress */
.inquiry-progress {
    flex-shrink: 0;
    margin-bottom: 8px;
}

.progress-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple-primary), var(--green-primary));
    border-radius: 2px;
    transition: width 0.5s ease;
}

.progress-labels {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.progress-covered {
    color: var(--text-secondary);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0 100px;
    scrollbar-width: thin;
    scrollbar-color: var(--purple-border) transparent;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--purple-border); border-radius: 4px; }

/* Thinking Dots Animation */
.thinking-dots {
    display: flex;
    gap: 6px;
    padding: 4px 0;
}
.thinking-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--purple-secondary);
    animation: typing 1.2s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Chat Input */
.chat-input-area {
    flex-shrink: 0;
    padding: 8px 0 12px;
    border-top: 1px solid var(--purple-border);
}

.chat-input-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    transition: border-color 0.2s;
}
.chat-input-wrapper:focus-within {
    border-color: var(--purple-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.chat-textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    line-height: 1.5;
    resize: none;
    outline: none;
}
.chat-textarea::placeholder { color: var(--text-muted); }

.chat-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

/* === Intake Summary Card === */
.intake-summary-card {
    width: 100%;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-lg);
    padding: 20px;
    animation: slideIn 0.5s ease-out;
}
.intake-summary-card h3 {
    font-size: 16px;
    margin-bottom: 14px;
    color: #60A5FA;
}

.intake-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.intake-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 12px;
    background: rgba(30, 24, 60, 0.4);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(139, 92, 246, 0.08);
}

.intake-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.intake-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.intake-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.intake-value {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* === Step Badge === */
.step-badge {
    display: inline-block;
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid var(--purple-border);
    margin-bottom: 10px;
}
.step-badge-result {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border-color: rgba(16, 185, 129, 0.2);
}

/* === Result Page === */
.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.result-header-section {
    text-align: center;
    padding: 10px 0;
}

.result-badge {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: fadeIn 0.5s ease-out;
}
.result-icon { font-size: 40px; }

.result-type {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 6px;
}
.result-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Cards */
.result-analysis-card,
.result-score-card,
.result-advice-card,
.result-tip-card,
.contact-form-card,
.submit-success-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    animation: slideIn 0.5s ease-out;
}

.result-analysis-card {
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.05);
}

.result-analysis-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
}
.result-analysis-card p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.result-score-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

/* Score bars */
.score-bars { display: flex; flex-direction: column; gap: 10px; }
.score-row {
    display: grid;
    grid-template-columns: 50px 1fr 45px;
    gap: 10px;
    align-items: center;
}
.score-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
}
.score-track {
    height: 8px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.score-value {
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

/* Advice Card */
.advice-summary {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--purple-border);
}
.advice-summary-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--purple-secondary);
}

.detail-section {
    margin-bottom: 16px;
}
.detail-section:last-child { margin-bottom: 0; }
.detail-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}
.detail-section p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Tip Card */
.result-tip-card {
    text-align: center;
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.15);
}
.tip-icon { font-size: 28px; margin-bottom: 8px; }
.tip-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.tip-text em {
    color: #F59E0B;
    font-style: normal;
    font-weight: 500;
}

/* === Form Styles === */
.form-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.form-header-icon { font-size: 28px; }
.form-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}
.form-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.optional-tag {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(15, 12, 30, 0.6);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-main);
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus {
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.form-group input::placeholder { color: var(--text-muted); }

.form-privacy {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* === Buttons === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--purple-primary), #7C3AED);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-submit { margin-top: 4px; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--purple-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background: var(--purple-glow);
    border-color: var(--purple-primary);
}

.btn-loading {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Report Link Card === */
.report-link-card {
    width: 100%;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    margin-bottom: 16px;
    animation: fadeIn 0.5s ease-out;
}
.report-link-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.report-link-icon {
    font-size: 18px;
}
.report-link-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.report-link-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.report-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.report-link-input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(12, 10, 26, 0.6);
    border: 1px solid var(--purple-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.report-link-copy-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--purple-primary), #7C3AED);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Noto Sans SC', sans-serif;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
    flex-shrink: 0;
}
.report-link-copy-btn:active {
    transform: scale(0.95);
}
.report-link-copy-btn.copied {
    background: linear-gradient(135deg, var(--green-primary), #059669);
}
.report-link-share-btn {
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, var(--purple-primary), #7C3AED);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Noto Sans SC', sans-serif;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}
.report-link-share-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* === Result Actions === */
.result-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* === Share Tip Card === */
.share-tip-card {
    width: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-lg);
    padding: 18px;
    text-align: center;
}
.share-tip-icon { font-size: 28px; margin-bottom: 8px; }
.share-tip-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.btn-share-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-share-now:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4); }
.btn-share-now:active { transform: translateY(0); }

/* === Footer === */
.result-footer {
    width: 100%;
    text-align: center;
    padding: 20px 0 10px;
}
.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}
.footer-logo {
    font-size: 24px;
    opacity: 0.6;
}
.footer-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}
.footer-slogan {
    font-size: 12px;
    color: var(--text-muted);
}
.footer-disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === Success Card === */
.success-animation {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.success-circle {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.5s ease-out;
}
.success-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--green-primary);
}
.success-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}
.success-info-card {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
}
.success-info-card p { font-size: 13px; color: var(--text-secondary); }
.success-contact {
    font-size: 16px;
    font-weight: 600;
    color: var(--green-primary);
    margin-top: 6px;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--purple-border); border-radius: 4px; }

/* === Mobile Optimization === */
@media (max-width: 375px) {
    .welcome-title { font-size: 22px; }
    .tag-btn { font-size: 12px; padding: 5px 10px; }
}

/* iOS keyboard / safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .chat-input-area {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}
