/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-header: #334155;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.brand-logo {
    width: 56px;
    height: 56px;
    margin-right: 12px;
    padding: 6px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

/* Hide static fallback items during first paint; dynamic-nav.js reveals after first render. */
.sidebar-nav.nav-initializing .nav-item {
    display: none !important;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
}

.nav-item .icon {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: inherit;
}

.nav-item .icon i {
    font-size: 18px;
    line-height: 1;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-logout .icon {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-logout .icon i {
    font-size: 15px;
    line-height: 1;
}

/* 主内容区 */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
}

/* 顶部栏 */
.topbar {
    background: var(--card-bg);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.topbar h1 {
    font-size: 24px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    color: var(--text-secondary);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 内容容器 */
.content-container {
    padding: 32px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* iframe 嵌入页面撑满高度 */
.page-iframe-container {
    height: calc(100vh - 81px);
    padding: 0 !important;
}
.page-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 图表卡片 */
.dashboard-charts {
    display: grid;
    gap: 24px;
}

.chart-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

/* 页面头部优化 */
.page-header {
    margin-bottom: 40px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 800;
    width: 100%;
    margin-bottom: 12px;
}

.page-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
    width: 100%;
    margin-bottom: 20px;
}

/* 按钮现代化美化 */
.btn {
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
}

/* 表格现代化美化 */
.table-container {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    background: #f1f5f9;
}

.data-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    font-size: 14px;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}

/* 状态标签现代化美化 */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-active, .status-success {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-inactive, .status-failed, .status-error {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-pending, .status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* 模态框 */
.modal {
    display: none;
    /* 默认隐藏，通过JS设置display: flex来显示 */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

/* 任务列表 */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.task-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 工具提示 */
.text-muted {
    color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 20px 10px rgba(139, 92, 246, 0.2); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); transform: scale(1); }
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

/* 操作按钮组美化 - 优化为 3x2 栅格布局 */
.action-buttons-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    width: 290px;
    margin: 4px 0;
}

.action-buttons-group .btn {
    padding: 6px 4px;
    font-size: 11px;
    width: 100%;
    margin: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 养号中动画效果 */
@keyframes pulse-warming {
    0% { background-color: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.2); }
    50% { background-color: rgba(245, 158, 11, 0.3); border-color: rgba(245, 158, 11, 0.5); transform: scale(1.05); }
    100% { background-color: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.2); }
}

.pulse-warming {
    animation: pulse-warming 2s infinite ease-in-out;
    color: #d97706 !important;
    font-weight: 800 !important;
}

.btn-start-warming {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    color: white !important;
}

.btn-stop-warming {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
}

/* 内联停止按钮 */
.stop-warm-inline {
    background: #ef4444;
    color: white;
    border: none;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.stop-warm-inline:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* 模式切换标签 */
.warmer-mode-tabs {
    display: flex;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.warmer-mode-tab {
    flex: 1;
    text-align: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.2s;
}

.warmer-mode-tab.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 600;
}


/* ==================== 账号信息采集样式 ==================== */

/* 采集进度弹窗 */
.modal-large {
    max-width: 800px;
    width: 90%;
}

/* 采集统计 */
.collect-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-item .stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 5px;
}

.stat-item .stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #1e293b;
}

.stat-item.success .stat-value {
    color: #10b981;
}

.stat-item.error .stat-value {
    color: #ef4444;
}

/* 进度条 */
.progress-bar-container {
    position: relative;
    width: 100%;
    height: 30px;
    background: #e2e8f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
    color: #1e293b;
}

/* 采集日志 */
.collect-logs h4 {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
}

.log-container {
    max-height: 300px;
    overflow-y: auto;
    background: #1e293b;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.log-item {
    color: #e2e8f0;
    padding: 5px 0;
    line-height: 1.6;
}

.log-item.success {
    color: #10b981;
}

.log-item.error {
    color: #ef4444;
}

.log-item.warning {
    color: #f59e0b;
}

/* 按钮样式 */
.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

/* 状态徽章 */
.status-badge.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-error {
    background: #fee2e2;
    color: #991b1b;
}

/* 文本样式 */
.text-muted {
    color: #94a3b8;
    font-style: italic;
}

/* 账号复选框 */
.account-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

#select-all-accounts {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* 代理复选框样式 */
.proxy-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#selectAllProxies {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 5px;
}

/* 半选状态样式 */
#selectAllProxies:indeterminate {
    opacity: 0.5;
}

/* 批量测试按钮禁用状态 */
#batchTestBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #94a3b8;
}

