/* ============================================================
   RVCMOD Web 端样式
   基于 GUI style.css 复用核心变量和通用组件，追加 Web 端专用样式
   ============================================================ */

/* ============================================================
   核心 CSS 变量（从 GUI 复用）
   ============================================================ */
:root {
    --bg:            #f5f5f8;
    --bg-secondary:  #ffffff;
    --bg-card:       #ffffff;
    --bg-input:      #f0f0f5;
    --bg-hover:      #eeeef4;
    --accent:        #6c5ce7;
    --accent-hover:  #7f70f0;
    --accent-light:  rgba(108,92,231,0.10);
    --accent-glow:   rgba(108,92,231,0.25);
    --text:          #2d2d3a;
    --text-dim:      #8e8ea0;
    --text-light:    #b0b0c0;
    --border:        #e4e4ec;
    --border-light:  #ededf3;
    --success:       #00b894;
    --success-light: rgba(0,184,148,0.12);
    --warning:       #f39c12;
    --danger:        #e74c3c;
    --danger-hover:  #ff6b6b;
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.06);
    --shadow-md:     0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg:     0 8px 30px rgba(0,0,0,0.10);
    --radius:        8px;
    --radius-lg:     12px;
    --radius-xl:     16px;
    --transition:    0.2s ease;
}

/* ============================================================
   暗色模式变量（从 GUI 复用）
   ============================================================ */
body.dark-mode {
    --bg:            #0a0a0f;
    --bg-secondary:  #12121e;
    --bg-card:       #1a1a2e;
    --bg-input:      #14142a;
    --bg-hover:      #2a2a44;
    --text:          #e8e8f0;
    --text-dim:      #8888a8;
    --text-light:    #666688;
    --border:        #2e2e48;
    --border-light:  #2a2a42;
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.2);
    --shadow-md:     0 4px 12px rgba(0,0,0,0.25);
    --shadow-lg:     0 8px 30px rgba(0,0,0,0.3);
}

/* ============================================================
   基础重置与全局样式
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ============================================================
   通用组件 — 区块卡片（从 GUI 复用）
   ============================================================ */
.section-card {
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

body.dark-mode .section-card {
    background: rgba(26,26,46,0.6);
    border-color: rgba(46,46,72,0.8);
}

/* ============================================================
   通用组件 — 操作按钮（从 GUI 复用）
   ============================================================ */
.action-btn {
    padding: 9px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.action-btn.primary {
    background: var(--accent);
    color: #fff;
}
.action-btn.primary:hover { background: var(--accent-hover); }
.action-btn.secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}
.action-btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.danger {
    background: var(--danger);
    color: #fff;
}
.action-btn.danger:hover { background: var(--danger-hover); }
.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   通用组件 — 搜索输入框（从 GUI 复用）
   ============================================================ */
.search-input {
    flex: 1;
    max-width: 300px;
    padding: 8px 14px 8px 36px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238e8ea0' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 12px center;
    background-size: 14px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-light); }

/* 搜索框包裹（输入框+放大镜按钮） */
.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 320px;
}
.search-wrap .search-input {
    max-width: none;
    padding-right: 36px;
}
.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: color var(--transition);
}
.search-btn:hover { color: var(--accent); }

/* ============================================================
   通用组件 — 输入框（从 GUI 复用）
   ============================================================ */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="email"],
textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    outline: none;
}
select:focus { border-color: var(--accent); }

/* 字段行 */
.field-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}
.field-row label { font-size: 12px; color: var(--text-dim); font-weight: 500; }

/* ============================================================
   通用组件 — 模型网格（从 GUI 复用）
   ============================================================ */
.model-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    padding-bottom: 16px;
}

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
}
.model-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.model-card .cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-input);
}

.model-card .cover-placeholder {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    font-size: 28px;
    color: var(--text-light);
}

.model-card .card-info { padding: 8px 10px; }
.model-card .card-name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.model-card .card-price {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    text-align: center;
    margin-top: 2px;
}

.model-card .card-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.40);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    pointer-events: none;
}
.model-card:hover .card-overlay { opacity: 1; pointer-events: auto; }

body.dark-mode .model-card {
    background: var(--bg-card);
    border-color: var(--border);
}

/* ============================================================
   通用组件 — 弹出面板（从 GUI 复用）
   ============================================================ */
.popup-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 1999;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
}

.popup-panel {
    position: fixed;
    z-index: 2000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    min-width: 240px;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    animation: popupIn 0.15s ease;
    /* 默认居中 */
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.popup-panel.hidden { display: none; }

@keyframes popupIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.popup-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}
.popup-panel-header span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.popup-panel-close {
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}
.popup-panel-close:hover { color: var(--text); }

.popup-panel-body {
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

body.dark-mode .popup-panel {
    background: rgba(26,26,46,0.95);
}

/* Web 端通用弹窗提示 */
.web-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0,0,0,0.35);
}
.web-popup-overlay.hidden { display: none; }
.web-popup-panel {
    position: fixed;
    z-index: 3001;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    max-width: 90vw;
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    animation: popupIn 0.18s ease;
    overflow: hidden;
}
.web-popup-panel.hidden { display: none; }
body.dark-mode .web-popup-panel {
    background: rgba(26,26,46,0.95);
}

/* ============================================================
   登录页全屏布局 — 对齐 GUI .login-fullscreen 结构
   ============================================================ */
.login-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ededf3;
}

/* 左右两栏容器 */
.login-fs-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* 左侧区域 — 无背景色，继承 #ededf3，宽度 680px 对齐 GUI */
.login-fs-left {
    width: 680px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 全局 logo 渐变文字样式 */
.app-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 右侧外层容器 — 提供间距 */
.login-fs-right-wrap {
    flex: 1;
    padding: 10px 10px 10px 0;
    display: flex;
}

/* 右侧表单区 — 悬浮白色圆角面板 */
.login-fs-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 36px;
    background: var(--bg);
    overflow-y: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    position: relative;
}

