@font-face {
    font-family: 'HeadingFont';
    src: url('ttf/1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BodyFont';
    src: url('ttf/2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ===== 侧边栏系统重构 ===== */

/* 强制侧边栏固定定位规则 - 最高优先级 */
aside.sidebar {
    position: fixed !important;
    z-index: 1000 !important;
}

/* 默认隐藏侧边栏（移动端） */
.sidebar {
    display: none;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 33.33%;
    height: 100vh;
    background: linear-gradient(135deg, var(--content-bg-light), var(--bg-light));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2rem;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1000 !important;
    border-radius: 0 20px 20px 0;
    border-right: 1px solid var(--border-light);
    overflow: hidden;
    /* 确保不会随滚动移动 */
    transform: translateZ(0) !important;
    will-change: auto;
    -webkit-transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* 只为悬停效果添加过渡，不影响定位 */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 桌面模式下的侧边栏显示 */
@media (min-width: 1024px) {
    .sidebar {
        display: flex !important;
        position: fixed !important;
        left: 20px !important;
        top: 20px !important;
        transform: none !important;
        width: calc(33.33% - 40px) !important;
        height: calc(100vh - 40px) !important;
        border-radius: 20px !important;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15), 0 5px 20px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid var(--border-medium-light) !important;
        z-index: 1000 !important;
    }
    
    /* 确保主内容区域为侧边栏留出空间 */
    .main-content {
        margin-left: 33.33% !important;
        padding-left: 20px !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        min-height: calc(100vh - 40px) !important;
    }
}

/* 侧边栏悬停效果 */
.sidebar:hover {
    transform: translateX(5px) translateZ(0) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    background: linear-gradient(135deg, var(--content-bg-light), rgba(255, 255, 255, 0.1)) !important;
}

/* 额外的强制规则 */
.sidebar,
aside.sidebar,
body .sidebar,
html .sidebar {
    position: fixed !important;
    transform: none !important;
}

/* 悬停时只允许轻微的横向移动 */
aside.sidebar:hover {
    transform: translateX(5px) !important;
}

/* 按钮点击效果 */
.sidebar *:active,
.sidebar button:active,
.sidebar .clickable:active {
    background-color: var(--accent-color) !important;
    transform: none !important;
    transition: none !important;
}

/* ===== 侧边栏下方图片系统 ===== */

/* 默认隐藏图片容器 */
.sidebar-bottom-image {
    display: none;
    position: fixed;
    left: 20px;
    bottom: 25px; /* 从底部向上25px，给出一个合适的间距 */
    width: calc(33.33% - 40px);
    z-index: 998; /* 比侧边栏低一层，确保不会遮挡 */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 桌面模式下显示图片 */
@media (min-width: 1024px) {
    .sidebar-bottom-image {
        display: block !important;
    }
}

/* 图片容器悬停效果 */
.sidebar-bottom-image:hover {
    transform: translateX(5px); /* 只进行水平移动 */
}

/* 图片链接样式 */
.sidebar-image-link {
    display: block;
    text-decoration: none;
    width: 100%;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-image-link:hover {
    text-decoration: none;
}

.sidebar-image-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 15px;
}

/* 图片卡片样式 */
.sidebar-image-card {
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-medium-light);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer; /* 添加手型指针表示可点击 */
}

.sidebar-image-card:hover {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 15px 40px 0 rgba(0, 0, 0, 0.15);
}

/* 点击效果 */
.sidebar-image-card:active {
    transform: translateY(0) scale(0.995);
    box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.sidebar-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
}

/* 校园卡小图标样式 */
.campus-card-item-link {
    display: inline;
    text-decoration: none;
    color: inherit; /* 继承父元素的文字颜色 */
    transition: all 0.2s ease;
}

.campus-card-item-link:hover {
    text-decoration: none;
    color: var(--accent-color); /* 悬停时文字变为主题色 */
}

.campus-card-link {
    display: inline;
    text-decoration: none;
    margin-left: 2px;
    margin-right: 2px;
}

.campus-card-icon {
    height: 2em; /* 进一步放大图片 */
    width: auto;
    vertical-align: middle; /* 垂直居中对齐 */
    display: inline;
    transition: transform 0.2s ease;
    margin-left: 6px; /* 增加与文字的间距 */
}

.campus-card-icon:hover {
    transform: scale(1.1);
}

.campus-card-item-link:focus {
    outline: 1px solid var(--accent-color);
    outline-offset: 1px;
    border-radius: 2px;
}

/* 点击提示文字样式 */
.click-tip {
    color: #ff0000; /* 红色文字 */
    font-size: 0.8em; /* 小一些的字体 */
    margin-left: 4px;
    font-weight: normal;
    transition: color 0.2s ease;
}

.campus-card-item-link:hover .click-tip {
    color: #ff3333; /* 悬停时稍微亮一些的红色 */
}

:root {
    --accent-color: #FFC107;
    --bg-light: #FFFFFF;
    --text-light: #333333;
    --content-bg-light: rgba(243, 244, 253, 0.9);
    --bg-dark: #121212;
    --text-dark: #E0E0E0;
    --content-bg-dark: rgba(42, 42, 62, 0.9);
    --nav-bg-light: rgba(255, 255, 255, 0.85);
    --nav-bg-dark: rgba(42, 42, 62, 0.85);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-dark: rgba(255, 255, 255, 0.2);
    --border-medium-light: rgba(255, 255, 255, 0.3);
    --border-medium-dark: rgba(255, 255, 255, 0.4);
    --border-strong-light: rgba(255, 255, 255, 0.4);
    --border-strong-dark: rgba(255, 255, 255, 0.5);
    --green-color: #00C896;
    --green-light: rgba(0, 200, 150, 0.9);
    --green-medium: rgba(0, 200, 150, 0.8);
    --green-dark: rgba(0, 200, 150, 0.95);
}

/* 暗色模式 - 直接重新定义所有变量 */
body.dark-mode {
    --bg-light: #121212;
    --text-light: #E0E0E0;
    --content-bg-light: rgba(42, 42, 62, 0.9);
    --nav-bg-light: rgba(42, 42, 62, 0.85);
    --border-light: rgba(255, 255, 255, 0.2);
    --border-medium-light: rgba(255, 255, 255, 0.4);
    --border-strong-light: rgba(255, 255, 255, 0.5);
}

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

body {
    font-family: 'BodyFont', sans-serif;
    background-color: var(--bg-light);
    background-image: url('image/5.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: blur(0px);
    color: var(--text-light);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    /* 确保侧边栏固定定位不受影响 */
    position: relative;
}

/* 为body添加伪元素来实现背景虚化效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('image/5.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: blur(8px);
    z-index: -1;
}

/* 主题切换覆盖层 - 用于实现主题切换的视觉效果 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: -1;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

/* 暗色模式的主题覆盖层 */
.dark-mode::after {
    background-color: rgba(18, 18, 18, 0.85); /* 深灰色半透明覆盖层 */
}

h1, h2, h3 {
    font-family: 'HeadingFont', serif;
}

/* ===== 侧边栏内部元素样式 ===== */

.profile {
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile:hover {
    transform: translateY(-2px);
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--accent-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 193, 7, 0.3);
}

.profile h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.profile p {
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-characters {
    text-align: center;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.6s ease;
}

.footer-characters.visible {
    transform: translateY(0);
    opacity: 1;
}

.character-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
}

.character-img:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.character-img.wiggle {
    animation: wiggle 0.5s ease-in-out;
}

.profile p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.footer-characters {
    text-align: center;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.6s ease;
}



.footer-characters.visible {
    transform: translateY(0);
    opacity: 1;
}

.character-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
}

.character-img.wiggle {
    animation: wiggle 0.5s ease-in-out;
}

/* 打字机效果动画 */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 按钮点击动画 - 已被:active伪类替代，符合交互规范 */
/* @keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
} */

/* 卡片悬停动画 - 进一步减少悬浮效果强度 */
@keyframes cardHover {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    }
    100% {
        transform: translateY(-1px) scale(1.005);
        box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.12);
    }
}

/* 粒子动画 */
@keyframes particle {
    0% {
        opacity: 1;
        transform: scale(0) translate(0, 0);
    }
    100% {
        opacity: 0;
        transform: scale(1) translate(var(--dx), var(--dy));
    }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* 波浪动画效果 */
@keyframes wave {
    0% {
        background-position: 0% 0%, 0% 0%;
    }
    25% {
        background-position: 50% 30%, -25% -20%;
    }
    50% {
        background-position: 100% 40%, -50% -30%;
    }
    75% {
        background-position: 150% 30%, -75% -20%;
    }
    100% {
        background-position: 200% 0%, -100% 0%;
    }
}

@keyframes wave-green {
    0% {
        background-position: 0% 0%, 0% 0%;
    }
    25% {
        background-position: 40% 35%, -30% -25%;
    }
    50% {
        background-position: 80% 45%, -60% -35%;
    }
    75% {
        background-position: 120% 35%, -90% -25%;
    }
    100% {
        background-position: 160% 0%, -120% 0%;
    }
}

.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    background: var(--nav-bg-light);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0.5rem 0.8rem;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    height: 60px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.mobile-name {
    font-family: 'HeadingFont', serif;
    font-size: 1.2rem;
    font-weight: bold;
}

.main-content {
    margin-left: 33.33%;
    min-height: 100vh;
    padding: 2rem;
}

.desktop-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: var(--nav-bg-light);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-light);
}

