:root {
    --primary: #0c5cbe; /* 深蓝主色 - 传达专业、信任和稳重 */
    --primary-light: #e9f0f8; /* 浅蓝背景色 */
    --success: #ec261f; /* 深红 - 表示上涨/积极 */
    --warning: #f5a623; /* 金色 - 表示警告/关注 */
    --danger: #02c225; /* 深绿 - 表示下跌/风险 */
    --secondary: #7b68ee; /* 靛蓝色 - 用于次要强调 */
    
    --text-main: #1a1a1a; /* 主要文本 */
    --text-secondary: #595959; /* 次要文本 */
    --light-text: #777; /* 辅助文本 */

    --bg-main: #f8f9fa; /* 页面背景 */
    --bg-card: #ffffff; /* 卡片背景 */
    --light-bg: #f5f7fa; /* 浅色背景 */

    --border: #e8e8e8; /* 边框色 */
    --shadow: 0px 4px 8px rgba(0, 0, 0, 0.08); /* 阴影 */

    --market-up: #d0021b; /* 市场上涨色 */
    --market-down: #2c8c44; /* 市场下跌色 */
    --market-neutral: #7b68ee; /* 市场中性色 */
}
/* Base & Reset Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.6;
}

/* Layout Components */
.container {
    background: var(--bg-main);
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px;
    background: var(--bg-card);
    border-bottom: none;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.logo {
    height: 30px;
    width: auto;
    margin-right: 0;
    vertical-align: middle;
    border-radius: 4px;
}

.avatar {
    height: 30px;
    width: auto;
    object-fit: cover;
}

.rounded-circle {
    border-radius: 50%;
}

.hero-content .logo {
    height: 80px;
    margin: 20px auto 20px;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.site-title {
    font-size: 20px;
}

h1 {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

h1 i {
    color: var(--primary);
    background: var(--primary-light);
    padding: 10px;
    border-radius: 50%;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* UI Components */
.stats-card {
    background: var(--bg-card);
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.stats-card i {
    font-size: 1.1rem;
}

.stocks-info {
    background: rgba(52, 152, 219, 0.08);
    color: var(--primary);
}

.stocks-info i {
    color: var(--primary);
}

.btn {
    border: 1px solid var(--border);
    box-shadow: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card);
    color: var(--text-main);
    min-width: 36px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover,
.btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #c62828 100%);
    color: white;
    border: none;
    background-size: 200% auto;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled):not(.disabled) {
    background-position: right center;
    box-shadow: 0 8px 20px rgba(198, 40, 40, 0.4);
}

.login-btn {
    text-decoration: none;
}

.action-cell {
    text-align: center;
    border-left: 1px solid var(--border);
}

.delete-btn {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.delete-btn:hover {
    background-color: #e7d2d4;
}

.delete-btn i {
    pointer-events: none;
}

.legend {
    display: flex;
    gap: 20px;
    margin: 15px 0 5px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-real-time { background: var(--primary); }
.legend-low-frequency { background: var(--low-frequency); }
.legend-fixed-data { background: var(--fixed-data); }

.card {
    background: var(--bg-main);
    border-radius: 6px;
    box-shadow: none;
    padding: 10px;
    margin: 0;
    overflow: hidden;
    border: none;
}

.user-avatar-container {
    position: relative;
    height: 100%;
    cursor: pointer;
}
.avatar-popup {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 100;
    width: 150px;
}
/* 移除悬停显示弹窗的样式 */
/* .user-avatar-container:hover .avatar-popup {
    display: block;
} */
.logout-btn {
    background: none;
    border: none;
    color: #333;
    padding: 5px 10px;
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.logout-btn:hover {
    background-color: #f5f5f5;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.modal-content {
    background-color: var(--bg-card);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--border);
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    overflow-y: auto;
}

.modal-content h3 {
    margin: 0 0 5px;
    color: var(--text-main);
}

#metricsList {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.category-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.metric-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.category-header {
    text-align: center;
    color: var(--light-text);
    font-size: 0.9em;
    font-weight: 500;
}

.metric-item label {
    cursor: pointer;
    flex: 1;
}

#confirmMetrics {
    background-color: var(--primary);
    color: white;
    margin: 0 auto 0;
    width: 50%;
    text-align: center;
    display: block;
}

/* Table Styles */
.table-container {
    flex: 1;
    overflow: auto;
    margin: 0;
    max-height: 80vh;
    border-radius: 8px;
    background: var(--bg-card);
}

/* Table Elements */
table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: auto;
}

th {
    background: #f9f9f9;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    padding: 5px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}

td {
    padding: 5px;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

.field-cell {
    width: auto !important;
    min-width: 80px !important;
    max-width: 200px !important;
    font-weight: 500;
    font-size: 14px;
    background: #f9f9f9;
    position: sticky;
    left: 0;
    z-index: 3;
}

.indicator-header {
    border-left: 1px solid var(--border);
}

.action-header {
    border-left: 1px solid var(--border);
}

.stock-header {
    width: auto;
    max-width: 220px;
    padding: 12px 16px;
    border-left: 1px solid var(--border);
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--primary);
}

.stock-cell {
    color: #2f54b7;
}

.stock-name.holding {
    color: var(--primary);
    font-weight: 600;
}

.value-cell {
    position: relative;
    transition: all 0.3s ease;
    border-left: 1px solid var(--border);
    width: auto !important;
    min-width: 100px !important;
    max-width: 300px !important;
}

.value-cell.real-time { background: rgba(52, 152, 219, 0.05); }
.value-cell.low-frequency { background: rgba(155, 89, 182, 0.05); }
.value-cell.fixed-data { background: rgba(46, 204, 113, 0.05); }

.value-cell.editable {
    cursor: pointer;
}

.value-cell.editable:hover { background: rgba(22, 119, 255, 0.08); }
.value-cell.editable:focus { outline: 2px solid var(--primary); }

.positive { color: var(--success); font-weight: 500; }
.negative { color: var(--danger); font-weight: 500; }

.cell-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.real-time .cell-indicator { background: var(--primary); }
.low-frequency .cell-indicator { background: var(--low-frequency); }
.fixed-data .cell-indicator { background: var(--fixed-data); }

/* Form Elements */
.editable-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
}

.actions {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.action-btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    border: none;
    background: #f0f0f0;
    transition: background 0.3s;
}

.action-btn:hover { background: #e0e0e0; }

.save-btn {
    background: var(--primary);
    color: white;
}

.save-btn:hover { background: #1060cc; }

/* Animations */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.updating { animation: pulse 1.5s infinite; }

/* Stock Table Enhancements */
#stockTable {
    width: 100%;
    height: 100%;
    position: relative;
    border-collapse: separate;
    margin: 10px;
}

/* Table Locking */
#stockTable thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--light-bg);
}
#stockTable th:first-child, #stockTable td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--light-bg);
}

/* 行选中样式 */
#stockTable tr.selected {
    background-color: rgba(22, 119, 255, 0.1);
    border-left: 4px solid var(--primary);
}

/* 拖拽排序样式 */
#stockTable tr.dragging {
    opacity: 0.5;
    position: absolute;
    background-color: white;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 10;
}

