/* ===================================================================
 * 哔哩哔哩自助系统 — 精致 UI 样式表
 * 风格：B站粉 | 毛玻璃 | 微动效 | 响应式
 * =================================================================== */

/* ========== 全局变量 ========== */
:root {
    --bili-pink: #FB7299;
    --bili-pink-dark: #e05a7e;
    --bili-pink-light: #fce4ec;
    --bili-blue: #00A1D6;
    --bili-bg: #f4f5f7;
    --bili-card: #ffffff;
    --bili-text: #18191C;
    --bili-text-secondary: #606266;
    --bili-border: #e4e7ed;
    --bili-success: #67C23A;
    --bili-warning: #E6A23C;
    --bili-danger: #F56C6C;

    /* 新增精致阴影层级 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --bili-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);

    /* 渐变 & 圆角 */
    --bili-pink-gradient: linear-gradient(135deg, #FB7299, #e05a7e);
    --radius: 12px;
    --radius-sm: 8px;

    /* 缓动曲线 — 果冻感 */
    --ease-spring: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 关键帧动画 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ========== 重置 & 基础 ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bili-bg);
    color: var(--bili-text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--bili-pink);
    text-decoration: none;
    transition: color 0.25s var(--ease-spring);
}
a:hover {
    color: var(--bili-pink-dark);
}

/* ========== 导航栏 — 毛玻璃效果 ========== */
.navbar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--bili-pink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-brand .logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    font-size: 16px;
}
.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}
.navbar-user .username {
    color: var(--bili-text-secondary);
}
/* ========== 用户下拉菜单 ========== */
.user-menu {
    position: relative;
}
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--bili-text);
    transition: background 0.2s var(--ease-spring);
}
.user-menu-trigger:hover {
    background: var(--bili-pink-light);
}
.user-menu-trigger .username {
    color: var(--bili-text);
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-arrow {
    font-size: 10px;
    color: var(--bili-text-secondary);
    transition: transform 0.2s var(--ease-spring);
}
.user-menu-trigger.open .user-menu-arrow {
    transform: rotate(180deg);
}
.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 170px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 6px;
    z-index: 300;
    animation: slideUp 0.2s var(--ease-spring);
}
.user-menu-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--bili-text);
    border-radius: 8px;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s var(--ease-spring), color 0.2s;
}
.user-menu-item:hover {
    background: var(--bili-pink-light);
    color: var(--bili-pink);
}
.user-menu-danger {
    color: var(--bili-danger);
}
.user-menu-danger:hover {
    background: #fef0f0;
    color: var(--bili-danger);
}
.user-menu-divider {
    height: 1px;
    background: var(--bili-border);
    margin: 5px 8px;
}
.btn-logout {
    background: none;
    border: 1px solid var(--bili-border);
    color: var(--bili-text-secondary);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s var(--ease-spring);
}
.btn-logout:hover {
    border-color: var(--bili-pink);
    color: var(--bili-pink);
}