/* 右侧面板上下装饰线 */
.login-fs-right::before,
.login-fs-right::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c0c0cc 30%, #c0c0cc 70%, transparent);
    pointer-events: none;
}
.login-fs-right::before { top: 139.5px; }
.login-fs-right::after { bottom: 139.5px; }

/* 隐藏右侧面板滚动条 */
.login-fs-right::-webkit-scrollbar { display: none; }
.login-fs-right { -ms-overflow-style: none; scrollbar-width: none; }

/* 登录面板 — 居中对齐，固定宽度 */
.login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 面板内输入框固定宽度 253px */
.login-fs-right .field-row {
    width: 253px;
}
.login-fs-right .field-row input {
    width: 253px;
}
.login-fs-right .verify-code-row {
    width: 253px;
}
.login-fs-right .checkbox-label {
    width: 253px;
}

/* 记住密码复选框 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    margin-bottom: 6px;
}
.checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    background: var(--bg-input);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}
.checkbox-label input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.checkbox-label input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 3.5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 1.2px 1.2px 0;
    transform: rotate(45deg);
}

/* 验证码行 */
.verify-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.verify-code-row input { flex: 1; min-width: 0; }

/* 获取验证码按钮 */
.verify-code-btn {
    flex-shrink: 0;
    width: 110px;
    padding: 8px 0;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.verify-code-btn:hover { background: var(--accent); color: #fff; }
.verify-code-btn.disabled {
    background: var(--border);
    border-color: var(--border);
    color: var(--text-dim);
    cursor: not-allowed;
    pointer-events: none;
}

/* 登录链接 */
.login-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 12px;
}
.login-link {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition);
}
.login-link:hover { color: var(--accent-hover); text-decoration: underline; }
.login-link-divider { color: var(--text-light); user-select: none; }

/* 错误提示 — 固定占位，不影响布局 */
.error-text {
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
    text-align: center;
    min-height: 18px;
}

/* 加载状态按钮 */
.loading-state {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.loading-state::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 16px; height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* 暗色模式 — 登录页适配（左侧无紫色背景，跟随整体暗色） */
body.dark-mode .login-fullscreen {
    background: #0a0a0f;
}
body.dark-mode .login-fs-right {
    background: var(--bg);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
body.dark-mode .login-fs-right::before,
body.dark-mode .login-fs-right::after {
    background: linear-gradient(90deg, transparent, #3a3a50 30%, #3a3a50 70%, transparent);
}
body.dark-mode .verify-code-btn.disabled {
    background: var(--border);
    border-color: var(--border);
    color: var(--text-dim);
}

/* ============================================================
   Web 端专用 — 页面容器
   ============================================================ */
.web-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   Web 端专用 — 顶部导航栏
   ============================================================ */
.web-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.web-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 导航左侧 — 品牌 */
.web-nav-brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

/* 导航中间 — 链接 */
.web-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}
.web-nav-links a {
    font-size: 16px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}
.web-nav-links a:hover,
.web-nav-links a.active {
    color: var(--accent);
}
.web-nav-links a.active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: -4px;
    width: 20px; height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transform: translateX(-50%);
}

/* 导航右侧 — 操作区 */
.web-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 日夜切换按钮 — SVG 图标切换（复用 GUI 结构） */
.theme-toggle {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
    position: relative;
}
.theme-toggle:hover { background: var(--accent-light); }

/* 隐藏 checkbox */
.theme-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* 图标容器 */
.theme-toggle .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: color var(--transition);
}
.theme-toggle:hover .icon { color: var(--accent); }

/* 默认：显示月亮，隐藏太阳 */
.theme-toggle .icon--moon { display: flex; }
.theme-toggle .icon--sun  { display: none; }

/* 选中（暗色模式）：隐藏月亮，显示太阳 */
.theme-toggle-input:checked ~ .icon--moon { display: none; }
.theme-toggle-input:checked ~ .icon--sun  { display: flex; }

/* 导航登录/用户按钮 */
.nav-login-btn {
    padding: 6px 18px;
    border: 1.5px solid var(--accent);
    border-radius: 20px;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}
.nav-login-btn:hover { background: var(--accent); color: #fff; text-decoration: none; }

.nav-user-info {
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
}

/* 暗色模式 — 导航栏 */
body.dark-mode .web-nav {
    background: rgba(10,10,15,0.92);
    border-bottom-color: var(--border);
}

/* ============================================================
   Web 端专用 — 首页英雄区域
   ============================================================ */
.web-hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(108,92,231,0.06) 0%, transparent 100%);
}

.web-hero-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.web-hero-title .highlight {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.web-hero-desc {
    font-size: 16px;
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.web-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.web-hero-btn {
    padding: 12px 32px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.web-hero-btn.primary {
    background: var(--accent);
    color: #fff;
    border: none;
}
.web-hero-btn.primary:hover { background: var(--accent-hover); text-decoration: none; }
.web-hero-btn.secondary {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}
.web-hero-btn.secondary:hover { background: var(--accent-light); text-decoration: none; }

/* 特性卡片网格 */
.web-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 40px 0 60px;
}

.web-feature-card {
    padding: 24px;
    text-align: center;
}
.web-feature-card .icon {
    font-size: 32px;
    margin-bottom: 12px;
}
.web-feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}
.web-feature-card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ============================================================
   Web 端专用 — 页脚
   ============================================================ */
.web-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-light);
    padding: 12px 0;
}

.web-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.web-footer-brand {
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.web-footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
}
.web-footer-links a {
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    transition: color var(--transition);
}
.web-footer-links a:hover { color: var(--accent); }

.web-footer-copy {
    font-size: 12px;
    color: var(--text-light);
}

