/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #ffffff;
    color: #202124;
    line-height: 1.5;
}

/* 顶部导航栏 */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e8eaed;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 500;
    color: #1a73e8;
}

.logo i {
    font-size: 24px;
}

.main-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: #5f6368;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: #f8f9fa;
    color: #1a73e8;
}

.nav-link.active {
    color: #1a73e8;
    background-color: #e8f0fe;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-icon {
    background: none;
    border: none;
    color: #5f6368;
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: #f8f9fa;
    color: #1a73e8;
}

.btn-signin {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-signin:hover {
    background-color: #1557b0;
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* 市场指数卡片 */
.market-indices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.index-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
}

.index-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #dadce0;
}

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

.index-name {
    font-size: 14px;
    color: #5f6368;
    font-weight: 400;
}

.btn-add {
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background-color: #f8f9fa;
    color: #1a73e8;
}

.index-value {
    font-size: 28px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
}

.index-change {
    font-size: 14px;
    font-weight: 500;
}

.index-change.positive {
    color: #137333;
}

.index-change.negative {
    color: #d93025;
}

/* 期货市场部分 */
.futures-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 16px;
}

.futures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.futures-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.futures-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.futures-name {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 8px;
}

.futures-value {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 4px;
}

.futures-change {
    font-size: 12px;
    font-weight: 500;
}

.futures-change.positive {
    color: #137333;
}

.futures-change.negative {
    color: #d93025;
}

/* 热门股票部分 */
.popular-stocks {
    margin-bottom: 32px;
}

.stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.stock-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    transition: all 0.2s ease;
}

.stock-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stock-symbol {
    font-size: 16px;
    font-weight: 500;
    color: #1a73e8;
    margin-bottom: 4px;
}

.stock-name {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 8px;
}

.stock-price {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 4px;
}

.stock-change {
    font-size: 12px;
    font-weight: 500;
}

.stock-change.positive {
    color: #137333;
}

.stock-card .btn-add {
    position: absolute;
    top: 16px;
    right: 16px;
}

/* 新闻部分 */
.news-section {
    margin-bottom: 32px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.news-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.news-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.news-category {
    font-size: 12px;
    color: #1a73e8;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.news-title {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-card.featured .news-title {
    font-size: 18px;
}

.news-source {
    font-size: 12px;
    color: #5f6368;
}

/* 投资组合和观察列表 */
.portfolio-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.portfolio-card,
.watchlist-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.portfolio-card:hover,
.watchlist-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.card-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
}

.btn-primary {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #1557b0;
}

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

.card-content p {
    color: #5f6368;
    margin-bottom: 12px;
}

/* 市场趋势 */
.market-trends {
    margin-bottom: 32px;
}

.trends-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e8eaed;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 16px;
    color: #5f6368;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #1a73e8;
}

.tab-btn.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.trends-content {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 20px;
    min-height: 300px;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 250px;
    color: #5f6368;
}

.chart-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
}

/* 页脚 */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e8eaed;
    padding: 24px 0;
    margin-top: 48px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #1a73e8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 12px;
    }
    
    .nav-left {
        gap: 16px;
    }
    
    .main-nav {
        display: none;
    }
    
    .main-content {
        padding: 16px 12px;
    }
    
    .market-indices {
        grid-template-columns: 1fr;
    }
    
    .futures-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .stocks-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card.featured {
        grid-column: span 1;
    }
    
    .portfolio-section {
        grid-template-columns: 1fr;
    }
    
    .trends-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-right {
        gap: 8px;
    }
    
    .btn-signin {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .index-value {
        font-size: 24px;
    }
    
    .futures-value {
        font-size: 18px;
    }
    
    .stock-price {
        font-size: 18px;
    }
}
