/* ==========================================================
   吞食鱼吧 - 前台样式（海洋主题 · 日间/夜间双模式）
   通过 html[data-theme="dark"] 切换夜间主题，默认日间
   ========================================================== */

/* ---------- 主题变量 ---------- */
:root {
    --bg:        #e6f3f9;   /* 页面浅海蓝 */
    --bg-deep:   #cde9f2;
    --card:      #ffffff;
    --card-2:    #f2fafd;
    --text:      #1d2c3a;
    --muted:     #58707f;
    --border:    rgba(14, 90, 120, .14);
    --primary:   #0e7c86;
    --primary-2: #12a5ad;
    --deep:      #0b3d5c;
    --deep-2:    #07293f;
    --deep-3:    #031827;
    --accent:    #18b6a8;
    --gold:      #ffd166;
    --danger:    #e0503f;
    --shadow:     0 10px 30px rgba(7, 60, 90, .12);
    --shadow-lg:  0 18px 50px rgba(7, 40, 70, .22);
    --radius:    14px;
    --header-grad: linear-gradient(135deg, #082b46 0%, #0b4160 48%, #0e5d6e 100%);
    --wave-fill: #e6f3f9;   /* 波浪分隔色（与页面背景衔接） */
    --toggle-bg: rgba(255, 255, 255, .16);
    --notice-bg: linear-gradient(90deg, #fdf3d6, #fdeec9);
    --notice-tx: #7a5b12;
    --notice-bd: #f0dfae;
    --placeholder-1: linear-gradient(135deg, #073a5e 0%, #155e55 55%, #1f8a7a 100%);
    --placeholder-2: linear-gradient(135deg, #0d3a66 0%, #0f6885 50%, #2fb0c0 100%);
    --placeholder-3: linear-gradient(135deg, #332a68 0%, #1d4a8f 45%, #0f9d8a 100%);
}

html[data-theme="dark"] {
    --bg:        #060d13;
    --bg-deep:   #0a1a26;
    --card:      #0e2131;
    --card-2:    #12293c;
    --text:      #d9e8f0;
    --muted:     #85a0b2;
    --border:    rgba(130, 190, 220, .16);
    --primary:   #34c9bc;
    --primary-2: #4fd8cd;
    --deep:      #0a2e4a;
    --deep-2:    #061d30;
    --deep-3:    #030f1b;
    --accent:    #2ec4b6;
    --shadow:     0 10px 30px rgba(0, 0, 0, .4);
    --shadow-lg:  0 18px 50px rgba(0, 0, 0, .55);
    --header-grad: linear-gradient(135deg, #030f1b 0%, #07293f 50%, #0a3a4a 100%);
    --wave-fill: #060d13;
    --toggle-bg: rgba(255, 255, 255, .1);
    --notice-bg: linear-gradient(90deg, #2b2010, #38290f);
    --notice-tx: #e8c77a;
    --notice-bd: #4a3a18;
    --placeholder-1: linear-gradient(135deg, #04243d 0%, #0b3d36 55%, #126659 100%);
    --placeholder-2: linear-gradient(135deg, #082a4a 0%, #0a4d66 50%, #1d8fa0 100%);
    --placeholder-3: linear-gradient(135deg, #231c4d 0%, #14336b 45%, #0b7567 100%);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    /* 浅色海洋渐变底图 */
    background:
        radial-gradient(1100px 480px at 88% -8%, rgba(46, 196, 182, .12), transparent 60%),
        radial-gradient(900px 420px at 6% 12%, rgba(14, 124, 134, .10), transparent 55%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 34%);
    background-attachment: fixed;
    line-height: 1.7;
    transition: background .35s ease, color .35s ease;
}
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-2); }
img { max-width: 100%; display: block; }
::selection { background: rgba(46, 196, 182, .3); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 18px; }
.section { padding: 52px 0; }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(14, 124, 134, .35); border-radius: 6px; }

/* ---------- 顶部导航 ---------- */
.site-header {
    position: relative;
    background: var(--header-grad);
    color: #fff;
    box-shadow: 0 6px 24px rgba(3, 24, 39, .35);
    overflow: hidden;
}
/* 头部细碎光点 */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(2px 2px at 12% 30%, rgba(255,255,255,.5), transparent 55%),
        radial-gradient(2px 2px at 28% 66%, rgba(255,255,255,.35), transparent 55%),
        radial-gradient(1.5px 1.5px at 45% 22%, rgba(255,255,255,.45), transparent 55%),
        radial-gradient(2px 2px at 62% 70%, rgba(255,255,255,.3), transparent 55%),
        radial-gradient(1.5px 1.5px at 78% 34%, rgba(255,255,255,.4), transparent 55%),
        radial-gradient(2px 2px at 92% 62%, rgba(255,255,255,.35), transparent 55%);
    pointer-events: none;
}
.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}
.logo { display: flex; align-items: center; gap: 11px; color: #fff; }
.logo:hover { opacity: 1; }
.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 26px;
    border-radius: 50%;
    object-fit: contain;
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.35), rgba(255,255,255,.06) 70%);
    border: 1px solid rgba(255, 255, 255, .3);
    border: 1px solid rgba(255, 255, 255, .3);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3), inset 0 1px 2px rgba(255,255,255,.35);
    animation: logoFloat 3.4s ease-in-out infinite;
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.logo-text { font-size: 24px; font-weight: 800; letter-spacing: 3px; text-shadow: 0 3px 10px rgba(0, 0, 0, .4); }

.header-right { display: flex; align-items: center; gap: 12px; }

/* 汉堡菜单按钮：仅手机端（≤768px）显示 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
    transition: all .22s ease;
}
.nav-toggle:hover { background: rgba(255, 255, 255, .16); }
.nav-toggle-bar { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; transition: all .25s ease; }
.nav-toggle.open .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 登录 / 注册入口 */
.user-box { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.user-welcome { color: #dceff5; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-link {
    color: #dceff5;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    transition: all .22s ease;
}
.user-link:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.user-sep { color: rgba(255, 255, 255, .5); }

/* ---------- 语言切换 ---------- */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
    padding: 3px 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}
.lang-btn {
    color: rgba(255, 255, 255, .75);
    padding: 5px 9px;
    border-radius: 999px;
    transition: all .22s ease;
}
.lang-btn:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.lang-btn.active {
    color: #fff;
    background: var(--accent);
    font-weight: 600;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
}

.main-nav { display: flex; gap: 6px; flex-wrap: wrap; }
/* 账号区链接（后台/退出/登录/注册）默认隐藏，仅手机汉堡菜单内显示 */
.nav-extra { display: none; }
.nav-item {
    position: relative;
    color: #dceff5;
    padding: 9px 19px;
    border-radius: 999px;
    font-size: 15px;
    transition: all .22s ease;
}
.nav-item::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: translateX(-50%);
    transition: width .28s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .12); color: #fff; opacity: 1; }
.nav-item:hover::after { width: 55%; }
.nav-item.active { background: linear-gradient(135deg, rgba(24, 182, 168, .9), rgba(18, 165, 173, .85)); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.nav-item.active::after { width: 55%; }

/* 夜间模式切换按钮 */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .28);
    background: var(--toggle-bg);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s ease, background .2s ease, box-shadow .2s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}
.theme-toggle:hover { background: rgba(255, 255, 255, .28); transform: rotate(20deg); box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); }
.theme-toggle:active { transform: scale(.92); }

