/* ==========================================================================
   AI视界 · 移动端深色主题 V3「墨黑玻璃」
   深色玻璃表面 / 渐变细描边 / 单一主色 / 精准高光 / 克制动效
   ========================================================================== */

/* ---------------- 设计令牌 ---------------- */
:root {
    /* 背景与表面 */
    --bg: #04050a;
    --bg-2: #080a12;
    --surface: rgba(255, 255, 255, .032);
    --surface-solid: #0c0f18;
    --surface-2: rgba(255, 255, 255, .055);
    --surface-3: rgba(255, 255, 255, .09);
    --glass: rgba(13, 16, 26, .66);

    /* 描边 */
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .13);
    --edge: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 38%, rgba(139, 124, 255, .28));
    --edge-soft: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 45%, rgba(139, 124, 255, .16));

    /* 文字 */
    --text: #f4f6ff;
    --text-2: #a8b0c6;
    --text-3: #69718c;
    --muted: #69718c; /* 兼容旧写法 */

    /* 色彩 */
    --acc: #8b7cff;
    --acc-2: #4fd8ff;
    --gold: #f2c572;
    --success: #43e0a0;
    --warning: #f2c572;
    --danger: #ff6b8b;
    --ink: #0b0d16; /* 主按钮上的深色文字 */

    /* 渐变 */
    --grad: linear-gradient(135deg, #9d8bff, #5aa8ff 55%, #45d8ff);
    --grad-text: linear-gradient(100deg, #fff 8%, #b8c4ff 45%, #8b7cff 82%);
    --grad-soft: linear-gradient(135deg, rgba(139, 124, 255, .16), rgba(79, 216, 255, .06));

    /* 圆角 */
    --r-xl: 28px;
    --r-lg: 22px;
    --r-md: 18px;
    --r-sm: 13px;

    /* 阴影 */
    --sh-1: 0 2px 10px rgba(0, 0, 0, .35);
    --sh-2: 0 18px 40px -26px rgba(0, 0, 0, 1);
    --glow: 0 16px 38px -18px rgba(139, 124, 255, .55);

    --ease: cubic-bezier(.22, .8, .3, 1);
    --tabbar-h: 60px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 氛围背景：两处微光 + 底部暗角，克制 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(760px 420px at 12% -10%, rgba(120, 100, 255, .13), transparent 60%),
        radial-gradient(620px 380px at 105% 4%, rgba(70, 190, 255, .07), transparent 58%),
        radial-gradient(900px 480px at 50% 118%, rgba(90, 80, 220, .07), transparent 62%);
}

/* 细噪点，提升质感 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; outline: none; border: none; background: none; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 0; height: 0; }
::selection { background: rgba(139, 124, 255, .4); color: #fff; }

/* ---------------- 布局骨架 ---------------- */
.app {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 30px);
}
.app.no-tabbar { padding-bottom: 26px; }

.page { padding: 0 16px; }

/* 内容分层入场 */
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.page > * { animation: rise .55s var(--ease) both; }
.page > *:nth-child(2) { animation-delay: .05s; }
.page > *:nth-child(3) { animation-delay: .1s; }
.page > *:nth-child(4) { animation-delay: .15s; }
.page > *:nth-child(5) { animation-delay: .2s; }
.page > *:nth-child(6) { animation-delay: .24s; }
.page > *:nth-child(7) { animation-delay: .28s; }
.page > *:nth-child(n+8) { animation-delay: .3s; }