#stockTable tr.drag-over {
    border-top: 2px solid var(--primary);
}

/* 选择指示器样式 */
.select-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 100%;
    cursor: pointer;
    user-select: none;
    color: #ccc;
    font-size: 12px;
}

.select-indicator.selected {
    color: var(--primary);
}

/* 排序按钮样式 */
.sort-handle {
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 100%;
    color: #ccc;
}

.sort-handle:hover {
    color: #666;
}

/* 选择列样式 */
.select-header {
    width: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    text-align: center;
    border-left: none !important;
    position: sticky;
    left: 0;
    z-index: 4;
    background: var(--light-bg);
}

/* 选择单元格样式 */
.select-cell {
    width: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    text-align: center;
    border-left: none !important;
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--light-bg);
}

.search-container {
    display: flex;
    margin-bottom: 15px;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--bg-card);
    min-width: 160px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 10px;
    z-index: 100;
}

.dropdown.show .dropdown-content {
    display: block;
}

.dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

/* Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

#stockSearchInput {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

#confirmAddStocks {
    background: linear-gradient(135deg, var(--primary) 0%, #c62828 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    background-size: 200% auto;
    transition: all 0.3s ease;
}

#confirmAddStocks:hover {
    background-position: right center;
    box-shadow: 0 8px 20px rgba(198, 40, 40, 0.4);
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.search-results div {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

/* 股票项目样式 */
.stock-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stock-item:hover {
    background-color: #f5f5f5;
}

.stock-item.selected {
    background-color: rgba(12, 92, 190, 0.1);
    color: #0c5cbe;
    font-weight: 500;
}

/* 已添加股票的样式 */
.stock-item.already-added {
    opacity: 0.7;
    background-color: #f0f0f0;
}