/* ---------- 顶部广告位 ---------- */
.ad-strip {
    background: color-mix(in srgb, var(--card) 92%, transparent);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    backdrop-filter: blur(4px);
}
.ad-items { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.ad-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(7, 60, 90, .08);
    transition: transform .22s ease, box-shadow .22s ease;
}
.ad-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); opacity: 1; }
.ad-item img { height: 80px; width: auto; object-fit: cover; }
.ad-empty {
    border: 2px dashed color-mix(in srgb, var(--primary) 45%, transparent);
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
    padding: 14px;
    letter-spacing: 8px;
    font-size: 14px;
    background: repeating-linear-gradient(45deg, var(--card), var(--card) 12px, var(--card-2) 12px, var(--card-2) 24px);
}

/* ---------- 公告条 ---------- */
.notice-bar {
    background: var(--notice-bg);
    border-bottom: 1px solid var(--notice-bd);
    color: var(--notice-tx);
    font-size: 14px;
}
.notice-bar .container { display: flex; align-items: center; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.notice-icon { font-size: 15px; }

/* ---------- 轮播（滚动大图） ---------- */
.carousel { position: relative; background: var(--deep-2); overflow: hidden; }
.carousel-viewport { position: relative; height: 440px; overflow: hidden; }
.carousel-track { position: relative; width: 100%; height: 100%; }
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease, visibility .9s ease;
}
.slide.active { opacity: 1; visibility: visible; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

/* 无图时的渐变色占位横幅 */
.slide-placeholder { background: var(--deep-2); }
.slide-placeholder:nth-child(1) { background: var(--placeholder-1); }
.slide-placeholder:nth-child(2) { background: var(--placeholder-2); }
.slide-placeholder:nth-child(3) { background: var(--placeholder-3); }
.slide-placeholder:nth-child(4) { background: var(--placeholder-1); }
.slide-placeholder:nth-child(5) { background: var(--placeholder-2); }

.slide-inner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(3, 20, 35, .18), rgba(3, 20, 35, .5));
    padding: 24px;
}
.slide-placeholder .slide-inner { background: transparent; }
.slide-content { color: #fff; max-width: 780px; }
.slide-content h2 {
    font-size: 46px;
    margin: 0 0 12px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .5);
    letter-spacing: 4px;
    font-weight: 800;
}
.slide-content p {
    font-size: 19px;
    margin: 0;
    opacity: .95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
.slide-more {
    display: inline-block;
    margin-top: 18px;
    padding: 8px 24px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 999px;
    font-size: 14px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(4px);
    transition: all .22s ease;
}
.slide-more:hover { background: rgba(255, 255, 255, .3); color: #fff; }

/* 轮播内的气泡与鱼群装饰 */
.bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.bubbles span {
    position: absolute;
    bottom: -50px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .06));
    animation: bubbleRise linear infinite;
}
.bubbles span:nth-child(1)  { left: 8%;  width: 16px; height: 16px; animation-duration: 9s;  animation-delay: 0s; }
.bubbles span:nth-child(2)  { left: 22%; width: 9px;  height: 9px;  animation-duration: 7s;  animation-delay: 1.4s; }
.bubbles span:nth-child(3)  { left: 35%; width: 22px; height: 22px; animation-duration: 11s; animation-delay: .6s; }
.bubbles span:nth-child(4)  { left: 47%; width: 7px;  height: 7px;  animation-duration: 6s;  animation-delay: 2.2s; }
.bubbles span:nth-child(5)  { left: 58%; width: 13px; height: 13px; animation-duration: 8s;  animation-delay: .2s; }
.bubbles span:nth-child(6)  { left: 70%; width: 18px; height: 18px; animation-duration: 10s; animation-delay: 1.8s; }
.bubbles span:nth-child(7)  { left: 83%; width: 8px;  height: 8px;  animation-duration: 6.5s; animation-delay: 3s; }
.bubbles span:nth-child(8)  { left: 92%; width: 14px; height: 14px; animation-duration: 8.5s; animation-delay: .9s; }
@keyframes bubbleRise {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    8%   { opacity: .75; }
    50%  { transform: translateY(-55vh) translateX(14px); opacity: .55; }
    100% { transform: translateY(-110vh) translateX(-10px); opacity: 0; }
}