.content-switcher {
    flex: 1;
    display: flex;
    justify-content: center;
}

.switcher-pill {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 4px;
    display: flex;
    cursor: pointer;
    border: 1px solid var(--border-medium-light);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switcher-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.switcher-pill:active {
    background-color: var(--accent-color) !important;
    transform: none !important;
    transition: none !important;
}

.pill-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--accent-color);
    border-radius: 21px;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1;
}

.pill-text {
    padding: 12px 24px;
    border-radius: 21px;
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.pill-text.active {
    color: #333;
}

.pill-text:not(.active) {
    color: var(--text-light);
    opacity: 0.7;
}

/* 调整购买清单文字位置，使其与入学前建议边距保持一致 */
.pill-text:nth-child(3) {
    padding-left: 28px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--border-medium-light);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

.theme-toggle:active {
    background-color: var(--accent-color) !important;
    transform: scale(0.95) !important;
    transition: all 0.1s ease !important;
}

.sun-icon, .moon-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dark-mode .sun-icon {
    opacity: 0;
    transform: scale(0);
}

.dark-mode .moon-icon {
    opacity: 1;
    transform: scale(1);
}

body:not(.dark-mode) .sun-icon {
    opacity: 1;
    transform: scale(1);
}

body:not(.dark-mode) .moon-icon {
    opacity: 0;
    transform: scale(0);
}

.content {
    display: block;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-height: 100vh;
}

.content.hidden {
    display: none; /* 简单的隐藏/显示切换 */
}

/* 确保所有内容都可见 */
.content .scroll-animate {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 简化的滚动动画 - 确保内容始终可见 */
.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 首次加载时的动画效果 */
.scroll-animate.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.scroll-animate.fade-in.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* 段落级动画延迟 */
.scroll-animate:nth-child(1) { transition-delay: 0.1s; }
.scroll-animate:nth-child(2) { transition-delay: 0.2s; }
.scroll-animate:nth-child(3) { transition-delay: 0.3s; }
.scroll-animate:nth-child(4) { transition-delay: 0.4s; }
.scroll-animate:nth-child(5) { transition-delay: 0.5s; }
.scroll-animate:nth-child(6) { transition-delay: 0.6s; }
.scroll-animate:nth-child(7) { transition-delay: 0.7s; }
.scroll-animate:nth-child(8) { transition-delay: 0.8s; }
.scroll-animate:nth-child(9) { transition-delay: 0.9s; }
.scroll-animate:nth-child(10) { transition-delay: 1.0s; }

.content-card {
    background: var(--content-bg-light);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-medium-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* 移除默认的opacity动画，让滚动动画控制 */
    opacity: 1; /* 确保内容卡片默认可见 */
    transform: translateY(0); /* 确保内容卡片默认位置正确 */
}

.content-card:hover {
    animation: cardHover 0.3s ease-out forwards;
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent-color);
    animation: typewriter 3s steps(40, end), blink-caret 1s step-end infinite;
    /* 确保两个页面的标题长度不影响动画速度 */
    max-width: 100%;
    animation-fill-mode: forwards;
}

/* 为不同页面的标题调整动画步数以保持一致的速度 */
#advice-section .typewriter {
    animation: typewriter 3s steps(35, end), blink-caret 1s step-end infinite;
}