.stock-item.already-added:hover {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.added-tag {
    background-color: transparent;
    color: #666;
    padding: 2px 6px;
    border-radius: 0;
    font-size: 12px;
    margin-left: 8px;
    font-style: italic;
}

.search-results div:hover {
    background-color: #f5f5f5;
}

.search-results div.selected {
    background-color: #e3f2fd;
    border-left: 3px solid var(--primary);
}

/* Tabbed Interface */
.tab-container { margin-bottom: 20px; margin-top: 110px; min-height: 550px;}

.tab-actions { margin-left: auto; }

.tab-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 55px;
    left: 0;
    width: 100%;
    background: var(--bg-main);
    z-index: 999;
    padding-top: 10px;
}

.tab-button {
    padding: 10px 10px;
    margin-left: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    max-width: 180px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-button span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    text-align: left;
}

.tab-button:hover {
    color: var(--primary);
    background-color: rgba(52, 152, 219, 0.05);
}

.tab-button.active {
    color: var(--primary);
    font-weight: 500;
    background-color: var(--bg-main);
    border: 2px solid var(--border);
    border-bottom: 3px solid var(--bg-main);
    border-radius: 8px 8px 0 0;
    margin-bottom: -1px;
}

.tab-button.active::after {
    display: none;
}

.tab-close {
    margin-left: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}

.tab-close:hover { background: #cdcdcd; }

.tab-content { display: flex; flex-direction: column; }

.tab-panel { display: none; }
.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
    background: var(--bg-main);
}

/* 侧边栏与菜单样式 */
.sidebar {
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 10px 0;
    width: 120px;
    height: calc(100vh - 140px);
    margin: 10px;
    position: fixed;
    top: 110px;
    left: 0;
    z-index: 998;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-item {
    background: none;
    border: none;
    padding: 15px 15px;
    text-align: left;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    width: 100px;
    display: flex;
    align-items: center;
    margin: 5px 10px;
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.menu-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.menu-item.active {
    background-color: rgba(12, 92, 190, 0.2);
    color: var(--primary);
    font-weight: 500;
    border-radius: 25px;
    padding: 15px 15px;
    margin: 5px 10px;
    border-left: none;
}

/* 主内容区样式 */
.main-content {
    padding: 0px;
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 10px 10px 10px 140px;
    flex: 1;
    width: calc(100% - 150px);
    overflow: auto;
}

/* 带侧边栏的容器布局 */
.container.with-sidebar {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
}

/* 内容区域样式 */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 公司公告样式 */
.announcements-layout {
    display: flex;
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.announcements-directory {
    width: 200px;
    padding: 10px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    max-height: 800px;
}

.pdf-container {
    flex: 1;
    min-height: 400px;
}

.pdf-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    border-radius: 4px;
}

.announcement-list {
    margin-top: 15px;
}

.announcement-item {
    padding: 5px 5px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: background-color 0.2s;
}

.announcement-item:hover {
    background-color: var(--primary-light);
}

.announcement-item.selected {
    background-color: rgba(12, 92, 190, 0.8);
    color: white;
    border-radius: 8px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    color: var(--text-secondary);
}

.announcement-item.error {
    color: var(--error);
}

.announcement-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

.announcement-date {
    font-size: 12px;
}


.stock-info-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.stock-info-card h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}

.info-label { color: var(--text-secondary); }
.info-value { font-weight: 500; }

.chart-container {
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.financial-data {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.financial-data h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
}

.financial-table {
    width: 100%;
    border-collapse: collapse;
}

.financial-table th, .financial-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.financial-table th { background-color: #f9f9f9; }

/* Stock Name Link Styles */
.stock-name-link {
    color: #2f54b7;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.stock-name-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Landing Page 样式 */
.landing-page {
    margin-top: 55px; /* 与header保持距离 */
    background: var(--bg-card);
    min-height: calc(100vh - 70px);
}

.hero-section {
    padding: 60px 20px;
    text-align: center;
}

.hero-content {
    margin: 40px 0px;
}

.main-title {
    font-size: 42px;
    margin: 20px 0;
    font-weight: 600;
    text-align: center;
}

.subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
}

.tools-section {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0px;
}

.tool-card {
    flex: 1;
    padding: 25px;
    background: rgba(178, 183, 212, 0.2);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--primary-light);
}

.tool-icon i {
    font-size: 38px;
    color: var(--primary);
}

.tool-card h3 {
    font-size: 23px;
    margin-bottom: 10px;
    color: var(--text-main);
}

.tool-card p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.testimonials-section {
    padding: 60px 20px;
    background: var(--light-bg);
    text-align: center;
}

.section-title {
    font-size: 32px;
    color: var(--text-main);
    margin-bottom: 10px;
}

.section-desc {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.testimonial-card {
    padding: 25px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

.testimonial-name {
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 5px;
}

.testimonial-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.testimonial-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.cta-button {
    padding: 10px 60px;
    margin: 10px 0px 50px 0px;
    font-size: 24px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, #c62828 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3);
    background-size: 200% auto;
}

.cta-button:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(198, 40, 40, 0.4);
}

.start-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #c62828 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: 200% auto;
}

.start-btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(12, 92, 190, 0.4);
}

/* 价值投资相关样式 */
.stock-basic-info {
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 400px;
}

.stock-detail-name {
    margin-top: 10px;
    font-size: 24px;
    font-weight: 600;
}

.stock-detail-ticker{
    font-size: 1rem;
    color: var(--light-text);
    margin-bottom: 10px;
}

.stock-detail-price {
    font-size: 30px;
    font-weight: 600;
}

.stock-detail-change {
    font-size: 1.2rem;
    margin-left: 10px;
}

.stock-price-section {
    text-align: right;
}

.change {
    font-size: 1.1rem;
    margin: 5px 0;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 10px;
}

.dashboard > div:first-child {
    grid-column: 1 / -1;
    height: 100px;
}

.dashboard-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 15px;
    min-width: 200px;
}

