:root {
--primary-color: #3a86ff;
--secondary-color: #8338ec;
--dark-bg: #121212;
--dark-card: #1e1e1e;
--dark-text: #e0e0e0;
--light-bg: #f5f7fa;
--light-card: #ffffff;
--light-text: #333333;
--success-color: #4caf50;
--danger-color: #f44336;
--border-radius: 8px;
--box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
background-color: var(--light-bg);
color: var(--light-text);
line-height: 1.6;
transition: var(--transition);
}

body.dark-mode {
background-color: var(--dark-bg);
color: var(--dark-text);
}

.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}

/* 导航栏样式 */
header {
background-color: var(--light-card);
box-shadow: var(--box-shadow);
position: sticky;
top: 0;
z-index: 100;
transition: var(--transition);
}

body.dark-mode header {
background-color: var(--dark-card);
}

.navbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 0;
}

.logo {
font-size: 24px;
font-weight: 700;
color: var(--primary-color);
text-decoration: none;
}

.nav-links {
display: flex;
list-style: none;
}

.nav-links li {
margin-left: 25px;
}

.nav-links a {
text-decoration: none;
color: inherit;
font-weight: 500;
transition: var(--transition);
padding: 5px 10px;
border-radius: var(--border-radius);
}

.nav-links a:hover, .nav-links a.active {
background-color: var(--primary-color);
color: white;
}

.nav-controls {
display: flex;
align-items: center;
}

.search-bar {
position: relative;
margin-right: 15px;
}

.search-bar input {
padding: 8px 15px;
border: 1px solid #ddd;
border-radius: 20px;
width: 200px;
transition: var(--transition);
background-color: var(--light-bg);
}

body.dark-mode .search-bar input {
background-color: var(--dark-bg);
border-color: #444;
color: var(--dark-text);
}

.search-bar input:focus {
outline: none;
border-color: var(--primary-color);
width: 250px;
}

.theme-toggle {
background: none;
border: none;
cursor: pointer;
font-size: 20px;
color: inherit;
}

/* 主要内容区域样式 */
.main-content {
padding: 30px 0;
}

.section-title {
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid var(--primary-color);
display: inline-block;
}

/* 卡片样式 */
.card {
background-color: var(--light-card);
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
padding: 20px;
margin-bottom: 20px;
transition: var(--transition);
}

body.dark-mode .card {
background-color: var(--dark-card);
}

.card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* 首页特定样式 */
.hero-section {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 20px;
margin-bottom: 30px;
}

.price-ticker {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 15px;
margin-bottom: 20px;
}

.crypto-price {
display: flex;
flex-direction: column;
align-items: center;
padding: 15px;
border-radius: var(--border-radius);
background-color: var(--light-card);
box-shadow: var(--box-shadow);
transition: var(--transition);
}

body.dark-mode .crypto-price {
background-color: var(--dark-card);
}

.crypto-price .name {
font-weight: 600;
margin-bottom: 5px;
}

.crypto-price .price {
font-size: 18px;
font-weight: 700;
margin-bottom: 5px;
}

.crypto-price .change {
font-size: 14px;
}

.change.positive {
color: var(--success-color);
}

.change.negative {
color: var(--danger-color);
}

.news-slider {
position: relative;
border-radius: var(--border-radius);
overflow: hidden;
height: 200px;
}

