/* 
 * 华尔街分析师助手 - 主界面样式 (Bloomberg Terminal / 高端深色流体玻璃美学)
 */

 :root {
    --bg-dark: #07090f;
    --panel-bg: rgba(22, 27, 42, 0.65);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --accent-blue: #0ea5e9;
    --accent-glow: rgba(14, 165, 233, 0.5);
    --accent-pink: #d946ef;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* 动态背景光源效果 */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14,165,233,0.15) 0%, rgba(7,9,15,0) 70%);
    top: -100px;
    left: -100px;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(217,70,239,0.12) 0%, rgba(7,9,15,0) 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -10s;
}

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

/* 基础玻璃态容器 */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hidden {
    display: none !important;
}

/* ===== 顶部搜索区 ===== */
.search-panel {
    text-align: center;
    padding: 60px 0 40px;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 span {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.2);
    transform: translateY(-2px);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    padding: 0 24px;
    outline: none;
}

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

.primary-btn {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.primary-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.primary-btn:active {
    transform: translateY(1px) scale(0.98);
}

/* ===== 状态指示器 ===== */
.status-board {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0.4;
    transition: var(--transition);
}

.status-step.active {
    opacity: 1;
}

.status-step.active .step-indicator {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
    border-color: transparent;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-step span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-step.active span {
    color: #fff;
}

/* ===== 主内容区 ===== */
.main-content {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 32px;
    align-items: start;
}

/* ===== 左侧：监控面板 ===== */
.market-panel {
    position: sticky;
    top: 32px;
    padding: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.widget-box {
    margin-bottom: 24px;
}

.widget-box h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

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

.stat-item {
    display: flex;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.4);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}

.stat-label { color: #cbd5e1; }
.stat-value { font-weight: 600; }
.text-green { color: #4ade80; }
.text-blue { color: #38bdf8; }

.model-list {
    list-style: none;
    padding: 0;
}

.model-list li {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-icon {
    color: var(--accent-pink);
    font-weight: bold;
}

.risk-notice {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    background: rgba(255,255,255,0.03);
    padding: 12px;
    border-radius: 6px;
    border-left: 2px solid var(--accent-pink);
}

/* 中间报告预览 */
.report-viewer {
    padding: 32px;
    min-height: 600px;
}

.viewer-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.viewer-header h2 {
    font-size: 1.4rem;
    font-weight: 500;
}

.viewer-header span {
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: normal;
    background: rgba(14, 165, 233, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 12px;
}

/* Markdown 排版系统 (类似Github但深色) */
.markdown-body {
    color: #cbd5e1;
    font-size: 15px;
}

.markdown-body h1 {
    color: #fff;
    font-size: 2em;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
}

.markdown-body h2 {
    color: #f8fafc;
    font-size: 1.5em;
    margin-top: 32px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 6px;
}

.markdown-body h3 {
    color: #f8fafc;
    font-size: 1.25em;
    margin-top: 24px;
    margin-bottom: 12px;
}

.markdown-body p {
    margin-bottom: 16px;
}

.markdown-body ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.markdown-body li {
    margin-bottom: 6px;
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent-blue);
    background: rgba(14,165,233,0.05);
    padding: 12px 16px;
    margin: 0 0 16px 0;
    color: #94a3b8;
    border-radius: 4px;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.markdown-body th {
    background: rgba(255,255,255,0.05);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.1);
}

.markdown-body td {
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.markdown-body strong {
    color: #fff;
    font-weight: 600;
}

/* 闪烁光标效果 (正在生成时) */
.cursor-blink::after {
    content: '▋';
    color: var(--accent-blue);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 右侧侧边栏 */
.action-panel {
    position: sticky;
    top: 32px;
    padding: 28px;
}

.action-panel h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 12px;
}

.action-panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.download-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.download-btn:not(.disabled):hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.download-btn.ready {
    background: linear-gradient(135deg, rgba(217,70,239,0.8), rgba(14,165,233,0.8));
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(217,70,239,0.3);
}

.download-btn .icon {
    width: 20px;
    height: 20px;
}

.info-module {
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
}

.info-module h4 {
    color: #94a3b8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.info-module ul {
    list-style: none;
    padding: 0;
}

.info-module li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow);
}