/* ========== 容器 ========== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ========== 卡片系统 ========== */
.card {
    background: var(--bili-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s var(--ease-spring);
    animation: fadeInUp 0.4s var(--ease-spring) both;
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 18px;
}
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--bili-text-secondary);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--bili-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.25s var(--ease-spring);
    outline: none;
    background: var(--bili-card);
}
.form-input:focus {
    border-color: var(--bili-pink);
    box-shadow: 0 0 0 3px rgba(0, 161, 214, 0.15);
}
.form-input:hover {
    border-color: #c0c4cc;
}
.form-hint {
    font-size: 12px;
    color: var(--bili-text-secondary);
    margin-top: 4px;
}
.form-hint a {
    font-size: 12px;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s var(--ease-spring);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.25s var(--ease-spring);
}
.btn:hover::after {
    background: rgba(255, 255, 255, 0.1);
}
.btn:active {
}
.btn-primary {
    background: var(--bili-pink);
    color: #fff;
}
.btn-primary:hover {
    background: var(--bili-pink-dark);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--bili-border);
    color: var(--bili-text-secondary);
}
.btn-outline:hover {
    border-color: var(--bili-pink);
    color: var(--bili-pink);
}
.btn-success {
    background: var(--bili-success);
    color: #fff;
}
.btn-success:hover {
    background: #58b02c;
}
.btn-danger {
    background: var(--bili-danger);
    color: #fff;
}
.btn-danger:hover {
    background: #e05050;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}
.btn-block {
    width: 100%;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ========== 提示信息 ========== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    animation: fadeInUp 0.3s var(--ease-spring) both;
}
.alert-success {
    background: #f0f9eb;
    color: var(--bili-success);
    border: 1px solid #c8e6c9;
}
.alert-error {
    background: #fef0f0;
    color: var(--bili-danger);
    border: 1px solid #fbc4c4;
}
.alert-info {
    background: #f4f4f5;
    color: var(--bili-text-secondary);
    border: 1px solid #dcdfe6;
}

/* ========== 开关 Toggle ========== */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.toggle {
    position: relative;
    width: 40px;
    height: 22px;
    background: #dcdfe6;
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    flex-shrink: 0;
}
.toggle.active {
    background: var(--bili-pink);
    box-shadow: 0 0 6px rgba(0, 161, 214, 0.4);
}
.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.toggle.active::after {
    transform: translateX(18px);
    box-shadow: 0 1px 4px rgba(251, 114, 153, 0.3);
}
.toggle:hover::after {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

/* ========== 表格 ========== */
.table-wrap {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th {
    background: var(--bili-pink-gradient);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
thead tr:first-child th:first-child {
    border-radius: 8px 0 0 0;
}
thead tr:first-child th:last-child {
    border-radius: 0 8px 0 0;
}
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--bili-border);
    vertical-align: middle;
    transition: background 0.2s var(--ease-spring);
}
tr:hover td {
    background: #fce4ec;
}
tr:nth-child(even) td {
    background: #fafbfc;
}
tr:nth-child(even):hover td {
    background: #fce4ec;
}

/* ========== 徽章 ========== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.25s var(--ease-spring);
}
.badge-vip {
    background: #fff3e0;
    color: #e65100;
}
.badge-active {
    background: #e8f5e9;
    color: var(--bili-success);
}
.badge-inactive {
    background: #f5f5f5;
    color: #999;
}
.badge-warning {
    background: #fff8e1;
    color: var(--bili-warning);
}
.badge-success {
    background: #e8f5e9;
    color: var(--bili-success);
}
.badge-fail {
    background: #fef0f0;
    color: var(--bili-danger);
}

/* ========== 登录/注册页 — 氛围升级 ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
    position: relative;
    overflow: hidden;
}
/* 装饰性浮动光晕 */
.auth-page::before {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 161, 214, 0.25), transparent 70%);
    top: -80px;
    right: -80px;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}
.auth-page::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 161, 214, 0.2), transparent 70%);
    bottom: -120px;
    left: -120px;
    pointer-events: none;
    animation: float 8s ease-in-out infinite reverse;
}
.auth-card {
    background: var(--bili-card);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    padding: 40px;
    width: 400px;
    max-width: 90vw;
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s var(--ease-spring) both;
}
.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 24px;
}
.auth-card .auth-logo .logo-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: contain;
    margin-bottom: 12px;
}
.auth-card .auth-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}
.auth-card .auth-subtitle {
    text-align: center;
    color: var(--bili-text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}
.auth-card .auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--bili-text-secondary);
}

/* ========== 账号卡片 ========== */
.account-card {
    border: 1px solid var(--bili-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    background: var(--bili-card);
    transition: all 0.3s var(--ease-spring);
    animation: fadeInUp 0.4s var(--ease-spring) both;
    position: relative;
    border-left: 3px solid transparent;
}
.account-card:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--bili-pink);
}
.account-card .ac-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.account-card .ac-name {
    font-size: 16px;
    font-weight: 600;
}
.account-card .ac-uid {
    font-size: 13px;
    color: var(--bili-text-secondary);
    margin-left: 8px;
}
.account-card .ac-body {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}
.account-card .ac-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.account-card .ac-cookies {
    background: var(--bili-bg);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 12px;
    font-size: 13px;
    word-break: break-all;
}
.account-card .ac-cookies .ck-label {
    font-weight: 500;
    color: var(--bili-text-secondary);
    margin-bottom: 4px;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--bili-text-secondary);
    animation: fadeInUp 0.5s var(--ease-spring) both;
}
.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}
.empty-state p {
    font-size: 14px;
}

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bili-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    animation: fadeInUp 0.4s var(--ease-spring) both;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-card .stat-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--bili-pink);
}
.stat-card .stat-label {
    font-size: 14px;
    color: var(--bili-text-secondary);
    margin-top: 4px;
}

