/* ===================== 基础样式 ===================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

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

a:hover {
    color: var(--primary-dark);
}

/* ===================== 导航栏 ===================== */
.navbar {
    background: var(--secondary);
    color: white;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 8px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.3rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    justify-content: center;
    min-width: 0;
}
.nav-menu::-webkit-scrollbar { display: none; }

.nav-menu a {
    color: rgba(255,255,255,0.8);
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: white;
    background: rgba(255,255,255,0.12);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.update-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}

.btn-join {
    background: var(--accent);
    color: var(--secondary);
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-join:hover {
    background: #fbbf24;
    color: var(--secondary);
}

/* ===================== Hero区域 ===================== */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    color: white;
    padding: 48px 20px;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 24px;
}

.stat-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* 今日速报卡片 */
.today-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.15);
}

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

.today-badge {
    background: var(--accent);
    color: var(--secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.today-date {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.today-server {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
}

.today-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.today-item {
    text-align: center;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
}

.today-item.highlight {
    background: rgba(245, 158, 11, 0.15);
}

.today-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.today-item.highlight .today-value {
    color: var(--accent);
}

.today-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.btn-detail {
    display: block;
    text-align: center;
    background: var(--primary);
    color: white;
    padding: 10px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-detail:hover {
    background: var(--primary-dark);
    color: white;
}

/* ===================== 主内容布局 ===================== */
.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.content-left {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 70px;
    height: fit-content;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ===================== 区块样式 ===================== */
.section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

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

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-more {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tabs a {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    background: var(--bg);
    color: var(--text-muted);
    transition: all 0.2s;
}

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

/* ===================== 表格样式 ===================== */
.table-responsive {
    overflow-x: auto;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.price-table th {
    background: var(--bg);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.price-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.price-table tr:hover {
    background: #f8fafc;
}

.rank {
    font-weight: 700;
    color: var(--text-muted);
}

.server-name {
    font-weight: 600;
}

.price {
    font-weight: 700;
    color: var(--primary);
}

.change {
    font-weight: 600;
}

.change.up {
    color: var(--danger);  /* 红涨 */
}

.change.down {
    color: var(--success);  /* 绿跌 */
}

.badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-gray {
    background: var(--bg);
    color: var(--text-muted);
}

/* ===================== 金价列表（概念图样式） ===================== */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}

.category-tabs a {
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    transition: all 0.2s;
}

.category-tabs a:hover {
    color: var(--primary);
}

.category-tabs a.active {
    background: var(--primary);
    color: white;
}

.price-header {
    flex-wrap: wrap;
    gap: 16px;
}

.price-header h2 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.price-section .section-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.price-section .filter-tabs a {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.price-list {
    display: flex;
    flex-direction: column;
}

.price-row {
    display: grid;
    grid-template-columns: 50px 1fr 90px 80px 80px 70px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.price-row:hover {
    background: #f8fafc;
}

.price-row:last-child {
    border-bottom: none;
}

.price-header-row {
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
}
.price-header-row:hover {
    background: #f8fafc;
}

.price-rank {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
}

.price-server {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-server .server-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.price-server .server-price-small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.price-today {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
}

.price-change {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.price-change.up {
    color: var(--danger);  /* 红涨 */
}

.price-change.down {
    color: var(--success);  /* 绿跌 */
}

.price-status {
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-transferable {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-untransferable {
    background: #ffedd5;
    color: #c2410c;
}

.price-footer {
    text-align: center;
    padding: 16px 0 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.view-all {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.view-all:hover {
    color: var(--primary-dark);
}

/* ===================== 日记卡片 ===================== */
.diary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.diary-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    transition: all 0.2s;
}

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

.diary-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.diary-day {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.diary-tag {
    background: var(--bg);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.diary-card h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.diary-card h3 a {
    color: var(--text);
}

.diary-card h3 a:hover {
    color: var(--primary);
}

.diary-info {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.diary-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.diary-stats {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
}

.diary-stats .highlight {
    color: var(--accent);
    font-weight: 700;
}

/* ===================== 侧边栏组件 ===================== */
.widget {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.widget h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg);
}

/* 计算器 */
.calculator-widget .calc-row {
    margin-bottom: 12px;
}

.calculator-widget label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.calculator-widget input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.calculator-widget input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-calc {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.calc-result {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.result-row strong {
    font-size: 1.1rem;
    color: var(--accent);
}

/* 我的服务器 */
.my-server-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    border: 1px solid #bfdbfe;
}

.my-server-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.my-server-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.my-server-price span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.my-server-price strong {
    font-size: 1.4rem;
    color: var(--primary);
}

/* 热门攻略 */
.hot-list {
    list-style: none;
}

.hot-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

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

.hot-list a {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
}

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

/* 交流群 */
.group-widget {
    text-align: center;
}

.group-widget p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.qr-placeholder {
    width: 160px;
    height: 160px;
    background: var(--bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-join-group {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 10px 32px;
    border-radius: var(--radius);
    font-weight: 600;
}

.btn-join-group:hover {
    color: white;
    opacity: 0.9;
}

/* 关于站长 */
.about-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.avatar {
    width: 48px;
    height: 48px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.about-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===================== 广告位 ===================== */
.ad-slot {
    margin: 20px 0;
    text-align: center;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-ad {
    min-height: 250px;
}

.mobile-ad {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 8px;
    z-index: 90;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* ===================== 底部 ===================== */
.footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.7);
    padding: 48px 20px 24px;
    margin-top: 48px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-section h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

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

/* 快速链接双列 */
.footer-links-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 24px;
}
.footer-links-double li {
    margin-bottom: 6px;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1280px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.footer-beian {
    margin-top: 8px;
}
.footer-beian a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-beian a:hover {
    color: white;
    text-decoration: underline;
}

/* ===================== 日记列表页 ===================== */
.diary-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.diary-list-item {
    display: flex;
    gap: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
}

.diary-list-left {
    text-align: center;
    min-width: 70px;
}

.diary-list-day {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

.diary-list-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.diary-list-right {
    flex: 1;
    min-width: 0;
}

.diary-list-right h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.diary-list-right h3 a {
    color: var(--text);
}

.diary-list-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.diary-list-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

.diary-list-stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
}

.diary-list-stats .highlight {
    color: var(--accent);
    font-weight: 700;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-link {
    padding: 8px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text);
    transition: all 0.2s;
}

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

/* ===================== 日记详情页 ===================== */
.diary-article {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.diary-article-header {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--bg);
}

.diary-article-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.diary-day-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.diary-article-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.diary-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 收益卡片 */
.diary-stats-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #bae6fd;
}

.stats-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.stats-card-body {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
}

.stat-item.highlight .stat-value {
    color: var(--accent);
    font-weight: 700;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

/* 活动表格 */
.activity-section {
    margin-bottom: 24px;
}

.activity-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.activity-table th,
.activity-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.activity-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.activity-table .highlight {
    font-weight: 700;
    color: var(--accent);
}

/* 日记正文 */
.diary-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

.diary-content br {
    margin-bottom: 8px;
}

/* ===================== 计算器页 ===================== */
.calculator-box {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.calc-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.calc-group {
    display: flex;
    flex-direction: column;
}

.calc-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.calc-group input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s;
}

.calc-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calc-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-calc-large {
    grid-column: 1 / -1;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-calc-large:hover {
    background: var(--primary-dark);
}

.calc-results {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.calc-results h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.result-card {
    text-align: center;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
}

.result-card.highlight {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.result-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.result-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.result-card.highlight .result-value {
    color: var(--accent);
}

.result-detail {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 参考表 */
.reference-section {
    margin-top: 24px;
}

.reference-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.reference-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.reference-table th,
.reference-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.reference-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===================== 后台管理 ===================== */
.admin-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px;
}

.admin-container h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

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

.btn-logout {
    padding: 8px 16px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #fecaca;
    color: #7f1d1d;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}

.tab-btn {
    padding: 8px 20px;
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-form {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-submit {
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.label-row label {
    margin-bottom: 0 !important;
}

.btn-generate-diary {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-generate-diary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-generate-diary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
}

.admin-table tr:hover {
    background: #f8fafc;
}

.btn-delete {
    display: inline-block;
    background: var(--danger);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: var(--radius);
    text-decoration: none;
    margin-left: 6px;
    transition: opacity 0.2s;
}

.btn-delete:hover {
    opacity: 0.85;
}

/* ===== 访客统计 ===== */
.visitor-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.import-help {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.import-help h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.import-help pre {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    overflow-x: auto;
    line-height: 1.6;
}

.setting-info {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

.setting-info h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.setting-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 8px;
}

.setting-info p:last-child {
    margin-bottom: 0;
}

/* ===================== 侧边栏日统计 ===================== */
.day-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.day-stat {
    background: var(--bg);
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
}

.day-stat span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.day-stat strong {
    font-size: 1.1rem;
    color: var(--text);
}

/* 快速统计 */
.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.quick-stat {
    text-align: center;
}

.quick-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.quick-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 计算器帮助 */
.calc-help {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.calc-help strong {
    color: var(--text);
}

/* ===================== 响应式 ===================== */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .sidebar-ad {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .nav-menu {
        display: none;
    }

    .stats-card-body {
        grid-template-columns: 1fr 1fr;
    }

    .calc-inputs {
        grid-template-columns: 1fr;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .price-row {
        grid-template-columns: 36px 1fr 70px 65px 65px 60px;
        gap: 6px;
        padding: 10px 8px;
    }

    .price-rank {
        font-size: 0.9rem;
    }

    .price-server .server-name {
        font-size: 0.85rem;
    }

    .price-server .server-price-small {
        font-size: 0.7rem;
    }

    .price-today {
        font-size: 0.9rem;
    }

    .price-change {
        font-size: 0.8rem;
    }

    .status-badge {
        padding: 3px 6px;
        font-size: 0.7rem;
    }

    .category-tabs a {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .price-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .diary-list-item {
        flex-direction: column;
    }

    .diary-list-left {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

    .mobile-ad {
        display: flex;
    }

    .reference-table {
        overflow-x: auto;
    }
}

/* ===================== 隐藏数字输入框的上下按钮 ===================== */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ===================== 公共广告 sidebar 样式 ===================== */
.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    position: sticky;
    top: 20px;
}
.ad-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ad-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: var(--bg);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    line-height: 1.4;
}
.ad-item:hover {
    opacity: 0.85;
    transform: translateX(2px);
}
.ad-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===================== 首页「联系我」按钮 ===================== */
.hero-contact {
    margin-bottom: 20px;
}
.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.12);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.btn-contact:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

/* ===================== 模态弹窗 ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.2s;
}
.modal-overlay.hidden {
    display: none;
}
.modal-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.modal-close:hover {
    color: var(--text);
}
