/*
  引导页新版骨架（对齐 imsyy/home v4 布局，原生 js + css 实现）
  ────────────────────────────────────────────────────────────
  为什么单独一个文件：style.css 是旧版骨架（bootstrap 栅格 .row/.col + 全屏 .box/.more），
  这里用 #id / 后代选择器把它覆盖掉，旧文件里各卡片的内部细节（一言、音乐控件、进度条）继续复用。
  加载顺序必须排在 style.css / mobile.css 之后。
*/

/* ============ 基础 ============ */
/* v4 在 style.scss 的 `*, a, p` 里写了 box-sizing: border-box，
   旧 style.css 没有。补全局后「定高 + padding」的卡片（165px + 20px 等）才不会溢出。 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
}

#section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============ 背景 ============ */
.bg-all {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

#bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15);
    /* 旧 style.css:82 给 #bg 写了 filter: blur(10px)，会把壁纸糊成一片灰，必须重置 */
    filter: blur(0);
    transition: transform 0.8s ease-out, filter 0.8s ease-out;
}

#bg.error {
    background: #2b2b2b;
}

.cover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity 1.5s;
    pointer-events: none;
}

/* ============ 主容器：左信息 / 右功能 ============ */
#main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* v4 的主内容入场：从 1.2 倍缩回原尺寸，配合揭幕 */
    transform: scale(1.2);
    transition: transform 0.3s;
    animation: fade-blur-main-in 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.5s;
    /* 旧 style.css 的 main 带 display:flex + rgb(0 0 0 / 20%)，
       会把整页压一层黑、并把 .container 变成 flex item，这里复位 */
    display: block;
    background: transparent;
}

#main .container {
    width: 100%;
    /* v4 的 global.scss 给 .container 限了 max-width 并居中（1200 / 1100 / 900 三档），
       不限制的话大屏上两栏会被拉得很散，内容全贴着屏幕两边 */
    max-width: 1200px;
    height: 100vh;
    margin: 0 auto;
    padding: 0 0.5vw;
    /* 旧 .container 是 display:flex + space-around，新骨架里只有 .all 一个子节点，复位为块 */
    display: block;
}

#main .all {
    width: 100%;
    height: 100%;
    padding: 0 0.75rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

/* 两栏必须是 flex:1 1 0 + min-width:0。
   之前写 width:50% 再加 margin（10px + 0.75rem），总宽 = 100% + 22px > 容器，
   flex 压缩也补不回来，右栏第 3 列会被顶出屏幕外。
   min-width:0 是关键：flex item 默认 min-width:auto，内容撑宽后依然溢出。 */
#main .left {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin-right: 10px;
    transform: translateY(20px);
}

#main .right {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin-left: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============ 卡片统一（v4 的 .cards） ============ */
/* 旧版 style.css 的 .cards 只有 transition，背景是各卡片各写一遍；
   这里统一补上圆角 + 40% 黑 + 毛玻璃，新结构里所有卡片靠它出层次 */
.cards {
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    transition: transform 0.3s, background-color 0.3s, backdrop-filter 0.3s;
}

.cards:hover {
    transform: scale(1.01);
}

.cards:active {
    transform: scale(0.98);
}

/* 单行省略（v4 在 style.scss 第 87 行定义，旧 style.css 里没有）。
   logo 名字、网站列表标题、卡片名都靠它，缺了长名字会顶破卡片 */
.text-hidden {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ============ 左栏：Logo + 简介 + 社交 ============ */
.info .logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* 这里不能用 460：v4 的站名是 "imsyy.top"（短），我们是 "wenhong.vip"，
       5rem 字号 + 120px 头像 + 22px 内缩后 460 装不下，会被 text-hidden 截成 "wenhon..." */
    max-width: 100%;
    animation: fade 0.5s;
}

.info .logo-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    /* 旧版 .main-img img:hover 会把头像转一圈，那个圆形 logo 就是钟表面盘，
       这是原有的「钟表动画」，新骨架里漏掉了，补回来 */
    transition: transform 0.5s;
}

.info .logo-img:hover {
    transform: rotate(360deg);
}

.info .name {
    width: 100%;
    padding-left: 22px;
    transform: translateY(-8px);
    font-family: "Pacifico-Regular", cursive;
}

.info .name .bg {
    /* 5rem 时 "wenhong" 已占满整行，".vip" 被挤掉；降到 4.2rem 两个都能显示 */
    font-size: 4.2rem;
    line-height: 1.1;
    /* style.css 的 `*` 把 font-family 直接写在每个元素上（直接声明 > 继承），
       所以 span 拿不到 .name 上的 Pacifico，必须在这里再声明一次 */
    font-family: "Pacifico-Regular", cursive;
}