/* ========== 加载动画 ========== */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--bili-border);
    border-top-color: var(--bili-pink);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.2s var(--ease-spring) both;
}
.modal {
    background: var(--bili-card);
    border-radius: var(--radius);
    padding: 24px;
    width: 540px;
    max-width: 90vw;
    max-height: 88vh;
    overflow-y: auto;
    animation: slideUp 0.3s var(--ease-spring) both;
    box-shadow: var(--shadow-lg);
}
.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

/* ========== 关闭按钮增强（通用） ========== */
.modal .close-btn,
.modal-overlay .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bili-bg);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--bili-text-secondary);
    transition: all 0.25s var(--ease-spring);
}
.modal .close-btn:hover,
.modal-overlay .close-btn:hover {
    background: var(--bili-pink-light);
    color: var(--bili-pink);
    transform: rotate(90deg);
}

/* ========== 扫码引导 ========== */
.qr-guide {
    background: var(--bili-bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.8;
}
.qr-guide ol {
    padding-left: 20px;
}
.qr-guide code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--bili-pink);
}

/* ========== 登录页动画增强 ========== */
.auth-card .btn-block {
    background: var(--bili-pink);
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 28px;
}
.auth-card .btn-block:hover {
    background: var(--bili-pink-dark);
}

/* ========== 特殊按钮变体（从 JS 模板引用） ========== */
.btn-like:hover,
.btn-sign:hover,
.btn-coin:hover,
.btn-refresh-cookie:hover,
.btn-show-cookies:hover,
.btn-show-logs:hover,
.btn-delete:hover,
.btn-del-account:hover,
.btn-del-user:hover,
.btn-copy-val:hover {
    transform: translateY(-1px);
}

/* ========== 辅助工具 ========== */
.cookies-content,
.ck-val {
    word-break: break-all;
}

/* ========== 通用 transition 增强 ========== */
button,
input,
select,
textarea,
a,
.toggle,
.badge,
img {
    transition: all 0.25s var(--ease-spring);
}

/* ========== checkbox 美化 ========== */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--bili-border);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.25s var(--ease-spring);
    flex-shrink: 0;
}
input[type="checkbox"]:checked {
    background: var(--bili-blue);
    border-color: var(--bili-blue);
}
input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
input[type="checkbox"]:hover {
    border-color: var(--bili-pink);
}

/* ========== 选择框增强 ========== */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23606266' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* ========== 响应式 ========== */

/* 平板 + 手机 */
@media (max-width: 768px) {
    .container {
        padding: 16px 12px;
    }
    .card {
        padding: 16px;
    }
    .auth-card {
        padding: 28px 20px;
        border-radius: 16px;
    }
    .account-card .ac-body {
        flex-direction: row;
        align-items: center;
    }

    .navbar {
        padding: 0 12px;
        height: 52px;
    }
    .navbar-brand {
        font-size: 16px;
    }
    .navbar-brand .logo {
        width: 26px;
        height: 26px;
    }
    .navbar-user {
        gap: 8px;
        font-size: 13px;
    }
    .btn-logout {
        padding: 4px 10px;
        font-size: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card {
        padding: 14px 10px;
    }
    .stat-card .stat-num {
        font-size: 26px;
    }
    .stat-card .stat-label {
        font-size: 12px;
    }

    .modal {
        padding: 18px;
    }
    .modal-title {
        font-size: 16px;
    }

    .account-card {
        padding: 14px;
    }
    .account-card .ac-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .account-card .ac-actions {
        flex-wrap: wrap;
    }

    /* 表单元素触控优化 */
    .form-input, .btn, .btn-logout {
        min-height: 42px;
    }
    .btn-sm {
        min-height: 34px;
    }

    /* 表格响应式 — 水平滚动 */
    .table-wrap {
        margin: 0 -12px;
        padding: 0 12px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    /* 手机端弹窗收缩适配屏宽（375px 屏 ≈ 94vw），覆盖内联宽度限制 */
    .modal {
        width: 94vw !important;
        max-width: 94vw !important;
        padding: 18px;
    }
    .container {
        padding: 12px 8px;
    }
    .card {
        padding: 12px;
        border-radius: var(--radius-sm);
    }

    .navbar {
        padding: 0 8px;
        height: 48px;
    }
    .navbar-brand span {
        font-size: 14px;
    }
    /* 用户名作为下拉菜单入口，手机端保留显示 */
    .navbar-user .username {
        display: inline;
        max-width: 90px;
    }
    .user-menu-trigger {
        padding: 5px 8px;
    }
    .btn-logout {
        padding: 3px 8px;
        font-size: 11px;
    }

    .auth-page {
        align-items: center;
        padding-top: 40px;
    }
    .auth-card {
        padding: 24px 16px;
        border-radius: 12px;
        width: 94vw;
    }
    .auth-card .auth-title {
        font-size: 20px;
    }

    h2 {
        font-size: 17px !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .stat-card .stat-num {
        font-size: 22px;
    }

    .account-card .ac-header {
        flex-direction: row;
        align-items: center;
    }
    .account-card .ac-name {
        font-size: 16px;
    }

    table {
        font-size: 12px;
    }
    th, td {
        padding: 8px 6px;
    }

    .modal {
        padding: 14px;
        border-radius: var(--radius-sm);
    }

    .btn {
        padding: 10px 18px;
        font-size: 14px;
        min-height: 44px;
    }

    /* 触控目标强制 ≥44px */
    .form-input {
        padding: 12px 14px;
        font-size: 16px;
        min-height: 44px;
    }
}

/* ========== 修复：账号卡片网格布局 ========== */
.account-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
    .account-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========== 修复：板块分隔标题 ========== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--bili-border);
}
.section-header:first-of-type {
    border-top: none;
    padding-top: 0;
}
.section-header h2 {
    font-size: 20px;
    font-weight: 700;
}
.section-header .section-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--bili-pink-light);
    color: var(--bili-pink);
    font-weight: 500;
}