#list-section .typewriter {
    animation: typewriter 3s steps(20, end), blink-caret 1s step-end infinite;
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--accent-color);
    }
}

.animate-text {
    opacity: 0;
    animation: slideInLeft 0.6s ease-out forwards;
}

/* 确保所有页面的列表项动画时间一致 */
.animate-text:nth-child(1) { animation-delay: 0.1s; }
.animate-text:nth-child(2) { animation-delay: 0.2s; }
.animate-text:nth-child(3) { animation-delay: 0.3s; }
.animate-text:nth-child(4) { animation-delay: 0.4s; }
.animate-text:nth-child(5) { animation-delay: 0.5s; }
.animate-text:nth-child(6) { animation-delay: 0.6s; }
.animate-text:nth-child(7) { animation-delay: 0.7s; }
.animate-text:nth-child(8) { animation-delay: 0.8s; }
.animate-text:nth-child(9) { animation-delay: 0.9s; }
.animate-text:nth-child(10) { animation-delay: 1.0s; }
.animate-text:nth-child(11) { animation-delay: 1.1s; }
.animate-text:nth-child(12) { animation-delay: 1.2s; }
.animate-text:nth-child(13) { animation-delay: 1.3s; }
.animate-text:nth-child(14) { animation-delay: 1.4s; }
.animate-text:nth-child(15) { animation-delay: 1.5s; }