.fish-deco { position: absolute; pointer-events: none; z-index: 1; opacity: .55; animation: fishSwim linear infinite; }
.fish-deco.f1 { top: 22%; font-size: 34px; animation-duration: 26s; }
.fish-deco.f2 { top: 62%; font-size: 24px; animation-duration: 34s; animation-delay: -8s; }
.fish-deco.f3 { top: 40%; font-size: 18px; animation-duration: 22s; animation-delay: -14s; }
@keyframes fishSwim {
    0%   { transform: translateX(-12vw) scaleX(1); }
    49%  { transform: translateX(112vw) scaleX(1); }
    50%  { transform: translateX(112vw) scaleX(-1); }
    100% { transform: translateX(-12vw) scaleX(-1); }
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: all .22s ease;
}
.carousel-arrow:hover { background: rgba(255, 255, 255, .38); transform: translateY(-50%) scale(1.08); }
.carousel-arrow.prev { left: 20px; }
.carousel-arrow.next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.dot {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .42);
    cursor: pointer;
    padding: 0;
    transition: all .25s ease;
}
.dot:hover { background: rgba(255, 255, 255, .7); }
.dot.active { background: var(--gold); width: 28px; border-radius: 8px; box-shadow: 0 0 10px rgba(255, 209, 102, .6); }

/* ---------- 波浪分隔（轮播 → 介绍） ---------- */
.wave-divider {
    position: relative;
    display: block;
    width: 100%;
    height: 70px;
    margin-top: -2px;
    z-index: 2;
}
.wave-divider svg { display: block; width: 100%; height: 100%; }
.wave-divider .wave-fill { fill: var(--wave-fill); }

/* ---------- 介绍区 ---------- */
.intro { background: transparent; position: relative; }
.intro-body {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 34px 38px;
    overflow: hidden;
    transition: background .35s ease, box-shadow .35s ease;
}
/* 卡片顶部海洋波纹装饰 */
.intro-body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--primary-2), var(--primary), var(--accent));
    background-size: 200% 100%;
    animation: waveSlide 8s linear infinite;
}
@keyframes waveSlide { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }
.intro-body::after {
    content: "🌊";
    position: absolute;
    right: 26px;
    top: 20px;
    font-size: 34px;
    opacity: .16;
    pointer-events: none;
}
.intro-body p { margin: 0 0 16px; color: var(--text); font-size: 16px; }
.intro-body p:last-child { margin-bottom: 0; }

.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 {
    margin: 0 0 12px;
    font-size: 30px;
    color: var(--deep);
    letter-spacing: 3px;
    text-shadow: 0 2px 0 rgba(255, 255, 255, .4);
    transition: color .35s ease;
}
html[data-theme="dark"] .section-head h2 { color: var(--accent); text-shadow: none; }
.section-line {
    display: block;
    width: 76px;
    height: 4px;
    margin: 0 auto;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary-2));
    box-shadow: 0 2px 8px rgba(46, 196, 182, .35);
}

/* ---------- 占位页 ---------- */
.placeholder-page {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 64px 30px;
    text-align: center;
    transition: background .35s ease;
}
.placeholder-fish { font-size: 76px; margin-bottom: 10px; animation: logoFloat 3.4s ease-in-out infinite; display: inline-block; }
.placeholder-page h2 { color: var(--deep); margin: 10px 0 14px; letter-spacing: 3px; }
html[data-theme="dark"] .placeholder-page h2 { color: var(--accent); }
.placeholder-page p { color: var(--muted); max-width: 560px; margin: 0 auto 14px; }

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #12a394);
    color: #fff;
    padding: 11px 30px;
    border-radius: 999px;
    font-size: 15px;
    box-shadow: 0 6px 16px rgba(24, 182, 168, .4);
    transition: all .22s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(24, 182, 168, .45); color: #fff; opacity: 1; }