/* 页脚中间区域 — 放置操作按钮 */
.web-footer-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* 页脚三栏布局辅助 */
.web-footer-spacer {
    flex: 1;
}
.web-footer-left {
    flex: 1;
}
.web-footer-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}
.web-footer-right-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

body.dark-mode .web-footer {
    background: rgba(18,18,30,0.88);
    border-top-color: var(--border);
}

/* ============================================================
   Web 端专用 — 分页控件
   ============================================================ */
.web-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 0;
}

.web-pagination button,
.web-pagination .page-num {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.web-pagination button:hover,
.web-pagination .page-num:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.web-pagination .page-num.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.web-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.web-pagination .page-info {
    font-size: 12px;
    color: var(--text-dim);
    margin: 0 8px;
}

/* ============================================================
   Web 端专用 — 管理后台侧边栏
   ============================================================ */
.web-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px);
}

.web-sidebar-header {
    padding: 20px 16px 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}

.web-sidebar-menu {
    list-style: none;
    padding: 8px 0;
    flex: 1;
}

.web-sidebar-menu li {
    margin: 2px 8px;
}

.web-sidebar-menu a,
.web-sidebar-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.web-sidebar-menu a:hover,
.web-sidebar-menu button:hover {
    background: var(--accent-light);
    color: var(--accent);
    text-decoration: none;
}
.web-sidebar-menu a.active,
.web-sidebar-menu button.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.web-sidebar-menu .menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* 管理后台布局 */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.admin-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    min-width: 0;
}

body.dark-mode .web-sidebar {
    background: var(--bg-card);
    border-right-color: var(--border);
}

/* ============================================================
   通用工具类
   ============================================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* 空状态提示 */
.empty-hint {
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    padding: 48px 0;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: var(--accent-light);
    color: var(--accent);
}
.tag.success { background: var(--success-light); color: var(--success); }
.tag.warning { background: rgba(243,156,18,0.12); color: var(--warning); }
.tag.danger { background: rgba(231,76,60,0.12); color: var(--danger); }

/* 表格 */
.web-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.web-table th,
.web-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
.web-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--bg-input);
}
.web-table tr:hover td {
    background: var(--bg-hover);
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .model-grid { grid-template-columns: repeat(4, 1fr); }
    .web-features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .model-grid { grid-template-columns: repeat(3, 1fr); }
    .web-features { grid-template-columns: 1fr; }
    /* 登录页小屏适配 — 改为上下布局 */
    .login-fs-container { flex-direction: column; }
    .login-fs-left { width: 100%; height: 80px; flex-shrink: 0; }
    .login-fs-right-wrap { padding: 10px; }
    .web-hero-title { font-size: 28px; }
    .web-sidebar { width: 180px; }
    .web-footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
    .model-grid { grid-template-columns: repeat(2, 1fr); }
    .web-nav-links { display: none; }
    .web-sidebar { width: 60px; }
    .web-sidebar-menu a span,
    .web-sidebar-menu button span { display: none; }
}


/* ============================================================
   模型商城页 — 搜索与筛选栏
   ============================================================ */
.store-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0 16px;
    flex-wrap: wrap;
}

.tag-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-filter-btn {
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-card);
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}
.tag-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.tag-filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* 多级筛选栏 */
.store-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 0 16px;
}
.store-filter-bar .filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.store-filter-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
/* 筛选组之间的分隔线 */
.store-filter-bar .filter-group + .filter-group::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 18px;
    background: var(--border);
    margin-right: 4px;
}

/* 上传标签选择器 */
.upload-tag-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.upload-tag-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.upload-tag-row label {
    font-size: 12px;
    color: var(--text-dim);
    min-width: 48px;
}
.upload-tag-row .tag-filter-btn {
    font-size: 11px;
    padding: 3px 10px;
}

/* ============================================================
   模型详情弹窗 — GUI 风格卡片
   ============================================================ */
.detail-gui-panel {
    position: fixed;
    z-index: 2000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: stretch;
    animation: popupIn 0.18s ease;
}
.detail-gui-panel.hidden { display: none; }

.detail-gui-card {
    width: 1100px;
    height: 750px;
    max-width: 95vw;
    max-height: 90vh;
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
body.dark-mode .detail-gui-card {
    background: var(--bg);
}

/* 右侧操作按钮侧边栏 */
.detail-gui-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0 12px 10px;
    justify-content: flex-start;
}
.sidebar-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.15);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    align-self: center;
}
.sidebar-close-btn:hover {
    background: rgba(0,0,0,0.3);
}
.sidebar-btn:first-of-type {
    margin-top: auto;
}
.sidebar-btn:last-of-type {
    margin-bottom: auto;
}
.sidebar-btn {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 16px 10px;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 2px;
    transition: var(--transition);
}
.sidebar-btn.primary {
    background: var(--accent);
    color: #fff;
}
.sidebar-btn.primary:hover { background: var(--accent-hover); }
.sidebar-btn.primary:disabled { background: var(--border); color: var(--text-dim); cursor: default; }
.sidebar-btn.secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}
.sidebar-btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.sidebar-btn.secondary:disabled { color: var(--text-dim); cursor: default; }

/* 右侧购买卡片（与主卡片同高） */
.detail-buy-card {
    position: relative;
    width: 280px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-left: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.detail-buy-card .sidebar-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}
.buy-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.buy-view.hidden { display: none; }
.buy-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 4px 0 18px;
}
.buy-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}
.buy-field > label {
    font-size: 12px;
    color: var(--text-dim);
}
.buy-field > span {
    font-size: 14px;
    color: var(--text);
    word-break: break-all;
}
.buy-price {
    font-size: 20px !important;
    font-weight: 700;
    color: var(--accent);
}
.buy-pay-methods {
    display: flex;
    gap: 8px;
}
.buy-pay-btn {
    flex: 1;
    padding: 8px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.buy-pay-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(74, 144, 217, 0.08);
}
.buy-error {
    font-size: 12px;
    color: var(--danger, #e74c3c);
    min-height: 16px;
    margin-bottom: 8px;
}
.buy-action-btn {
    margin-top: 12px;
    padding: 12px 0;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.buy-action-btn:hover { background: var(--accent-hover); }
.buy-action-btn:disabled { background: var(--border); color: var(--text-dim); cursor: default; }
/* 返回态：次要样式 */
.buy-action-btn.is-back {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}
.buy-action-btn.is-back:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-input); }