.content-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.section-block {
    margin-bottom: 2rem;
}

.section-block h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.section-block ul {
    list-style: none;
    padding-left: 0;
}

.section-block li {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.section-block li:hover {
    transform: translateX(5px);
    background: rgba(255, 193, 7, 0.1);
}

.contact-info {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 10px;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #ffb300;
}

/* 新生活元素样式 */
.new-life-section {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    min-height: 150px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.new-life-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.new-life-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: calc(100% - 2rem);
    height: 80px;
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.9) 0%, 
        rgba(255, 203, 17, 0.8) 25%,
        rgba(255, 193, 7, 0.95) 50%,
        rgba(255, 183, 7, 0.85) 75%,
        rgba(255, 193, 7, 0.9) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 2px solid var(--accent-color);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(255, 193, 7, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    overflow: hidden;
}

.new-life-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: 
        radial-gradient(ellipse at center, rgba(255, 193, 7, 0.4) 0%, transparent 60%),
        linear-gradient(90deg, 
            rgba(255, 193, 7, 0.9) 0%, 
            rgba(255, 203, 17, 0.8) 25%,
            rgba(255, 193, 7, 0.95) 50%,
            rgba(255, 183, 7, 0.85) 75%,
            rgba(255, 193, 7, 0.9) 100%);
    background-size: 400% 150%, 500% 120%;
    border-radius: 0 0 13px 13px;
    transition: height 0.1s ease, background 0.3s ease;
    z-index: 1;
    box-shadow: 
        0 -2px 10px rgba(255, 193, 7, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
    pointer-events: none;
    animation: wave 6s ease-in-out infinite;
    overflow: hidden;
}

.new-life-progress::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -100%;
    width: 300%;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        rgba(255, 255, 255, 0.4) 20px,
        transparent 40px
    );
    animation: wave-ripple 4s linear infinite;
}