/* ---------- 页脚 ---------- */
.site-footer {
    position: relative;
    margin-top: 20px;
    background: linear-gradient(180deg, var(--deep-2), var(--deep-3));
    color: #9fc3d4;
    text-align: center;
    padding: 34px 0 26px;
    font-size: 13px;
    overflow: hidden;
}
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(2px 2px at 15% 40%, rgba(255,255,255,.25), transparent 55%),
        radial-gradient(1.5px 1.5px at 40% 70%, rgba(255,255,255,.2), transparent 55%),
        radial-gradient(2px 2px at 68% 45%, rgba(255,255,255,.22), transparent 55%),
        radial-gradient(1.5px 1.5px at 90% 65%, rgba(255,255,255,.18), transparent 55%);
    pointer-events: none;
}
.site-footer .container { position: relative; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: #3ddad0; }
.icp { color: #6f95a8; }

/* ==========================================================
   移动端适配（平板 1024 / 手机 768 / 小屏手机 480）
   ========================================================== */

/* 平板及以下 */
@media (max-width: 1024px) {
    .carousel-viewport { height: 360px; }
}

/* 手机 */
@media (max-width: 768px) {
    /* iOS Safari 对 background-attachment: fixed 支持不佳，手机端改回随页面滚动 */
    body { background-attachment: scroll; }

    /* 顶部：第一行 = logo（左）+ 用户入口 + 主题切换 + 汉堡按钮（右）
       文字按钮（后台/退出/登录/注册）收进汉堡菜单，顶部只留图标与切换 */
    .header-inner { padding-top: 10px; padding-bottom: 10px; }
    .logo { flex: 0 0 auto; }
    .user-box { order: 2; margin-left: auto; margin-right: 6px; font-size: 0; gap: 4px; }
    .user-link { display: none !important; }
    .user-welcome { display: none !important; }
    .user-avatar { width: 30px; height: 30px; border-radius: 50%; }
    .user-chip { padding: 2px 4px; }
    .msg-bell { width: 30px; height: 30px; font-size: 15px; margin-right: 0; }
    .msg-badge { top: -2px; right: -3px; min-width: 15px; height: 15px; font-size: 10px; line-height: 15px; }
    .theme-toggle { order: 3; width: 32px; height: 32px; font-size: 14px; }
    .nav-toggle { order: 4; display: inline-flex; margin-left: 0; width: 34px; height: 34px; }
    .header-right { order: 0; width: auto; justify-content: flex-end; padding-top: 0; gap: 6px; }
    .lang-switch { order: 0; font-size: 11px; margin-left: 2px; padding: 2px; }
    .lang-btn { padding: 4px 6px; }

    /* 汉堡下拉内的账号区（后台 / 退出 / 登录 / 注册） */
    .nav-extra {
        border-top: 1px solid rgba(255, 255, 255, .14);
        margin-top: 8px;
        padding-top: 8px;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    /* 手机端导航收进汉堡菜单：下拉面板（纵向），点击菜单项跳转 */
    .site-header { overflow: visible; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 2px;
        margin: 0;
        padding: 10px 16px 14px;
        background: var(--header-grad);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, .14);
        box-shadow: 0 18px 32px rgba(3, 24, 39, .45);
        overflow-y: auto;
        max-height: calc(100vh - 70px);
        z-index: 300;
    }
    .main-nav.open { display: flex; }
    .main-nav .nav-item {
        white-space: nowrap;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    .main-nav::-webkit-scrollbar { display: none; }

    /* 广告位 */
    .ad-strip { padding: 8px 0; }
    .ad-items { gap: 8px; }
    .ad-item img { height: 52px; }
    .ad-empty { letter-spacing: 4px; padding: 10px; font-size: 13px; }

    /* 公告 */
    .notice-bar .container { font-size: 13px; padding-top: 6px; padding-bottom: 6px; }

    /* 轮播 */
    .carousel-viewport { height: 250px; }
    .slide-content { padding: 0 12px; }
    .slide-content h2 { font-size: 24px; letter-spacing: 2px; }
    .slide-content p { font-size: 14px; }
    .slide-more { margin-top: 12px; padding: 6px 18px; font-size: 13px; }
    .carousel-arrow { width: 38px; height: 38px; font-size: 24px; }
    .carousel-arrow.prev { left: 12px; }
    .carousel-arrow.next { right: 12px; }
    .carousel-dots { bottom: 12px; }
    .dot { width: 9px; height: 9px; }
    .dot.active { width: 22px; }

    /* 波浪与介绍 */
    .wave-divider { height: 42px; }
    .section { padding: 34px 0; }
    .section-head { margin-bottom: 20px; }
    .section-head h2 { font-size: 22px; letter-spacing: 2px; }
    .intro-body { padding: 22px 18px; border-radius: 10px; }
    .intro-body p { font-size: 15px; margin-bottom: 12px; }
    .intro-body::after { right: 14px; top: 14px; font-size: 26px; }

    /* 占位页 */
    .placeholder-page { padding: 44px 18px; }
    .placeholder-fish { font-size: 60px; }
    .placeholder-page h2 { font-size: 20px; }
    .placeholder-page p { font-size: 14px; }

    /* 页脚 */
    .site-footer { padding: 26px 0 20px; font-size: 12px; }
    /* 刘海屏安全区 */
    .site-footer .container { padding-bottom: env(safe-area-inset-bottom); }
}

/* 小屏手机（≤480px） */
@media (max-width: 480px) {
    .logo-text { font-size: 20px; letter-spacing: 2px; }
    .logo-icon { width: 38px; height: 38px; font-size: 22px; }
    .main-nav .nav-item { padding: 10px 14px; font-size: 13px; }
    .theme-toggle { width: 32px; height: 32px; font-size: 14px; }
    .carousel-viewport { height: 210px; }
    .slide-content h2 { font-size: 20px; }
    .slide-content p { font-size: 13px; }
    .ad-item img { height: 44px; }
    .intro-body p { font-size: 14px; }
    .section-head h2 { font-size: 20px; }
}

/* ==========================================================
   登录 / 注册页
   ========================================================== */
.auth-page {
    min-height: 62vh;
    padding: 46px 16px;
}
.auth-box {
    max-width: 420px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 34px 30px;
    box-shadow: var(--shadow, 0 14px 34px rgba(7, 43, 66, .18));
    backdrop-filter: blur(6px);
}
.auth-title { text-align: center; margin-bottom: 22px; }
.auth-fish { width: 56px; height: 56px; display: block; margin: 0 auto 10px; border-radius: 50%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(13,110,140,.35)); }
.auth-title h1 { font-size: 24px; letter-spacing: 2px; color: var(--text); }
.auth-title p { font-size: 13px; color: var(--muted); margin-top: 6px; }

.auth-field { display: block; margin-bottom: 14px; }
.auth-field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.auth-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg, rgba(255, 255, 255, .8));
    color: var(--text);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.auth-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(24, 182, 168, .18);
}
/* 邮箱 + 发送验证码按钮行 */
.auth-code-row { display: flex; gap: 8px; }
.auth-code-row input { flex: 1; min-width: 0; }
.auth-code-btn {
    flex: none;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #0e9488);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s ease;
}
.auth-code-btn:hover:not(:disabled) { opacity: .9; }
.auth-code-btn:disabled { opacity: .55; cursor: not-allowed; }
.auth-code-tip { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; }
.auth-btn {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    font-size: 16px;
    letter-spacing: 6px;
    border: none;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), #12a394);
    box-shadow: 0 6px 16px rgba(24, 182, 168, .32);
    transition: all .22s ease;
}
.auth-btn:hover { opacity: .92; transform: translateY(-1px); }