.info .name .sm {
    margin-left: 6px;
    font-size: 1.7rem;
    font-family: "Pacifico-Regular", cursive;
}

.info .description {
    padding: 1rem;
    margin-top: 3.5rem;
    max-width: 460px;
    cursor: pointer;
    animation: fade 0.5s;
}

.info .description .content {
    display: flex;
    justify-content: space-between;
}

/* 右侧那半个引号贴底对齐（对齐 v4 的 .xicon:nth-of-type(2) { align-self: flex-end }） */
.info .description .content > i:last-child {
    align-self: flex-end;
}

.info .description .content .text {
    margin: 0.75rem 1rem;
    margin-right: auto;
    line-height: 2rem;
}

.info .description .content .text p:first-child {
    font-size: 1.6rem;
    font-family: "Pacifico-Regular", cursive;
}

.info .description .content .text p:last-child {
    font-size: 0.95rem;
    opacity: 0.85;
}

.social {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 460px;
    /* width 也必须给满：只写 max-width 时容器宽度会按内容收缩，
       justify-content: space-between 就失效，右侧提示文字会紧贴图标 */
    width: 100%;
    height: 42px;
    background-color: transparent;
    backdrop-filter: blur(0);
    border-radius: 6px;
    transition: background-color 0.3s, backdrop-filter 0.3s;
    animation: fade 0.5s;
}

.social .link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.social .link a {
    display: flex;
    align-items: center;
}

.social .link a i {
    margin: 0 12px;
    font-size: 1.45rem;
    transition: transform 0.3s;
}

.social .link a:hover i {
    transform: scale(1.12);
}

.social .tip {
    display: none;
    margin-right: 12px;
    font-size: 0.95rem;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .social:hover {
        background-color: rgba(0, 0, 0, 0.25);
        backdrop-filter: blur(5px);
    }

    .social:hover .tip {
        display: block;
    }
}

/* ============ 右栏：功能区（165px，与一言卡同高） ============ */
/* 全站没有全局 box-sizing:border-box，而 .func-right / .hitokoto / .music 都是
   「height:165px + padding:20px」。用默认的 content-box 时实际占 205px，
   会把下方的网站列表整体顶下去，所以功能区内的定高容器统一改 border-box。 */
.function,
.func-left,
.func-right {
    box-sizing: border-box;
}

.function .hitokoto,
.function .music,
#box,
.box-content {
    box-sizing: border-box;
}

.function {
    display: flex;
    flex-direction: row;
    gap: 20px;
    height: 165px;
}

.func-left {
    position: relative;
    /* 同 .left/.right：50% + 50% + gap(20px) 超过 100%，天气卡右侧会被裁 */
    flex: 1 1 0;
    min-width: 0;
}

/* 一言与音乐卡互斥显示，叠在同一格上，避免切换时高度抖动 */
.func-left > .hitokoto,
.func-left > .music {
    position: absolute;
    inset: 0;
    height: 100%;
}

/* 一言卡顶部的「打开音乐播放器」条：旧版靠 bootstrap 的 .fixed-top（position:fixed，全屏顶），
   bootstrap 已移除，若不补就会变成普通流内元素把卡片内容往下顶。这里改成贴在卡片顶部。 */
.func-left > .hitokoto #open-music {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    border-radius: 6px 6px 0 0;
}