/* 二维码区域（购买卡片中部，按钮上方）— 框/价格常驻，倒计时购买后才显示 */
.buy-qr-area {
    margin-top: 16px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 10px;
}
.buy-qr-box {
    position: relative;
    width: 180px;
    height: 180px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.buy-qr-box img, .buy-qr-box canvas { display: block; width: 160px !important; height: 160px !important; }
/* 购买前的二维码占位（未激活态）—— 干净白底 + 淡灰图标 */
.buy-qr-mask {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: #c2c8d0;
    padding: 12px;
    text-align: center;
}
.buy-qr-mask span {
    font-size: 12px;
    color: #9aa0a6;
    line-height: 1.4;
}
.buy-qr-mask.hidden { display: none; }

/* 价格 / 倒计时 */
.buy-qr-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}
.buy-qr-countdown {
    font-size: 13px;
    color: var(--text-dim);
}
.buy-qr-countdown.hidden { visibility: hidden; }
.buy-qr-countdown span { color: var(--danger, #e74c3c); font-weight: 600; }

/* 顶部栏 — 直接复制 GUI #topbar */
.dg-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    background: var(--bg);
    flex-shrink: 0;
    height: 48px;
}
.dg-topbar-left { display: flex; align-items: center; gap: 12px; }
.dg-logo {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* 标签页导航 — 直接复制 GUI #tab-nav + .tab-btn */
.dg-tabs {
    display: flex;
    justify-content: center;
    background: var(--bg);
    flex-shrink: 0;
    padding: 0;
    gap: 0;
}
.dg-tab {
    position: relative;
    padding: 12px 28px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    cursor: default;
}
.dg-tab::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2.5px;
    background: var(--accent);
    border-radius: 2px;
    transform: translateX(-50%);
}
.dg-tab.active {
    color: var(--accent);
    font-weight: 700;
}
.dg-tab.active::after {
    width: 24px;
}
.dg-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dg-username {
    font-size: 12px;
    color: var(--text-dim);
}

/* 爱心 Like 组件（来自 Uiverse.io by ilkhoeri，已适配） */
.like-tooltip {
    --bg: var(--bg-card);
    --cl: #e74c3c;
    --sz: 0.85rem;
    --sizer: 34px;
    --h-cnt: calc(var(--sz) * 2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.like-trigger {
    color: var(--cl);
    background: var(--bg);
    cursor: pointer;
    border-radius: 999px;
    padding: calc(var(--sz) / 2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    outline: none;
    box-shadow: rgba(95,95,115,0.15) 0px 2px 5px -1px;
    width: var(--sizer);
    min-width: var(--sizer);
    max-width: var(--sizer);
    height: var(--sizer);
    min-height: var(--sizer);
    max-height: var(--sizer);
}
.like-trigger .like-heart {
    width: 22px;
    height: 22px;
    transition: all 0.2s ease;
    color: var(--cl);
}
.like-trigger .like-heart .like-fill {
    opacity: 0;
    display: none;
}
.like-trigger:hover {
    --scale-1: 0.9;
    --scale-2: 0.8;
    animation: like-scaling 1s ease infinite;
}
.like-trigger:hover .like-heart {
    --scale-1: 1.3;
    --scale-2: 1.4;
    animation: like-scaling 1s ease infinite;
}
@keyframes like-scaling {
    0% { transform: scale(1); }
    20%,90% { transform: scale(var(--scale-1)); }
    50% { transform: scale(var(--scale-2)); }
}
.like-trigger .like-checkround {
    position: absolute;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--cl);
    scale: 1.1;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dashoffset: 162.6;
    stroke-dasharray: 0 330 158 134.6;
    rotate: 130deg;
    opacity: 0.6;
    z-index: -1;
    pointer-events: none;
}
.like-content {
    position: absolute;
    border-radius: 999px;
    top: calc(var(--h-cnt) * -0.75);
    font-size: 12px;
    padding: calc(var(--sz) / 4) calc(var(--sz) / 2);
    z-index: -1;
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: max-content;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0) translate(0, 200%);
    font-weight: 600;
    background-color: var(--cl);
    color: #fff;
}
.like-content::before {
    position: absolute;
    content: "";
    height: 0.8rem;
    width: 0.8rem;
    bottom: -0.15em;
    left: 50%;
    transform: translate(-50%) rotate(45deg);
    border-radius: 2px;
    z-index: -2;
    background-color: transparent;
}
.like-tooltip .like-trigger:hover + .like-content {
    top: calc(var(--h-cnt) * -1.25);
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    transform: scale(1) translate(0%, 0%);
}
.like-content span {
    --y-crease: 14px;
    position: relative;
    margin-left: 4px;
    height: var(--y-crease);
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    margin-bottom: -1px;
}
.like-content span::before,
.like-content span::after {
    line-height: 1.1;
    position: relative;
    transform: translateY(calc(var(--y-crease) / 2));
    transition: transform 0.5s ease;
    transition-delay: 0s;
}
.like-content span::before { content: attr(data-decrease); }
.like-content span::after { content: attr(data-increase); }

/* 收藏激活态 */
.like-trigger:focus .like-heart .like-fill,
.like-trigger.liked .like-heart .like-fill {
    display: unset;
    animation: like-filled 0.2s ease 1s forwards;
}
@keyframes like-filled { to { opacity: 0.3; } }
.like-trigger:focus + .like-content span::before,
.like-trigger:focus + .like-content span::after {
    transform: translateY(calc((var(--y-crease) / 2) * -1));
    transition-delay: 1s;
}
.like-trigger:focus .like-checkround {
    animation: like-stroke 0.9s linear forwards, like-checkhide 0.45s linear 0.9s forwards;
}
@keyframes like-stroke { to { stroke-dasharray: 0 163 158 134.6; } }
@keyframes like-checkhide { to { stroke: var(--bg); scale: 0; stroke-width: 0; opacity: 0; } }
/* 已收藏持久态 */
.like-trigger.liked .like-heart .like-fill {
    display: unset;
    opacity: 0.3;
}
/* 收藏计数（始终显示） */
.like-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--cl, #e74c3c);
    margin-left: 4px;
    min-width: 16px;
    text-align: center;
}

/* 主体布局 — 复制 GUI .home-layout：flex居中，gap 32px */
.dg-body {
    display: flex;
    gap: 32px;
    flex: 1;
    overflow: hidden;
    padding: 20px 28px 80px 28px;
    align-items: center;
    justify-content: center;
}
.dg-left {
    flex: 0 0 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dg-cover-container {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border);
    box-shadow: 0 0 30px var(--accent-glow, rgba(99,102,241,0.15));
    position: relative;
}
.dg-cover-spinner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}
.dg-cover-spinner.spinning {
    animation: coverSpin 8s linear infinite;
}
@keyframes coverSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.dg-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dg-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-dim);
    font-size: 14px;
}
.dg-right {
    flex: 0 1 420px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dg-info-card {
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
}
.dg-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.dg-info-item label {
    min-width: 56px;
    font-size: 12px;
    color: var(--text-dim);
    flex-shrink: 0;
    padding-top: 1px;
}
.dg-info-item span {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text);
    word-break: break-all;
}
.dg-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.detail-tag {
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(108,92,231,0.3);
    color: #fff;
    font-size: 11px;
}

