/* 科技感主题 - 移动端 APP 风格 */
:root {
    --bg-deep:    #060B18;
    --bg-panel:   #0D1527;
    --bg-card:    #111B33;
    --accent:     #00D4FF;
    --accent2:    #7B2FFF;
    --success:    #00FF88;
    --warning:    #FF6B00;
    --danger:     #FF2D55;
    --text:       #E2E8F0;
    --text-muted: #64748B;
    --border:     rgba(0, 212, 255, 0.2);
    --glow:       0 0 20px rgba(0, 212, 255, 0.35);
    --glow-sm:    0 0 8px rgba(0, 212, 255, 0.4);
    --app-max-w:  480px;
    --header-h:   52px;
    --bottom-nav-h: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body, .app-body {
    background: #020508;
    color: var(--text);
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

/* ---- APP 外壳 ---- */
.app-frame {
    max-width: var(--app-max-w);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-deep);
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.app-body-full .app-frame { max-width: none; box-shadow: none; }

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding-top: env(safe-area-inset-top);
}

.app-header-logo { font-size: 1.3rem; }
.app-header-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    text-shadow: var(--glow-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-header-back {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: var(--accent);
    text-decoration: none; border-radius: 8px;
}
.app-header-user {
    font-size: 0.75rem; color: var(--text-muted);
    max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-header-logout {
    font-size: 0.72rem; color: var(--text-muted);
    text-decoration: none; padding: 4px 10px;
    border: 1px solid var(--border); border-radius: 6px;
    margin-left: 6px; flex-shrink: 0;
}
.app-header-logout:hover { color: var(--accent); border-color: var(--accent); }
.app-header-right { display: flex; align-items: center; }

.app-main { min-height: calc(100vh - var(--header-h)); }
.app-main.has-bottom-nav {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 8px);
}

.page-content { padding: 1rem; }

/* ---- 底部 Tab 导航 ---- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: var(--app-max-w);
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(13, 21, 39, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 200;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

.bottom-nav-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.62rem;
    transition: color 0.2s;
    padding: 4px 0;
}
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-icon { font-size: 1.2rem; line-height: 1; }
.bottom-nav-label-long { font-size: 0.65rem; letter-spacing: -0.02em; }

.bottom-nav-fab { position: relative; }
.bottom-nav-fab-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: #fff;
    font-size: 1.4rem; font-weight: 300;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--glow-sm);
    margin-top: -8px;
}
.bottom-nav-fab.active .bottom-nav-fab-btn { box-shadow: var(--glow); }

/* ---- 平台客服页 ---- */
.support-hero {
    text-align: center;
    padding: 1.25rem 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(145deg, rgba(123, 47, 255, 0.12), rgba(0, 212, 255, 0.08));
    border-color: rgba(0, 212, 255, 0.25);
}
.support-hero-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.support-hero-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
}
.support-hero-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}
.support-contact-link { text-decoration: none; color: inherit; }
.support-copy-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    font: inherit;
    color: var(--accent);
    text-align: right;
}
.support-copy-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.35rem;
}
.support-qr-card { text-align: center; }
.support-qr-wrap {
    display: inline-block;
    padding: 0.75rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--glow-sm);
}
.support-qr-img {
    display: block;
    width: 200px;
    height: 200px;
    object-fit: contain;
}
.text-accent { color: var(--accent); }

.support-message-card { margin-top: 1rem; }
.support-message-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 1rem;
}
.support-message-input { min-height: 96px; resize: vertical; }
.support-my-messages {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.support-my-messages-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.support-message-item {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}
.support-message-item:last-child { border-bottom: none; }
.support-message-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.support-message-body {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}
.chip-badge {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.05rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
    vertical-align: middle;
}
.support-admin-message-unread {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: var(--glow-sm);
}
.support-admin-message-content {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
}

/* ---- 卡片 ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
}
.card-title {
    font-size: 0.85rem; font-weight: 600;
    color: var(--accent); margin-bottom: 0.75rem;
}

/* ---- 移动端列表卡片 ---- */
.list-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    margin-bottom: 0.625rem;
}
.list-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.5rem;
}
.list-card-title { font-weight: 600; color: var(--accent); font-size: 0.95rem; }
.list-card-row {
    display: flex; justify-content: space-between;
    font-size: 0.8rem; color: var(--text-muted);
    padding: 0.2rem 0;
}
.list-card-row .val { color: var(--text); }
.list-card-actions { margin-top: 0.625rem; display: flex; gap: 0.5rem; justify-content: flex-end; }