/* ---------------- 顶栏 ---------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
    padding: 0 16px;
    background: rgba(4, 5, 10, .6);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, background .3s;
}
.topbar.scrolled {
    border-bottom-color: var(--line);
    background: rgba(4, 5, 10, .82);
}
.topbar .title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .3px;
}
.topbar .back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: -7px;
    border-radius: 11px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 17px;
    line-height: 1;
    padding-bottom: 3px;
    transition: transform .18s var(--ease), background .18s;
}
.topbar .back:active { transform: scale(.9); background: var(--surface-3); }
.topbar .spacer { flex: 1; }

.brand { display: flex; align-items: center; gap: 9px; }
.brand .logo {
    width: 32px; height: 32px;
    border-radius: 10px;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800; color: #fff;
    box-shadow: 0 6px 18px -6px rgba(120, 100, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .4);
    overflow: hidden;
}
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.brand .name { font-size: 16.5px; font-weight: 700; letter-spacing: .4px; }

/* ---------------- 底部导航（悬浮玻璃胶囊） ---------------- */
.tabbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(12px + var(--safe-bottom));
    width: calc(100% - 28px);
    max-width: 590px;
    height: var(--tabbar-h);
    display: flex;
    border-radius: 21px;
    background: rgba(11, 13, 22, .78);
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, .09);
    box-shadow:
        0 24px 50px -22px rgba(0, 0, 0, 1),
        inset 0 1px 0 rgba(255, 255, 255, .08);
    z-index: 100;
    overflow: hidden;
}
.tabbar a {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-3);
    font-size: 10.5px;
    transition: color .22s;
}
.tabbar a::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 42px;
    height: 30px;
    border-radius: 12px;
    background: var(--surface-3);
    border: 1px solid rgba(255, 255, 255, .1);
    opacity: 0;
    transform: translateX(-50%) scale(.5);
    transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.tabbar a.active::before { opacity: 1; transform: translateX(-50%) scale(1); }
.tabbar a svg {
    position: relative;
    z-index: 1;
    width: 22px; height: 22px;
    stroke-width: 1.75;
    transition: transform .3s var(--ease), color .25s;
}
.tabbar a .txt { position: relative; z-index: 1; transition: color .22s; }
.tabbar a:active svg { transform: scale(.86); }
.tabbar a.active { color: var(--text); }
.tabbar a.active svg { color: #cabdff; filter: drop-shadow(0 0 8px rgba(139, 124, 255, .8)); }
.tabbar a.active .txt { font-weight: 600; color: #fff; }

/* ---------------- 通用组件：玻璃卡片 ---------------- */
.card,
.list,
.stats,
.upload-zone,
.compare .item,
.video-card,
.quick a {
    position: relative;
    border-radius: var(--r-lg);
}

.card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .028), transparent 55%),
        var(--glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid transparent;
    background-clip: padding-box;
    border-radius: var(--r-lg);
    padding: 17px;
    box-shadow: var(--sh-2);
}
/* 渐变细描边：覆盖一层 edge */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--edge-soft);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.section { margin-top: 26px; }
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px;
}
.section-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .2px;
}
.section-head h2::before {
    content: "";
    width: 3.5px;
    height: 15px;
    border-radius: 2px;
    background: var(--grad);
    box-shadow: 0 0 12px rgba(139, 124, 255, .9);
}
.section-head .more {
    display: inline-flex;
    align-items: center;
    font-size: 12.5px;
    color: var(--text-3);
    transition: color .2s;
}
.section-head .more:active { color: var(--text-2); }