.alert-box { padding: 11px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-box.error { background: #fdeeed; color: #b13b37; border: 1px solid #f4c7c4; }
.alert-box.ok { background: #e2f7f2; color: #0e8a7a; border: 1px solid #b8ebdf; }
.alert-box.ok a { color: #0b7a6c; font-weight: 700; }

.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 600; }

/* 登录/注册页 移动端微调 */
@media (max-width: 480px) {
    .auth-page { padding: 30px 12px; }
    .auth-box { padding: 26px 20px; }
}

/* 登录欢迎提示 */
.welcome-tip { margin-top: 14px; }
.welcome-tip .alert-box { margin-bottom: 0; }

/* 用户头像 */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #dceff5;
    padding: 3px 10px 3px 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    transition: all .22s ease;
}
.user-chip:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, .45);
}

/* 个人中心 */
.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(24, 182, 168, .45);
    box-shadow: 0 8px 20px rgba(7, 43, 66, .25);
    margin-bottom: 10px;
}
.profile-box .auth-title { margin-bottom: 18px; }

/* ================= 资源站 ================= */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-title { font-size: 26px; margin: 0 0 6px; color: var(--text); }
.page-sub { margin: 0; color: var(--muted); font-size: 13.5px; }

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 18px;
}
.resource-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .22s ease, box-shadow .22s ease;
}
.resource-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.res-cover { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-deep); }
.res-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.resource-card:hover .res-cover img { transform: scale(1.04); }
.res-cover-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 52px;
    background: linear-gradient(135deg, #0c6e8f, #0aa3a0);
}
.res-body { padding: 12px 14px 8px; flex: 1; }
.res-name { font-size: 15px; margin: 0 0 6px; line-height: 1.4; }
.res-name a { color: var(--text); text-decoration: none; }
.res-name a:hover { color: var(--accent); }
.res-intro {
    margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.res-links {
    border-top: 1px dashed var(--border);
    padding: 9px 12px;
    display: flex; flex-direction: column; gap: 6px;
}
.res-link {
    font-size: 12.5px; color: var(--accent); text-decoration: none;
    display: flex; gap: 6px; align-items: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res-link:hover { text-decoration: underline; }

/* 资源分区 */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.cat-tabs .mini-btn {
    display: inline-block; padding: 6px 14px; font-size: 13px; border-radius: 16px;
    text-decoration: none; color: var(--muted); border: 1px solid var(--border);
    background: var(--card); transition: all .2s ease;
}
.cat-tabs .mini-btn:hover { border-color: var(--accent); color: var(--accent); }
.cat-tabs .mini-btn.active {
    background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700;
}
.res-foot { border-top: 1px dashed var(--border); padding: 8px 12px; }
.res-cat {
    display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .5px;
    color: var(--accent); border: 1px solid var(--accent); border-radius: 10px; padding: 1px 8px;
}
.detail-cat { color: var(--accent); }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 26px 0 8px; }
.pager-info { font-size: 13px; color: var(--muted); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* 详情页 */
.crumb { margin-bottom: 14px; }
.crumb a { color: var(--accent); text-decoration: none; font-size: 13.5px; }
.detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: grid;
    grid-template-columns: minmax(0, 380px) 1fr;
    gap: 26px;
    box-shadow: var(--shadow);
}
.detail-gallery { min-width: 0; }
.detail-main {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-deep);
    border: 1px solid var(--border);
}
.detail-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.detail-main-empty {
    display: flex; align-items: center; justify-content: center;
    font-size: 72px; color: rgba(255, 255, 255, .35);
}
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail-thumbs img {
    width: 62px; height: 62px; object-fit: cover; border-radius: 8px;
    border: 2px solid var(--border); cursor: pointer; opacity: .72;
}
.detail-thumbs img.active, .detail-thumbs img:hover { opacity: 1; border-color: var(--accent); }
.detail-info { min-width: 0; }
.detail-name { font-size: 24px; margin: 0 0 10px; color: var(--text); }
.detail-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.detail-intro { font-size: 14px; line-height: 1.85; color: var(--text); margin-bottom: 20px; white-space: pre-line; }
.detail-links-title { font-size: 15px; margin: 0 0 10px; color: var(--text); }
.btn-download { margin-bottom: 10px; text-align: center; }

