/* ============================================================
   WinUI 3 / Fluent Design 主题 · 官网首页
   - 令牌与 changelog / help / feedback / boss 页保持一致
   - 浅色强调色 #00AAFF，深色 #005FB8
   - 深色文字整体压暗
   - 深色下隐藏背景视频，改由 body 底色承载
   ============================================================ */

/* ---------- 设计令牌：浅色 ---------- */
:root {
    --accent: #00AAFF;
    --accent-hover: #33BBFF;
    --accent-pressed: #0099E6;
    --text-on-accent: #1B1B1B;

    --bg: #F3F3F3;
    --bg-layer: rgba(252, 252, 252, 0.7);
    --card-bg: #FFFFFF;
    --card-hover: #F9F9F9;
    --card-pressed: #F1F1F1;
    --control-bg: rgba(255, 255, 255, 0.7);
    --control-hover: rgba(0, 0, 0, 0.037);
    --control-focus-bg: #FFFFFF;

    --text-primary: #1B1B1B;
    --text-secondary: #5D5D5D;
    --text-tertiary: #868686;

    --stroke: rgba(0, 0, 0, 0.0578);
    --stroke-strong: rgba(0, 0, 0, 0.16);

    --danger: #C42B1C;

    --status-active: #16A34A;
    --status-ended: #DC2626;

    --radius: 12px;
    --radius-sm: 6px;
    --radius-xs: 2px;

    --ease: cubic-bezier(0.2, 0, 0, 1);
    --dur: 150ms;
}

/* ---------- 设计令牌：深色 ---------- */
.dark {
    --accent: #005FB8;
    --accent-hover: #1A6FC4;
    --accent-pressed: #004C93;
    --text-on-accent: #FFFFFF;

    --bg: #202020;
    --bg-layer: rgba(44, 44, 44, 0.7);
    --card-bg: rgba(255, 255, 255, 0.0512);
    --card-hover: rgba(255, 255, 255, 0.0837);
    --card-pressed: rgba(255, 255, 255, 0.0326);
    --control-bg: rgba(255, 255, 255, 0.0605);
    --control-hover: rgba(255, 255, 255, 0.0837);
    --control-focus-bg: rgba(255, 255, 255, 0.0837);

    --text-primary: rgba(255, 255, 255, 0.85);
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-tertiary: rgba(255, 255, 255, 0.44);

    --stroke: rgba(255, 255, 255, 0.0698);
    --stroke-strong: rgba(255, 255, 255, 0.16);

    --danger: #D97A85;

    --status-active: #4ADE80;
    --status-ended: #F87171;

    color: var(--text-primary);
    background-color: var(--bg);
    background-image: none;
}
body.dark,
.dark body {
    background-color: var(--bg);
    background-image: none;
}