@keyframes wave-ripple {
    0% {
        transform: translateX(-33%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* 播放状态下的翠绿色进度条 */
.new-life-card.playing .new-life-progress {
    background: 
        radial-gradient(ellipse at center, rgba(0, 200, 150, 0.4) 0%, transparent 60%),
        linear-gradient(90deg, 
            var(--green-light) 0%, 
            rgba(0, 220, 160, 0.8) 25%,
            var(--green-dark) 50%,
            rgba(0, 180, 140, 0.85) 75%,
            var(--green-medium) 100%);
    background-size: 400% 150%, 500% 120%;
    box-shadow: 
        0 -2px 10px rgba(0, 200, 150, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
    animation: wave-green 5s ease-in-out infinite;
}

.new-life-card.playing .new-life-progress::before {
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        rgba(255, 255, 255, 0.5) 18px,
        transparent 36px
    );
    animation: wave-ripple 3.5s linear infinite;
}

.new-life-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-color), transparent, var(--accent-color));
    border-radius: 17px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.new-life-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(255, 193, 7, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.new-life-card:hover::before {
    opacity: 1;
}

.new-life-card:active {
    background: rgba(255, 193, 7, 0.95) !important;
    border-color: rgba(255, 193, 7, 1.0) !important;
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.8) !important;
    transform: scale(0.98) !important;
    transition: none !important;
}

.new-life-card:active .new-life-text {
    color: #222 !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5) !important;
}

.new-life-text {
    font-family: 'BodyFont', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
    line-height: 1.4;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    pointer-events: none; /* 禁止文字阻挡点击事件 */
}

.new-life-card:hover .new-life-text {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-footer {
    display: none;
    text-align: center;
    padding: 2rem;
    min-height: 200px; /* 确保有足够的空间显示角色 */
    position: relative;
}

.mobile-footer .footer-characters {
    text-align: center;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.6s ease;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
}

.mobile-footer .footer-characters.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mobile-character {
    width: 140px;
    height: 140px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-character.wiggle {
    animation: wiggle 0.5s ease-in-out;
}

/* 中等屏幕适配 (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .sidebar {
        position: fixed !important;
        width: 30%;
    }
    
    .main-content {
        margin-left: 30%;
        padding: 1.5rem;
    }
    
    .profile h1 {
        font-size: 2rem;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .content-card {
        padding: 1.8rem;
    }
    
    .desktop-nav {
        padding: 0.8rem 1.5rem;
    }
}

/* 小屏幕适配 (480px - 767px) */
@media (max-width: 767px) and (min-width: 480px) {
    .content-card h2 {
        font-size: 1.8rem;
    }
    
    .section-block h3 {
        font-size: 1.3rem;
    }
    
    .intro {
        font-size: 1.05rem;
    }
}

/* ===== 移动端隐藏规则 ===== */
@media (max-width: 1023px) {
    .sidebar {
        display: none !important;
    }
    
    .sidebar-bottom-image {
        display: none !important;
    }

    .mobile-header {
        display: flex;
        position: relative; /* 改为sticky为relative避免布局问题 */
        background: var(--nav-bg-light);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 0.5rem 0.8rem;
        align-items: center;
        justify-content: space-between;
        z-index: 1000;
        border-bottom: 1px solid var(--border-light);
        height: 60px;
    }
    
    /* 确保移动端主题切换按钮可见且可点击 - 增强版 */
    .mobile-header .theme-toggle {
        display: flex !important;
        position: relative !important;
        z-index: 1002 !important;
        flex-shrink: 0; /* 防止按钮被压缩 */
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        min-height: 60px !important;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        -webkit-touch-callout: none !important;
        background: rgba(255, 255, 255, 0.4) !important;
        border: 3px solid rgba(255, 193, 7, 0.8) !important;
        border-radius: 50% !important;
        transition: all 0.2s ease !important;
        font-size: 1.8rem !important;
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* 移动端主题按钮激活效果 - 增强版 */
    .mobile-header .theme-toggle:active {
        background: rgba(255, 193, 7, 0.9) !important;
        transform: scale(0.85) !important;
        border-color: #FFC107 !important;
        box-shadow: 0 2px 10px rgba(255, 193, 7, 0.6), 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* 移动端主题按钮悬停效果 */
    .mobile-header .theme-toggle:hover {
        background: rgba(255, 255, 255, 0.5) !important;
        border-color: rgba(255, 193, 7, 1) !important;
        box-shadow: 0 6px 20px rgba(255, 193, 7, 0.5), 0 3px 10px rgba(0, 0, 0, 0.25) !important;
        transform: scale(1.05) !important;
    }

    /* 移动端内容切换器 - 调整位置避免与主题按钮冲突 */
    .mobile-header .content-switcher {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1001;
        background: var(--nav-bg-light);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 20px;
        padding: 2px;
        border: 1px solid var(--border-strong-light);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    .mobile-header .switcher-pill {
        background: var(--nav-bg-light);
        border: 1px solid var(--border-medium-light);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        min-width: 180px;
        max-width: 200px;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 70px; /* 减少顶部间距 */
    }

    .desktop-nav {
        display: none;
    }

    .mobile-footer {
        display: block;
    }
    
    .new-life-section {
        display: block;
        padding: 1.5rem 1rem;
    }
    
    .new-life-card {
        max-width: calc(100% - 1rem);
        height: 70px;
    }
    
    .new-life-progress {
        border-radius: 0 0 11px 11px;
    }
    
    .new-life-text {
        font-size: 1.1rem;
        letter-spacing: 1.5px;
    }

    .content-card {
        padding: 1.5rem;
    }

    .content-card h2 {
        font-size: 1.5rem;
    }

    .section-block h3 {
        font-size: 1.2rem;
    }

    .intro {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .section-block li {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .switcher-pill {
        width: auto;
        max-width: 200px;
        min-width: 180px;
    }

    .pill-text {
        padding: 6px 10px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* 确保胶囊内文字右对齐效果 */
    .mobile-header .pill-indicator {
        width: calc(50% - 2px);
        height: calc(100% - 4px);
        top: 2px;
        left: 2px;
    }
}

.theme-transition {
    position: fixed;
    width: 100px;
    height: 100px;
    background: #FFFFFF; /* 默认颜色，将由JavaScript动态设置 */
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 10002;
    pointer-events: none;
    transition: none;
}

.theme-transition.active {
    animation: expandCircle 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes expandCircle {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(15);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(25);
        opacity: 0;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: #333;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 10000;
}

/* 粒子爆炸效果 */
.particle {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: particle 0.8s ease-out forwards;
}

.particle::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: particle 0.8s ease-out forwards;
}

.notification.show {
    transform: translateX(0);
}

/* 欢迎弹窗样式 */
.welcome-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: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.welcome-modal.show {
    opacity: 1;
    visibility: visible;
}

.welcome-modal-content {
    background: var(--content-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-medium-light);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-width: 90%;
    width: 400px;
}

.welcome-modal.show .welcome-modal-content {
    transform: scale(1) translateY(0);
}

.welcome-modal h3 {
    font-family: 'HeadingFont', serif;
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-modal p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.welcome-modal .close-btn {
    background: var(--accent-color);
    border: none;
    color: #333;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.welcome-modal .close-btn:hover {
    background: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

/* ===== 主题状态调试指示器 ===== */
.theme-debug-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
    z-index: 10003;
    pointer-events: none;
    transition: all 0.3s ease;
}

.dark-mode .theme-debug-indicator {
    background: rgba(255, 255, 255, 0.9);
    color: black;
}