/* 上传页 */
.upload-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
.form-block { display: block; margin-bottom: 16px; }
.form-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.req { color: var(--danger); font-style: normal; }
.form-block input[type="text"],
.form-block input[type="url"],
.form-block textarea,
.link-row input {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-block input:focus, .form-block textarea:focus, .link-row input:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}
.form-block textarea { resize: vertical; }
.form-block input[type="file"] { font-size: 13px; }
.link-row { display: flex; gap: 8px; margin-bottom: 9px; }
.link-row input { flex: 1; }
.link-remove { flex-shrink: 0; }
.mt-24 { margin-top: 24px; }

/* 状态徽章（前台） */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}
.tag-on { background: rgba(16, 185, 129, .14); color: #10b981; }
.tag-wait { background: rgba(245, 158, 11, .16); color: #f59e0b; }
.tag-off { background: rgba(239, 68, 68, .14); color: #ef4444; }

/* 提示条 / 面板通用 */
.alert-box { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-box.ok { background: rgba(16, 185, 129, .12); color: #10b981; border: 1px solid rgba(16, 185, 129, .3); }
.alert-box.err { background: rgba(239, 68, 68, .12); color: #ef4444; border: 1px solid rgba(239, 68, 68, .3); }
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}
.panel-title { font-size: 16px; margin: 0 0 14px; color: var(--text); }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 10px 0 0; }
.data-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.data-table th, .data-table td { padding: 9px 10px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

@media (max-width: 767px) {
    .detail-card { grid-template-columns: 1fr; }
    .page-head { align-items: flex-start; flex-direction: column; }
}

/* ================= 头像 500×500 裁切 ================= */
.crop-area { margin-top: 14px; }
.crop-area.hidden { display: none; }
.crop-tip { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.crop-stage { display: flex; justify-content: center; }
.crop-box {
    position: relative;
    width: min(500px, 88vw);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 14px;
    border: 2px solid var(--accent);
    background: #0b2436;
    touch-action: none;
    cursor: grab;
    box-shadow: var(--shadow-lg);
}
.crop-box:active { cursor: grabbing; }
#cropImg {
    position: absolute;
    top: 0; left: 0;
    max-width: none !important;
    width: auto; height: auto;
    transform-origin: 0 0;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.crop-size {
    position: absolute;
    right: 10px; bottom: 10px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    pointer-events: none;
    letter-spacing: .5px;
}
.crop-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.crop-controls label { font-size: 13px; color: var(--text); }
.crop-controls input[type="range"] { width: 200px; accent-color: var(--accent); }

/* ================= 上传页：图片预览 + 链接行移动端加固 ================= */
.img-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.img-preview-empty { margin: 0; font-size: 12.5px; color: var(--muted); }
.img-preview-item {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    background: var(--bg-deep);
}
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-preview-del {
    position: absolute;
    top: 4px; right: 4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(239, 68, 68, .92);
    color: #fff;
    font-size: 14px;
    line-height: 21px;
    text-align: center;
    border: none;
    cursor: pointer;
    user-select: none;
}

/* 链接行：窄屏自动换行，移除按钮始终可见 */
.link-row { flex-wrap: wrap; }
.link-row input { flex: 1 1 180px; width: auto; min-width: 0; }
.link-remove { flex: 0 0 auto; }

/* ================= 手机端适配（资源站 / 上传 / 详情 / 个人中心） ================= */
@media (max-width: 767px) {
    .upload-panel, .detail-card, .panel { padding: 16px; }
    .crop-controls { flex-wrap: wrap; }
    .crop-controls input[type="range"] { flex: 1 1 100%; width: auto; margin: 4px 0; }
    .img-preview-item { width: 74px; height: 74px; }
}

@media (max-width: 600px) {
    /* 方形卡片：手机上一行两枚 */
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .res-body { padding: 10px 11px 6px; }
    .res-name { font-size: 13.5px; }
    .res-links { padding: 8px 10px; }
    .res-link { font-size: 12px; }
    /* 上传/添加按钮整行可点 */
    #addLinkBtn { width: 100%; }
    .page-head { flex-direction: column; align-items: stretch; }
    .page-head .btn { align-self: flex-start; }
    .detail-thumbs img { width: 52px; height: 52px; }
    .form-label { font-size: 13px; }
    .auth-box { padding: 20px 16px; }
}

/* ================= 消息中心 ================= */
.msg-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 2px;
    border-radius: 50%;
    font-size: 18px;
    text-decoration: none;
    transition: background .2s ease;
}
.msg-bell:hover { background: rgba(255, 255, 255, .14); }
.msg-bell-icon { line-height: 1; }
.msg-badge {
    position: absolute;
    top: 0;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(6, 35, 61, .9);
}

.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--card, var(--glass));
    border: 1px solid var(--border);
    transition: border-color .2s ease;
}
.msg-item.unread { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--card, var(--glass))); }
.msg-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}
.msg-body { flex: 1; min-width: 0; }
.msg-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-title-text { font-size: 15px; font-weight: 600; color: var(--text); }
.msg-tag {
    font-size: 11.5px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .12);
    color: var(--muted);
}
.msg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}
.msg-content {
    margin: 7px 0 6px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--muted);
    word-break: break-word;
}
.msg-time { font-size: 12px; color: var(--muted); opacity: .75; }
.msg-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.msg-empty {
    text-align: center;
    padding: 46px 20px;
}
.msg-empty p { margin: 0 0 8px; font-size: 16px; color: var(--text); }
.msg-empty span { font-size: 13px; color: var(--muted); }