/* 底部栏 — 与 GUI #bottom-bar 完全一致：悬浮效果 */
.dg-bottombar {
    display: flex;
    align-items: center;
    height: 56px;
    margin: 0 10px 10px 10px;
    padding: 0 20px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
}
body.dark-mode .dg-bottombar {
    background: rgba(18,18,30,0.88);
    backdrop-filter: blur(16px);
}
.dg-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.dg-bar-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg-input);
    flex-shrink: 0;
}
.dg-bar-thumb-ph {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 18px;
    flex-shrink: 0;
}
.dg-bar-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}
.dg-bar-sub {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.dg-bar-center {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.dg-bar-btn {
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 22px;
}
.dg-bar-btn-play {
    background: var(--accent);
    color: #fff;
    min-width: 90px;
    text-align: center;
    justify-content: center;
}
.dg-bar-btn-play:hover { background: var(--accent-hover); }
.dg-bar-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}
.dg-bar-icon-btn {
    width: 36px;
    height: 36px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(200, 200, 210);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition-duration: 0.3s;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.08);
    color: #fff;
}
.dg-bar-icon-btn:hover {
    background-color: rgb(180, 180, 195);
}
.dg-bar-icon-btn:active,
.dg-bar-icon-btn.playing {
    background-color: rgb(140, 140, 160);
    transform: scale(0.92);
}
body.dark-mode .dg-bar-icon-btn {
    background-color: rgb(60, 60, 80);
}
body.dark-mode .dg-bar-icon-btn:hover {
    background-color: rgb(80, 80, 100);
}
body.dark-mode .dg-bar-icon-btn:active,
body.dark-mode .dg-bar-icon-btn.playing {
    background-color: rgb(50, 50, 70);
}
.dg-bar-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 56px;
    font-size: 10px;
    color: var(--text-dim);
}

/* （爱心动画已整合到 Like 组件中） */

/* ============================================================
   评论区样式
   ============================================================ */
.comment-section { border-top: 1px solid var(--border-light); padding-top: 12px; }
.comment-section-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }

.comment-list { max-height: 200px; overflow-y: auto; margin-bottom: 12px; }

.comment-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}
.comment-item:last-child { border-bottom: none; }
.comment-user { font-size: 12px; font-weight: 600; color: var(--text); }
.comment-time { font-size: 11px; color: var(--text-light); margin-left: 8px; }
.comment-rating { font-size: 11px; color: var(--warning); margin-left: 8px; }
.comment-content { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

.comment-form { display: flex; flex-direction: column; gap: 8px; }
.comment-form textarea {
    width: 100%;
    min-height: 60px;
    resize: vertical;
}
.comment-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.comment-form-row label { font-size: 12px; color: var(--text-dim); }
.comment-form-row select { padding: 4px 8px; font-size: 12px; }

/* ============================================================
   上传页样式
   ============================================================ */
.upload-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 0;
}

.upload-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    background: var(--bg-card);
}
.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-light);
}
.upload-drop-zone .icon { font-size: 40px; margin-bottom: 12px; }
.upload-drop-zone .hint { font-size: 14px; color: var(--text-dim); }
.upload-drop-zone .sub-hint { font-size: 12px; color: var(--text-light); margin-top: 6px; }

.upload-progress-wrap {
    margin-top: 16px;
}
.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}
.upload-progress-text {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 6px;
}

.upload-edit-form {
    margin-top: 24px;
}
.upload-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}
.upload-meta-label {
    font-size: 12px;
    color: var(--text-dim);
    min-width: 80px;
    flex-shrink: 0;
}
.upload-meta-value {
    font-size: 13px;
    color: var(--text);
}

/* ============================================================
   个人中心页样式
   ============================================================ */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.profile-container .section-card {
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}
.info-row:last-child { border-bottom: none; }
.info-label {
    font-size: 13px;
    color: var(--text-dim);
    min-width: 80px;
}
.info-value {
    font-size: 13px;
    color: var(--text);
    flex: 1;
}