/* ---- 按钮 ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.4rem; padding: 0.55rem 1rem;
    border-radius: 8px; border: none; cursor: pointer;
    font-size: 0.875rem; font-weight: 500;
    transition: all 0.2s; text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: #fff; box-shadow: var(--glow-sm);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-danger {
    background: rgba(255, 45, 85, 0.15);
    border: 1px solid rgba(255, 45, 85, 0.4);
    color: var(--danger);
}
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.btn-block { width: 100%; }

/* ---- 表单 ---- */
.form-group { margin-bottom: 1rem; }
.form-label {
    display: block; font-size: 0.75rem;
    color: var(--text-muted); margin-bottom: 0.35rem;
}
.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.875rem;
    color: var(--text); font-size: 0.9rem;
    outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: var(--glow-sm); }
select.form-control option { background: var(--bg-card); }

/* ---- 徽章 ---- */
.badge {
    display: inline-flex; padding: 0.15rem 0.55rem;
    border-radius: 100px; font-size: 0.7rem; font-weight: 600;
}
.badge-pending   { background: rgba(245,158,11,0.15); color: #F59E0B; border: 1px solid rgba(245,158,11,0.3); }
.badge-active    { background: rgba(0,255,136,0.15);  color: var(--success); border: 1px solid rgba(0,255,136,0.3); }
.badge-completed { background: rgba(100,116,139,0.15); color: var(--text-muted); border: 1px solid rgba(100,116,139,0.3); }
.badge-cancelled { background: rgba(255,45,85,0.15);  color: var(--danger); border: 1px solid rgba(255,45,85,0.3); }

/* ---- 统计卡片 ---- */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    margin-bottom: 1rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.875rem 1rem;
}
.stat-label { font-size: 0.68rem; color: var(--text-muted); }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--accent); font-family: Consolas, monospace; margin-top: 0.2rem; }

/* ---- 筛选标签 ---- */
.filter-chips {
    display: flex; gap: 0.5rem;
    overflow-x: auto; padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0;
    padding: 0.35rem 0.875rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-decoration: none;
    white-space: nowrap;
}
.chip.active, .chip:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,255,0.08); }

/* ---- 提示 ---- */
.alert {
    padding: 0.75rem 1rem; border-radius: 8px;
    font-size: 0.85rem; margin-bottom: 1rem;
}
.alert-error   { background: rgba(255,45,85,0.1);  border: 1px solid rgba(255,45,85,0.3);  color: var(--danger); }
.alert-success { background: rgba(0,255,136,0.1);  border: 1px solid rgba(0,255,136,0.3);  color: var(--success); }

/* ---- 个人中心 ---- */
.profile-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1rem;
}
.profile-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 0.75rem;
}
.profile-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.65rem; }

/* 等级 + 充值按钮：纵向排列，充值在等级正下方 */
.profile-tier-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}
.profile-tier {
    display: inline-block;
    padding: 0.2rem 0.875rem;
    border-radius: 100px;
    border: 1px solid;
    font-size: 0.78rem;
}
.profile-tier-link {
    text-decoration: none;
    transition: opacity 0.2s, box-shadow 0.2s;
}
.profile-tier-link:active {
    opacity: 0.85;
}

/* 会员升级说明 */
.tier-guide-current {
    border-color: rgba(0, 212, 255, 0.2);
}
.tier-progress-track {
    height: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.tier-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #7B2FFF, #00D4FF);
    transition: width 0.4s ease;
}
.tier-guide-card-current {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.08);
}