.func-right {
    flex: 1 1 0;
    min-width: 0;
    height: 165px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.func-right .clock {
    width: 100%;
    font-size: 1.1rem;
    /* 不能用 overflow-x: hidden —— 按 CSS 规范，另一方向会从 visible 变成 auto，
       于是天气卡里冒出竖向滚动条，时钟也一起被裁。用 overflow: hidden 才不产生滚动容器。 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.func-right .clock .time-text {
    display: block;
    margin-top: 10px;
    /* 3.25rem 时 "16:47:25" 在右栏一半宽度里会溢出被裁，
       用 vw 自适应：窄屏自动缩小，宽屏最多 3.25rem */
    font-size: clamp(2rem, 2.5vw, 3.25rem);
    letter-spacing: 1px;
    font-family: "UnidreamLED", monospace;
    line-height: 1;
}

.func-right .weather {
    width: 100%;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ 网站列表：每页 6 个 + 圆点分页 ============ */
/* .links .line 的间距不再覆盖：style.css 的 .line 就是
   margin: 1rem 0.25rem + margin-top: 2rem，和 v4 的 2rem 0.25rem 1rem 一致 */
.links .line {
    margin: 2rem 0.25rem 1rem;
}

.link-pages {
    position: relative;
}

.link-page {
    display: none;
    /* minmax(0,1fr)：1fr 等价 minmax(auto,1fr)，卡片内容一撑就超列宽，
       3 列会顶出右边界。改成 minmax(0,…) 允许内容收缩 */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.link-page.active {
    display: grid;
}

.link-page > a {
    display: block;
}

.link-page .link-card {
    /* v4 的 .item 是 height:100px + padding: 0 10px */
    height: 100px;
    padding: 0 10px;
    flex-direction: row;
    gap: 8px;
}

.link-page .link-card i {
    font-size: 1.4rem;
}

/* v4 的网站卡片 hover 是 scale(1.02) + 背景加深（比通用 .cards 的 1.01 更明显） */
.link-page .link-card:hover {
    transform: scale(1.02);
    background-color: rgba(0, 0, 0, 0.4);
}

.link-page .link-card:active {
    transform: scale(1);
}

.link-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 1.2rem;
}

.link-dots.show {
    display: flex;
}

/* 对齐 v4 的 swiper-pagination：横向长条(20x4)，靠 opacity 表当前页 */
.link-dots span {
    width: 20px;
    height: 4px;
    border-radius: 4px;
    background: #fff;
    opacity: 0.2;
    cursor: pointer;
    transition: opacity 0.3s;
}

.link-dots span:hover {
    opacity: 1;
}

.link-dots span.active {
    opacity: 1;
}

/* ============ 盒子：替换右栏显示（v4 的 Box） ============ */
#box {
    display: none;
    position: relative;
    /* 与 .right 一致：flex:1 1 0 平分，不用 calc(50% - …) */
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin-left: 0.75rem;
    height: 80%;
    max-height: 660px;
    padding: 0;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    z-index: 2;
    animation: fade 0.3s;
    overflow: hidden;
}

#box.open {
    display: flex;
    flex-direction: column;
}

/* 盒子是主面板，不是可点的小卡片：必须抵消 .cards 的 hover 放大 / active 缩小，
   否则点简介打开盒子后鼠标一划过整个面板就跟着缩放（v4 的 .box.cards:hover 也是 scale(1)） */
#box:hover,
#box:active {
    transform: none;
}

.box-tools {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 3;
}

.box-tools .tool {
    font-size: 1.35rem;
    opacity: 0.55;
    transition: transform 0.3s, opacity 0.3s;
    cursor: pointer;
}

.box-tools .tool:hover {
    opacity: 1;
    transform: scale(1.15);
}

.box-content {
    height: 100%;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
}

.box-content .line {
    margin: 0 0 0.75rem 0;
}

.box-content .line + .line {
    margin-top: 1.6rem;
}

/* 杂七杂八标题的前一个兄弟是 .date（4 条进度条），不是 .line，
   所以上面的 .line + .line 规则没命中它 —— 这才是它贴进度条太近的根因 */
.box-content .date + .line {
    margin-top: 2.4rem;
}

/* 时光胶囊的沙漏图标（对齐 v4 的 HourglassFull） */
.box-content .capsule-icon {
    font-size: 1.25rem;
    margin-right: 8px;
    opacity: 0.9;
}

/* 进度条：.progress / .progress-bar 的 flex 布局原本由 bootstrap 提供，
   bootstrap 移除后只剩 style.css 里的颜色，条子就变形成一条细线。
   这里补回基座布局，并给轨道一个可见底色（v4 的 el-progress 是 #00000020）。 */
#box .progress {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 20px;
    overflow: hidden;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.18) !important;
    backdrop-filter: blur(5px);
}

#box .progress .progress-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
    white-space: nowrap;
    text-align: center;
    transition: width 0.6s ease;
}

.box-content .date-text {
    margin: 0.8rem 0 0.4rem 0;
    font-size: 0.95rem;
}

/* 时光胶囊每条之间的呼吸感（v4 靠 .item-title 的 margin，这里落在 .item 上） */
.box-content .item + .item {
    margin-top: 0.6rem;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

/* 盒子里空间比旧版侧栏宽裕，52px 的纯文字卡显得空；
   改成和网站列表同构（图标 + 文字），高度给到 60px */
.link-grid .link-card {
    height: 60px;
    gap: 8px;
}

.link-grid .link-card i {
    font-size: 1.1rem;
    opacity: 0.9;
}

.link-grid .link-name {
    font-size: 0.95rem;
}

.aplayer-wrap {
    margin-top: 1.6rem;
}

/* style.css 的 .aplayer 是 width:100% + margin-right:18px（旧版靠外层留白吸收），
   放进盒子里会横向溢出，这里复位 */
#aplayer .aplayer {
    width: 100% !important;
    margin-right: 0 !important;
}