#batchTestBtn:disabled:hover {
    background: #94a3b8;
}

/* 滚动条样式 */
.log-container::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ==================== 系统设置页面样式 ==================== */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    font-weight: 600;
}

.settings-tab {
    display: none;
}

.settings-tab.active {
    display: block;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-info {
    background-color: #e3f2fd;
    border-left-color: #2196F3;
    color: #1976D2;
}

.alert-success {
    background-color: #e8f5e9;
    border-left-color: #4CAF50;
    color: #2E7D32;
}

.alert-warning {
    background-color: #fff3e0;
    border-left-color: #FF9800;
    color: #E65100;
}

.alert-error {
    background-color: #ffebee;
    border-left-color: #f44336;
    color: #C62828;
}

#config-categories {
    margin-bottom: 30px;
}

.config-category {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

.config-category h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 3px solid #4CAF50;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.config-item:last-child {
    border-bottom: none;
}

.config-label-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.config-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.config-description {
    color: #666;
    font-size: 12px;
    line-height: 1.5;
    display: block;
    margin-top: 2px;
}

.config-input-container {
    width: 100%;
}

.config-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.config-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.config-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 2px solid #e0e0e0;
    margin-top: 24px;
}

.settings-actions .btn {
    min-width: 120px;
    font-size: 15px;
    padding: 12px 24px;
}

.about-info {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.about-info h4 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.about-info h5 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
}

.about-info ul {
    list-style: none;
    padding-left: 0;
}

.about-info ul li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.about-info ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