.news-slide {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 0.5s ease;
background-size: cover;
background-position: center;
display: flex;
align-items: flex-end;
padding: 20px;
color: white;
text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.news-slide.active {
opacity: 1;
}

.news-content {
background: linear-gradient(transparent, rgba(0,0,0,0.7));
padding: 10px;
border-radius: var(--border-radius);
}

.content-grid {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 20px;
}

.news-list, .market-sentiment {
margin-bottom: 30px;
}

.news-item {
padding: 15px 0;
border-bottom: 1px solid #eee;
}

body.dark-mode .news-item {
border-bottom-color: #444;
}

.news-item:last-child {
border-bottom: none;
}

.news-tag {
display: inline-block;
padding: 3px 8px;
border-radius: 12px;
font-size: 12px;
margin-right: 10px;
background-color: var(--primary-color);
color: white;
}

.sentiment-card {
text-align: center;
padding: 20px;
}

.sentiment-value {
font-size: 36px;
font-weight: 700;
margin: 10px 0;
}

.sentiment-gauge {
height: 10px;
background: linear-gradient(to right, var(--danger-color), #ff9800, var(--success-color));
border-radius: 5px;
margin: 15px 0;
position: relative;
}

.sentiment-indicator {
position: absolute;
top: -5px;
width: 20px;
height: 20px;
background-color: white;
border-radius: 50%;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
transform: translateX(-50%);
}

.featured-section {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin-bottom: 30px;
}

.featured-card {
display: flex;
flex-direction: column;
height: 100%;
}

.featured-card img {
width: 100%;
height: 150px;
object-fit: cover;
border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.featured-content {
padding: 15px;
flex-grow: 1;
}

.btn {
display: inline-block;
padding: 8px 15px;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: var(--border-radius);
text-decoration: none;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
}

.btn:hover {
background-color: var(--secondary-color);
transform: translateY(-2px);
}

/* 百科栏目页样式 */
.category-header {
margin-bottom: 30px;
}

.category-filters {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 20px;
}

.filter-btn {
padding: 8px 15px;
background-color: var(--light-card);
border: 1px solid #ddd;
border-radius: var(--border-radius);
cursor: pointer;
transition: var(--transition);
}

body.dark-mode .filter-btn {
background-color: var(--dark-card);
border-color: #444;
}

.filter-btn.active, .filter-btn:hover {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color);
}

.alphabet-index {
display: flex;
flex-wrap: wrap;
gap: 5px;
margin-bottom: 20px;
}

.alphabet-letter {
padding: 5px 10px;
background-color: var(--light-card);
border-radius: var(--border-radius);
cursor: pointer;
transition: var(--transition);
}

body.dark-mode .alphabet-letter {
background-color: var(--dark-card);
}

.alphabet-letter.active, .alphabet-letter:hover {
background-color: var(--primary-color);
color: white;
}

.terms-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
}

.term-card {
padding: 20px;
height: 100%;
display: flex;
flex-direction: column;
}

.term-tags {
margin-top: auto;
padding-top: 15px;
}

.term-tag {
display: inline-block;
padding: 3px 8px;
background-color: #e0e0e0;
border-radius: 12px;
font-size: 12px;
margin-right: 5px;
margin-bottom: 5px;
}

body.dark-mode .term-tag {
background-color: #333;
}

/* 内容页样式 */
.article-header {
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #eee;
}

body.dark-mode .article-header {
border-bottom-color: #444;
}

.article-meta {
display: flex;
flex-wrap: wrap;
gap: 15px;
margin-top: 10px;
font-size: 14px;
color: #777;
}

body.dark-mode .article-meta {
color: #aaa;
}

.article-sidebar {
background-color: var(--light-card);
border-radius: var(--border-radius);
padding: 20px;
margin-bottom: 20px;
}

body.dark-mode .article-sidebar {
background-color: var(--dark-card);
}

.info-item {
margin-bottom: 10px;
display: flex;
}

.info-label {
font-weight: 600;
min-width: 120px;
}

.article-content {
line-height: 1.8;
}

.article-content h2 {
margin: 25px 0 15px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}

body.dark-mode .article-content h2 {
border-bottom-color: #444;
}

.article-content h3 {
margin: 20px 0 10px;
}

.article-content p {
margin-bottom: 15px;
}

.article-content ul, .article-content ol {
margin-left: 20px;
margin-bottom: 15px;
}

.internal-link {
color: var(--primary-color);
text-decoration: none;
border-bottom: 1px dotted var(--primary-color);
}

.internal-link:hover {
border-bottom-style: solid;
}

.content-feedback {
margin-top: 30px;
text-align: center;
padding: 20px;
border-top: 1px solid #eee;
}

body.dark-mode .content-feedback {
border-top-color: #444;
}

.feedback-buttons {
display: flex;
justify-content: center;
gap: 15px;
margin-top: 15px;
}

.feedback-btn {
padding: 8px 20px;
border: 1px solid #ddd;
border-radius: var(--border-radius);
background-color: var(--light-card);
cursor: pointer;
transition: var(--transition);
}

body.dark-mode .feedback-btn {
background-color: var(--dark-card);
border-color: #444;
}

.feedback-btn:hover {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color);
}

.related-content {
margin-top: 40px;
}

.related-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 15px;
margin-top: 15px;
}

.related-card {
padding: 15px;
border-radius: var(--border-radius);
background-color: var(--light-card);
transition: var(--transition);
}

body.dark-mode .related-card {
background-color: var(--dark-card);
}

.related-card:hover {
transform: translateY(-3px);
box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* 页脚样式 */
footer {
background-color: var(--light-card);
padding: 30px 0;
margin-top: 50px;
border-top: 1px solid #eee;
}

body.dark-mode footer {
background-color: var(--dark-card);
border-top-color: #444;
}

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

.footer-section h3 {
margin-bottom: 15px;
color: var(--primary-color);
}

.footer-links {
list-style: none;
}

.footer-links li {
margin-bottom: 8px;
}

.footer-links a {
color: inherit;
text-decoration: none;
transition: var(--transition);
}

.footer-links a:hover {
color: var(--primary-color);
}

.copyright {
text-align: center;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #eee;
font-size: 14px;
color: #777;
}

body.dark-mode .copyright {
border-top-color: #444;
color: #aaa;
}

/* 响应式设计 */
@media (max-width: 768px) {
.navbar {
    flex-direction: column;
    align-items: flex-start;
}

.nav-links {
    margin-top: 15px;
    flex-wrap: wrap;
}

.nav-links li {
    margin-left: 0;
    margin-right: 15px;
    margin-bottom: 10px;
}

.nav-controls {
    margin-top: 15px;
    width: 100%;
    justify-content: space-between;
}

.search-bar input {
    width: 150px;
}

.hero-section, .content-grid {
    grid-template-columns: 1fr;
}

.price-ticker {
    grid-template-columns: repeat(2, 1fr);
}

.terms-grid {
    grid-template-columns: 1fr;
}
}