#aplayer {
    border-radius: 6px;
    overflow: hidden;
    /* 无歌单时会显示很长的操作提示，强制折行 */
    word-break: break-all;
    font-size: 0.88rem;
    line-height: 1.6;
    opacity: 0.85;
}

/* ============ 设置面板（全屏，v4 的 MoreSet） ============ */
#more {
    display: none;
}

/* 遮罩层只负责铺满 + 压暗 + 模糊（与 v4 的 .more 一致：#00000080 + blur 20px）。
   面板 .set-all 自己 absolute 居中，所以这里不能有 padding，
   否则 .set-all 的 top/left:50% 会以 padding box 为基准而偏移。 */
#more.open {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    right: auto;
    bottom: auto;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    z-index: 999;
    animation: fade 0.3s;
}

/* v4 的 MoreSet 是「遮罩 + 居中浮层」：遮罩由 #more.open 负责，
   面板本身是 .set（80%x80%、圆角 6px、padding 40px、居中）。
   底色比 v4 的 40% 白更沉一档，否则叠在深色壁纸上白字对比不足。 */
.set-all {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    /* 用 auto + max-height：内容少时面板贴合内容（否则固定 80% 会只占上半页），
       内容多时封顶 88% 并内部滚动 */
    height: auto;
    max-height: 88%;
    max-width: 1100px;
    padding: 40px;
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
    background-color: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    overflow-y: auto;
    animation: fade 0.3s;
}


/* 44% + 56% + gap(40px) 会超过 100%，右栏设置项右侧被裁。
   用 flex-grow 按 44:56 分配剩余空间（扣掉 gap 之后）才不溢出。 */
.set-left {
    flex: 44 1 0;
    min-width: 0;
    width: auto;
}

.set-right {
    flex: 56 1 0;
    min-width: 0;
    width: auto;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 24px 26px;
}

.set-left .img-title {
    font-family: "Pacifico-Regular", cursive;
    line-height: 1.2;
}

.set-left .img-title .img-title-big {
    font-size: 3.2rem;
}

.set-left .img-title .img-text {
    font-size: 1.1rem;
}

.upnote {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 1.6rem;
}

.upnote .uptext {
    font-size: 0.92rem;
    opacity: 0.85;
}

.set-right .line {
    margin: 0 0 1rem 0;
}

.set-right .line + .line {
    margin-top: 1.8rem;
}

.wallpaper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* style.css 给 .form-radio 写死 width/min-width/max-width:31.3% + flex:1 1 0%，
   放进新的 flex-wrap 容器后 4 个按钮会挤成 3+1 且宽度不齐，这里改成按内容自适应 */
.wallpaper .form-radio {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.wallpaper .form-radio label {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s;
}

.wallpaper .form-radio input:checked + label {
    background-color: rgba(255, 255, 255, 0.28);
}

.wallpaper .form-radio label:hover {
    background-color: rgba(0, 0, 0, 0.42);
}

.set-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.set-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.95rem;
}

.set-item input[type="checkbox"] {
    appearance: none;
    width: 42px;
    height: 22px;
    border-radius: 11px;
    background-color: rgba(255, 255, 255, 0.25);
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0;
}

.set-item input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.3s;
}

.set-item input[type="checkbox"]:checked {
    background-color: rgba(255, 255, 255, 0.55);
}

.set-item input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

.set-close {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.3s;
}

.set-close:hover {
    opacity: 1;
}

/* ============ 移动端底部菜单按钮 ============ */
#switchmenu {
    display: none;
}

/* v4 的 .menu：absolute + top:84% + calc(50% - 28px)，56x34（不是贴底） */
@media (max-width: 720px) {
    #switchmenu {
        display: flex;
        position: absolute;
        top: 84%;
        left: calc(50% - 28px);
        z-index: 10;
        animation: fade 0.5s;
    }

    #switchmenu .menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 34px;
        border-radius: 6px;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        transition: transform 0.3s;
    }

    #switchmenu .menu-button i {
        font-size: 1.15rem;
    }

    #switchmenu .menu-button:active {
        transform: scale(0.95);
    }
}

/* 禁 JS 时的提示条：原来靠 bootstrap 的 .fixed-top，bootstrap 移除后要自己定位 */
.noscript {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    font-size: 0.95rem;
}

