/* ===== CSS变量 - 高端金融/体育APP风格 v11.2.0 视觉增强 ===== */
:root {
    color-scheme: light only;
    -webkit-tap-highlight-color: transparent;
    
    /* 核心色彩 - 白色主题增强 */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fafbfc;
    --bg-hover: #f0f2f5;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* 文字颜色 - 更深更突出 */
    --text-primary: #1a202c;
    --text-secondary: #64748b;
    --text-dim: #94a3b8;
    --text-accent: #1e40af;
    
    /* 强调色 - 深蓝系 */
    --accent: #1e40af;
    --accent-dark: #1e3a5f;
    --accent-light: #dbeafe;
    --accent-hover: #1d4ed8;
    
    /* 金色点缀 */
    --gold: #d97706;
    --gold-light: #fef3c7;
    --gold-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    
    /* 状态色 - 更鲜明 */
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #dbeafe;
    --purple: #8b5cf6;
    --purple-light: #ede9fe;
    
    /* 边框 */
    --border: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.04);
    --border-strong: rgba(0, 0, 0, 0.12);
    --border-accent: rgba(30, 64, 175, 0.2);
    
    /* 渐变定义 - 更丰富 */
    --gradient-accent: linear-gradient(135deg, #1e40af, #3b82f6);
    --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
    --gradient-header: linear-gradient(135deg, #1e3a5f, #1e40af);
    --gradient-blue-light: linear-gradient(180deg, rgba(30, 64, 175, 0.03) 0%, transparent 100%);
    
    /* 彩色卡片顶部条 */
    --card-blue: #3b82f6;
    --card-green: #10b981;
    --card-gold: #f59e0b;
    --card-purple: #8b5cf6;
    --card-orange: #f97316;
    --card-pink: #ec4899;
    --card-cyan: #06b6d4;
    
    /* 阴影 - 层次分明 */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --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 24px rgba(0, 0, 0, 0.12);
    --shadow-button: 0 4px 12px rgba(30, 64, 175, 0.3);
    --shadow-elevated: 0 6px 16px rgba(0, 0, 0, 0.1);
    
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', -apple-system, sans-serif;
    background: linear-gradient(180deg, #f5f7fa 0%, #edf2f7 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 美化滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 页面顶部渐变装饰条 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #3b82f6, #10b981, #f59e0b, #8b5cf6, #ec4899);
    z-index: 10001;
}

/* ===== 头部导航 ===== */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: none;
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25);
}

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

.version-badge {
    background: var(--gradient-accent);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.2);
}

/* ===== 底部悬浮导航栏 ===== */
.nav-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 24px;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 6px 8px;
    justify-content: center;
    gap: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
    max-width: 95%;
    width: auto;
}

.nav-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 6px;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    border: none;
    outline: none;
    position: relative;
    letter-spacing: 0.3px;
}

.nav-tab .nav-icon {
    font-size: 22px;
    transition: all 0.25s ease;
}

.nav-tab:hover {
    color: #1e40af;
    background: rgba(30, 64, 175, 0.06);
}

.nav-tab:hover .nav-icon {
    transform: scale(1.1) translateY(-1px);
}

.nav-tab.active {
    color: #1e40af;
    background: rgba(30, 64, 175, 0.1);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #3b82f6);
    border-radius: 2px;
}

.nav-tab.active .nav-icon {
    transform: scale(1.15) translateY(-2px);
}

/* ===== 主内容区 ===== */
.main-content {
    padding: 24px;
    padding-bottom: 60px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page.animate-in {
    animation: pageFadeIn 0.3s ease;
}

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

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .header { padding: 10px 16px; }
    .logo span { display: none; }
    .main-content { padding: 16px; }
    .nav-tabs { width: calc(100% - 24px); max-width: 400px; bottom: 10px; padding: 5px 6px; }
    .nav-tab { padding: 6px 4px; font-size: 9px; }
    .nav-tab .nav-icon { font-size: 20px; }
}

/* ===== 登录验证遮罩 ===== */
body.not-logged-in .page:not(#page-login):not(#page-register) .main-content,
body.not-logged-in .header,
body.not-logged-in .nav-tabs {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

/* ===== 退出登录按钮 ===== */
.logout-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: var(--danger);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 16px;
}
        
.logout-btn:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: translateY(-2px);
}

/* ===== 锁定提示 ===== */
.lock-message {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    color: var(--danger);
    font-size: 13px;
    text-align: center;
    font-weight: 600;
}

/* ===== Badge 角标 ===== */
.badge {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
}

/* ===== 加载动画 ===== */
.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    gap: 16px;
}

.loading-text {
    color: var(--accent);
    font-size: 14px;
    letter-spacing: 1px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 52px;
    margin-bottom: 16px;
}

.load-more-btn {
    text-align: center;
    padding: 14px 0;
    margin: 16px 0 10px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    background: var(--accent-light);
    transition: var(--transition-smooth);
    letter-spacing: 0.5px;
}

.load-more-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.load-more-btn:active {
    transform: scale(0.98);
}

.schedule-no-more {
    text-align: center;
    padding: 16px 0 8px;
    color: #cbd5e1;
    font-size: 12px;
}

/* ===== 弹窗默认隐藏（登录前CSS延迟加载时也需要） ===== */
.recharge-sheet-overlay,
.usdt-sheet-overlay,
.pay-iframe-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 5000;
}
.recharge-sheet-overlay.active,
.usdt-sheet-overlay.active,
.pay-iframe-overlay.active {
    display: flex;
}