/* ========== 修复：直播助手卡片（代替inline style） ========== */
.live-card {
    background: var(--bili-card);
    border-radius: var(--radius);
    border: 1px solid var(--bili-border);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s var(--ease-spring);
    animation: fadeInUp 0.4s var(--ease-spring) both;
    position: relative;
    border-left: 3px solid transparent;
}
.live-card:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--bili-blue);
}
.live-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.live-card-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.live-card-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.live-card-room-id {
    font-weight: 600;
    font-size: 15px;
}
.live-card-status-text {
    font-size: 12px;
    color: var(--bili-text-secondary);
}
.live-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.live-card-meta {
    font-size: 13px;
    color: var(--bili-text-secondary);
    margin-top: 6px;
    line-height: 1.6;
}
.live-card-meta .feature-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 2px;
}
.feature-tag.on {
    background: #e3f2fd;
    color: var(--bili-blue);
}
.feature-tag.off {
    background: #f5f5f5;
    color: #999;
}

/* ========== 修复：增强的信息提示 ========== */
.alert-info.dashboard-tip {
    background: linear-gradient(135deg, #e3f2fd, #fff);
    border-left: 3px solid var(--bili-blue);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.alert-info.dashboard-tip .tip-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* ========== 修复：后台页面顶部微渐变 ========== */
.dashboard-bg {
    position: relative;
}
.dashboard-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 280px;
    background: linear-gradient(180deg, rgba(0,161,214,0.06) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}
.container {
    position: relative;
    z-index: 1;
}

/* ========== 修复：手机端增强 ========== */
@media (max-width: 480px) {
    .live-card-header {
        flex-direction: row;
        align-items: center;
    }
    .live-card-actions {
        flex-wrap: wrap;
    }
    .live-card-actions label {
        font-size: 12px;
    }
    .section-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    .dashboard-tip {
        flex-direction: row;
        text-align: center;
    }
}
/* 手机端紧凑优化 — 追加到 style.css 末尾 */

@media (max-width: 480px) {
    /* === 账号卡片：头部紧凑 === */
    .account-card {
        padding: 10px;
        margin-bottom: 10px;
    }
    .account-card .ac-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        margin-bottom: 8px;
    }
    .account-card .ac-uid {
        display: none;
    }
    .account-card .ac-header .btn-sm {
        font-size: 13px;
        padding: 6px 10px;
        min-height: 36px;
    }
    .account-card .ac-name {
        font-size: 16px;
    }

    /* === 账号卡片：toggle 2×2 网格 === */
    .account-card .ac-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-bottom: 8px;
    }
    .account-card .ac-body .toggle-wrap {
        gap: 4px;
    }
    .account-card .ac-body .toggle-wrap span {
        font-size: 14px;
    }

    /* === 手动操作按钮紧凑 === */
    .account-card .ac-actions {
        gap: 4px;
    }
    .account-card .ac-actions .btn-sm {
        font-size: 13px;
        padding: 6px 10px;
        min-height: 36px;
    }

    /* === 板块标题紧凑 === */
    .section-header {
        padding-top: 14px;
        margin-bottom: 10px;
        gap: 4px;
    }
    .section-header h2 {
        font-size: 18px;
    }
    .section-header .section-badge {
        font-size: 12px;
        padding: 2px 7px;
    }
/* ========== 直播板块蓝色徽标 ========== */
.section-header.live-section .section-badge {
    background: #e3f2fd;
    color: var(--bili-blue);
}
    .section-header .btn-primary {
        font-size: 13px;
        padding: 6px 14px;
        min-height: 34px;
    }

    /* === 直播卡片紧凑 === */
    .live-card {
        padding: 10px;
        margin-bottom: 8px;
    }
    .live-card-header {
        gap: 6px;
    }
    .live-card-actions {
        gap: 4px;
    }
    .live-card-actions .btn-sm {
        font-size: 13px;
        padding: 6px 10px;
        min-height: 36px;
    }
    .live-card-actions label {
        font-size: 13px;
    }
    .live-card-room-id {
        font-size: 15px;
    }
    .live-card-meta {
        font-size: 14px;
        margin-top: 4px;
        line-height: 1.5;
    }
    .live-card-meta .feature-tag {
        font-size: 12px;
        padding: 1px 4px;
    }

    /* === 提示卡片紧凑 === */
    .alert-info.dashboard-tip {
        padding: 10px 12px;
        font-size: 13px;
    }
    .alert-info.dashboard-tip .tip-icon {
        font-size: 16px;
    }

    /* === 弹窗紧凑 === */
    .modal .form-group {
        margin-bottom: 10px;
    }
    .modal .form-label {
        font-size: 14px;
        margin-bottom: 4px;
    }
}