/* ============ 页脚 ============ */
#footer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 46px;
    line-height: 46px;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
    word-break: keep-all;
    z-index: 2;
    /* 旧 style.css 的 footer 恒带 25% 黑 + blur(10px)，会让「底栏背景模糊」开关完全失效，
       这里把基线复位成透明，是否出背景只由 .blur 决定 */
    background: transparent;
    backdrop-filter: none;
    transition: background-color 0.3s, backdrop-filter 0.3s;
}

#footer.blur {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

#footer .power {
    animation: fade 0.3s;
    /* 版权串很长（Powered By … 备案号），必须给省略号，否则溢出屏幕边缘 */
    padding: 0 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#lrc {
    display: none;
    line-height: 46px;
}

#footer.show-lrc #lrc {
    display: block;
}

#footer.show-lrc .power {
    display: none;
}

/* ============ 加载动画 ============
   使用原有 loading.css 的那套（左右两块幕布 + 三层环 spinner），
   不在这里重写，避免两套动画互相覆盖。 */

/* ============ 响应式 ============ */
/* v4 global.scss 的 changeWidth：容器分 1200 / 1100 / 900 三档并居中 */
@media (max-width: 1280px) {
    #main .container {
        max-width: 1100px;
    }
}

@media (max-width: 992px) {
    #main .container {
        max-width: 900px;
    }
}

/* 1200 以下：收窄左右内边距（v4 的 @media (max-width: 1200px) { padding: 0 2vw }） */
@media (max-width: 1200px) {
    #main .container {
        padding: 0 2vw;
    }
}

/* 910 以下：一言/音乐收起，只留时间卡占满整行 */
@media (max-width: 910px) {
    .function {
        height: 165px;
    }

    .func-left {
        display: none;
    }

    .func-right {
        width: 100%;
    }

    .link-page {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 720 以下：左右互斥，靠底部菜单按钮切换 */
@media (max-width: 720px) {
    #main .container {
        height: 100vh;
    }

    #main .all {
        flex-direction: column;
        justify-content: flex-start;
        padding: 12vh 1rem 18vh;
        overflow-y: auto;
        gap: 2rem;
    }

    #main .left,
    #main .right {
        width: 100%;
        /* .all 这里已改成 flex-direction: column，
           桌面端的 flex:1 1 0 在纵向会变成「平分高度」，必须复位 */
        flex: none;
        min-width: 0;
        margin: 0;
        transform: none;
    }

    #main .left.hide,
    #main .right:not(.show) {
        display: none;
    }

    #main .left.show {
        display: block;
    }

    #main .right.show {
        display: flex;
    }

    .info .logo {
        max-width: 100%;
    }

    .info .logo-img {
        width: 100px;
        height: 100px;
    }

    .info .name .bg {
        font-size: 4.2rem;
    }

    .info .description,
    .social {
        max-width: 100%;
    }

    .info .description {
        margin-top: 2.2rem;
        pointer-events: none;
    }

    .social {
        justify-content: center;
    }

    .social .tip {
        display: none !important;
    }

    .social .link {
        justify-content: space-evenly;
        width: 90%;
    }

    #box {
        width: 100%;
        flex: none;
        min-width: 0;
        margin: 0;
        height: auto;
        max-height: none;
    }

    .link-page {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
    }

    /* 移动端卡片改为图标在上、文字在下（沿用旧 mobile.css 的观感） */
    .link-page .link-card {
        height: 80px;
        flex-direction: column;
        gap: 4px;
    }

    .link-page .link-card i {
        font-size: 1.25rem;
    }

    .link-page .link-name {
        font-size: 0.85rem;
    }

    .links .line {
        font-size: 0.95rem;
    }

    span.line-text,
    i.iconfont.icon-link {
        font-size: 1.05rem;
    }

    /* 移动端面板拉宽，内部改单列 */
    .set-all {
        width: 92%;
        height: auto;
        max-height: 88%;
        padding: 22px;
        flex-direction: column;
        gap: 24px;
        overflow-y: auto;
    }

    .set-left,
    .set-right {
        flex: none;
        width: 100%;
    }

    .set-left,
    .set-right {
        width: 100%;
    }

    #footer {
        font-size: 0.85rem;
    }
}

@media (max-width: 390px) {
    #main .all {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .link-page {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============ 动画 ============ */
/* v4 主内容入场：1.2 倍缩回原尺寸 */
@keyframes fade-blur-main-in {
    from {
        transform: scale(1.2);
    }

    to {
        transform: scale(1);
    }
}

@keyframes fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}
