/* 全局样式 */
:root {
    --primary-color: #4caf50;
    --secondary-color: #388e3c;
    --accent-color: #8bc34a;
    --text-color: #333;
    --light-text: #666;
    --lighter-text: #999;
    --bg-color: #fff;
    --light-bg: #f5f5f5;
    --border-color: #ddd;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* 导航按钮样式 */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    display: block;
    padding: 10px 20px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.main-nav a:hover {
    background-color: #3a36e0;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.main-nav a.active {
    background-color: #3a36e0;
    color: white;
    font-weight: 600;
}

/* 移动端导航按钮样式 */
.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu a {
    display: block;
    padding: 12px 20px;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background-color: #3a36e0;
    color: white;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 头部样式 */
.header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
    background-color: rgba(76, 175, 80, 0.1);
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 40px 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 200px;
    transition: var(--transition);
}

.search-box input:focus {
    width: 250px;
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    padding: 20px;
    z-index: 99;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu li {
    margin-bottom: 15px;
}

.mobile-menu a {
    color: var(--text-color);
    font-size: 18px;
    display: block;
    padding: 5px 0;
}

.mobile-menu a:hover, .mobile-menu a.active {
    color: var(--primary-color);
}

.mobile-search {
    margin-top: 20px;
    position: relative;
}

.mobile-search input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.mobile-search button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
}

/* 面包屑导航 */
.breadcrumb {
    margin: 20px 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.breadcrumb li {
    position: relative;
    padding-right: 20px;
    margin-right: 10px;
}

.breadcrumb li:not(:last-child)::after {
    content: '>';
    position: absolute;
    right: 0;
    color: var(--lighter-text);
}

.breadcrumb a {
    color: var(--light-text);
}

.breadcrumb li:last-child a {
    color: var(--text-color);
    pointer-events: none;
}

/* 主内容区域 */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 70px - 300px); /* 减去头部和底部的高度 */
}

/* 首页样式 */
.hero {
    background-color: var(--bg-color);
    padding: 50px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.hero p {
    font-size: 18px;
    color: var(--light-text);
    max-width: 800px;
    margin: 0 auto 30px;
}

.section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title h2 {
    font-size: 24px;
    color: var(--primary-color);
}

.section-title a {
    font-size: 14px;
}

.home-section {
    margin-bottom: 40px;
}

/* 文章列表样式 */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.article-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-card-img {
    height: 200px;
    overflow: hidden;
}

.article-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-card-img img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 15px;
}

.article-card-title {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-card-excerpt {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 15px;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--lighter-text);
    font-size: 12px;
}

.article-card-source {
    display: flex;
    align-items: center;
}

.article-card-source i {
    margin-right: 5px;
}

.article-card-date {
    display: flex;
    align-items: center;
}

.article-card-date i {
    margin-right: 5px;
}

/* 视频列表样式 */
.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-card-img {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.video-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover .video-card-img img {
    transform: scale(1.05);
}

.video-card-img .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0.8;
    transition: var(--transition);
}

.video-card:hover .video-card-img .play-icon {
    background-color: var(--primary-color);
    opacity: 1;
}

.video-card-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.video-card-content {
    padding: 15px;
}

.video-card-title {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 45px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--lighter-text);
    font-size: 12px;
}

.video-card-author {
    display: flex;
    align-items: center;
}

.video-card-author i {
    margin-right: 5px;
}

.video-card-views {
    display: flex;
    align-items: center;
}

.video-card-views i {
    margin-right: 5px;
}

/* 文章详情页样式 */
.article-detail {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.article-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.article-title {
    font-size: 28px;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    color: var(--lighter-text);
    font-size: 14px;
}

.article-meta > div {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 5px;
}

.article-content {
    line-height: 1.8;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
}

.article-content h2, .article-content h3 {
    margin: 30px 0 15px;
    color: var(--primary-color);
}

.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.article-tags span {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: var(--light-bg);
    border-radius: 4px;
    font-size: 14px;
    color: var(--light-text);
}

/* 视频详情页样式 */
.video-detail {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.video-player {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.video-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    color: var(--lighter-text);
    font-size: 14px;
}

.video-meta > div {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.video-meta i {
    margin-right: 5px;
}

.video-description {
    line-height: 1.8;
    color: var(--text-color);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    transition: var(--transition);
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .disabled {
    color: var(--lighter-text);
    cursor: not-allowed;
}

.pagination .ellipsis {
    border: none;
}

/* 底部样式 */
.footer {
    background-color: var(--bg-color);
    padding: 50px 0 20px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-logo p {
    color: var(--light-text);
}

.footer-links h3, .footer-contact h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--light-text);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    margin-bottom: 10px;
    color: var(--light-text);
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--light-bg);
    border-radius: 50%;
    margin-right: 10px;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--lighter-text);
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* 关于页面样式 */
.about-section {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.about-section h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.about-content {
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 20px;
}

.about-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .search-box {
        display: none;
    }
    
    .article-list, .video-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 30px 0;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .article-detail, .video-detail, .about-section {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .article-list, .video-list {
        grid-template-columns: 1fr;
    }
    
    .article-card-img {
        height: 180px;
    }
    
    .article-title {
        font-size: 20px;
    }
}

/* 价格曲线图样式 */
.price-bar {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.price-chart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.price-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.chart-title {
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.current-price {
    font-weight: bold;
    font-size: 15px;
    color: #fff;
}

.price-change {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.price-change.up {
    background: rgba(76, 175, 80, 0.3);
    color: #a5d6a7;
}

.price-change.down {
    background: rgba(244, 67, 54, 0.3);
    color: #ef9a9a;
}

.price-change.stable {
    background: rgba(158, 158, 158, 0.3);
    color: #e0e0e0;
}

.price-chart {
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 8px;
    margin: 8px 0;
    backdrop-filter: blur(10px);
}

.price-chart svg {
    display: block;
    border-radius: 4px;
}

.chart-time {
    text-align: right;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

/* 悬停效果 */
.price-chart-container:hover {
    background: linear-gradient(135deg, #2a5298, #3b5998);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .price-chart-header {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
    
    .price-chart {
        padding: 6px;
    }
    
    .chart-title {
        font-size: 13px;
    }
    
    .current-price {
        font-size: 14px;
    }
    
    .price-change {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .price-bar {
        padding: 8px 0;
    }
    
    .price-chart-container {
        padding: 0 12px;
    }
    
    .price-chart-header {
        font-size: 12px;
    }
    
    .current-price {
        font-size: 13px;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .price-bar {
        padding: 6px 0;
        font-size: 12px;
    }
}

/* 30天价格走势图样式 */
.daily-price-chart-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.daily-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.daily-chart-header h3 {
    color: #333;
    font-size: 18px;
    margin: 0;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-price {
    font-weight: bold;
    color: #333;
}

.daily-chart {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    background: #fafafa;
}

.chart-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.time-range, .update-time {
    font-size: 12px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .daily-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .price-info {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .daily-chart {
        padding: 6px;
    }
}
    
    .price-display {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    
    .price-value {
        font-size: 13px;
    }
    
    .price-time {
        display: block;
        width: 100%;
        text-align: center;
    }
}