/* ========== 管理后台表格表头优化 ========== */
.admin-table th {
    background: #f7f8fa;
    background-image: none;
    color: #303133;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    padding: 12px 14px;
    border-bottom: 2px solid #e4e7ed;
    white-space: nowrap;
}
.admin-table th:first-child {
    border-radius: 0;
}
.admin-table th:last-child {
    border-radius: 0;
}
.admin-table td {
    padding: 12px 14px;
    font-size: 13px;
}
.admin-table tbody tr:nth-child(even) td {
    background: #fafbfc;
}
.admin-table tbody tr:hover td {
    background: #fdf3f6;
}
.admin-table .badge {
    font-size: 11px;
    padding: 3px 8px;
}

/* ========== 管理后台表格移动端自适应 ========== */
.admin-table td:last-child,
.admin-table th:last-child {
    white-space: nowrap;
}
.admin-table td .btn {
    margin: 2px 0;
    white-space: nowrap;
}

/* 平板：隐藏次要列 */
@media (max-width: 768px) {
    .admin-table .hide-sm { display: none; }
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
    }
}

/* 手机：进一步隐藏次要列，操作按钮紧凑 */
@media (max-width: 480px) {
    .admin-table .hide-xs { display: none; }
    .admin-table th {
        font-size: 12px;
        padding: 10px 6px;
    }
    .admin-table td {
        font-size: 12px;
        padding: 8px 6px;
    }
    .admin-table td .btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* ========== 积分充值 ========== */
.recharge-tabs {
    display: flex;
    gap: 8px;
    margin: 4px 0 14px;
    border-bottom: 1px solid var(--bili-border);
    padding-bottom: 10px;
}
.recharge-tab {
    background: none;
    border: none;
    padding: 6px 18px;
    font-size: 14px;
    color: var(--bili-text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.25s var(--ease-spring);
}
.recharge-tab.active {
    background: var(--bili-pink-light);
    color: var(--bili-pink);
    font-weight: 600;
}
.recharge-rate-tip {
    font-size: 13px;
    color: var(--bili-text-secondary);
    background: var(--bili-pink-light);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
}
.recharge-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.recharge-amount {
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--bili-text);
    background: #fff;
    border: 1.5px solid var(--bili-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s var(--ease-spring);
}
.recharge-amount:hover {
    border-color: var(--bili-pink);
    color: var(--bili-pink);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.recharge-amount.active {
    border-color: var(--bili-pink);
    background: var(--bili-pink-light);
    color: var(--bili-pink);
}
.recharge-credit-preview {
    font-size: 13px;
    color: var(--bili-text-secondary);
    margin: 4px 0 10px;
    text-align: right;
}
.recharge-record {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid #f2f3f5;
}
.recharge-record:last-child {
    border-bottom: none;
}
@media (max-width: 480px) {
    .recharge-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    .recharge-amount {
        padding: 14px 0;
    }
}

/* ========== 分页组件（2026-08-11 新增） ========== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 16px 0 4px;
}
.pg-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--bili-border);
    background: var(--bili-card);
    color: var(--bili-text);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s var(--ease-spring);
    user-select: none;
}
.pg-btn:hover:not(:disabled):not(.active) {
    border-color: var(--bili-pink);
    color: var(--bili-pink);
    transform: translateY(-1px);
}
.pg-btn.active {
    background: var(--bili-pink-gradient);
    border-color: var(--bili-pink);
    color: #fff;
    font-weight: 600;
}
.pg-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}
.pg-ellipsis {
    color: var(--bili-text-secondary);
    padding: 0 2px;
    line-height: 32px;
}
.pg-info {
    font-size: 12px;
    color: var(--bili-text-secondary);
    margin-left: 6px;
    white-space: nowrap;
}
/* 手机端紧凑 */
@media (max-width: 480px) {
    .pagination {
        gap: 4px;
        margin: 12px 0 2px;
    }
    .pg-btn {
        min-width: 28px;
        height: 28px;
        padding: 0 6px;
        font-size: 12px;
    }
    .pg-info {
        display: none;
    }
}

/* ========== 直播扩展弹窗（2026-08-11 新增） ========== */
.modal-lg {
    max-width: 720px;
    width: 92%;
}
.extend-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 2px;
    border-bottom: 1px solid #f2f3f5;
    flex-wrap: wrap;
}
.extend-url-tag {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--bili-blue);
    background: rgba(0, 161, 214, 0.08);
    border: 1px solid rgba(0, 161, 214, 0.3);
    border-radius: 6px;
    padding: 2px 8px;
}
.extend-url-text {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--bili-text-secondary);
    word-break: break-all;
    line-height: 1.6;
}
/* 弹幕滚动窗 */
.danmaku-window {
    height: 300px;
    overflow-y: auto;
    background: #18191c;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.7;
    scroll-behavior: smooth;
}
.danmaku-window::-webkit-scrollbar {
    width: 6px;
}
.danmaku-window::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
}
.dm-item {
    color: #e5e6eb;
    margin-bottom: 4px;
    word-break: break-all;
}
.dm-uname {
    color: #7ec3ff;
    font-weight: 600;
}
.dm-gift {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.08);
    border-radius: 6px;
    padding: 2px 8px;
    margin: 4px 0;
}
.dm-price {
    color: #ffb84d;
    font-size: 12px;
}
.dm-enter {
    color: #8f959e;
    font-size: 12px;
}
.dm-system {
    color: var(--bili-blue);
    font-size: 12px;
}
/* WS 连接状态灯 */
.ws-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.ws-dot.on { background: #52c41a; box-shadow: 0 0 6px #52c41a; }
.ws-dot.off { background: #999; }
.ws-dot.connecting { background: #faad14; animation: pulse 1.2s infinite; }

/* 直播卡片 meta 行：左侧信息 + 右侧扩展按钮（2026-08-11 调整） */
.live-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}
.live-card-meta-row .live-card-meta {
    flex: 1;
    min-width: 0;
    margin-top: 0;
}
/* 弹幕窗：关注 / 分享 / 上舰 提示 */
.dm-follow {
    color: #7ed99a;
}
.dm-share {
    color: #66b3ff;
}
.dm-guard {
    color: #ff9ec4;
    font-weight: 600;
    background: rgba(251, 114, 153, 0.12);
    border-radius: 6px;
    padding: 2px 8px;
    margin: 4px 0;
}

/* 弹幕行：等级 / 粉丝牌 / 发送栏 */
.dm-level {
    display: inline-block;
    min-width: 18px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff9a56, #ff6b6b);
    border-radius: 4px;
    padding: 0 4px;
    margin-right: 4px;
    vertical-align: middle;
}
.dm-medal {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #fb7299, #e05a7e);
    border-radius: 4px;
    padding: 0 5px;
    margin-right: 4px;
    vertical-align: middle;
}
.dm-send-bar {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.dm-send-bar .form-input {
    flex: 1;
    min-width: 0;
}
.dm-send-bar .btn {
    flex-shrink: 0;
    padding: 8px 18px;
}

/* 点赞提示 */
.dm-like {
    color: #ffd36e;
    font-size: 12px;
}