/* ---------------- 按钮：白色主 CTA ---------------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 47px;
    padding: 0 20px;
    border-radius: 15px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    transition: transform .16s var(--ease), opacity .16s, background .2s;
}
.btn:active { transform: scale(.97); opacity: .92; }
.btn-primary {
    background: linear-gradient(180deg, #ffffff, #dfe4f6);
    border-color: rgba(255, 255, 255, .6);
    color: var(--ink);
    box-shadow:
        0 14px 32px -14px rgba(160, 150, 255, .55),
        inset 0 1px 0 #fff;
}
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.btn-ghost { background: var(--surface-2); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 34px;
    padding: 0 15px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-2);
    font-size: 13.5px;
    white-space: nowrap;
    transition: .22s var(--ease);
}
.chip:active { transform: scale(.95); }
.chip.active {
    background: linear-gradient(180deg, #ffffff, #e2e6f5);
    border-color: rgba(255, 255, 255, .65);
    color: var(--ink);
    font-weight: 700;
    box-shadow: 0 10px 24px -12px rgba(160, 150, 255, .6);
}
.chips,
.style-pick {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 16px;
    margin-left: -16px;
    margin-right: -16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar,
.style-pick::-webkit-scrollbar { display: none; }
.style-pick { margin-top: 16px; }

.badge {
    display: inline-block;
    padding: 2.5px 8px;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 600;
    background: rgba(139, 124, 255, .14);
    color: #c3b8ff;
    border: 1px solid rgba(139, 124, 255, .2);
}
.badge-green { background: rgba(67, 224, 160, .1); color: #7ee8bf; border-color: rgba(67, 224, 160, .18); }
.badge-red { background: rgba(255, 107, 139, .1); color: #ffa3b8; border-color: rgba(255, 107, 139, .18); }
.badge-warn { background: rgba(242, 197, 114, .1); color: #f6d79a; border-color: rgba(242, 197, 114, .18); }

.empty {
    padding: 58px 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 13.5px;
}
.empty .ico {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: .5;
    filter: grayscale(.2);
}

/* ---------------- 首页 ---------------- */
.notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 11px 14px;
    border-radius: var(--r-sm);
    background: linear-gradient(90deg, rgba(242, 197, 114, .09), rgba(242, 197, 114, .03));
    border: 1px solid rgba(242, 197, 114, .16);
    font-size: 12.5px;
    color: #f0d6a2;
    overflow: hidden;
}
.notice .txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Hero：深色玻璃 + 光斑 + 渐变字 */
.hero {
    position: relative;
    display: block;
    margin-top: 16px;
    padding: 26px 22px 24px;
    border-radius: var(--r-xl);
    background:
        radial-gradient(130% 120% at 88% -12%, rgba(120, 100, 255, .34), transparent 52%),
        radial-gradient(110% 110% at 0% 110%, rgba(70, 200, 255, .12), transparent 50%),
        var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--sh-2);
    transition: transform .2s var(--ease);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--edge);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 2;
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute;
    width: 300px; height: 300px;
    right: -110px; top: -150px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: inset 0 0 80px rgba(139, 124, 255, .14);
    z-index: -1;
}
.hero:active { transform: scale(.985); }
.hero .hero-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4.5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 11px;
    font-weight: 600;
    color: #d5d9f5;
    backdrop-filter: blur(6px);
}
.hero h1 {
    position: relative;
    margin-top: 13px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .5px;
    line-height: 1.32;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p {
    position: relative;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--text-2);
}
.hero .hero-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 19px;
    height: 40px;
    padding: 0 19px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff, #e3e7f7);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 10px 26px -12px rgba(160, 150, 255, .7), inset 0 1px 0 #fff;
}

.quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 18px;
}
.quick a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 4px;
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    font-size: 11.5px;
    color: var(--text-2);
    box-shadow: var(--sh-2);
    transition: transform .16s var(--ease), border-color .2s, background .2s;
}
.quick a:active { transform: scale(.95); border-color: rgba(139, 124, 255, .4); background: var(--surface-2); }
.quick a .ico {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 13px;
    font-size: 19px;
    background: var(--surface-2);
    border: 1px solid var(--line);
}
.quick a:nth-child(1) .ico { background: linear-gradient(135deg, rgba(139, 124, 255, .3), rgba(139, 124, 255, .07)); border-color: rgba(139, 124, 255, .2); }
.quick a:nth-child(2) .ico { background: linear-gradient(135deg, rgba(79, 216, 255, .24), rgba(79, 216, 255, .05)); border-color: rgba(79, 216, 255, .18); }
.quick a:nth-child(3) .ico { background: linear-gradient(135deg, rgba(242, 197, 114, .22), rgba(242, 197, 114, .05)); border-color: rgba(242, 197, 114, .16); }
.quick a:nth-child(4) .ico { background: linear-gradient(135deg, rgba(255, 107, 139, .2), rgba(255, 107, 139, .05)); border-color: rgba(255, 107, 139, .16); }