/* ==================== 账号预览样式 ==================== */
.account-preview {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.account-preview h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.account-preview-item {
    padding: 5px 0;
    color: #666;
    font-size: 13px;
}

.account-preview-item strong {
    color: #333;
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 768px) {
    .config-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .settings-actions {
        flex-direction: column;
    }

    .settings-actions .btn {
        width: 100%;
    }
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-license {
    font-size: 12px;
    color: #666;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}


/* 编辑账号选项卡样式 */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: var(--primary-hover);
}

#cookie-count-display {
    color: var(--text-secondary);
    font-size: 12px;
}


/* ==================== 账号详情弹窗样式 ==================== */

.account-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.account-detail-content {
    position: relative;
    z-index: 10000;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.detail-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.detail-item span {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

/* 仪表板数据卡片 */
.dashboard-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-card h4 {
    margin: 0 0 15px 0;
    color: #4CAF50;
    font-size: 16px;
    text-align: center;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.metric-label {
    font-size: 13px;
    color: #666;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* 笔记表格 */
.notes-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
}

.notes-table {
    width: 100%;
    border-collapse: collapse;
}

.notes-table thead {
    background: #4CAF50;
    color: white;
}

.notes-table th,
.notes-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.notes-table th {
    font-weight: 600;
    font-size: 13px;
}

.notes-table td {
    font-size: 13px;
}

.note-title {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notes-table tbody tr:hover {
    background: #f5f5f5;
}

/* 粉丝数据卡片 */
.fans-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.fans-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fans-card h4 {
    margin: 0 0 15px 0;
    color: #2196F3;
    font-size: 16px;
    text-align: center;
}

.fans-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fans-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.fans-label {
    font-size: 13px;
    color: #666;
}

.fans-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.fans-increase {
    color: #4CAF50;
}

.fans-decrease {
    color: #f44336;
}

.empty-hint {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

/* 详情按钮样式 */
.btn-info {
    background: #2196F3;
    color: white;
}

.btn-info:hover {
    background: #1976D2;
}

/* 表格排序样式 */
.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    position: relative;
    padding-right: 28px !important;
}

.data-table th.sortable:hover {
    background-color: #f1f5f9;
}

.data-table th.sortable.sort-active {
    background-color: #e0e7ff;
    color: var(--primary-color);
    font-weight: 600;
}

.sort-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    font-size: 14px;
    color: #94a3b8;
    transition: all 0.2s;
    background: #f1f5f9;
    border-radius: 3px;
    font-weight: bold;
}

.data-table th.sortable:hover .sort-icon {
    color: var(--primary-color);
    background: #e0e7ff;
    transform: translateY(-50%) scale(1.1);
}

.data-table th.sortable.sort-active .sort-icon {
    color: #ffffff;
    background: var(--primary-color);
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}


/* ==================== API文档页面样式 ==================== */
.api-docs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.api-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.3s ease;
}

.api-section:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.api-section h3 {
    margin: 0 0 24px 0;
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 700;
    padding-bottom: 16px;
    border-bottom: 3px solid #4CAF50;
    display: inline-block;
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.api-endpoint .method {
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.api-endpoint .method.get {
    background: #10b981;
    color: white;
}

.api-endpoint .method.post {
    background: #3b82f6;
    color: white;
}

.api-endpoint .method.put {
    background: #f59e0b;
    color: white;
}

.api-endpoint .method.delete {
    background: #ef4444;
    color: white;
}

.api-endpoint .url {
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.api-description {
    margin-bottom: 28px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-left: 4px solid #4CAF50;
    border-radius: 6px;
    color: #495057;
    line-height: 1.8;
    font-size: 15px;
}

.api-params h4,
.api-example h4,
.api-response h4 {
    margin: 28px 0 16px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-params h4::before {
    content: "📋";
    font-size: 20px;
}

.api-example h4::before {
    content: "💻";
    font-size: 20px;
}

.api-response h4::before {
    content: "✅";
    font-size: 20px;
}

.params-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.params-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.params-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.params-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    background: white;
    font-size: 14px;
}

.params-table tbody tr:hover {
    background: #f8f9fa;
}

.params-table tbody tr:last-child td {
    border-bottom: none;
}

.params-table code {
    background: #e7f3ff;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #0066cc;
    font-weight: 600;
}

.api-example pre,
.api-response pre {
    background: #1e1e1e;
    border: none;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.api-example code,
.api-response code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #d4d4d4;
    display: block;
}

/* 代码高亮 */
.api-example pre code,
.api-response pre code {
    color: #d4d4d4;
}

.api-note {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border-left: 5px solid #ffc107;
    padding: 20px 24px;
    margin-top: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.api-note strong {
    color: #856404;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.api-note ul {
    margin: 12px 0 0 24px;
    color: #856404;
    line-height: 1.8;
}

.api-note li {
    margin: 8px 0;
    font-size: 14px;
}

/* 此处原有重复定义已合并至前部 */

/* 响应式优化 */
@media (max-width: 768px) {
    .api-section {
        padding: 20px;
    }

    .api-endpoint {
        flex-direction: column;
        align-items: flex-start;
    }

    .params-table {
        font-size: 12px;
    }

    .api-example pre,
    .api-response pre {
        padding: 12px;
        font-size: 11px;
    }
}

/* ==================== Toggle 开关样式 ==================== */
.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    user-select: none;
}

.toggle-input {
    display: none;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    background: #ccc;
    border-radius: 10px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked+.toggle-slider {
    background: #ff2442;
}

.toggle-input:checked+.toggle-slider::after {
    left: 18px;
}

.toggle-text {
    color: var(--text-primary);
    white-space: nowrap;
}

/* ==================== 评论多维过滤器样式 ==================== */
.comment-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-filters select {
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
}

.comment-filters select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ==================== 嵌入模式（iframe embed=1）==================== */
body.embed-mode .sidebar,
body.embed-mode .topbar {
    display: none !important;
}
body.embed-mode .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
}
body.embed-mode .content-container {
    padding: 20px !important;
}

/* ==================== 手机授权 UI ==================== */
.mobile-status-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.status-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.status-strip-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4338ca;
    flex-shrink: 0;
}

.status-strip-main {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 6px;
}

.status-strip-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.status-strip-progress {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.status-strip-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
}

.status-refresh-btn {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    padding: 6px 11px;
    cursor: pointer;
}

.status-refresh-btn:hover {
    border-color: #a5b4fc;
    color: #3730a3;
    background: #eef2ff;
}

.entitlement-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
}

.entitlement-pill.is-active {
    border-color: #bbf7d0;
    color: #166534;
    background: #dcfce7;
}

.entitlement-pill.is-inactive {
    border-color: #fecaca;
    color: #991b1b;
    background: #fee2e2;
}

.entitlement-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    padding: 6px 10px;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.entitlement-cta:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #3730a3;
}

.pricing-panel {
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.pricing-panel summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.pricing-panel summary::-webkit-details-marker {
    display: none;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 14px 10px;
}

.pricing-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px;
}

.pricing-card .name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 4px;
}

.pricing-card .price span {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.pricing-card .desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.pricing-note {
    margin: 0 14px 14px;
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    line-height: 1.6;
    padding: 10px 12px;
}

.pricing-note a {
    color: #1d4ed8;
    margin-left: 8px;
    font-weight: 700;
    text-decoration: none;
}

.capacity-tip {
    color: #475569;
}

@media (max-width: 900px) {
    .status-strip {
        align-items: flex-start;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }
}