/* 个人中心 - 充值按钮（位于等级正下方） */
.profile-recharge-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 168px;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #34d399 0%, #10b981 45%, #059669 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.profile-recharge-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.42);
}
.profile-recharge-btn:active {
    transform: translateY(0);
}

/* ---- 弹窗 ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(6, 11, 24, 0.72);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-sheet {
    width: 100%;
    max-width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem 1rem 1rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.25s ease;
}
.modal-overlay.show .modal-sheet {
    transform: translateY(0) scale(1);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}
.modal-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1rem;
}
.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
}
.modal-actions .btn {
    flex: 1;
}
.modal-fee-box {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}
.modal-fee-box.has-penalty {
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.07);
}
.modal-fee-box.no-penalty {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.07);
}
.modal-fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-top: 0.4rem;
}
.modal-fee-row:first-child {
    margin-top: 0;
}
.modal-fee-row .label {
    color: var(--text-muted);
}
.modal-fee-row .amount {
    font-weight: 600;
}
.modal-fee-row .amount.danger {
    color: #f87171;
}
.modal-fee-row .amount.success {
    color: #34d399;
}

.info-list, .action-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.info-item, .action-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.875rem;
    text-decoration: none; color: var(--text);
}
.info-item:last-child, .action-item:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-size: 0.8rem; }
.info-value { font-weight: 600; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.action-arrow { color: var(--text-muted); font-size: 1.2rem; }
.action-item-danger { color: var(--danger); }

/* ---- 首页 Hero ---- */
.hero-section {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
}
.hero-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.hero-title {
    font-size: 1.4rem; font-weight: 700;
    color: var(--accent); text-shadow: var(--glow);
    margin-bottom: 0.5rem;
}
.hero-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

.feature-grid { padding: 0 1rem 1rem; }
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.625rem;
    display: flex; gap: 0.875rem; align-items: flex-start;
}
.feature-icon { font-size: 1.75rem; flex-shrink: 0; }
.feature-title { font-weight: 600; color: var(--accent); font-size: 0.9rem; margin-bottom: 0.25rem; }
.feature-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* ---- 登录页 ---- */
.login-bg {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(123,47,255,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0,212,255,0.12) 0%, transparent 50%),
        var(--bg-deep);
}
.login-card {
    background: rgba(13, 21, 39, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    width: 100%; max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), var(--glow);
}
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo h1 { font-size: 1.3rem; color: var(--accent); text-shadow: var(--glow); }
.login-logo p  { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ---- 分页 ---- */
.pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.page-btn {
    padding: 0.35rem 0.7rem; border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent; color: var(--text);
    text-decoration: none; font-size: 0.8rem;
}
.page-btn.active { border-color: var(--accent); color: var(--accent); }

/* ---- 空状态 ---- */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* ---- 快捷操作 ---- */
.quick-actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* 兼容旧类名 */
.container, .container-sm { padding: 0; max-width: none; margin: 0; }
.table-wrap { display: none; }

/* ---- 错误页 ---- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(255,45,85,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(123,47,255,0.1) 0%, transparent 50%),
        var(--bg-deep);
}
.error-card {
    width: 100%;
    max-width: 380px;
    background: rgba(13, 21, 39, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 45, 85, 0.25);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(255,45,85,0.15);
}
.error-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 12px rgba(255,107,0,0.6));
}
.error-code {
    font-family: Consolas, monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--danger);
    text-shadow: 0 0 20px rgba(255,45,85,0.5);
    line-height: 1;
    margin-bottom: 0.75rem;
}
.error-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.625rem;
}
.error-message {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}
.error-request-id {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: Consolas, monospace;
    margin-bottom: 1.25rem;
    word-break: break-all;
}
.error-actions { margin-top: 0.5rem; }

/* ---- 复制成功提示 ---- */
.copy-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom) + 16px);
    transform: translateX(-50%) translateY(12px);
    max-width: calc(var(--app-max-w, 480px) - 2rem);
    padding: 0.65rem 1.25rem;
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
    font-size: 0.875rem;
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
}
.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
