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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #f0c27f;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.15);
    color: #f0c27f;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #1a1a2e;
        position: absolute;
        top: 60px;
        left: 0;
        padding: 20px;
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #2c3e50, #4ca1af);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.price-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s;
}

.price-card:hover {
    transform: translateY(-5px);
}

.price-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.price-card .price {
    font-size: 28px;
    font-weight: bold;
    color: #f0c27f;
}

.price-card .change {
    font-size: 14px;
    margin-top: 5px;
}

/* 图表区域 */
.chart-section {
    padding: 60px 0;
    background: #fff;
}

.chart-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

#priceChart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    background: #fafafa;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.chart-hint {
    text-align: center;
    color: #999;
    margin-top: 10px;
}

/* 新闻模块 */
.news-section {
    padding: 60px 0;
    background: #f1f3f5;
}

.news-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.news-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.news-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.news-card p {
    color: #666;
    font-size: 14px;
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: #ccc;
    text-align: center;
    padding: 30px 0;
}

.footer a {
    color: #f0c27f;
    text-decoration: none;
}

/* 管理后台 */
.admin-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
}

.login-box, .admin-panel {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.login-box h1, .admin-panel h1 {
    margin-bottom: 20px;
    text-align: center;
}

input[type="text"], input[type="password"], input[type="number"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

button {
    background: #f0c27f;
    color: #1a1a2e;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

button:hover {
    background: #e0b06e;
}

.error {
    color: #e74c3c;
    margin-bottom: 10px;
}

.success {
    color: #27ae60;
    margin-bottom: 10px;
}

/* 内页通用 */
.page-section {
    padding: 60px 0;
}

.page-section h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
}

/* 网格通用 */
.grid-2, .grid-3, .grid-4 {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

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

/* 货币转换器 */
.converter-box {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.converter-box select, .converter-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.converter-box .result {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-top: 15px;
}

/* 收藏与分享 */
.share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.share-btn {
    background: #f0c27f;
    color: #1a1a2e;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s;
}

.share-btn:hover {
    background: #e0b06e;
}

/* 价格提醒 */
.alert-form {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.alert-form label {
    display: block;
    margin: 10px 0 5px;
}

/* 价格对比 */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.compare-table th, .compare-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.compare-table th {
    background: #1a1a2e;
    color: #f0c27f;
}