/* 首页数据条 */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 14px;
    padding: 16px 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .024), transparent 60%),
        var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    box-shadow: var(--sh-2);
}
.stats .st { position: relative; text-align: center; }
.stats .st + .st::before {
    content: "";
    position: absolute;
    left: 0; top: 16%;
    width: 1px; height: 68%;
    background: linear-gradient(transparent, var(--line-2), transparent);
}
.stats .st .n {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .3px;
    font-variant-numeric: tabular-nums;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stats .st .l { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* ---------------- 视频卡片 ---------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.video-card {
    display: block;
    overflow: hidden;
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    box-shadow: var(--sh-2);
    transition: transform .2s var(--ease), border-color .2s;
}
.video-card:active { transform: scale(.975); border-color: rgba(139, 124, 255, .5); }
.video-card .thumb {
    position: relative;
    aspect-ratio: 3 / 4;
    background: var(--surface-solid);
    overflow: hidden;
}
.video-card .thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .55s var(--ease);
}
.video-card:active .thumb img { transform: scale(1.05); }
.video-card .thumb::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 52%;
    background: linear-gradient(transparent, rgba(3, 4, 8, .62));
    pointer-events: none;
}
.video-card .thumb .dur {
    position: absolute;
    z-index: 2;
    right: 7px; bottom: 7px;
    padding: 1.5px 7px;
    border-radius: 7px;
    background: rgba(5, 6, 11, .6);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 10.5px;
    color: #fff;
}
.video-card .thumb .play {
    position: absolute;
    z-index: 2;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(8, 10, 18, .4);
    border: 1.4px solid rgba(255, 255, 255, .66);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 13px;
    padding-left: 2px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .9);
}
.video-card .info { padding: 10px 11px 12px; }
.video-card .info h3 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: .1px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}
.video-card .info .meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    font-size: 10.5px;
    color: var(--text-3);
    overflow: hidden;
    white-space: nowrap;
}
.video-card .info .meta span:first-child { color: var(--text-2); }

.video-row {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    transition: opacity .18s;
}
.video-row:last-child { border-bottom: none; }
.video-row:active { opacity: .7; }
.video-row .thumb {
    position: relative;
    width: 116px; height: 70px;
    border-radius: 13px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface-solid);
}
.video-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-row .thumb .dur {
    position: absolute;
    right: 5px; bottom: 5px;
    padding: 0 5px;
    border-radius: 5px;
    background: rgba(5, 6, 11, .6);
    font-size: 10px;
    color: #fff;
}
.video-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.video-row .txt h3 {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.42;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-row .txt .meta {
    margin-top: 7px;
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    gap: 8px;
}

/* ---------------- 播放页 ---------------- */
.player-wrap {
    position: relative;
    margin: 0 -16px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 20px 44px -26px rgba(0, 0, 0, 1);
}
.player-wrap video { width: 100%; height: 100%; display: block; background: #000; }
.video-detail h1 {
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: .2px;
}
.video-detail .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 9px;
    font-size: 12px;
    color: var(--text-3);
}

/* ---------------- AI 页 ---------------- */
.upload-zone {
    margin-top: 16px;
    border-radius: var(--r-xl);
    border: 1.5px dashed rgba(139, 124, 255, .38);
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(120, 100, 255, .13), rgba(70, 200, 255, .03) 60%, transparent);
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    text-align: center;
    overflow: hidden;
    transition: border-color .25s, background .25s;
}
.upload-zone:active { border-color: rgba(139, 124, 255, .8); }
.upload-zone .up-ico {
    width: 66px; height: 66px;
    border-radius: 22px;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    box-shadow: 0 16px 34px -14px rgba(120, 100, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .4);
    margin-bottom: 15px;
    animation: floaty 3.4s ease-in-out infinite;
}
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.upload-zone h3 { font-size: 15.5px; font-weight: 700; letter-spacing: .2px; }
.upload-zone p { margin-top: 7px; font-size: 12.5px; color: var(--text-2); }
.upload-zone input[type=file] { display: none; }
.upload-zone .preview {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #07090f;
}
.upload-zone .preview-tip {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(3, 4, 8, .85));
    font-size: 12px;
    color: #fff;
}