.nickname-edit-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nickname-edit-row input { flex: 1; }

/* 购买记录列表 */
.purchase-list { list-style: none; }
.purchase-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.purchase-item:last-child { border-bottom: none; }
.purchase-cover {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg-input);
}
.purchase-info { flex: 1; }
.purchase-name { font-size: 13px; font-weight: 600; }
.purchase-date { font-size: 11px; color: var(--text-light); }

/* 消息通知列表 */
.notification-list { list-style: none; }
.notification-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
}
.notification-item:last-child { border-bottom: none; }
.notification-item.unread { background: var(--accent-light); border-radius: var(--radius); padding: 10px 8px; margin-bottom: 4px; }
.notification-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notification-content { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.notification-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* 修改密码表单 */
.password-form { max-width: 320px; }

/* 作者功能区 */
.author-section { display: none; }
.author-section.visible { display: block; }
/* 管理后台审核表格：拒绝理由 */
.review-note-cell { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.revenue-card {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.revenue-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
}
.revenue-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}
.revenue-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* 提现记录列表 */
.withdrawal-list { list-style: none; }
.withdrawal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.withdrawal-item:last-child { border-bottom: none; }
.withdrawal-amount { font-size: 14px; font-weight: 600; color: var(--text); }
.withdrawal-status { font-size: 12px; }
.withdrawal-time { font-size: 11px; color: var(--text-light); }

/* 作者模型库筛选栏 */
.author-model-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* 总收益区域 */
.revenue-ratio-text {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 12px;
}
.revenue-ratio-text span { color: var(--accent); font-weight: 600; }
.earnings-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.earnings-filter select {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
}
.earnings-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
}
.earnings-num { font-size: 26px; font-weight: 700; color: var(--accent); }
.earnings-label { font-size: 12px; color: var(--text-dim); }
.balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.balance-info { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.balance-label { font-size: 13px; color: var(--text-dim); }
.balance-num { font-size: 18px; font-weight: 700; color: var(--text); }
.balance-sub { font-size: 12px; color: var(--text-light); }

/* 用户购买记录列表 */
.purchase-list { list-style: none; }
.purchase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.purchase-item:last-child { border-bottom: none; }
.pu-main { display: flex; align-items: baseline; gap: 6px; min-width: 0; flex-wrap: wrap; }
.pu-buyer { font-size: 13px; font-weight: 600; color: var(--text); }
.pu-model { font-size: 12px; color: var(--text-dim); }
.pu-meta { display: flex; align-items: baseline; gap: 12px; }
.pu-amount { font-size: 14px; font-weight: 600; color: var(--accent); }
.pu-time { font-size: 11px; color: var(--text-light); }

/* 上传记录列表（仅文字：名称/状态/日期/拒绝理由，无封面图） */
.upload-record-list { list-style: none; }
.upload-record-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.upload-record-item:last-child { border-bottom: none; }
.ur-main { display: flex; align-items: center; gap: 10px; }
.ur-name { font-size: 14px; font-weight: 600; color: var(--text); }
.ur-meta { display: flex; align-items: baseline; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.ur-date { font-size: 12px; color: var(--text-light); }
.ur-note { font-size: 12px; color: var(--danger); }
.ur-note-empty { color: var(--text-light); }


/* ============================================================
   登录弹窗 — 对齐 GUI login-fullscreen 结构，以弹窗形式展示
   弹窗固定大小 1000×680（GUI 窗口大小）
   ============================================================ */

/* 遮罩层 */
.login-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* 弹窗容器 — 固定 GUI 窗口大小，居中，整体背景 #ededf3 对齐 GUI */
.login-dialog-box {
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 680px;
    background: #ededf3;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.1);
    animation: loginDialogIn 0.2s ease;
}

@keyframes loginDialogIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 关闭按钮 */
.login-dialog-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color var(--transition);
}
.login-dialog-close:hover { color: var(--text); }

/* 弹窗内的左右两栏容器 */
.login-dialog-box .login-fs-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* 左侧区域 — 无背景色，继承弹窗整体 #ededf3，宽度 680px 对齐 GUI */
.login-dialog-box .login-fs-left {
    width: 680px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 右侧外层容器 — 无背景色，对齐 GUI */
.login-dialog-box .login-fs-right-wrap {
    flex: 1;
    padding: 10px;
    display: flex;
}

/* 右侧表单区 — 悬浮白色圆角面板 */
.login-dialog-box .login-fs-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 36px;
    background: var(--bg);
    overflow-y: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    position: relative;
}

/* 隐藏右侧面板滚动条 */
.login-dialog-box .login-fs-right::-webkit-scrollbar { display: none; }
.login-dialog-box .login-fs-right { -ms-overflow-style: none; scrollbar-width: none; }

/* 登录面板 — 居中对齐 */
.login-dialog-box .login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 面板内输入框固定宽度 253px */
.login-dialog-box .field-row { width: 253px; }
.login-dialog-box .field-row input { width: 253px; }
.login-dialog-box .verify-code-row { width: 253px; }
.login-dialog-box .checkbox-label { width: 253px; }

/* 记住密码复选框 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    margin-bottom: 6px;
}
.checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 14px; height: 14px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    background: var(--bg-input);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}
.checkbox-label input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.checkbox-label input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 3.5px; top: 1px;
    width: 4px; height: 8px;
    border: solid #fff;
    border-width: 0 1.2px 1.2px 0;
    transform: rotate(45deg);
}

/* 验证码行 */
.verify-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.verify-code-row input { flex: 1; min-width: 0; }

/* 获取验证码按钮 */
.verify-code-btn {
    flex-shrink: 0;
    width: 110px;
    padding: 8px 0;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.verify-code-btn:hover { background: var(--accent); color: #fff; }
.verify-code-btn.disabled {
    background: var(--border);
    border-color: var(--border);
    color: var(--text-dim);
    cursor: not-allowed;
    pointer-events: none;
}

/* 登录链接 */
.login-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 12px;
}
.login-link {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition);
}
.login-link:hover { color: var(--accent-hover); text-decoration: underline; }
.login-link-divider { color: var(--text-light); user-select: none; }

/* 错误提示 */
.error-text {
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
    text-align: center;
    min-height: 18px;
}

/* 加载状态按钮 */
.loading-state {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.loading-state::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 16px; height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* 暗色模式 — 登录弹窗适配，对齐 GUI（左侧无紫色背景，跟随整体暗色） */
body.dark-mode .login-dialog-box {
    background: #0a0a0f;
}
body.dark-mode .login-dialog-box .login-fs-right {
    background: var(--bg);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
body.dark-mode .login-dialog-box .login-fs-right::before,
body.dark-mode .login-dialog-box .login-fs-right::after {
    background: linear-gradient(90deg, transparent, #3a3a50 30%, #3a3a50 70%, transparent);
}
body.dark-mode .login-dialog-close {
    color: var(--text-dim);
}

/* ============================================================
   中文点选验证码弹窗（从 GUI 复用）
   ============================================================ */
.captcha-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: captchaFadeIn 0.2s ease;
}

@keyframes captchaFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.captcha-dialog {
    background: var(--bg-card, #fff);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-lg, 0 8px 30px rgba(0,0,0,0.10));
    padding: 18px 20px 14px;
    width: 360px;
    user-select: none;
}

.captcha-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text, #2d2d3a);
}

.captcha-title {
    white-space: nowrap;
}

.captcha-targets {
    display: flex;
    gap: 6px;
}

.captcha-target-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--accent-light, rgba(108,92,231,0.10));
    color: var(--accent, #6c5ce7);
    font-weight: bold;
    font-size: 16px;
}

.captcha-canvas-wrap {
    position: relative;
    width: 320px;
    height: 180px;
    margin: 0 auto;
    border-radius: var(--radius, 8px);
    overflow: hidden;
    border: 1px solid var(--border, #e4e4ec);
}

.captcha-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.captcha-marker-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.captcha-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent, #6c5ce7);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(108,92,231,0.4);
    animation: captchaMarkerPop 0.2s ease;
}

@keyframes captchaMarkerPop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

.captcha-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 8px;
}

.captcha-refresh-btn,
.captcha-close-btn {
    padding: 5px 14px;
    border: 1px solid var(--border, #e4e4ec);
    border-radius: var(--radius, 8px);
    background: var(--bg-secondary, #fff);
    color: var(--text, #2d2d3a);
    font-size: 12px;
    cursor: pointer;
    transition: background var(--transition, 0.2s ease);
}

.captcha-refresh-btn:hover,
.captcha-close-btn:hover {
    background: var(--bg-hover, #eeeef4);
}

.captcha-status {
    font-size: 12px;
    flex: 1;
    text-align: center;
}

.captcha-status-ok {
    color: var(--success, #00b894);
}

.captcha-status-err {
    color: var(--danger, #e74c3c);
}

/* ============================================================
   夜间模式 — 星空背景（从 GUI 复用）
   ============================================================ */
.night-sky {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.night-sky .sky-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    background: #0a0a0f;
}
.night-sky .stars {
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    pointer-events: none;
}
.night-sky .stars-1 {
    background-image: radial-gradient(1px 1px at 10% 10%, #fff, transparent),
        radial-gradient(1px 1px at 30% 20%, #fff, transparent),
        radial-gradient(1px 1px at 50% 50%, #fff, transparent),
        radial-gradient(1px 1px at 70% 30%, #fff, transparent),
        radial-gradient(1px 1px at 90% 10%, #fff, transparent);
    background-size: 200px 200px;
    animation: twinkle 3s ease-in-out infinite;
}
.night-sky .stars-2 {
    background-image: radial-gradient(1.5px 1.5px at 20% 40%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 60% 85%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 85% 65%, #fff, transparent);
    background-size: 300px 300px;
    animation: twinkle 5s ease-in-out infinite 1s;
}
.night-sky .stars-3 {
    background-image: radial-gradient(2px 2px at 40% 70%, #fff, transparent),
        radial-gradient(2px 2px at 10% 80%, #fff, transparent),
        radial-gradient(2px 2px at 80% 40%, #fff, transparent);
    background-size: 400px 400px;
    animation: twinkle 7s ease-in-out infinite 2s;
}
.night-sky .meteor {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255,255,255,0.5);
    opacity: 0;
    pointer-events: none;
}
.night-sky .meteor::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
}
.night-sky .m1 { top: 10%; left: 110%; animation: shoot 8s linear infinite; }
.night-sky .m2 { top: 30%; left: 110%; animation: shoot 12s linear infinite 4s; }
.night-sky .m3 { top: 50%; left: 110%; animation: shoot 10s linear infinite 2s; }
.night-sky .moon {
    position: absolute;
    top: 15%;
    right: 15%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 12px 12px 0 0 #fdfbd3;
    filter: drop-shadow(0 0 12px rgba(253,251,211,0.3));
    z-index: 10;
}
@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}
@keyframes shoot {
    0% { transform: translateX(0) translateY(0) rotate(-35deg); opacity: 0; }
    5% { opacity: 1; }
    15% { transform: translateX(-1500px) translateY(1000px) rotate(-35deg); opacity: 0; }
    100% { transform: translateX(-1500px) translateY(1000px) rotate(-35deg); opacity: 0; }
}


/* ============================================================
   进度条组件（从 GUI 复用）
   ============================================================ */
.progress-area { margin-top: 10px; }
.progress-bar {
    width: 100%;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #a29bfe);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.progress-text {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ============================================================
   个人中心 — 标签栏（参考 GUI tab-nav 风格）
   ============================================================ */
.profile-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 24px 80px;
}
.profile-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
}
.profile-tab-btn {
    position: relative;
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition);
}
.profile-tab-btn::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 0;
    width: 0; height: 2.5px;
    background: var(--accent);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}
.profile-tab-btn:hover { color: var(--text); }
.profile-tab-btn:hover::after { width: 40%; }
.profile-tab-btn.active { color: var(--accent); font-weight: 700; }
.profile-tab-btn.active::after { width: 24px; }

.profile-tab-panel { display: none; }
.profile-tab-panel.active { display: block; }

/* 导航栏用户区域固定宽度，防止内容加载时跳动 */
#navUserArea {
    display: inline-block;
    min-width: 64px;
    text-align: right;
}

/* ============================================================
   管理后台 — 统计概览筛选栏与走势图
   ============================================================ */
.stats-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.stats-period-btns {
    display: flex;
    gap: 4px;
}
.stats-period-btn {
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-card);
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}
.stats-period-btn:hover { border-color: var(--accent); color: var(--accent); }
.stats-period-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.stats-custom-range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.stats-custom-range input[type="date"] {
    padding: 4px 8px;
    font-size: 12px;
}

/* 5 列统计卡片 */
.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* 6 列统计卡片 */
.stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
@media (max-width: 1200px) {
    .stats-grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .stats-grid-6 { grid-template-columns: repeat(2, 1fr); }
}

/* 小按钮组件 */
.btn-sm {
    padding: 4px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}
.btn-sm.primary { background: var(--accent); color: #fff; }
.btn-sm.primary:hover { background: var(--accent-hover); }
.btn-sm.danger { background: var(--danger); color: #fff; }
.btn-sm.danger:hover { background: var(--danger-hover); }
.btn-sm.warning { background: var(--warning); color: #fff; }
.btn-sm.warning:hover { opacity: 0.85; }
.btn-sm.success { background: var(--success); color: #fff; }
.btn-sm.success:hover { opacity: 0.85; }

/* 消息通知 — 模型上新卡片 */
.notif-model-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--transition);
    margin-top: 6px;
}
.notif-model-card:hover { border-color: var(--accent); }
.notif-model-cover {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg-input);
    flex-shrink: 0;
}
.notif-model-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.notif-model-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-model-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    background: var(--accent-light);
    color: var(--accent);
    width: fit-content;
}

/* ============================================================
   会员页（membership.html）
   ============================================================ */

/* 会员状态横幅 */
.membership-status {
    margin: 16px 0 0;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 14px;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.ms-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
}
.ms-active { background: var(--success-light); color: var(--success); }
.ms-expired { background: rgba(231,76,60,0.12); color: var(--danger); }

/* 顶部标题区 */
.membership-hero {
    text-align: center;
    padding: 40px 0 28px;
}
.membership-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.membership-subtitle {
    font-size: 15px;
    color: var(--text-dim);
    margin: 0;
}

/* 套餐卡片网格 */
.plan-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
    align-items: stretch;
    margin: 8px 0 56px;
}
.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 320px;
    padding: 30px 28px 26px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    text-align: center;
    cursor: pointer;
    transform: scale(0.94);
    opacity: 0.78;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), opacity var(--transition);
}
.plan-card:hover {
    transform: scale(0.97);
    opacity: 1;
}
/* 激活态（被选中放大显示）：尺寸放大 + 边框醒目 + 完全不透明 */
.plan-card.plan-card-active {
    transform: scale(1.06);
    opacity: 1;
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    cursor: default;
    z-index: 2;
}
.plan-card.plan-card-active:hover {
    transform: scale(1.06);
}
/* 推荐（年卡）卡片：渐变描边 + 顶部高亮 */
.plan-card-featured {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(135deg, var(--accent), #f5b400) border-box;
    box-shadow: 0 12px 36px var(--accent-glow);
}

/* 角标：推荐（左上）+ 折扣（右上） */
.plan-recommend {
    position: absolute;
    top: 0;
    left: 24px;
    transform: translateY(-50%);
    padding: 4px 14px;
    background: linear-gradient(135deg, var(--accent), #f5b400);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 1px;
    box-shadow: var(--shadow-sm);
}
.plan-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 3px 10px;
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
}

.plan-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-top: 6px;
}
.plan-subtitle {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 6px;
}

/* 价格行：现价大字 + 原价划线 */
.plan-price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}
.plan-price {
    font-size: 44px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.plan-original {
    font-size: 15px;
    color: var(--text-light);
    text-decoration: line-through;
}
.plan-permonth {
    margin-top: 6px;
    font-size: 13px;
    color: #f5b400;
    font-weight: 600;
}
.plan-duration {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-dim);
}

.plan-divider {
    height: 1px;
    background: var(--border-light);
    margin: 20px 0 16px;
}

/* 卡内权益清单 */
.plan-benefits {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
    text-align: left;
    flex: 1;
}
.plan-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.5;
    padding: 7px 0;
}
.benefit-check {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--success);
}

.plan-buy-btn {
    margin-top: 22px;
    width: 100%;
    padding: 13px 0;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.plan-buy-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.plan-card-featured .plan-buy-btn {
    background: linear-gradient(135deg, var(--accent), #f5b400);
}
.plan-card-featured .plan-buy-btn:hover { filter: brightness(1.05); }

/* 支付弹窗 */
.pay-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 必须高于 popup-panel-overlay (1999)，否则 backdrop-filter 会把对话框糊住 */
    z-index: 2001;
    width: 340px;
    max-width: 92vw;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}
.pay-dialog .sidebar-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}
.pay-dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    text-align: center;
}

/* 会员页支付弹窗内的按钮：占满宽度、上下间距更舒展 */
.pay-dialog .buy-action-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 13px 0;
    text-align: center;
}

@media (max-width: 720px) {
    .plan-card { width: 100%; max-width: 360px; }
}
