/* --- 全局与根变量 --- */
:root {
    --primary-color: #0033a0; /* 高盛蓝 */
    --secondary-color: #0d6efd; /* 亮蓝色，用于交互 */
    --background-color: #f5f7fa; /* 非常浅的灰色背景 */
    --card-background: #ffffff;
    --text-color: #333333;
    --text-color-light: #888; /* 浅灰色，用于英文标题 */
    --heading-color: #1a1a1a; /* 深灰色，用于中文标题 */
    --border-color: #dee2e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --font-family-base: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-headings: "Microsoft YaHei", "Georgia", "Times New Roman", serif;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- 主容器与卡片布局 --- */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.analysis-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.card-header .card-icon {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e6f0ff;
    border-radius: 50%;
}

.card-header h2 {
    font-family: var(--font-family-headings);
    color: var(--heading-color);
    margin: 0;
    font-size: 2rem;
}

.card-description {
    color: #555;
    margin-bottom: 25px;
}

/* --- 输入区域 --- */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.input-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.input-group input, .search-wrapper input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    outline: none;
}

/* --- 搜索建议 --- */
.search-wrapper {
    position: relative;
}

.suggestions-list {
    position: absolute;
    width: 100%;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    display: none;
}

.suggestions-list li {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    transition: background-color 0.2s;
}

.suggestions-list li:hover, .suggestions-list li.selected {
    background-color: #e9ecef;
}

.stock-name {
    font-weight: 600;
}
.stock-code {
    color: #6c757d;
}

/* --- 按钮 --- */
.card-actions {
    margin-top: 25px;
    text-align: right;
}

.primary-button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.primary-button:hover:not(:disabled) {
    background-color: #00227a; /* 深一点的蓝 */
    transform: translateY(-2px);
}

.primary-button:disabled {
    background-color: #aeb8c5;
    cursor: not-allowed;
}

/* --- 报告容器 --- */
.report-container {
    display: none; /* 初始隐藏 */
    background: var(--card-background);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-top: 30px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.report-container.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}


/* --- 报告页眉 --- */
.report-header {
    display: flex;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 30px;
}

.header-logo img {
    height: 80px; /* 增大Logo尺寸 */
    margin-right: 25px;
}

.header-titles {
    flex-grow: 1;
}

.report-title-main {
    font-family: var(--font-family-headings);
    font-size: 2.2rem;
    color: var(--heading-color);
    margin: 0;
}

.report-title-sub {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 5px 0 0 0;
    font-style: italic;
}

.header-meta {
    color: #6c757d;
    font-size: 0.9rem;
    white-space: nowrap;
    margin-top: 15px; /* 增加与副标题的间距 */
}

/* --- 新增：水印样式 --- */
.report-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 80px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.05);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
}


/* --- 报告主体与章节 --- */
.report-body {
    padding-top: 10px;
}

.report-section {
    margin-bottom: 35px;
    padding: 25px;
    border-left: 4px solid var(--primary-color);
    background-color: #fbfdff;
    border-radius: 0 8px 8px 0;
}

.report-section h2 {
    font-family: var(--font-family-headings);
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.report-section h2 .fa-icon {
    margin-right: 12px;
    font-size: 1.4rem;
}

/* 新增：中英文标题样式 */
.report-section h2 .cn-title {
    font-size: 1.6rem; /* 保持不变或略微增大 */
    color: var(--heading-color);
    font-weight: 600;
    margin-right: 10px;
}
.report-section h2 .en-title {
    font-size: 1.1rem; /* 显著减小 */
    color: var(--text-color-light);
    font-weight: 400;
    font-family: var(--font-family-base); /* 使用基础字体而非标题字体 */
    letter-spacing: 0.5px;
}


.report-section h3 {
    font-size: 1.2rem;
    color: var(--heading-color);
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
    margin-top: 25px;
    margin-bottom: 15px;
}

.report-section ul {
    padding-left: 20px;
}
.report-section li {
    margin-bottom: 10px;
}

/* --- 报告操作按钮 --- */
.report-actions-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.report-button {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.report-button:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 新增：报告页脚和二维码样式 */
.report-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
}
.footer-disclaimer {
    flex-grow: 1;
    font-size: 0.8rem;
    color: var(--text-color-light);
}
.footer-qrcode {
    text-align: center;
}
.footer-qrcode img {
    width: 100px;
    height: 100px;
    border: 1px solid var(--border-color);
    padding: 4px;
    background: white;
}
.footer-qrcode p {
    font-size: 0.8rem;
    margin-top: 5px;
    color: var(--text-color);
}


/* --- 加载动画 --- */
.loading-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.loading-content {
    text-align: center;
}

.logo-animation img {
    height: 80px;
    animation: pulse 1.5s infinite ease-in-out;
}

#loading-text {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading-color);
}

.progress-bar {
    width: 250px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar-inner {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .input-row {
        grid-template-columns: 1fr;
    }
    .report-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .header-logo img {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .header-meta {
        margin-top: 15px;
        text-align: center;
    }
    .report-container {
        padding: 20px;
    }
    .report-section {
        padding: 15px;
    }
} 