/* ===== 全局重置与基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, sans-serif;
    background: #0a0e1a;
    color: #e0e6ed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== 股票K线背景动画 ===== */
#stockBg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.85;        /* 更亮的动画 */
    pointer-events: none;
}

.bg-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(10,14,26,0.4) 0%, rgba(15,23,42,0.5) 100%);
    z-index: 1;
    pointer-events: none;
}

/* ===== 免责声明弹窗 ===== */
.disclaimer-mask {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.disclaimer-box {
    background: #1a1f35;
    border: 2px solid #e63946;
    border-radius: 16px;
    padding: 22px 26px;
    max-width: 460px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 60px rgba(230,57,70,0.4), 0 20px 60px rgba(0,0,0,0.5);
    animation: popIn 0.4s ease;
}

@keyframes popIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.disclaimer-box h2 {
    color: #e63946;
    font-size: 22px;
    margin-bottom: 14px;
    text-align: center;
}

.disclaimer-content {
    color: #b0b8c8;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.disclaimer-content p {
    margin: 0 0 9px;
}
.disclaimer-content p:last-child {
    margin-bottom: 0;
}
.disclaimer-content br { line-height: 1.5; }

/* 注册/登录页免责声明弹窗容器（register.php / login.php） */
.modal-content {
    line-height: 1.5;
}
.modal-content p {
    margin: 0 0 9px;
}
.modal-content p:last-child {
    margin-bottom: 0;
}
.modal-content br { line-height: 1.5; }

.disclaimer-box form {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-agree, .btn-disagree {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-agree {
    background: linear-gradient(135deg, #e63946, #c1121f);
    color: #fff;
}
.btn-agree:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(230,57,70,0.5); }

.btn-disagree {
    background: #2a3050;
    color: #8a93a8;
    border: 1px solid #3a4060;
}
.btn-disagree:hover { background: #3a4060; }

/* ===== 导航条 ===== */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15,23,42,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(230,57,70,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 20px;
    height: 50px;
}

.nav-subbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.nav-logo {
    font-size: 20px;
    font-weight: bold;
    color: #e63946;
    text-decoration: none;
    text-shadow: 0 0 20px rgba(230,57,70,0.4);
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-links a {
    color: #c0c8d8;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 15px;
}

.nav-links a:hover {
    background: rgba(230,57,70,0.15);
    color: #fff;
}

.nav-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.nav-right a {
    background: rgba(230,57,70,0.2);
    border: 1px solid rgba(230,57,70,0.4);
    color: #c0c8d8;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
}
.nav-right a:hover {
    background: rgba(230,57,70,0.4);
    color: #fff;
}

/* ===== 导航栏搜索框（第二栏） ===== */
.nav-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.nav-search-input {
    width: 280px;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px 0 0 20px;
    background: rgba(255,255,255,0.06);
    color: #e0e6ed;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}
.nav-search-input:focus {
    border-color: #e63946;
    background: rgba(255,255,255,0.1);
    width: 340px;
}
.nav-search-input::placeholder { color: #5a6278; }
.nav-search-btn {
    padding: 7px 16px;
    border: none;
    border-radius: 0 20px 20px 0;
    background: #e63946;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}
.nav-search-btn:hover { background: #c92f3c; }

/* ===== 广告位 ===== */
.ad-zone {
    max-width: 1200px;
    margin: 15px auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.ad-top {
    text-align: center;
}

.ad-bottom {
    text-align: center;
}

.ad-item {
    display: inline-block;
    background: rgba(26,31,53,0.9);
    border: 1px solid rgba(230,57,70,0.2);
    border-radius: 8px;
    padding: 10px 24px;
    color: #e8a838;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}
.ad-item:hover { border-color: #e63946; box-shadow: 0 0 15px rgba(230,57,70,0.2); }
.ad-item img { max-width: 100%; border-radius: 6px; }

/* ===== 自营广告横幅（运营方自营产品）===== */
.self-operated-ad {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 12px auto;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2520 100%);
    border: 1.5px dashed #c8963e;
    border-radius: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.self-operated-ad:hover {
    border-color: #e8a838;
    box-shadow: 0 4px 20px rgba(200,150,62,0.2);
    transform: translateY(-1px);
}
.self-operated-ad .ad-label {
    position: absolute;
    top: -1px;
    left: 16px;
    background: linear-gradient(135deg, #d4a020, #f0c040);
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 0 0 6px 6px;
    letter-spacing: 1px;
}
.self-operated-ad .ad-body {
    display: flex;
    flex-direction: column;
    margin-left: 48px;
    gap: 3px;
}
.self-operated-ad .ad-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.self-operated-ad .ad-title .ad-tag-self {
    color: #e8a838;
    font-weight: 600;
}
.self-operated-ad .ad-subtitle {
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.4;
}
.self-operated-ad .ad-btn {
    flex-shrink: 0;
    margin-left: 24px;
    padding: 9px 22px;
    background: transparent;
    color: #e8e8e8;
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.25s ease;
}
.self-operated-ad:hover .ad-btn {
    background: #e8a838;
    color: #1a1a1a;
    border-color: #e8a838;
}
@media (max-width: 640px) {
    .self-operated-ad {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 30px 18px 16px;
    }
    .self-operated-ad .ad-body { margin-left: 0; }
    .self-operated-ad .ad-btn { margin-left: 0; }
}

/* ===== 主容器 ===== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* ===== 日历区域 ===== */
.calendar-section {
    flex: 1;
    min-width: 600px;
    background: rgba(26,31,53,0.9);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

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

.calendar-header h2 {
    color: #e0e6ed;
    font-size: 22px;
}

.cal-nav-btn {
    color: #e8a838;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(232,168,56,0.1);
    border: 1px solid rgba(232,168,56,0.3);
    transition: all 0.3s;
    font-size: 14px;
}
.cal-nav-btn:hover { background: rgba(232,168,56,0.2); }

/* 日历表格 */
.cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* 周末列（日/六）收窄，空间让给工作日 */
.cal-table th:first-child,
.cal-table td:first-child { width: 7%; }
.cal-table th:last-child,
.cal-table td:last-child { width: 7%; }

.cal-table th {
    padding: 12px 8px;
    color: #8a93a8;
    font-size: 14px;
    font-weight: normal;
    border-bottom: 2px solid rgba(230,57,70,0.2);
}

.cal-table th.weekend { color: #e63946; }

.cal-table td {
    padding: 4px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    height: 70px;
    vertical-align: middle;
    overflow: hidden;
}

.cal-table td.empty { background: rgba(0,0,0,0.2); }

.cal-table td.weekend { background: rgba(230,57,70,0.05); }

.cal-table td.today {
    border: 2px solid #e63946;
    box-shadow: inset 0 0 15px rgba(230,57,70,0.15);
}

.cal-table td.has-post {
    background: rgba(38,166,91,0.08);
}

.cal-table td.has-post a {
    display: block;
    width: 100%;
    height: 100%;
    color: #4fc3a1;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
    padding: 8px 0;
}

.cal-table td.has-post a:hover {
    background: rgba(38,166,91,0.2);
    transform: scale(1.05);
}

/* 收盘日历涨跌红绿底色 */
.cal-table td.cal-up {
    background: #e63946;
    border-color: rgba(255,255,255,0.25);
}
.cal-table td.cal-down {
    background: #16a34a;
    border-color: rgba(255,255,255,0.25);
}
.cal-table td.cal-flat {
    background: rgba(90,98,120,0.30);
}
.cal-table td.cal-up a,
.cal-table td.cal-down a,
.cal-table td.cal-flat a {
    color: #ffffff;
}
.cal-table td.cal-up .day-num,
.cal-table td.cal-down .day-num,
.cal-table td.cal-flat .day-num,
.cal-table td.cal-up .post-badge,
.cal-table td.cal-down .post-badge,
.cal-table td.cal-flat .post-badge {
    color: rgba(255,255,255,0.9);
}
.cal-table td.cal-up a:hover,
.cal-table td.cal-down a:hover {
    background: rgba(255,255,255,0.18);
    transform: scale(1.05);
}
.trend-arrow {
    display: block;
    font-size: 18px;
    line-height: 1.1;
    margin-top: 3px;
    color: rgba(255,255,255,0.95);
}
/* 日历格子内的当日上证指数点位 */
.idx-val {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    margin-top: 3px;
    color: rgba(255,255,255,0.92);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}
.dot-ud-up { background: #e63946; }
.dot-ud-down { background: #16a34a; }

/* 日历格子内的当日涨/跌家数对比（自适应框宽，避免长数字溢出变形） */
.ud-counts {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1px 3px;
    font-size: clamp(10px, 2.1vw, 13px);
    line-height: 1.15;
    margin-top: 3px;
    color: rgba(255,255,255,0.95);
    min-width: 0;
}
.ud-counts b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.2px;
    white-space: nowrap;
}
.ud-counts b.lead {
    font-weight: 800;
    text-shadow: 0 0 4px rgba(255,255,255,0.6);
}
.ud-counts i { font-style: normal; opacity: 0.7; }

.day-num {
    display: inline-block;
    color: #5a6278;
    font-size: 18px;
}

.post-badge {
    display: inline-block;
    font-size: 10px;
    color: rgba(255,255,255,0.85);
    margin-left: 5px;
    padding: 0 4px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 3px;
    vertical-align: middle;
    font-weight: normal;
    line-height: 1.3;
}

/* 日历格子内涨跌幅百分比（替代"有数据"标签） */
.post-pct {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
    letter-spacing: 0.2px;
}
.post-pct.pct-up   { color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.post-pct.pct-down { color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.post-pct.pct-flat { color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }

/* 今日主线页：主线模式日历（无涨跌红绿色，显示主线一/主线二） */
.calendar.lines-mode { margin-top: 24px; }
.calendar.lines-mode .cal-table {
    width: 100%;
    table-layout: fixed;
}
.calendar.lines-mode .cal-table th {
    font-size: 12px;
    padding: 6px 2px;
}
.calendar.lines-mode .cal-table td {
    height: 60px;
    padding: 4px 3px;
    overflow: hidden;
    vertical-align: top;
}
.calendar.lines-mode .cal-table td.has-post { background: rgba(255,255,255,0.04); }
.calendar.lines-mode .cal-table td.has-post a {
    display: block;
    color: rgba(230,237,245,0.95);
    font-size: 12px;
    padding: 0;
    overflow: hidden;
}
.calendar.lines-mode .cal-table td .day-num {
    font-size: 14px;
    display: inline;
}
.calendar.lines-mode .post-badge {
    display: none;
}
.cal-line {
    display: block;
    font-size: 9px;
    line-height: 1.35;
    margin-top: 1px;
    color: rgba(230,237,245,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-line.l1 { color: #ffd166; }
.cal-line.l2 { color: rgba(230,237,245,0.7); }
.cal-line b { font-weight: 600; opacity: 0.75; margin-right: 1px; }

.calendar-legend {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #8a93a8;
}

.dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dot-today { background: #e63946; }
.dot-has-post { background: #4fc3a1; }
.dot-weekend { background: rgba(230,57,70,0.3); }

/* ===== 最近文章 ===== */
.recent-posts {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    background: rgba(26,31,53,0.9);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    height: fit-content;
}

.recent-posts h3 {
    color: #e0e6ed;
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.post-list {
    list-style: none;
}

.post-list li {
    margin-bottom: 12px;
}

.post-list a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    text-decoration: none;
    transition: all 0.3s;
}

.post-list a:hover {
    background: rgba(230,57,70,0.1);
    transform: translateX(4px);
}

.post-date { color: #8a93a8; font-size: 13px; }
.post-title-text { color: #c0c8d8; font-size: 15px; }

.empty-tip {
    color: #5a6278;
    text-align: center;
    padding: 20px;
}

/* ===== 侧边栏广告 ===== */
.sidebar-ads {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-ad-item {
    display: block;
    background: rgba(26,31,53,0.9);
    border: 1px solid rgba(232,168,56,0.2);
    border-radius: 8px;
    padding: 12px 20px;
    color: #e8a838;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    font-size: 14px;
}
.sidebar-ad-item:hover { border-color: #e8a838; box-shadow: 0 0 15px rgba(232,168,56,0.15); }

/* ===== 文章详情 ===== */
.post-detail {
    flex: 1;
    min-width: 0;
    background: rgba(26,31,53,0.9);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid rgba(255,255,255,0.08);
}

.post-header { margin-bottom: 24px; }

.back-link {
    display: inline-block;
    color: #e8a838;
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 14px;
}

.post-detail h1 {
    color: #e0e6ed;
    font-size: 26px;
    margin-bottom: 12px;
}

.post-meta {
    display: flex;
    gap: 16px;
    color: #8a93a8;
    font-size: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.badge-lock {
    background: rgba(230,57,70,0.2);
    color: #e63946;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.post-content {
    color: #c0c8d8;
    font-size: 16px;
    line-height: 1.8;
    margin-top: 20px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.post-content img, .post-content video {
    max-width: 100%;
    height: auto;
}

/* 数据表格在移动端防溢出：固定列宽 + 单元格内换行 */
.post-content table {
    table-layout: fixed;
}

.post-content table th, .post-content table td {
    word-break: break-word;
    overflow-wrap: break-word;
}

.post-content h1, .post-content h2, .post-content h3 {
    color: #e0e6ed;
    margin: 16px 0 8px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.post-content table th, .post-content table td {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 12px;
    text-align: left;
}

.post-content table th { background: rgba(230,57,70,0.15); color: #e0e6ed; }

/* 涨红跌绿（中国股市惯例） */
.post-content .up { color: #e63946; font-weight: bold; }
.post-content .down { color: #26a65b; font-weight: bold; }

.post-locked {
    text-align: center;
    padding: 60px 20px;
    color: #8a93a8;
}

.btn-login {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #e63946, #c1121f);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(230,57,70,0.4); }

/* ===== 页面视图左右布局（与首页统一） ===== */
.page-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

.page-main {
    flex: 1;
    min-width: 600px;
}

.page-main .post-detail {
    min-height: 300px;
}

.page-sidebar {
    flex: 0 0 auto;
    min-width: 300px;
    max-width: 380px;
    width: 100%;
    position: sticky;
    top: 80px;
}

.page-sidebar .post-list a {
    position: relative;
}

.page-sidebar .post-list a.active {
    background: rgba(230,57,70,0.15);
    border-left: 3px solid #e63946;
    padding-left: 9px;
}

.page-sidebar .post-list a.active .post-title-text {
    color: #fff;
}

.page-post-link {
    cursor: pointer;
}

/* ===== 搜索框 ===== */
.search-section {
    width: 100%;
    margin-bottom: 20px;
}
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: #e0e6ed;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}
.search-input:focus {
    border-color: #e63946;
    background: rgba(255,255,255,0.08);
}
.search-input::placeholder { color: #5a6278; }
.search-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #e63946;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}
.search-btn:hover { background: #c92f3c; }
.search-clear {
    padding: 12px 16px;
    color: #8a93a8;
    text-decoration: none;
    font-size: 14px;
}
.search-clear:hover { color: #e0e6ed; }

/* 搜索结果 */
.search-results {
    width: 100%;
    background: rgba(26,31,53,0.9);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
}
.search-results h3 {
    color: #e0e6ed;
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.search-results .search-clear {
    font-size: 14px;
    color: #8a93a8;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    transition: all 0.3s;
}
.search-results .search-clear:hover {
    color: #e63946;
    border-color: #e63946;
}
.search-list li { margin-bottom: 10px; }

/* ===== 侧边栏文章筛选 ===== */
.post-count {
    color: #5a6278;
    font-size: 14px;
    font-weight: normal;
}

.post-item-hidden { display: none; }

.toggle-posts-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    color: #8a93a8;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}
.toggle-posts-btn:hover {
    background: rgba(230,57,70,0.1);
    color: #e0e6ed;
    border-color: rgba(230,57,70,0.3);
}

/* ===== 底部 ===== */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(10,14,26,0.9);
    position: relative;
    z-index: 2;
}

.site-footer p { color: #5a6278; font-size: 13px; margin: 4px 0; }
.footer-warn { color: #e63946; font-size: 12px; }
.footer-sitemap { color: #94a3b8; font-size: 12px; margin-top: 8px; }
.footer-sitemap a { color: #60a5fa; text-decoration: underline; }
.footer-sitemap a:hover { color: #93c5fd; }

/* ===== 后台管理样式 ===== */
.admin-body { background: #0d1117; }

.admin-header {
    background: rgba(15,23,42,0.98);
    border-bottom: 2px solid #e63946;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.admin-header h1 {
    color: #e63946;
    font-size: 20px;
}

.admin-header .admin-user {
    color: #8a93a8;
    font-size: 14px;
}

.admin-header .admin-user a {
    color: #e8a838;
    margin-left: 12px;
    text-decoration: none;
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.admin-sidebar {
    width: 220px;
    background: rgba(15,23,42,0.9);
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 20px 0;
    flex-shrink: 0;
}

.admin-sidebar a {
    display: block;
    padding: 12px 24px;
    color: #8a93a8;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    color: #e63946;
    background: rgba(230,57,70,0.08);
    border-left-color: #e63946;
}

.admin-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.admin-card {
    background: rgba(26,31,53,0.9);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 20px;
}

.admin-card h2 {
    color: #e0e6ed;
    font-size: 20px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* 表单 */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    color: #8a93a8;
    font-size: 14px;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgba(13,17,23,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #e0e6ed;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #e63946;
}

textarea.form-control { min-height: 120px; resize: vertical; font-family: inherit; }

select.form-control { cursor: pointer; }

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #e63946, #c1121f);
    color: #fff;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(230,57,70,0.4); }

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #c0c8d8;
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); }

.btn-danger {
    background: rgba(220,53,69,0.2);
    color: #ff6b6b;
    border: 1px solid rgba(220,53,69,0.4);
}
.btn-danger:hover { background: rgba(220,53,69,0.3); }

.btn-sm { padding: 6px 14px; font-size: 13px; }

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 14px;
    color: #8a93a8;
    font-size: 13px;
    font-weight: normal;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #c0c8d8;
    font-size: 14px;
}

.data-table tr:hover td { background: rgba(255,255,255,0.02); }

.status-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.status-on { background: rgba(38,166,91,0.2); color: #4fc3a1; }
.status-off { background: rgba(90,98,120,0.2); color: #8a93a8; }

/* 提示消息 */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success { background: rgba(38,166,91,0.15); border: 1px solid rgba(38,166,91,0.3); color: #4fc3a1; }
.alert-error { background: rgba(230,57,70,0.15); border: 1px solid rgba(230,57,70,0.3); color: #ff6b6b; }

/* 登录页 */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: rgba(26,31,53,0.95);
    border-radius: 16px;
    padding: 40px;
    width: 380px;
    border: 1px solid rgba(230,57,70,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-box h1 {
    text-align: center;
    color: #e63946;
    margin-bottom: 8px;
}

.login-box .sub {
    text-align: center;
    color: #8a93a8;
    font-size: 14px;
    margin-bottom: 24px;
}

.login-box .btn { width: 100%; text-align: center; }

/* 仪表盘统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(26,31,53,0.9);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.08);
}

.stat-card .stat-label {
    color: #8a93a8;
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    color: #e63946;
    font-size: 32px;
    font-weight: bold;
}

/* ===== 页脚 ICP 备案号 + 底部链接 ===== */
.footer-icp {
    text-align: center;
    margin: 8px 0 4px;
    font-size: 13px;
}

.footer-icp a {
    color: #8a93a8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-icp a:hover {
    color: #e63946;
}

/* ===== 友情链接 ===== */
.friend-links {
    text-align: center;
    margin: 12px 0 6px;
}

.friend-links-title {
    color: #8a93a8;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.friend-links-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.friend-links-images a {
    display: inline-block;
    line-height: 0;
}

.friend-links-images img {
    max-height: 40px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.3s, transform 0.3s;
}

.friend-links-images img:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.friend-links-text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
}

.friend-links-text a {
    color: #8a93a8;
    text-decoration: none;
    transition: color 0.3s;
}

.friend-links-text a:hover {
    color: #e63946;
}

.friend-links-sep {
    color: #4a5468;
    font-size: 12px;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-container { padding: 2px; }
    .nav-container { flex-direction: column; height: auto; padding: 8px 10px; gap: 6px; }
    .nav-subbar { flex-direction: column; gap: 8px; padding: 8px 10px; }
    .nav-search-form { width: 100%; }
    .nav-search-input { width: 100%; flex: 1; min-width: 150px; }
    .nav-search-input:focus { width: 100%; }
    .nav-right { margin-left: 0; justify-content: center; }
    .nav-links { flex-wrap: wrap; justify-content: center; }
    .calendar-section { min-width: 100%; padding: 16px; }
    .recent-posts { max-width: 100%; }
    .admin-sidebar { width: 100%; }
    .admin-layout { flex-direction: column; }
    .calendar-header { flex-wrap: wrap; gap: 10px; justify-content: center; }
    .calendar-header h2 { font-size: 18px; flex: 1 1 100%; order: -1; text-align: center; }
    .cal-nav-btn { padding: 6px 12px; font-size: 13px; }
    .cal-table td { height: 54px; padding: 2px; }
    .cal-table td.has-post a { font-size: 15px; padding: 3px 0; }
    .day-num { font-size: 14px; }
    .idx-val { font-size: 11px; margin-top: 1px; }
    .trend-arrow { font-size: 13px; margin-top: 1px; }
    .ud-counts { font-size: 11px; white-space: normal; line-height: 1.1; }
    .calendar-legend { gap: 12px; font-size: 12px; flex-wrap: wrap; }
    .page-main { min-width: 100%; background: transparent; }
    .page-sidebar { max-width: 100%; min-width: 0; width: 100%; position: static; top: auto; }
    .page-sidebar .post-list a { border-left: none !important; padding-left: 12px !important; }
    .page-section { flex-direction: column; }
    .page-main .post-detail { min-height: auto; }
    .post-detail { padding: 10px 2px; border: none !important; border-radius: 0; margin: 0; background: transparent !important; box-shadow: none !important; }
    .post-content { font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,0.85); }
    .post-content table { width: 100%; }

    /* 移动端全内容容器去框：文字满屏 */
    .post-detail,
    .disclaimer-box,
    .calendar-section,
    .recent-posts,
    .search-results,
    .ad-item,
    .sidebar-ad-item {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px 2px !important;
        margin: 0 !important;
        animation: none !important;
    }
    .friend-links-images img { max-height: 32px; max-width: 90px; object-fit: contain; }
    .friend-links-images { gap: 10px; }
    .disclaimer-box h2 { font-size: 20px; }
    .disclaimer-content { font-size: 14px; }
}

@media (max-width: 480px) {
    .main-container { padding: 1px; }

    /* 小屏进一步压缩 */
    .post-detail,
    .disclaimer-box,
    .calendar-section,
    .recent-posts,
    .search-results,
    .ad-item,
    .sidebar-ad-item {
        padding: 8px 1px !important;
    }
    .friend-links-images img { max-height: 28px; max-width: 72px; }
    .friend-links-images { gap: 8px; }
    .friend-links-title { font-size: 12px; margin-bottom: 6px; }
    .friend-links-text { font-size: 12px; gap: 4px; }
    .friend-links-text a { font-size: 12px; }
    .friend-links-sep { font-size: 11px; }
    .share-btn { padding: 10px 20px; font-size: 14px; margin: 4px; }
    .share-section { padding: 15px 10px; }
    .step-num { width: 26px; height: 26px; font-size: 14px; }
    .step-title { font-size: 14px; }
    .step-desc { font-size: 12px; }
    .share-link-input { font-size: 12px; padding: 6px 8px; }
    .copy-link-btn { padding: 6px 12px; font-size: 13px; }
    .claim-reward-btn { padding: 12px; font-size: 15px; }
    .share-modal-body { padding: 20px 15px !important; }
    .wechat-guide-steps { gap: 15px; }
    .calendar-section { padding: 10px; }
    .calendar-header h2 { font-size: 16px; }
    .cal-table td { height: 56px; }
    .cal-table td.has-post a { font-size: 13px; padding: 2px 0; }
    .day-num { font-size: 12px; }
    .idx-val { font-size: 9px; margin-top: 1px; }
    .post-badge { display: none; }
    .trend-arrow { font-size: 11px; margin-top: 1px; }
    .ud-counts { font-size: 9px; line-height: 1.05; }
}


/* ========== 分享按钮和弹窗样式 ========== */
.share-section {
    margin: 30px 0 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.share-btn {
    padding: 12px 30px;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 6px;
}

/* 微信分享按钮（绿色渐变） */
.share-wechat-btn {
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.4);
}

.share-wechat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.6);
}

/* 更多分享按钮（紫色渐变） */
.share-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.share-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.share-tip {
    display: block;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* ===== 微信分享引导页样式 ===== */
.wechat-guide {
    padding: 5px 0;
}

.wechat-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wechat-step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.3);
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
}

.step-link-box {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-link-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    background: #f8f9fa;
    outline: none;
}

.share-link-input:focus {
    border-color: #07c160;
}

.copy-link-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.copy-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(7, 193, 96, 0.4);
}

.copy-link-btn.copied {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    cursor: default;
}

/* 领取积分按钮 */
.claim-reward-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
    margin-top: 8px;
}

.claim-reward-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.claim-reward-btn.ready {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.claim-reward-btn.ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
}

.claim-reward-btn.claimed {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    cursor: default !important;
}

/* 系统原生分享按钮 */
.native-share-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: linear-gradient(135deg, #5b6ef5 0%, #4a5fd5 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.native-share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 110, 245, 0.4);
}

/* 分享弹窗 */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.share-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.share-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-body {
    padding: 30px;
}

.share-article-title {
    text-align: center;
    color: #333;
    font-size: 16px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.share-option:hover {
    border-color: #667eea;
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.share-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.share-option span:last-child {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

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

.share-success {
    padding: 12px;
    background: #d4edda;
    color: #155724;
    border-radius: 6px;
    font-size: 15px;
}

.share-error {
    padding: 12px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    font-size: 15px;
}

/* 用户中心分享记录表格 */
.share-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

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

.share-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.share-table tr:hover {
    background: #f8f9fa;
}

/* ===== 列表前端分页控件（.uc-list 由 main.js / 内联脚本自动分页） ===== */
.uc-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 14px 0 4px;
}
.uc-pager-btn {
    padding: 9px 18px;
    background: rgba(26,31,53,0.9);
    color: #58a6ff;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background .2s;
}
.uc-pager-btn:hover:not(:disabled) { background: rgba(40,48,75,0.9); }
.uc-pager-btn:disabled { color: #5a6178; cursor: not-allowed; opacity: .6; }
.uc-pager-info {
    color: #b0b8c8;
    font-size: 13px;
    min-width: 88px;
    text-align: center;
}
