/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 导航栏 */
.navbar {
    background: white;
    backdrop-filter: blur(10px);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e9ecef;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    min-height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1e3a8a;
    letter-spacing: -0.5px;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    color: #1e3a8a;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-links a:hover {
    background: #f1f5f9;
    color: #1e3a8a;
}

.nav-links a.active {
    background: #1e3a8a;
    color: white;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: none;
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 股票表格 */
.stock-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
    font-size: 14px;
}

.stock-table thead {
    background: #f8f9fa;
}

.stock-table th,
.stock-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.stock-table th {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stock-table tbody tr {
    transition: background 0.15s;
}

.stock-table tbody tr:hover {
    background: #f8f9fa;
}

.price-up {
    color: #dc2626;
    font-weight: 500;
}

.price-down {
    color: #16a34a;
    font-weight: 500;
}

/* 新闻列表 */
.news-list {
    list-style: none;
    padding: 0 16px;
}

/* 雷达页面特定样式 */
@media (max-width: 768px) {
    .news-item h3 {
        font-size: 13px !important;
    }

    .news-item .news-title {
        font-size: 12px !important;
    }

    .news-item .news-meta {
        font-size: 11px !important;
    }

    .badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

.news-item {
    padding: 16px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.15s;
}

.news-item:hover {
    padding-left: 8px;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item h3 {
    margin: 0 0 10px 0;
    padding: 0 16px;
    word-wrap: break-word;
    word-break: break-all;
}

.news-item .news-title {
    padding: 0 16px;
    word-wrap: break-word;
    word-break: break-word;
}

.news-item .news-meta {
    padding: 0 16px;
}

/* 雷达页面特定样式 */
@media (max-width: 768px) {
    .news-item h3 {
        font-size: 13px !important;
    }

    .news-item .news-title {
        font-size: 12px !important;
    }

    .news-item .news-meta {
        font-size: 11px !important;
    }

    .badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

.news-title {
    font-weight: 500;
    margin-bottom: 8px;
    color: #212529;
    font-size: 15px;
    line-height: 1.5;
}

.news-meta {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .news-meta {
        gap: 8px;
    }
}

/* 标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #1e3a8a;
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
}

/* 统计卡片 */
.stat-card {
    text-align: center;
    padding: 24px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 4px 12px;
        flex-wrap: nowrap;
        min-height: 56px;
    }

    .logo {
        gap: 4px;
        flex-shrink: 0;
    }

    .logo-img {
        height: 48px;
    }

    .logo-text {
        font-size: 14px;
        display: none;
    }

    .nav-links {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 2px;
        width: auto;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 3px 0;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        font-size: 11px;
        padding: 5px 8px;
        white-space: nowrap;
        display: inline-block;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 16px;
    }

    .section-block .card-title {
        font-size: 16px;
    }

    .section-block {
        scroll-margin-top: 100px;
    }

    .stock-table {
        font-size: 12px;
    }

    .stock-table th,
    .stock-table td {
        padding: 10px 6px;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 20px;
        margin-top: 16px;
    }

    .container {
        padding: 12px 10px;
    }

    /* 雷达页面移动端优化 */
    .news-meta {
        flex-direction: row;
        gap: 6px;
        flex-wrap: wrap;
    }

    .news-meta span {
        margin-left: 0 !important;
    }
}

/* 超小屏幕（< 480px）优化 */
@media (max-width: 480px) {
    .navbar .container {
        gap: 4px;
        padding: 2px 8px;
        min-height: 48px;
    }

    .logo {
        gap: 3px;
    }

    .logo-img {
        height: 36px;
    }

    .logo-text {
        display: none;
    }

    .nav-links {
        gap: 0;
    }

    .nav-links a {
        font-size: 12px;
        padding: 4px 6px;
    }

    .card {
        padding: 12px;
        margin-bottom: 12px;
    }

    .section-block {
        margin-bottom: 16px;
    }

    .page-title {
        font-size: 20px;
        margin-bottom: 16px;
        margin-top: 12px;
    }

    .container {
        padding: 8px 8px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* 雷达页面移动端优化 */
    .news-meta {
        flex-direction: row;
        gap: 6px;
        flex-wrap: wrap;
    }

    .news-meta span {
        margin-left: 0 !important;
    }

    .news-item h3 {
        font-size: 12px !important;
    }

    .news-item .news-title {
        font-size: 11px !important;
    }

    .news-item .news-meta {
        font-size: 10px !important;
    }

    .badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 页面标题 */
.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 40px;
    text-align: left;
    letter-spacing: -0.5px;
}

/* 板块区域 */
.section-block {
    margin-bottom: 32px;
    scroll-margin-top: 100px;
}

.section-block .card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 0;
    border-bottom: none;
}

.section-block .card-title::before {
    content: none;
}

.section-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 24px;
    padding: 0;
    background: none;
    border-left: none;
    border-radius: 0;
    font-weight: 400;
}

.placeholder-content {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}