/* ==================== Lumina Glass UI - 智能股票分析系统 ==================== */

/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Microsoft YaHei', 'Arial', sans-serif;
    background-color: #0f0e17;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== Background Effects ==================== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0e17 0%, #1e1b4b 50%, #0f0e17 100%);
    z-index: -2;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    bottom: -250px;
    right: -250px;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

/* ==================== Custom Scrollbar ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== Container ==================== */
.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==================== Header ==================== */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.logo-icon svg {
    stroke: #fff;
    fill: #fff;
}

.main-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
    letter-spacing: 1px;
}

/* ==================== Navigation Section ==================== */
.nav-section {
    margin-bottom: 8px;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.nav-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(100%);
    -webkit-backdrop-filter: blur(24px) saturate(100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

.nav-btn svg {
    stroke: currentColor;
}

/* ==================== Glass Card ==================== */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(100%);
    -webkit-backdrop-filter: blur(24px) saturate(100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.card-accent {
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* ==================== Input Groups ==================== */
.input-group {
    margin-bottom: 20px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.input-group input::placeholder {
    color: #64748b;
}

.input-group select option {
    background: #1e1b4b;
    color: #fff;
}

/* ==================== Analyze Button ==================== */
.analyze-btn {
    width: 100%;
    padding: 16px;
    background: #fff;
    border: none;
    border-radius: 16px;
    color: #1e1b4b;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.analyze-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.analyze-btn:active {
    transform: scale(0.98);
}

.analyze-btn svg {
    stroke: currentColor;
}

/* ==================== Progress Section ==================== */
.progress-section {
    margin-top: 8px;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.progress-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.progress-icon .spinner {
    animation: spin 1s linear infinite;
    stroke: #fff;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

.progress-info {
    flex: 1;
}

.progress-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.progress-step {
    font-size: 0.875rem;
    color: #94a3b8;
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.progress-bar-container {
    margin-bottom: 24px;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 50px;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #64748b;
}

.step-item.active {
    color: #8b5cf6;
}

.step-item.completed {
    color: #10b981;
}

.step-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.step-item.active .step-icon {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.step-item.completed .step-icon {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.step-icon svg {
    stroke: currentColor;
}

/* ==================== Stock Info ==================== */
.stock-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.stock-code {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 24px;
}

.stock-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.metric-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.metric-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.metric-label {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.metric-value.positive {
    color: #10b981;
}

.metric-value.negative {
    color: #ef4444;
}

/* ==================== Technical Indicators ==================== */
.indicators-grid {
    display: grid;
    gap: 12px;
}

.indicator-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.indicator-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.indicator-name {
    font-size: 0.875rem;
    color: #94a3b8;
}

.indicator-value {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

/* ==================== AI Analysis Report ==================== */
#analysisReport {
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 0.9375rem;
}

#analysisReport h1,
#analysisReport h2,
#analysisReport h3 {
    color: #fff;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

#analysisReport h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#analysisReport h2 {
    font-size: 1.25rem;
    color: #8b5cf6;
}

#analysisReport h3 {
    font-size: 1.125rem;
}

#analysisReport ul,
#analysisReport ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

#analysisReport li {
    margin-bottom: 8px;
}

#analysisReport strong {
    color: #fff;
    font-weight: 600;
}

#analysisReport code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #ec4899;
}

#analysisReport pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#analysisReport blockquote {
    border-left: 4px solid #8b5cf6;
    padding-left: 16px;
    margin: 16px 0;
    color: #94a3b8;
    font-style: italic;
}

/* ==================== Toast Notification ==================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px) saturate(100%);
    -webkit-backdrop-filter: blur(24px) saturate(100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 16px 28px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    font-size: 0.9375rem;
    font-weight: 500;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==================== K线形态分析 ==================== */
.kline-summary {
    margin-bottom: 24px;
}

.kline-overall {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 16px;
}

.kline-signal {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.kline-signal.signal-bullish {
    color: #10b981;
}

.kline-signal.signal-bearish {
    color: #ef4444;
}

.kline-signal.signal-neutral {
    color: #94a3b8;
}

.kline-strength {
    font-size: 0.875rem;
    color: #94a3b8;
}

.kline-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item.bullish {
    border-color: rgba(16, 185, 129, 0.2);
}

.stat-item.bearish {
    border-color: rgba(239, 68, 68, 0.2);
}

.stat-label {
    display: block;
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.kline-patterns-list {
    display: grid;
    gap: 12px;
}

.pattern-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.pattern-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.pattern-item.bullish {
    border-left: 3px solid #10b981;
}

.pattern-item.bearish {
    border-left: 3px solid #ef4444;
}

.pattern-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pattern-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.pattern-signal {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
}

.pattern-signal.bullish {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.pattern-signal.bearish {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.pattern-desc {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 12px;
    line-height: 1.5;
}

.pattern-strength {
    display: flex;
    align-items: center;
    gap: 12px;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.strength-fill.bullish {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.strength-fill.bearish {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.strength-text {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}

.no-patterns {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 0.875rem;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .app-container {
        padding: 24px 16px;
    }

    .main-title {
        font-size: 1.5rem;
    }

    .nav-buttons {
        grid-template-columns: 1fr;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .stock-metrics {
        grid-template-columns: 1fr;
    }

    .progress-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .glass-card {
        padding: 20px;
    }

    .agent-verdict {
        flex-direction: column;
    }

    .agent-meta {
        justify-content: flex-start;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .logo-section {
        flex-direction: column;
        gap: 8px;
    }

    .main-title {
        font-size: 1.25rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }
}

/* Position Management */
.position-card {
    margin-top: 16px;
}

.position-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.radio-label {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.radio-label.active {
    border-color: #7c3aed;
    background: rgba(124,58,237,0.15);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-text {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
}

#holdingInputs {
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.trading-signal-section {
    margin-top: 20px;
}

/* ==================== Multi Agent Signal Board ==================== */
.agent-verdict {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.09);
    margin-bottom: 16px;
}

.agent-label {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 6px;
}

.agent-action {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
}

.agent-subtext {
    color: #cbd5e1;
    line-height: 1.6;
    margin-top: 8px;
    font-size: 14px;
}

.agent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    min-width: 210px;
}

.agent-meta span {
    color: #cbd5e1;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
    white-space: nowrap;
}

.agent-decision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.agent-decision-card {
    border-radius: 10px;
    padding: 13px;
    background: rgba(15, 23, 42, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-decision-card.positive {
    border-left: 3px solid #22c55e;
}

.agent-decision-card.warning {
    border-left: 3px solid #f59e0b;
}

.agent-decision-card.negative {
    border-left: 3px solid #ef4444;
}

.agent-decision-card.neutral {
    border-left: 3px solid #38bdf8;
}

.agent-decision-title {
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 6px;
}

.agent-decision-value {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

.agent-decision-detail {
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.signal-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.signal-check {
    border-radius: 10px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.signal-check.pass {
    border-left: 3px solid #22c55e;
}

.signal-check.fail {
    border-left: 3px solid #ef4444;
}

.signal-check-title {
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 6px;
}

.signal-check-value {
    color: #f8fafc;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
}

.signal-check-detail {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.agent-evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.agent-evidence {
    border-radius: 12px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-evidence.bullish {
    border-top: 3px solid #22c55e;
}

.agent-evidence.bearish {
    border-top: 3px solid #ef4444;
}

.agent-evidence h4 {
    margin: 0 0 10px;
    color: #e2e8f0;
    font-size: 15px;
}

.agent-evidence ul {
    margin: 0;
    padding-left: 18px;
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 13px;
}

.agent-empty {
    color: #64748b;
    font-size: 13px;
}

.agent-details {
    color: #94a3b8;
    font-size: 13px;
}

.agent-details summary {
    cursor: pointer;
    padding: 8px 0;
}

.agent-output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.agent-output-box {
    padding: 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.agent-output-title {
    color: #e2e8f0;
    font-weight: 700;
    margin-bottom: 6px;
}

.agent-output-summary {
    color: #cbd5e1;
    line-height: 1.55;
    margin-bottom: 8px;
}

.agent-output-line {
    font-size: 12px;
    line-height: 1.5;
    margin-top: 4px;
}

.agent-output-line.bullish {
    color: #86efac;
}

.agent-output-line.bearish {
    color: #fca5a5;
}

.agent-json-hint {
    margin-top: 10px;
    color: #64748b;
    line-height: 1.6;
}

.agent-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.agent-discussion-btn {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.agent-discussion-btn:hover {
    border-color: rgba(56, 189, 248, 0.65);
    background: rgba(30, 41, 59, 0.92);
}

.agent-action-note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.agent-discussion-panel {
    margin-top: 12px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px;
}

.agent-discussion-panel[hidden] {
    display: none;
}

.agent-discussion-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.agent-discussion-summary div {
    color: #cbd5e1;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.agent-discussion-timeline {
    display: grid;
    gap: 10px;
}

.agent-discussion-row {
    border-radius: 10px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.agent-discussion-role {
    color: #f8fafc;
    font-weight: 800;
    margin-bottom: 4px;
}

.agent-discussion-focus {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 7px;
}

.agent-discussion-stance {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 9px;
}

.agent-discussion-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.agent-discussion-columns span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 4px;
}

.agent-discussion-columns ul {
    margin: 0;
    padding-left: 18px;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 12px;
}

.agent-compact-empty {
    color: #64748b;
    font-size: 12px;
    margin: 0;
}

/* ==================== Markdown Report Styles ==================== */

.analysis-report {
    line-height: 1.85;
    color: #cbd5e1;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Paragraphs: comfortable rhythm, muted body */
.analysis-report .md-para {
    margin: 10px 0;
    color: #cbd5e1;
}

/* Section anchors — characterful serif, editorial weight */
.analysis-report h2,
.analysis-report .h2-title {
    font-family: 'Fraunces', Georgia, serif;
    font-optical-sizing: auto;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 28px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    letter-spacing: -0.01em;
}

.analysis-report h3,
.analysis-report .h3-title {
    font-family: 'Fraunces', Georgia, serif;
    font-optical-sizing: auto;
    font-size: 18px;
    font-weight: 600;
    color: #e9d5ff;
    margin: 22px 0 10px;
    padding-left: 14px;
    border-left: 3px solid;
    border-image: linear-gradient(180deg, #8b5cf6, #ec4899) 1;
    letter-spacing: -0.005em;
}

.analysis-report h4,
.analysis-report .h4-title {
    font-size: 14px;
    font-weight: 600;
    color: #c4b5fd;
    margin: 16px 0 6px;
    text-transform: none;
}

.analysis-report strong {
    color: #fbbf24;
    font-weight: 600;
}

.analysis-report em {
    color: #e9d5ff;
    font-style: italic;
}

.analysis-report .inline-code {
    background: rgba(124,58,237,0.18);
    color: #c4b5fd;
    padding: 2px 7px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 12.5px;
}

.analysis-report .code-block {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px 18px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 12.5px;
    line-height: 1.7;
    color: #a5f3fc;
    margin: 12px 0;
    white-space: pre-wrap;
}

.analysis-report .quote-block {
    border-left: 3px solid #f59e0b;
    background: rgba(245,158,11,0.08);
    padding: 12px 18px;
    margin: 12px 0;
    border-radius: 0 10px 10px 0;
    color: #fcd34d;
    font-size: 13.5px;
}

/* Lists: real markers, hanging indent */
.analysis-report .md-list {
    list-style: none;
    margin: 10px 0;
    padding-left: 4px;
}

.analysis-report .list-item {
    position: relative;
    margin: 6px 0;
    padding-left: 20px;
    color: #cbd5e1;
}

.analysis-report .list-item::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.analysis-report .md-ordered {
    list-style: none;
    counter-reset: md-counter;
    margin: 10px 0;
    padding-left: 4px;
}

.analysis-report .ordered-item {
    position: relative;
    margin: 6px 0;
    padding-left: 26px;
    color: #cbd5e1;
    counter-increment: md-counter;
}

.analysis-report .ordered-item::before {
    content: counter(md-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: #c4b5fd;
    background: rgba(124,58,237,0.2);
    border-radius: 50%;
}

/* Divider: hairline with a centered diamond — replaces raw --- */
.analysis-report .divider {
    border: none;
    height: 14px;
    margin: 22px 0;
    text-align: center;
    position: relative;
    background: none;
}

.analysis-report .divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.analysis-report .divider::after {
    content: "◆";
    position: relative;
    padding: 0 12px;
    color: #7c3aed;
    font-size: 10px;
    background: rgba(15,23,42,1);
}

/* 表格样式 */
.table-wrapper {
    overflow-x: auto;
    margin: 12px 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.analysis-table thead {
    background: rgba(124,58,237,0.2);
}

.analysis-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #c4b5fd;
    border-bottom: 2px solid rgba(124,58,237,0.3);
    white-space: nowrap;
}

.analysis-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #e2e8f0;
}

.analysis-table tr:hover {
    background: rgba(255,255,255,0.03);
}

/* 表格单元格状态颜色 */
.analysis-table td.pass {
    color: #22c55e;
    font-weight: 600;
}

.analysis-table td.fail {
    color: #ef4444;
    font-weight: 600;
}

.analysis-table td.reliable {
    color: #22c55e;
    background: rgba(34,197,94,0.1);
}

.analysis-table td.unreliable {
    color: #ef4444;
    background: rgba(239,68,68,0.1);
}

.analysis-table td.bullish {
    color: #22c55e;
}

.analysis-table td.bearish {
    color: #ef4444;
}

.analysis-table td.neutral {
    color: #f59e0b;
}

/* Renderer verdict pills (span-level, emitted by classifyCell) */
.analysis-table .cell-pass {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: #4ade80;
    background: rgba(34,197,94,0.14);
    border: 1px solid rgba(34,197,94,0.3);
}

.analysis-table .cell-fail {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: #f87171;
    background: rgba(239,68,68,0.14);
    border: 1px solid rgba(239,68,68,0.3);
}

/* Number-ish table cells get mono treatment for scanability */
.analysis-table td {
    font-variant-numeric: tabular-nums;
}

.analysis-table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #a78bfa;
}