.ai-progress { margin-top: 24px; text-align: center; }
.ai-progress .ring {
    position: relative;
    width: 84px; height: 84px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 3px solid rgba(139, 124, 255, .12);
    border-top-color: #a99aff;
    border-right-color: var(--acc-2);
    animation: spin .9s linear infinite;
    box-shadow: 0 0 36px -8px rgba(139, 124, 255, .7);
}
.ai-progress .ring::after {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .05);
    border-bottom-color: rgba(255, 255, 255, .4);
    animation: spin 1.7s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar {
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
    margin-top: 15px;
}
.progress-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--grad);
    border-radius: 99px;
    box-shadow: 0 0 14px rgba(139, 124, 255, .8);
    transition: width .35s var(--ease);
}

.compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}
.compare .item {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--sh-2);
}
.compare .item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.compare .item span {
    position: absolute;
    left: 8px; top: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(5, 6, 11, .55);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 11px;
    color: #fff;
}

/* ---------------- 列表 / 表单 ---------------- */
.list {
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .024), transparent 55%),
        var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    box-shadow: var(--sh-2);
}
.list-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    transition: background .18s;
}
.list-item:last-child { border-bottom: none; }
.list-item:active { background: rgba(255, 255, 255, .04); }
.list-item .ico {
    width: 36px; height: 36px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-soft);
    border: 1px solid rgba(139, 124, 255, .18);
    font-size: 16px;
    flex-shrink: 0;
}
.list-item .body { flex: 1; min-width: 0; }
.list-item .body .t { font-size: 14.5px; font-weight: 600; }
.list-item .body .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.list-item .arrow { color: var(--text-3); font-size: 15px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.input {
    width: 100%;
    height: 49px;
    padding: 0 15px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus {
    border-color: rgba(139, 124, 255, .7);
    box-shadow: 0 0 0 3.5px rgba(139, 124, 255, .13);
    background: rgba(255, 255, 255, .06);
}
textarea.input { height: auto; padding: 13px 15px; line-height: 1.6; resize: vertical; }
.input::placeholder { color: #565e75; }

/* ---------------- 钱包 / 订单 ---------------- */
.wallet {
    position: relative;
    padding: 22px;
    border-radius: var(--r-xl);
    background:
        radial-gradient(120% 140% at 92% -8%, rgba(120, 100, 255, .3), transparent 55%),
        radial-gradient(100% 120% at 0% 115%, rgba(70, 200, 255, .1), transparent 50%),
        #0a0d17;
    border: 1px solid rgba(139, 124, 255, .22);
    overflow: hidden;
    box-shadow: var(--sh-2);
}
.wallet::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(70% 90% at 100% 0%, rgba(139, 124, 255, .2), transparent 60%);
}
.wallet::after {
    content: "";
    position: absolute;
    width: 220px; height: 220px;
    right: -80px; bottom: -125px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .09);
}
.wallet .row { position: relative; z-index: 1; display: flex; gap: 20px; }
.wallet .row > div { flex: 1; min-width: 0; }
.wallet .lbl { font-size: 11.5px; color: rgba(255, 255, 255, .55); }
.wallet .val {
    font-size: 26px;
    font-weight: 800;
    margin-top: 4px;
    letter-spacing: .4px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 16px rgba(120, 100, 255, .45);
}
.wallet .val small { font-size: 13px; font-weight: 600; margin-left: 3px; }

.order-item { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.order-item:last-child { border-bottom: none; }
.order-item .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-item .top .t { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.order-item .bottom { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 9px; gap: 10px; }
.order-item .no { font-size: 11px; color: var(--text-3); line-height: 1.7; }
.order-item .price { font-size: 16px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }

.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.plan {
    position: relative;
    padding: 17px 12px;
    border-radius: var(--r-md);
    background: var(--surface-2);
    border: 1.5px solid var(--line);
    text-align: center;
    transition: .2s var(--ease);
}
.plan:active { transform: scale(.97); }
.plan.active {
    border-color: transparent;
    background:
        linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
        var(--edge) border-box;
    box-shadow: var(--glow);
}
.plan.active::after {
    content: "✓";
    position: absolute;
    top: 9px; left: 10px;
    width: 17px; height: 17px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-size: 9.5px;
    line-height: 17px;
    text-align: center;
    font-weight: 700;
}
.plan .tag {
    position: absolute;
    top: -9px; right: 9px;
    padding: 2px 9px;
    border-radius: 99px;
    background: linear-gradient(135deg, #ffb56b, #ff6b8b);
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(255, 130, 120, .8);
}
.plan .amt { font-size: 23px; font-weight: 800; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.plan .amt small { font-size: 12px; font-weight: 600; }
.plan .pts { margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.plan .bonus { margin-top: 5px; font-size: 11px; color: var(--success); }

.pay-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    border-radius: 15px;
    background: var(--surface-2);
    border: 1.5px solid var(--line);
    margin-bottom: 10px;
    transition: .2s var(--ease);
}
.pay-method:active { transform: scale(.985); }
.pay-method.active {
    border-color: transparent;
    background:
        linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
        var(--edge) border-box;
    box-shadow: var(--glow);
}
.pay-method .pic {
    width: 36px; height: 36px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 700; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.pay-method .nm { flex: 1; font-size: 14.5px; font-weight: 600; }
.pay-method .ck {
    width: 21px; height: 21px;
    border-radius: 50%;
    border: 1.5px solid var(--line-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: .2s;
}
.pay-method.active .ck {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(139, 124, 255, .9);
}

/* ---------------- 我的 ---------------- */
.profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-radius: var(--r-xl);
    background:
        radial-gradient(120% 130% at 88% -10%, rgba(120, 100, 255, .26), transparent 55%),
        var(--glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(139, 124, 255, .2);
    margin-top: 16px;
    overflow: hidden;
    box-shadow: var(--sh-2);
}
.profile::after {
    content: "";
    position: absolute;
    width: 180px; height: 180px;
    right: -75px; top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 124, 255, .22), transparent 70%);
}
.profile .avatar {
    position: relative;
    width: 64px; height: 64px;
    border-radius: 50%;
    padding: 2px;
    background: var(--grad);
    flex-shrink: 0;
    box-shadow: 0 10px 26px -10px rgba(120, 100, 255, .9);
}
.profile .avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #0a0c14;
}
.profile .info { position: relative; flex: 1; min-width: 0; }
.profile .info .nk { font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.profile .info .sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.profile > .btn { position: relative; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 15px; }
.stat-row .st { position: relative; text-align: center; padding: 3px 0; }
.stat-row .st .n {
    font-size: 21px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-row .st .l { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* ---------------- 登录 / 注册 ---------------- */
.auth-head { padding: 48px 20px 28px; text-align: center; }
.auth-head .logo {
    width: 70px; height: 70px;
    margin: 0 auto 18px;
    border-radius: 23px;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 31px;
    box-shadow: 0 22px 48px -18px rgba(120, 100, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.auth-head h1 { font-size: 23px; font-weight: 800; letter-spacing: .6px; }
.auth-head p { margin-top: 7px; font-size: 13px; color: var(--text-3); }
.auth-switch { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--text-3); }
.auth-switch a { color: #b3a6ff; font-weight: 600; }
.agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-3);
    margin: 4px 0 16px;
    line-height: 1.6;
}
.agree input { width: 16px; height: 16px; margin-top: 2px; accent-color: #8b7cff; }

/* ---------------- Toast / 弹层 ---------------- */
.toast {
    position: fixed;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%) scale(.88);
    z-index: 999;
    max-width: 78%;
    padding: 13px 21px;
    border-radius: 17px;
    background: rgba(17, 20, 32, .95);
    border: 1px solid var(--line-2);
    color: #fff;
    font-size: 14px;
    text-align: center;
    line-height: 1.65;
    opacity: 0;
    pointer-events: none;
    transition: .24s var(--ease);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 52px -22px rgba(0, 0, 0, 1);
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* 维护公告弹层 */
.notice-pop-mask {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(2, 3, 7, .66);
    backdrop-filter: blur(4px);
}
.notice-pop {
    z-index: 999;
    pointer-events: auto;
    max-width: 80%;
    padding: 20px 22px;
    line-height: 1.85;
    cursor: pointer;
    font-size: 13.5px;
    text-align: left;
    background: linear-gradient(160deg, rgba(26, 24, 56, .97), rgba(15, 18, 30, .97));
    border-color: rgba(139, 124, 255, .3);
}

.sheet-mask {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(2, 3, 7, .66);
    opacity: 0;
    pointer-events: none;
    transition: .25s;
    backdrop-filter: blur(4px);
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
    position: fixed;
    left: 50%; bottom: 0;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 640px;
    z-index: 901;
    padding: 20px 18px calc(22px + var(--safe-bottom));
    border-radius: 26px 26px 0 0;
    background: var(--bg-2);
    border-top: 1px solid var(--line-2);
    box-shadow: 0 -22px 54px -26px rgba(0, 0, 0, 1);
    transition: transform .3s var(--ease);
}
.sheet.show { transform: translate(-50%, 0); }
.sheet h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; text-align: center; }

.loading-inline { padding: 30px; text-align: center; color: var(--text-3); font-size: 13px; }

.skeleton {
    background: linear-gradient(90deg, var(--surface-solid) 25%, #141828 37%, var(--surface-solid) 63%);
    background-size: 400% 100%;
    animation: sk 1.3s ease infinite;
    border-radius: var(--r-sm);
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.flash-tip {
    margin-top: 14px;
    padding: 12px 15px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    line-height: 1.7;
    background: linear-gradient(135deg, rgba(139, 124, 255, .1), rgba(79, 216, 255, .04));
    border: 1px solid rgba(139, 124, 255, .2);
    color: #c8c0ff;
}

/* ---------------- 小说 / 漫画 ---------------- */
.novel-head {
    display: flex;
    gap: 15px;
    margin-top: 18px;
    padding: 16px;
    border-radius: var(--r-lg);
    background:
        radial-gradient(120% 130% at 90% -10%, rgba(120, 100, 255, .18), transparent 55%),
        var(--glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    box-shadow: var(--sh-2);
}
.novel-cover {
    width: 106px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--surface-solid);
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .9);
}
.novel-cover img { width: 100%; height: 100%; object-fit: cover; }
.novel-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.novel-info h1 {
    font-size: 18.5px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: .2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.novel-author { margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.novel-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-3);
}

/* 小说阅读页 */
.reader {
    max-width: 640px;
    margin: 0 auto;
    padding: 30px 22px 40px;
    background: linear-gradient(180deg, #0a0c13, #080a10);
    min-height: 100vh;
}
.reader-head h1 { font-size: 21px; font-weight: 800; letter-spacing: .3px; text-align: center; }
.reader-head p { margin-top: 8px; text-align: center; font-size: 12px; color: var(--text-3); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.reader-body { padding-top: 10px; }
.reader-body h2 {
    margin: 30px 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #cabdff;
    letter-spacing: .5px;
}
.reader-body h2.reader-end { color: var(--text-3); font-size: 12.5px; text-align: center; font-weight: 400; margin: 26px 0; }
.reader-body p {
    margin-top: 18px;
    font-size: 16.5px;
    line-height: 2.05;
    color: #cfd4e8;
    text-align: justify;
    text-indent: 0;
}
.reader-foot { margin-top: 40px; text-align: center; font-size: 12px; color: var(--text-3); letter-spacing: 4px; }

/* 漫画连页 */
.comic-pages { position: relative; }
.comic-pages img {
    width: 100%;
    border-radius: 13px;
    margin-bottom: 10px;
    background: var(--surface-solid);
    min-height: 120px;
}
.comic-page-no {
    display: block;
    text-align: right;
    margin: -22px 10px 6px 0;
    position: relative;
    z-index: 2;
    padding: 2px 9px;
    border-radius: 99px;
    background: rgba(5, 6, 11, .55);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 10.5px;
    color: #fff;
    width: fit-content;
    float: right;
}

/* ---------------- 无障碍 / 性能 ---------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
