@charset "utf-8";

:root {
    --primary: #1a73e8;
    --primary-hover: #1557b0;
    --primary-light: #e8f0fe;
    --secondary: #4285f4;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-light: #80868b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --border-color: #e8eaed;
    --border-light: #dadce0;
    --shadow: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-sm: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-logo {
    flex-shrink: 0;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
}

.header-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 15px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

.header-search {
    flex: 1;
    max-width: 400px;
    display: flex;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-input-header {
    flex: 1;
    padding: 10px 14px;
    border: none;
    font-size: 14px;
    outline: none;
}

.search-btn-header {
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn-header:hover {
    background: var(--primary-hover);
}

.header-user {
    display: flex;
    gap: 8px;
}

.user-link {
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 14px;
}

.user-link.login-btn,
.user-link.reg-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
}

.user-link.reg-btn {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.menu-toggle {
    display: none;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all 0.3s;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

.menu-icon::before { top: -8px; }
.menu-icon::after { top: 8px; }

.menu-toggle-open .menu-icon {
    background: transparent;
}

.menu-toggle-open .menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle-open .menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
}

.mobile-nav-open {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 15px;
}

.mobile-nav-link:hover {
    background: var(--primary-light);
    text-decoration: none;
}

@media (max-width: 768px) {
    .header-nav,
    .header-search,
    .header-user {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .header-container {
        justify-content: space-between;
    }
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

.detail-page {
    grid-template-columns: 1fr 260px;
}

.breadcrumb {
    grid-column: 1 / -1;
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb-sep {
    margin: 0 8px;
}

.breadcrumb-current {
    color: var(--text-primary);
}

.search-section {
    grid-column: 1 / -1;
}

.search-box {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-box form {
    display: flex;
    gap: 12px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-btn {
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-hover);
}

.category-tabs {
    grid-column: 1 / -1;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--bg-primary);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tab-item {
    padding: 8px 20px;
    color: var(--text-secondary);
    font-size: 15px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    transition: all 0.2s;
}

.tab-item:hover {
    text-decoration: none;
}

.tab-active,
.tab-item:hover {
    background: var(--primary);
    color: #fff;
}

.coin-price-section,
.news-section {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.section-more {
    font-size: 14px;
    color: var(--primary);
}

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

.coin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.coin-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.coin-card-figure {
    position: relative;
    overflow: hidden;
}

.coin-card-figure img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.coin-card:hover .coin-card-figure img {
    transform: scale(1.05);
}

.coin-card-tag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.coin-card-body {
    padding: 12px;
}

.coin-card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.coin-card-title a {
    color: var(--text-primary);
}

.coin-card-title a:hover {
    color: var(--primary);
}

.coin-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
}

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

.news-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: box-shadow 0.2s;
}

.news-card:hover {
    box-shadow: var(--shadow-hover);
}

.news-card-figure {
    flex-shrink: 0;
    width: 180px;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.news-card-figure img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.news-card-body {
    flex: 1;
    min-width: 0;
}

.news-card-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.news-card-title a {
    color: var(--text-primary);
}

.news-card-title a:hover {
    color: var(--primary);
}

.news-card-meta {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.news-author {
    margin-right: 12px;
}

.news-author a {
    color: var(--primary);
}

.news-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.news-card-stats {
    font-size: 14px;
    color: var(--text-light);
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-box {
    background: var(--bg-primary);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.stats-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.stats-list li:last-child {
    border-bottom: none;
}

.stats-list a {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stats-num {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

.stats-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.hot-list li {
    padding: 8px 0;
    border-bottom: 1px dotted var(--border-light);
}

.hot-list li:last-child {
    border-bottom: none;
}

.hot-list a {
    font-size: 14px;
    color: var(--text-secondary);
}

.hot-list a:hover {
    color: var(--primary);
}

.article-content {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.article-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.article-meta {
    font-size: 14px;
    color: var(--text-light);
}

.article-author {
    margin-right: 16px;
}

.article-author a {
    color: var(--primary);
}

.article-time {
    margin-right: 16px;
}

.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body img {
    margin: 16px 0;
    max-width: 60%;
    text-align: center;
    border-radius: var(--radius);
}

.article-body p {
    margin-bottom: 16px;
}

.article-source {
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.article-source span {
    color: var(--text-light);
}

.article-source a {
    color: var(--primary);
}

.article-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.back-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

.fav-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.fav-btn:hover {
    background: var(--primary-hover);
}

.detail-sidebar {
    flex-shrink: 0;
}

.related-item {
    padding: 8px;
}

.related-figure {
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.related-figure img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.related-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
}

.related-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-links a {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.related-links a:hover {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

.site-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

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

.footer-nav {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 16px;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-copyright {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

.footer-copyright p {
    margin-bottom: 8px;
}

@media (max-width: 1024px) {
    .main-content,
    .detail-page {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .coin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-card {
        flex-direction: column;
    }
    
    .news-card-figure {
        width: 100%;
    }
    
    .news-card-figure img {
        height: 180px;
    }
    
    .article-title {
        font-size: 22px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .coin-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs-nav {
        flex-direction: column;
    }
    
    .tab-item {
        text-align: center;
    }
}