/* ============================================================
   common.css — 基础重置 + 通用布局 + 侧栏固定 + 响应式基础
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
}

body {
    /*font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", serif;*/
    /*微软雅黑*/
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB","Helvetica Neue", Arial, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.75;
    font-size: 14px;
    transition: background 0.6s ease, color 0.4s ease;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 28px, var(--paper-texture) 28px, var(--paper-texture) 29px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent);
}

.clear {
    clear: both;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.mainbox {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 大布局：百分比 + 浮动，左右侧栏 sticky ===== */
.box {
    position: relative;
    padding: 20px 0;
    overflow: visible;
}

.box::after {
    content: "";
    display: table;
    clear: both;
}

/* 左侧边栏 - 定宽22%，sticky 固定 */
.main-left {
    float: left;
    width: 19%;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 20px 14px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: background 0.4s ease, border-color 0.4s ease;
    font-size: 14px;
    box-sizing: border-box;
    margin-right: 1.5%;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* 中间主内容 - 定宽56% */
.main-right {
    float: left;
    width: 59%;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

/* 右侧边栏 - 定宽20%，sticky 固定 */
.main-side {
    float: right;
    width: 19%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* ===== 阅读进度条 ===== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent);
    z-index: 100;
    transition: width 0.1s linear, background 0.4s ease;
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-deep);
    transform: translateY(-2px);
}

/* ===== 季节装饰 ===== */
.season-deco {
    position: fixed;
    bottom: 24px;
    left: 24px;
    font-size: 48px;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
}

/* ===== 手机端菜单按钮 ===== */
.menu-toggle {
    display: none;
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent-deep);
    font-size: 20px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 101;
}

.menu-toggle:hover {
    background: var(--accent-soft);
}

/* 菜单遮罩 */
.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ===== 全局主题过渡 ===== */
.theme-transition * {
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.3s ease, box-shadow 0.4s ease;
}





.fitobj{
    object-fit: cover;
    width: 100%;
    height: 100%;
}

html {
    overflow-y: scroll!important;
    scrollbar-width: none!important;        /* Firefox */
    -ms-overflow-style: none!important;     /* IE/Edge */
}
html::-webkit-scrollbar {
    display: none!important;                /* Chrome/Safari */
}
/* ============================================================
   xys.css — 四季主题 + 过年主题 变量定义
   ============================================================ */

/* ===== 春（默认） ===== */
:root {
    --bg-page: #f5f2e8;
    --bg-gradient: radial-gradient(circle at 8% 15%, rgba(150, 180, 120, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 92% 85%, rgba(190, 200, 140, 0.10) 0%, transparent 45%),
    #f5f2e8;
    --bg-card: #fdfcf8;
    --bg-soft: #ece8d8;
    --border-color: #ddd6c2;
    --text-main: #3d3a2e;
    --text-sub: #6e6a56;
    --text-light: #9c987e;
    --accent: #7a9a5a;
    --accent-soft: #e6edd8;
    --accent-deep: #5a7a3a;
    --accent-light: #b8cca0;
    --banner-text: #ffffff;
    --shadow-card: 0 1px 4px rgba(80, 70, 40, 0.05);
    --shadow-hover: 0 4px 16px rgba(90, 110, 60, 0.12);
    --tag-bg: #e6edd8;
    --tag-text: #5a7a3a;
    --paper-texture: rgba(160, 140, 100, 0.03);
}

/* ===== 夏 ===== */
body[data-season="summer"] {
    --bg-page: #eef4ec;
    --bg-gradient: radial-gradient(circle at 12% 22%, rgba(100, 170, 130, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(120, 180, 140, 0.10) 0%, transparent 45%),
    #eef4ec;
    --bg-card: #fbfdf8;
    --bg-soft: #e0ebdc;
    --border-color: #c8dcc4;
    --text-main: #24382e;
    --text-sub: #4e6a56;
    --text-light: #82a08a;
    --accent: #4a9060;
    --accent-soft: #d8ecdc;
    --accent-deep: #2e6a40;
    --accent-light: #90c8a0;
    --shadow-card: 0 1px 4px rgba(40, 80, 50, 0.05);
    --shadow-hover: 0 4px 16px rgba(46, 106, 64, 0.12);
    --tag-bg: #d8ecdc;
    --tag-text: #2e6a40;
    --paper-texture: rgba(100, 140, 100, 0.03);
}

/* ===== 秋 ===== */
body[data-season="autumn"] {
    --bg-page: #faf2e2;
    --bg-gradient: radial-gradient(circle at 10% 28%, rgba(230, 180, 100, 0.16) 0%, transparent 42%),
    radial-gradient(circle at 90% 72%, rgba(220, 160, 80, 0.10) 0%, transparent 45%),
    #faf2e2;
    --bg-card: #fffdf6;
    --bg-soft: #f5e8d0;
    --border-color: #e8d8bc;
    --text-main: #3d2e1e;
    --text-sub: #8a6a40;
    --text-light: #b8a078;
    --accent: #c48a30;
    --accent-soft: #f8ecd4;
    --accent-deep: #9a6818;
    --accent-light: #e0b868;
    --shadow-card: 0 1px 4px rgba(120, 90, 30, 0.05);
    --shadow-hover: 0 4px 16px rgba(154, 104, 24, 0.12);
    --tag-bg: #f8ecd4;
    --tag-text: #9a6818;
    --paper-texture: rgba(180, 150, 80, 0.03);
}

/* ===== 冬 ===== */
body[data-season="winter"] {
    --bg-page: #eef1f4;
    --bg-gradient: radial-gradient(circle at 12% 18%, rgba(140, 160, 190, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(120, 145, 180, 0.10) 0%, transparent 45%),
    #eef1f4;
    --bg-card: #fbfcfe;
    --bg-soft: #e2e8f0;
    --border-color: #d0dae6;
    --text-main: #202a36;
    --text-sub: #52667a;
    --text-light: #8898a8;
    --accent: #6a82a0;
    --accent-soft: #dce6f2;
    --accent-deep: #465a74;
    --accent-light: #a0b8d0;
    --shadow-card: 0 1px 4px rgba(40, 60, 90, 0.05);
    --shadow-hover: 0 4px 16px rgba(70, 90, 116, 0.12);
    --tag-bg: #dce6f2;
    --tag-text: #465a74;
    --paper-texture: rgba(100, 120, 150, 0.03);
}

/* ===== 过年（新增） ===== */
body[data-season="newyear"] {
    --bg-page: #fdf2ee;
    --bg-gradient: radial-gradient(circle at 10% 20%, rgba(220, 100, 80, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 90% 80%, rgba(230, 160, 100, 0.10) 0%, transparent 45%),
    #fdf2ee;
    --bg-card: #fffbf8;
    --bg-soft: #fae4dc;
    --border-color: #f0d0c4;
    --text-main: #3d2020;
    --text-sub: #8a4a40;
    --text-light: #c08878;
    --accent: #d44a3a;
    --accent-soft: #fce4de;
    --accent-deep: #a82e20;
    --accent-light: #f09080;
    --shadow-card: 0 1px 4px rgba(180, 80, 60, 0.05);
    --shadow-hover: 0 4px 16px rgba(168, 46, 32, 0.12);
    --tag-bg: #fce4de;
    --tag-text: #a82e20;
    --paper-texture: rgba(200, 140, 100, 0.03);
}

/* ===== 季节装饰 emoji ===== */
body[data-season="spring"] .season-deco::before { content: "🌱"; }
body[data-season="summer"] .season-deco::before { content: "🌾"; }
body[data-season="autumn"] .season-deco::before { content: "🍅"; }
body[data-season="winter"] .season-deco::before { content: "🏔️"; }
body[data-season="newyear"] .season-deco::before { content: "🧨"; }