/* ---------- 基础重置 ---------- */
* {
    margin: 0;
    padding: 0;
    transition: height 0.2s, filter 0.1s;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

::selection {
    background: rgba(0, 170, 255, 0.3);
    color: inherit;
}
.dark ::selection {
    background: rgba(96, 205, 255, 0.3);
}

.gray {
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    filter: grayscale(100%);
}

html {
    scrollbar-width: none;
}

body {
    width: 100%;
    height: 100%;
    font-family: "Segoe UI Variable Text", "Segoe UI",
                 "Microsoft YaHei UI", "Microsoft YaHei",
                 "PingFang SC", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 50% 0,
            rgba(0, 170, 255, 0.07), rgba(0, 170, 255, 0) 70.71%),
        radial-gradient(circle at 6.7% 75%,
            rgba(0, 170, 255, 0.06), rgba(0, 170, 255, 0) 70.71%),
        radial-gradient(circle at 93.3% 75%,
            rgba(135, 100, 255, 0.05), rgba(135, 100, 255, 0) 70.71%);
    background-attachment: fixed;
    -ms-overflow-style: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@font-face {
    font-family: "fusion-pixel";
    src: url("/assets/FusionPixelMonoPatched.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

#bgm {
    display: none;
}

/* ---------- 深色遮罩（保留结构，不再叠加变暗） ---------- */
.dark::after {
    content: '';
    position: fixed;
    z-index: 99999;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    pointer-events: none;
}

/* ---------- 背景视频 ---------- */
.bg_video {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bg_brightness {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0;
    background: url(/assets/img/brightness.png) no-repeat right top;
    animation: opacity_scale 10s infinite linear;
}
/* 深色下隐藏背景视频，由 body 底色承载 */
.dark .bg_video,
.dark .bg_brightness {
    display: none;
}

@keyframes opacity_scale {
    0%   { opacity: .4; transform: translateY(0); }
    50%  { opacity: 0;  transform: translateY(-30px) scale(1.1); }
    100% { opacity: .4; transform: translateY(0); }
}

@-webkit-keyframes changeRight {
    0%   { -webkit-transform: rotate(0deg); }
    50%  { -webkit-transform: rotate(180deg); }
    100% { -webkit-transform: rotate(360deg); }
}
@keyframes changeRight {
    0%   { transform: rotate(0deg); }
    50%  { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

body::-webkit-scrollbar {
    display: none;
}

a {
    color: var(--accent);
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    text-decoration: none;
}
a:focus-visible,
.corner_button:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

h1 {
    font-weight: bold;
    line-height: 1.3;
    font-size: 24px;
}
h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
    font-weight: bold;
}
p {
    text-indent: 2em;
    margin: 5px 0;
}

/* ---------- 顶部导航 ---------- */
.header {
    z-index: 999;
    width: 100%;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    transition: all 0.2s;
    background: var(--bg-layer);
    transform: translateZ(0);
    overflow: hidden;
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    backdrop-filter: blur(30px) saturate(160%);
    border-bottom: 1px solid var(--stroke);
}
.site_title {
    line-height: 60px;
    font-size: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    margin-left: 6vw;
    font-weight: 600;
}
.title {
    margin-top: 10px;
    margin-left: 10px;
    margin-right: 10px;
    line-height: 170%;
}
.logo {
    height: 48px;
    margin: 6px;
    border-radius: var(--radius-sm);
    vertical-align: top;
    animation: changeRight 60s linear infinite;
}
.logo:hover {
    animation: changeRight 0.3s linear infinite;
}

.link a {
    display: inline-block;
    height: 60px;
    line-height: 60px;
}
.desktop {
    float: right;
    margin-right: 10%;
    font-size: 18px;
}
.desktop .menu_btn {
    display: none;
}
.desktop a {
    padding: 0 15px;
    transition: border-bottom 0.2s, background-color var(--dur) var(--ease);
    color: var(--text-primary);
}
.mobile {
    display: block;
    float: right;
    width: 100%;
    height: 300px;
    margin-top: -60px;
    line-height: 60px;
    font-size: 18px;
    text-align: center;
    overflow: hidden;
}
.mobile .menu_btn {
    float: right;
    margin-right: 10%;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s;
}
.mobile a {
    width: 100%;
    box-sizing: border-box;
}

/* ---------- 三栏布局 ---------- */
.container {
    overflow: hidden;
}
.feedback, .online_boss {
    height: calc(100vh - 60px);
    overflow: auto;
    float: left;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.main {
    padding-top: 60px;
    height: calc(100vh - 60px);
    overflow: auto;
    float: left;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.video {
    height: calc(100vh - 60px);
    overflow: auto;
    float: right;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.size1 .block, .size2 .block {
    overflow: auto;
}
.size1 .main  { padding-top: 60px; width: 50vw; }
.size2 .main  { padding: 0 20vw; padding-top: 60px; width: 60vw; }
.size3 .main  { padding: 0 10vw; padding-top: 60px; width: 80vw; height: auto; }
.size4 .main  { padding-top: 60px; width: 100vw; height: auto; }

.size1 .feedback, .size1 .online_boss { width: 30vw; }
.size1 .video                          { width: 20vw; }
.size2 .feedback, .size2 .online_boss { width: 50vw; }
.size2 .video                          { width: 50vw; }
.size3 .feedback, .size3 .online_boss, .size3 .video { padding: 0 10vw; width: 80vw; height: auto; }
.size4 .feedback, .size4 .online_boss, .size4 .video { width: 100vw; height: auto; }
.size1 .feedback, .size1 .online_boss, .size1 .video { padding-top: 60px; }

.cover {
    display: block;
    border-radius: var(--radius);
    margin: 2% auto;
}
.size1 .cover, .size2 .cover, .size3 .cover { width: 80%; }
.size4 .cover                                { width: 96%; }

/* ---------- 内容块 ---------- */
.block {
    margin: 10px;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--stroke);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: background-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}
.block img {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    border-radius: var(--radius);
}
/* 深色下游戏截图不反色，只轻微压暗，避免颜色失真 */
.dark .block img {
    filter: brightness(0.9);
}
.list {
    color: var(--text-primary);
    margin: 8px;
}

.donate_vip {
    background: linear-gradient(to right, #fc0, #f80);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.block .donate_vip img {
    display: inline-block;
    vertical-align: bottom;
    width: 16px;
    height: 16px;
}

b {
    font-weight: bold;
    color: var(--accent);
}
.block a {
    padding: 3px 5px;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

/* ---------- 页脚 ---------- */
.footer {
    background: #1A1C26;
    text-align: center;
}
.footer_inner {
    display: inline-block;
    padding: 30px 10px;
    line-height: 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}
.dark .footer {
    background: #16181F;
}
.dark .footer_inner {
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- 悬浮按钮 ---------- */
.corner_button {
    z-index: 999;
    position: fixed;
    right: 16px;
    bottom: 66px;
    width: 36px;
    height: 36px;
    line-height: 34px;
    box-sizing: border-box;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: background-color var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}
#theme {
    bottom: 111px;
}
#theme img {
    width: 60%;
    margin: 20%;
}
.dark #theme img {
    filter: invert(1.0);
}
.corner_button:active {
    transform: scale(0.92);
    background-color: var(--card-pressed);
}

/* ---------- 下载条 ---------- */
#downloadbar {
    z-index: 99999;
    position: fixed;
    bottom: 0;
    display: none;
    justify-content: space-between;
    height: 60px;
    width: 100%;
    border-top: 1px solid var(--stroke);
    background: var(--bg-layer);
    transform: translateZ(0);
    -webkit-backdrop-filter: blur(50px) saturate(160%);
    backdrop-filter: blur(50px) saturate(160%);
}
.down_title, .down_close {
    margin: auto 0;
}
.down_btn {
    margin: auto 0;
    height: 32px;
    border: 1px solid transparent;
    background: var(--accent);
    color: var(--text-on-accent);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-sm);
    padding: 2px 14px;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease);
}
.down_btn:hover {
    background: var(--accent-hover);
}
.down_btn:active {
    background: var(--accent-pressed);
}
.down_close {
    font-size: 20px;
    margin-right: 3%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ---------- 侧栏标题 ---------- */
.side_title {
    color: var(--accent);
    text-align: center;
    line-height: 1.5;
    margin-top: 10px;
    font-size: 18px;
    font-weight: 600;
}

/* ---------- 位图按钮（保留图片反色） ---------- */
._btn {
    width: calc(25% - 4px);
    height: 32px;
    background-image: url(/assets/img/btn.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    margin: 4px auto;
    transition: .2s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
}
._btn:after {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
    content: '';
    background-image: url(/assets/img/btn-hvr.png);
}
/* 位图按钮的深色适配：只能走 filter */
.dark ._btn {
    filter: invert(0.8);
}

/* ---------- 视频卡片 ---------- */
.aspect-ratio {
    width: calc(100% - 20px);
    margin: 10px;
    border-radius: var(--radius);
    transition: transform 0.2s;
    position: relative;
}
.aspect-ratio img {
    border-radius: var(--radius);
    width: 100%;
}
.aspect-ratio p {
    position: absolute;
    bottom: 4px;
    left: 0;
    width: calc(100% - 6px);
    margin: 0;
    padding: 3px;
    line-height: 14px;
    font-size: 14px;
    text-indent: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 反馈/活动列表 ---------- */
#feedbackTop, #feedback, #online_boss {
    width: calc(100% - 20px);
    margin: 5px 10px;
}
.singlelink {
    display: block;
    margin-bottom: 5px;
    border-radius: var(--radius);
    padding: 10px;
    line-height: 1.8;
    transition: transform 0.2s, background-color var(--dur) var(--ease);
    border: 1px solid var(--stroke);
    background: var(--card-bg);
}
.singlelink b {
    color: var(--accent);
}
.singlelink:active {
    transform: scale(0.98);
}

/* ---------- 弹出菜单 ---------- */
.btn_menu {
    position: absolute;
    z-index: 999;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--bg-layer);
    border: 1px solid var(--stroke-strong);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    backdrop-filter: blur(30px) saturate(160%);
}
.btn_menu ._btn {
    width: 80px;
}

/* ---------- 活动 BOSS 列表 ---------- */
.list, .middle {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 10px;
    padding: 8px;
    box-sizing: border-box;
    line-height: 1.7;
    font-size: 14px;
    border-radius: var(--radius);
}

.online_boss .list {
    background: var(--card-bg);
    border: 1px solid var(--stroke);
    transition: transform 0.2s, background-color var(--dur) var(--ease);
}
.online_boss p {
    text-indent: 0;
    margin: 0;
}
.online_boss p b {
    color: var(--text-primary);
}
.online_boss .title {
    text-align: center;
    font-size: 16px;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}
.online_boss .title strong {
    color: var(--danger);
}
.online_boss .desc {
    margin: 0;
    padding: 0 0 0 22px;
    font-size: 14px;
}
.online_boss .desc li div {
    color: var(--text-secondary);
    text-indent: 0;
}
.online_boss .right-box {
    float: right;
    margin-top: 2px;
    margin-right: 6px;
}
.online_boss .date {
    color: var(--text-tertiary);
}

/* ============================================================
   悬停态
   ============================================================ */
@media (any-hover: hover) {
    .main::-webkit-scrollbar,
    .feedback::-webkit-scrollbar,
    .online_boss::-webkit-scrollbar,
    .video::-webkit-scrollbar {
        width: 12px;
        background-color: transparent;
    }
    .main::-webkit-scrollbar-thumb,
    .feedback::-webkit-scrollbar-thumb,
    .online_boss::-webkit-scrollbar-thumb,
    .video::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border: 4px solid transparent;
        background-clip: padding-box;
        border-radius: 8px;
        transition: background 0.1s;
    }
    .main:hover::-webkit-scrollbar-thumb,
    .feedback:hover::-webkit-scrollbar-thumb,
    .online_boss:hover::-webkit-scrollbar-thumb,
    .video:hover::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.35);
        background-clip: padding-box;
        border-width: 3px;
    }
    .dark .main::-webkit-scrollbar-thumb,
    .dark .feedback::-webkit-scrollbar-thumb,
    .dark .online_boss::-webkit-scrollbar-thumb,
    .dark .video::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        background-clip: padding-box;
    }
    .dark .main:hover::-webkit-scrollbar-thumb,
    .dark .feedback:hover::-webkit-scrollbar-thumb,
    .dark .online_boss:hover::-webkit-scrollbar-thumb,
    .dark .video:hover::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.35);
        background-clip: padding-box;
    }

    ._btn:hover {
        background-image: url(/assets/img/btn-hvr.png);
    }
    .desktop a:hover {
        color: var(--accent);
        background: var(--control-hover);
        border-bottom: solid 3px var(--accent);
    }
    .mobile a:hover {
        color: var(--accent);
        background: var(--card-hover);
        border-bottom: solid 3px var(--accent);
    }
    .block a:hover {
        background: var(--control-hover);
    }
    .online_boss .list:hover {
        transform: scale(0.98);
        background: var(--card-hover);
    }
    .aspect-ratio:hover {
        transform: scale(0.98);
    }
    .down_btn:hover {
        background: var(--accent-hover);
    }
    .corner_button:hover {
        background: var(--card-hover);
    }
    .singlelink:hover {
        transform: scale(0.98);
        background: var(--card-hover);
        border-color: var(--stroke-strong);
    }
}

.desktop a:active {
    color: var(--danger);
    background: var(--card-pressed);
    border-bottom: solid 3px var(--danger);
}
.mobile a:active {
    color: var(--danger);
    background: var(--card-pressed);
    border-bottom: solid 3px var(--danger);
}
.block a:active {
    background: var(--card-pressed);
}
.corner_button:active {
    transform: scale(0.92);
    background: var(--card-pressed);
}
.singlelink:active {
    transform: scale(0.98);
}