@media (max-width: 600px) {
    .msg-item { flex-wrap: wrap; padding: 13px 14px; }
    .msg-actions { flex-direction: row; width: 100%; }
    .msg-actions form { flex: 1; }
    .msg-actions .btn { width: 100%; }
    .msg-bell { width: 32px; height: 32px; font-size: 16px; }
}

/* ================= 网站使用规则确认面板 ================= */
.rules-box {
    border: 1px dashed var(--accent);
    border-radius: 12px;
    padding: 14px;
    background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.rules-details { border-radius: 10px; }
.rules-summary {
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent);
    padding: 6px 2px;
    user-select: none;
}
.rules-content {
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    max-height: 380px;
    overflow-y: auto;
}
.rules-preamble { margin: 0 0 12px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.rules-chapter { margin: 12px 0 6px; font-size: 13.5px; color: var(--text); }
.rules-list { margin: 0 0 8px; padding-left: 20px; }
.rules-list li { font-size: 12.8px; line-height: 1.8; color: var(--muted); margin-bottom: 4px; }
.rules-agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.rules-agree input { margin-top: 2px; accent-color: var(--accent); }

@media (max-width: 600px) {
    .rules-box { padding: 12px; }
    .rules-content { padding: 12px; max-height: 300px; }
}

/* ================= 个人中心：我的资源 ================= */
.profile-res { margin-top: 18px; }
.my-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.my-tab {
    padding: 9px 16px;
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid transparent;
    transition: all .2s ease;
}
.my-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.my-tab-num {
    display: inline-block;
    min-width: 20px;
    padding: 0 5px;
    margin-left: 4px;
    border-radius: 10px;
    background: rgba(127, 127, 127, .25);
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}
.my-tab.active .my-tab-num { background: var(--accent); color: #fff; }
.my-empty { padding: 22px 4px; }
.my-list { display: flex; flex-direction: column; gap: 10px; }
.my-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-deep);
}
.my-row-main { flex: 1; min-width: 0; }
.my-row-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.my-row-name a { color: var(--text); text-decoration: none; }
.my-row-name a:hover { color: var(--accent); }
.my-row-time { margin: 5px 0 0; font-size: 12px; color: var(--muted); opacity: .8; }
.my-row-reason { margin: 5px 0 0; font-size: 12.5px; color: var(--danger, #ef4444); }
.my-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.reject-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.reject-chip {
    font-size: 11.5px;
    padding: 2px 8px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--danger, #ef4444) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger, #ef4444) 40%, transparent);
    color: var(--danger, #ef4444);
}
.reject-chips.small { margin-top: 3px; }
.hint.small { font-size: 12px; }

/* 编辑页：已上传图片移除 */
.img-edit-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.img-edit-item {
    position: relative;
    width: 104px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-deep);
}
.img-edit-item img { width: 100%; height: 104px; object-fit: cover; display: block; }
.img-edit-rm {
    display: block;
    font-size: 12px;
    color: var(--muted);
    padding: 5px 8px;
    border-top: 1px solid var(--border);
    background: var(--card, var(--glass));
}
.img-edit-rm input { accent-color: var(--danger, #ef4444); }

@media (max-width: 600px) {
    .my-row { flex-direction: column; align-items: stretch; }
    .my-row-actions { width: 100%; }
    .my-row-actions .btn { flex: 1; }
    .my-tab { padding: 8px 12px; font-size: 13px; }
    .img-edit-item { width: 88px; }
    .img-edit-item img { height: 88px; }
}

/* ================= 公告栏 ================= */
.ann-board { padding-top: 8px; }
.ann-list { display: flex; flex-direction: column; gap: 10px; }
.ann-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 18px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px rgba(3, 24, 39, .12);
    transition: all .22s ease;
}
.ann-item:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    box-shadow: 0 10px 26px rgba(3, 24, 39, .18);
    transform: translateY(-1px);
}
.ann-flag { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ann-title { font-size: 15px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-badge {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #fff;
    box-shadow: 0 3px 10px rgba(225, 29, 72, .35);
}
.ann-excerpt { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-time { font-size: 12px; color: var(--muted); opacity: .85; }

/* 公告详情页 */
.ann-detail { padding: 26px 28px; }
.ann-detail-head { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 18px; }
.ann-detail-head h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; color: var(--text); flex-wrap: wrap; }
.ann-detail-time { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ann-detail-body { font-size: 15px; line-height: 1.9; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.ann-detail-back { margin-top: 22px; }

@media (max-width: 480px) {
    .ann-item { padding: 12px 14px; }
    .ann-title { font-size: 14px; }
    .ann-detail { padding: 18px 16px; }
    .ann-detail-head h2 { font-size: 18px; }
    .ann-detail-body { font-size: 14px; }
}

/* 资源站置顶徽章 */
.res-sticky { display: inline-block; margin-right: 4px; }
.res-name { display: flex; align-items: center; flex-wrap: wrap; }

/* ================= 首页后台管理面板（仅 admin / reviewer 可见） ================= */
.admin-panel-card { padding-top: 8px; }
.admin-panel-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px 26px;
    border-radius: 16px;
    background: linear-gradient(120deg,
        color-mix(in srgb, var(--accent) 14%, var(--glass)),
        color-mix(in srgb, var(--accent) 5%, var(--glass)));
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 22px rgba(3, 24, 39, .16);
}
.admin-panel-txt { flex: 1; min-width: 240px; }
.admin-panel-txt h2 { margin: 0 0 8px; font-size: 19px; color: var(--text); }
.admin-panel-txt p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.admin-panel-btn { flex-shrink: 0; }

@media (max-width: 560px) {
    .admin-panel-card-inner { padding: 18px; flex-direction: column; align-items: flex-start; }
    .admin-panel-txt h2 { font-size: 17px; }
    .admin-panel-btn { width: 100%; text-align: center; }
}

/* ---------- 小游戏页 ---------- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}
.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    padding: 26px 20px 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.game-card-icon {
    font-size: 46px;
    line-height: 1;
    filter: drop-shadow(0 4px 10px rgba(14, 124, 134, .35));
    transition: transform .2s ease;
}
.game-card:hover .game-card-icon { transform: scale(1.12) rotate(-6deg); }
.game-card-name { font-size: 18px; font-weight: 700; color: var(--text); }
.game-card-desc { font-size: 13px; color: var(--muted); line-height: 1.6; min-height: 40px; }
.game-card-play {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(24, 182, 168, .1);
    padding: 6px 16px;
    border-radius: 18px;
    border: 1px solid rgba(24, 182, 168, .3);
    transition: background .2s ease, color .2s ease;
}
.game-card:hover .game-card-play { background: var(--primary); color: #fff; }
@media (max-width: 560px) {
    .game-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .game-card { padding: 18px 14px 16px; }
    .game-card-icon { font-size: 36px; }
    .game-card-desc { font-size: 12px; }
}

/* ---------- 聊天室 ---------- */
.chat-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 860px;
    margin: 0 auto;
}
.chat-msgs {
    height: 520px;
    overflow-y: auto;
    padding: 18px 18px 10px;
    background:
        radial-gradient(900px 400px at 90% -10%, rgba(46, 196, 182, .06), transparent 60%),
        var(--card-2);
    scroll-behavior: smooth;
}
.chat-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: flex-start;
}
/* 自己的消息：头像在右、气泡在左（微信/QQ 风格） */
.chat-msg.own {
    flex-direction: row-reverse;
    justify-content: flex-start;
}
.chat-msg.own .chat-avatar { order: 2; }
.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    border: 2px solid rgba(24, 182, 168, .25);
    background: #fff;
}
.chat-bubble {
    max-width: 72%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px 14px 14px 4px;
    padding: 8px 13px;
    box-shadow: 0 2px 8px rgba(7, 60, 90, .06);
}
.chat-msg.own .chat-bubble {
    background: linear-gradient(180deg, rgba(24, 182, 168, .22), rgba(24, 182, 168, .13));
    border-color: rgba(24, 182, 168, .4);
    border-radius: 14px 14px 4px 14px;
}
}
.chat-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.chat-name { font-size: 13px; font-weight: 700; color: var(--primary); }
.chat-name.role-admin { color: #e05c4f; }
.chat-name.role-reviewer { color: #d99c42; }
.role-tag {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    line-height: 1.5;
}
.role-tag-admin { color: #c0301f; background: rgba(224, 92, 79, .12); border: 1px solid rgba(224, 92, 79, .35); }
.role-tag-reviewer { color: #a5711c; background: rgba(217, 156, 66, .12); border: 1px solid rgba(217, 156, 66, .35); }
.chat-time { font-size: 11px; color: var(--muted); margin-left: auto; }
.chat-text {
    font-size: 15px;
    color: var(--text);
    line-height: 1.65;
    word-break: break-word;
    white-space: pre-wrap;
}
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: var(--card);
}
.chat-me {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(24, 182, 168, .1);
    border: 1px solid rgba(24, 182, 168, .3);
    padding: 7px 12px;
    border-radius: 18px;
    white-space: nowrap;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 9px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--card-2);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.chat-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(24, 182, 168, .18); }
.chat-send { flex: none; }
.chat-login-tip { margin: 0; font-size: 14px; color: var(--muted); padding: 4px 0; width: 100%; text-align: center; }
.chat-login-tip a { color: var(--primary); font-weight: 600; }
.chat-hint { max-width: 860px; margin: 12px auto 0; font-size: 12px; color: var(--muted); text-align: center; }
@media (max-width: 560px) {
    .chat-msgs { height: 68vh; padding: 12px 10px 6px; }
    .chat-bubble { max-width: 80%; }
    .chat-me { display: none; }
}

/* 资料待审核提示 */
.alert-box.info { background: #e8f2fd; color: #1e66a8; border: 1px solid #c4ddf4; }
