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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f6fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* 应用容器 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.logo {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #3498db;
}

.logo span {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(52, 152, 219, 0.3);
    color: white;
    border-left: 4px solid #3498db;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.top-header {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-left h1 {
    font-size: 24px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-left h1 i {
    color: #3498db;
}

.header-right {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-refresh {
    background: #e9ecef;
    color: #495057;
}

.btn-refresh:hover {
    background: #dee2e6;
}

.btn-generate {
    background: #3498db;
    color: white;
}

.btn-generate:hover {
    background: #2980b9;
}

.btn-primary {
    background: #3498db;
    color: white;
    padding: 12px 24px;
}

.btn-primary:hover {
    background: #2980b9;
}

/* 内容区 */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 100px 20px;
    color: #6c757d;
}

.loading i {
    font-size:    margin-bottom: 48px;
 20px;
    color: #3498db;
}

/* 摘要卡片 */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
}

.summary-card i {
    font-size: 36px;
    color: #3498db;
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.card-label {
    font-size: 14px;
    color: #6c757d;
}

/* 新闻标签 */
.news-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.tab-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

/* 新闻区块 */
.news-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #3498db;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 新闻卡片 */
.news-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    background: #e3f2fd;
    border-left-color: #2980b9;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.news-card:active {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.news-source {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.news-content {
    font-size: 14px;
    color: #495057;
    line-height: 1.8;
}

/* 新闻元信息 */
.news-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-meta i {
    color: #3498db;
}

/* 股票分析 */
.stock-analysis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stock-card {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

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

.stock-header h3 {
    font-size: 16px;
    color: #2c3e50;
}

.stock-action {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.action-buy {
    background: #d4edda;
    color: #155724;
}

.action-hold {
    background: #fff3cd;
    color: #856404;
}

.action-sell {
    background: #f8d7da;
    color: #721c24;
}

.stock-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #6c757d;
}

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

/* 错误提示 */
.error {
    text-align: center;
    padding: 100px 20px;
    color: #dc3545;
}

.error i {
    font-size: 64px;
    margin-bottom: 20px;
}

.error p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    .nav-menu {
        display: flex;
        padding: 10px;
        overflow-x: auto;
    }
    
    .nav-item {
        padding: 10px 15px;
        white-space: nowrap;
    }
    
    .top-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .stock-analysis {
        grid-template-columns: 1fr;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeIn 0.5s ease forwards;
}

.stock-card {
    animation: fadeIn 0.5s ease forwards;
}

.summary-card {
    animation: fadeIn 0.5s ease forwards;
}