.dashboard-card.dividend-history {
    grid-column: 1 / -1;
}

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

.card-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
}

.metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.metric-card {
    background-color: var(--light-bg);
    border-radius: 6px;
    padding: 20px;
}

.metric-title {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 10px;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.metric-desc {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-top: 5px;
}

.good {
    color: var(--success);
}

.caution {
    color: var(--warning);
}

.poor {
    color: var(--danger);
}

/* 移除强制网格定位 */

.health-score {
    font-weight: 700;
    text-align: right;
}

.health-score-container {
    display: flex;
    align-items: center;
}

/* 移除强制网格定位 */


.profit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 移除强制网格定位 */


.div-activity {
    display: flex;
    margin: 20px 0;
}

.div-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-right: 1px solid var(--border);
}

.div-item:last-child {
    border-right: none;
}

.div-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.div-title {
    font-size: 0.9rem;
    color: var(--light-text);
}

.historical {
    grid-column: span 2;
    grid-row: 3;
}

.chart-container {
    height: 300px;
    display: flex;
    align-items: flex-end;
    margin-top: 20px;
    gap: 2%;
    padding: 20px 0;
}

.chart-bar {
    flex: 1;
    background: var(--secondary);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 1px;
}

.chart-bar:hover {
    opacity: 0.9;
}

.chart-label {
    position: absolute;
    bottom: -25px;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--light-text);
}

.div-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.div-table th, .div-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.div-table thead {
    background-color: var(--light-bg);
}

.div-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.div-table .positive {
    color: var(--success);
    font-weight: 600;
}

.div-chart {
    margin-top: 20px;
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.div-chart-bar {
    flex: 1;
    max-width: 40px;
    background-color: var(--success);
    border-radius: 4px 4px 0 0;
    position: relative;
    margin: 0 5px;
}

.div-chart-bar::after {
    content: attr(data-value);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    white-space: nowrap;
    color: var(--light-text);
}

.moat {
    grid-column: span 2;
    grid-row: 6;
}

.moat-container {
    display: flex;
    margin: 20px 0;
}

.moat-item {
    flex: 1;
    text-align: center;
    padding: 10px;
}

.moat-score {
    width: 100px;
    height: 100px;
    margin: 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--light-bg);
}

.moat-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.moat-strength {
    color: var(--success);
}

.summary {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin: 30px 0;
}

.summary-header {
    text-align: center;
    margin-bottom: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.summary-box {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.summary-box h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.summary-strength {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid var(--success);
}

.summary-caution {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid var(--warning);
}

.summary-concern {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--danger);
}

footer {
    background: var(--primary);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 30px;
}

/* 下载按钮 */
.download-btn {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #27ae60;
}

/* 响应式调整 - 合并为768px断点 */
@media (max-width: 768px) {
        /* 从768px断点合并的样式 */
    .dashboard {
        grid-template-columns: 1fr;
    }

    .dashboard > div:first-child {
        height: auto; /* 在小屏幕上自适应高度 */
    }

    .dashboard {
        grid-template-columns: 1fr;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tools-section {
        flex-direction: column;
        align-items: center;
    }
    .tool-card {
        max-width: 100%;
    }
    .testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 15px;
    }
    .testimonials-section {
        padding: 40px 15px;
    }
    .section-title {
        font-size: 24px;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }