/* ============================================================
   用户端 Web 站 — 移动优先彩票App风格
   ============================================================ */

:root {
    --user-primary: #F43B39;
    --user-primary-hover: #D92F2D;
    --user-primary-light: #FFF0F0;
    --user-primary-subtle: #FFEBEE;
    --user-accent: #FF6B35;
    --user-accent-hover: #E85D2C;
    --user-bg: #F6F6F6;
    --user-card-bg: #FFFFFF;
    --user-text: #1A1A1A;
    --user-text-secondary: #666666;
    --user-text-hint: #999999;
    --user-border: #E8E8E8;
    --user-border-light: #F0F0F0;
    --user-success: #2ECC71;
    --user-warning: #F39C12;
    --user-danger: #E74C3C;
    --user-info: #3498DB;
    --user-card-shadow: 0 4px 14px rgba(28,31,35,0.06);
    --user-card-shadow-hover: 0 8px 22px rgba(28,31,35,0.1);
    --user-radius: 18px;
    --user-radius-sm: 12px;
    --user-radius-xs: 6px;
    --user-tab-height: 64px;
    --user-header-height: 50px;
    --user-safe-bottom: env(safe-area-inset-bottom, 0px);
    --user-dynamic-bottom-space: 0px;
    --user-desktop-tab-bottom: 18px;
    --user-desktop-tab-height: 68px;

    /* 彩种配色 */
    --color-dlt: #E43D3D;       /* 大乐透 - 红 */
    --color-jj-football: #27AE60; /* 竞猜足球 - 绿 */
    --color-jj-basketball: #E67E22; /* 竞猜篮球 - 橙 */
    --color-bj-danchang: #00BCD4; /* 北京单场 - 青绿 */
    --color-pl3: #3498DB;       /* 排列3 - 蓝 */
    --color-pl5: #9B59B6;      /* 排列5 - 紫 */
    --color-qxc: #1A5276;      /* 七星彩 - 靛蓝 */
    --color-ct-football: #2C3E50; /* 传统足球 - 深灰蓝 */
}

body.user-page-home {
    --user-header-height: 60px;
}

body.user-page-matches {
    --user-header-height: 56px;
    padding-bottom: var(--user-safe-bottom);
}

/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--user-bg);
    color: var(--user-text);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    padding-top: var(--user-header-height);
    padding-bottom: calc(var(--user-tab-height) + var(--user-safe-bottom) + var(--user-dynamic-bottom-space) + 12px);
}

body.user-page-login,
body.user-page-register {
    padding-bottom: var(--user-safe-bottom);
}

/* iOS 安全区 */
body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

a {
    color: var(--user-primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== 页面内容区（底部留出Tab空间） ========== */
.page-content {
    max-width: 750px;
    width: 100%;
    margin: 0 auto;
    padding: 12px 12px 64px;
    min-height: calc(100vh - var(--user-header-height) - var(--user-tab-height));
    padding-bottom: calc(var(--user-tab-height) + var(--user-safe-bottom) + var(--user-dynamic-bottom-space) + 20px);
}

.page-content-no-tab {
    max-width: 750px;
    margin: 0 auto;
    padding: 12px 12px 0;
    min-height: calc(100vh - var(--user-header-height));
}

/* ========== Toast 提示 ========== */
.toast-msg {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(92vw, 520px);
    line-height: 1.45;
    text-align: center;
}
.toast-msg.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast-msg.error {
    background: var(--user-danger);
}
.toast-msg.success {
    background: var(--user-success);
}
.toast-msg.warning {
    background: var(--user-warning);
}

/* ========== 顶部导航栏 ========== */
.user-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--user-header-height);
    background: var(--user-primary);
    color: #fff;
    z-index: 1050;
    box-shadow: 0 2px 8px rgba(228, 61, 61, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.user-header.home-app-header {
    height: var(--user-header-height);
    align-items: center;
    padding: 0 18px;
    box-shadow: none;
}

.home-header-inner {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.home-shop-entry {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    text-decoration: none;
}

.home-shop-entry:hover,
.home-shop-entry:active {
    color: #fff;
}

.home-shop-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
    overflow: hidden;
    flex-shrink: 0;
}

.home-shop-logo img {
    width: 29px;
    height: 29px;
    border-radius: 8px;
}

.home-shop-name {
    max-width: min(58vw, 430px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1.08rem, 4.2vw, 1.45rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: .02em;
}

.home-header-actions {
    display: none;
}

.home-header-action {
    position: relative;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.18);
    transition: background .2s, transform .2s;
}

.home-header-action:hover,
.home-header-action:active {
    color: #fff;
    background: rgba(255,255,255,.22);
}

.home-header-action:active {
    transform: scale(.98);
}

.home-header-badge {
    position: absolute;
    right: 8px;
    top: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #FFD700;
    border: 1px solid var(--user-primary);
}

.user-header .header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.user-header .header-logo img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.user-header .header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-header .header-actions a {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    position: relative;
}

.user-header .header-actions a:hover {
    color: #fff;
}

.user-header .badge-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: #FFD700;
    border-radius: 50%;
    border: 1.5px solid var(--user-primary);
}

.user-header .header-back {
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: rgba(255,255,255,.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 2px;
    flex-shrink: 0;
}

.user-header .header-back:active {
    background: rgba(255,255,255,.24);
}

.user-header .header-title {
    font-size: 1rem;
    font-weight: 600;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.selection-header-inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-header-inner .selection-back {
    position: absolute;
    left: 0;
    margin-right: 0;
    background: transparent;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.42rem;
}

.selection-header-title {
    max-width: calc(100% - 140px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.26rem;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1;
}

.selection-rule-link {
    position: absolute;
    right: 2px;
    min-width: 54px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .98rem;
    font-weight: 800;
    text-decoration: none;
}

.selection-rule-link:hover,
.selection-rule-link:active {
    color: #fff;
    background: rgba(255,255,255,.14);
}

/* ========== 底部 Tab 导航 ========== */
.user-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--user-tab-height) + var(--user-safe-bottom));
    padding-bottom: var(--user-safe-bottom);
    background: rgba(255,255,255,0.98);
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: stretch;
    z-index: 1050;
    box-shadow: 0 -4px 18px rgba(0,0,0,0.06);
    backdrop-filter: blur(12px);
}

.user-tabbar .tab-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--user-text-hint);
    font-size: 0.78rem;
    text-decoration: none;
    transition: color 0.2s;
    gap: 3px;
    padding: 7px 0 5px;
    font-weight: 700;
}

.user-tabbar .tab-item i {
    font-size: 1.58rem;
    transition: color 0.2s;
    line-height: 1;
}

.user-tabbar .tab-item.active {
    color: var(--user-primary);
}

.user-tabbar .tab-item.active i {
    color: var(--user-primary);
}

.user-tabbar .tab-item:hover {
    color: var(--user-primary);
}

/* 统一禁用态：避免页面视觉上“可点”，实际接口又拒绝 */
button:disabled,
.btn:disabled,
.btn.disabled,
.pm-btn.disabled,
.odd-btn.disabled,
[aria-disabled="true"] {
    opacity: .58;
    cursor: not-allowed !important;
}

button:disabled,
.btn:disabled,
.btn.disabled {
    pointer-events: none;
}

.u-clickable {
    cursor: pointer;
}

/* ========== 卡片通用 ========== */
.card {
    border: none;
    border-radius: var(--user-radius);
    box-shadow: var(--user-card-shadow);
    background: var(--user-card-bg);
    margin-bottom: 12px;
    overflow: hidden;
}

.card-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--user-border-light);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 16px;
}

/* ========== 页面标题 ========== */
.page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--user-text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========== 按钮样式 ========== */
.btn-primary {
    background: var(--user-primary);
    border-color: var(--user-primary);
    border-radius: var(--user-radius-sm);
    font-size: 0.9rem;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover, .btn-primary:active {
    background: var(--user-primary-hover);
    border-color: var(--user-primary-hover);
}

.btn-primary:disabled {
    background: #ccc;
    border-color: #ccc;
}

.btn-outline-primary {
    border-color: var(--user-primary);
    color: var(--user-primary);
    border-radius: var(--user-radius-sm);
    font-size: 0.9rem;
    padding: 8px 20px;
    font-weight: 600;
}

.btn-outline-primary:hover, .btn-outline-primary:active {
    background: var(--user-primary);
    border-color: var(--user-primary);
    color: #fff;
}

.btn-accent {
    background: var(--user-accent);
    border-color: var(--user-accent);
    border-radius: var(--user-radius-sm);
    font-size: 0.9rem;
    padding: 10px 24px;
    font-weight: 600;
    color: #fff;
}

.btn-accent:hover {
    background: var(--user-accent-hover);
    border-color: var(--user-accent-hover);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: var(--user-radius-xs);
}

.btn-block {
    width: 100%;
    display: block;
}

/* ========== 表单 ========== */
.form-control, .form-select {
    border-radius: var(--user-radius-sm);
    border: 1px solid var(--user-border);
    padding: 10px 14px;
    font-size: 14px;
    min-height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--user-primary);
    box-shadow: 0 0 0 3px rgba(228, 61, 61, 0.15);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--user-text);
    margin-bottom: 6px;
}

.form-group {
    margin-bottom: 16px;
}

/* ========== 彩种入口图标 ========== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 4px;
}

.game-grid .game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    cursor: pointer;
    border-radius: var(--user-radius);
    transition: background 0.2s;
}

.game-grid .game-item:active {
    background: var(--user-primary-light);
}

.game-grid .game-item .game-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.game-grid .game-item .game-name {
    font-size: 0.75rem;
    color: var(--user-text);
    text-align: center;
}

/* ========== 比赛卡片 ========== */
.match-card {
    background: #fff;
    border-radius: var(--user-radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--user-card-shadow);
    transition: box-shadow 0.2s;
}

.match-card:active {
    box-shadow: var(--user-card-shadow-hover);
}

.match-card .match-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: var(--user-text-secondary);
}

.match-card .match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.match-card .match-teams .team {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-card .match-teams .team.home {
    text-align: right;
}

.match-card .match-teams .team.away {
    text-align: left;
}

.match-card .match-teams .score {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--user-primary);
    text-align: center;
    min-width: 50px;
}

.match-card .match-odds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.match-card .match-odds .odd-btn {
    padding: 6px 4px;
    text-align: center;
    border: 1px solid var(--user-border);
    border-radius: var(--user-radius-xs);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}

.match-card .match-odds .odd-btn:active {
    background: var(--user-primary-light);
    border-color: var(--user-primary);
}

.match-card .match-odds .odd-btn.selected {
    background: var(--user-primary);
    border-color: var(--user-primary);
    color: #fff;
}

.match-card .match-odds .odd-btn .odd-label {
    color: var(--user-text-secondary);
    font-size: 0.7rem;
    display: block;
}

.match-card .match-odds .odd-btn .odd-value {
    font-weight: 700;
    font-size: 0.85rem;
}

.match-card .match-odds .odd-btn.selected .odd-label {
    color: rgba(255,255,255,0.8);
}
.match-card .match-odds .odd-btn.selected .odd-value {
    color: #fff;
}

/* ========== 赔率变化指示 ========== */
.odd-up { color: var(--user-primary); }
.odd-down { color: var(--user-success); }

/* ========== Banner 轮播 ========== */
.banner-slider {
    border-radius: var(--user-radius);
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.banner-slider .banner-img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
}

.banner-slider .banner-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.banner-slider .banner-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s;
}

.banner-slider .banner-dots .dot.active {
    background: #fff;
    width: 18px;
    border-radius: 3px;
}

/* ========== 金刚区 ========== */
.quick-entry {
    background: #fff;
    border-radius: var(--user-radius);
    padding: 16px 8px;
    margin-bottom: 12px;
    box-shadow: var(--user-card-shadow);
}

/* ========== 开奖号码球 ========== */
.draw-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin: 2px;
}

.draw-ball.front { background: var(--user-primary); }
.draw-ball.back { background: #3498DB; }
.draw-ball.special { background: var(--user-accent); }

/* ========== 合买进度条 ========== */
.gb-progress {
    height: 8px;
    border-radius: 4px;
    background: var(--user-border-light);
    overflow: hidden;
    margin: 8px 0;
}

.gb-progress .gb-progress-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--user-primary), var(--user-accent));
    transition: width 0.5s ease;
}

/* 订单与合买方案共用的只读业务标签 */
.order-badges { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.order-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: .7rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.order-badge--copy { background: #eaf2ff; color: #1d4ed8; }
.order-badge--groupbuy { background: #fef3c7; color: #92400e; }

/* ========== 订单状态标签 ========== */
.status-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-tag.pending {
    background: #FFF3E0;
    color: #E65100;
}

.status-tag.waiting {
    background: #E3F2FD;
    color: #1565C0;
}

.status-tag.win {
    background: #FFF0F0;
    color: var(--user-primary);
}

.status-tag.lose {
    background: #F5F5F5;
    color: var(--user-text-hint);
}

.status-tag.paid {
    background: #E8F5E9;
    color: #2E7D32;
}

/* ========== 列表菜单（个人中心） ========== */
.menu-list {
    background: #fff;
    border-radius: var(--user-radius);
    overflow: hidden;
    box-shadow: var(--user-card-shadow);
}

.menu-list .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--user-border-light);
    cursor: pointer;
    transition: background 0.2s;
}

.menu-list .menu-item:last-child {
    border-bottom: none;
}

.menu-list .menu-item:active {
    background: var(--user-primary-light);
}

.menu-list .menu-item .menu-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-list .menu-item .menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.menu-list .menu-item .menu-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.menu-list .menu-item .menu-right {
    color: var(--user-text-hint);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 金额显示 ========== */
.amount {
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

.amount.positive { color: var(--user-primary); }
.amount.negative { color: var(--user-success); }

/* ========== 用户头像 ========== */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--user-border-light);
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========== 加载动画 ========== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px 20px;
    min-height: 148px;
    color: var(--user-primary);
}

.loading-spinner i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--user-primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    color: var(--user-primary);
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 46px 20px;
    color: var(--user-text-hint);
    background: rgba(255,255,255,.72);
    border: 1px dashed rgba(15, 23, 42, .08);
    border-radius: var(--user-radius);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .035);
}

.empty-state i {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    margin-bottom: 12px;
    opacity: 0.72;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* ========== 钱包卡片 ========== */
.wallet-card {
    background: linear-gradient(135deg, var(--user-primary), #C62828);
    border-radius: var(--user-radius);
    padding: 24px 20px;
    color: #fff;
    margin-bottom: 16px;
}

.wallet-card .wallet-label {
    font-size: 0.8rem;
    opacity: 0.85;
}

.wallet-card .wallet-amount {
    font-size: 2rem;
    font-weight: 700;
    margin: 8px 0;
}

.wallet-card .wallet-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.wallet-card .wallet-actions .wallet-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--user-radius-sm);
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: #fff;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.wallet-card .wallet-actions .wallet-btn:active {
    background: rgba(255,255,255,0.25);
}

/* ========== 响应式断点 ========== */
@media (min-width: 768px) {
    .page-content {
        padding: 20px 24px 0;
        padding-bottom: calc(64px + var(--user-safe-bottom));
    }
    .game-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1024px) {
    body.user-page-home {
        --user-header-height: 64px;
    }
    body {
        padding-top: 0;
        padding-bottom: calc(var(--user-desktop-tab-bottom) + var(--user-desktop-tab-height) + var(--user-dynamic-bottom-space) + 24px);
        background:
            radial-gradient(circle at 15% 0%, rgba(244,59,57,.06), transparent 26%),
            linear-gradient(180deg, #f8fafc 0%, #f5f5f5 48%, #f8fafc 100%);
    }
    body.user-page-login,
    body.user-page-register {
        padding-bottom: var(--user-safe-bottom);
    }
    .user-header {
        position: relative;
        padding-left: 32px;
        padding-right: 32px;
        min-height: var(--user-header-height);
    }
    .user-header.home-app-header {
        justify-content: center;
        padding: 0 32px;
    }
    .home-header-inner {
        width: min(1220px, calc(100vw - 64px));
        padding: 0 28px;
    }
    .home-shop-entry {
        flex: 0 1 auto;
    }
    .home-header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 0 0 auto;
    }
    .user-tabbar {
        left: 50%;
        right: auto;
        bottom: var(--user-desktop-tab-bottom);
        width: min(560px, calc(100vw - 48px));
        height: var(--user-desktop-tab-height);
        padding-bottom: 0;
        border-radius: 24px;
        border: 1px solid rgba(15, 23, 42, .08);
        box-shadow: 0 14px 36px rgba(15, 23, 42, .14);
        transform: translateX(-50%);
        overflow: hidden;
    }
    .user-tabbar .tab-item {
        margin: 6px 4px;
        border-radius: 18px;
        padding: 6px 0;
    }
    .user-tabbar .tab-item.active {
        background: var(--user-primary-light);
    }
    .page-content {
        max-width: 960px;
        padding-bottom: calc(var(--user-desktop-tab-bottom) + var(--user-desktop-tab-height) + var(--user-dynamic-bottom-space) + 24px);
    }
}

/* ========== 安全区 ========== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .user-tabbar {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ============================================================
   用户端 Web v2 设计组件：移动购彩体验
   ============================================================ */
.u-hero {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 18px 16px;
    margin-bottom: 12px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 10%, rgba(255,255,255,.35), transparent 26%),
        linear-gradient(135deg, #f04444 0%, #c8202c 100%);
    box-shadow: 0 10px 24px rgba(228,61,61,.18);
}
.u-hero .eyebrow { font-size: .74rem; opacity: .85; margin-bottom: 4px; }
.u-hero .title { font-size: 1.25rem; font-weight: 900; letter-spacing: .5px; }
.u-hero .desc { font-size: .8rem; opacity: .9; margin-top: 4px; }
.u-hero .actions { display: flex; gap: 8px; margin-top: 14px; }
.u-hero .hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 17px;
    background: #fff;
    color: var(--user-primary);
    font-size: .78rem;
    font-weight: 800;
}
.u-hero .hero-btn.ghost { background: rgba(255,255,255,.17); color: #fff; border: 1px solid rgba(255,255,255,.28); }

.u-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 2px 9px;
}
.u-section-head .title { font-size: .96rem; font-weight: 900; color: var(--user-text); }
.u-section-head .sub { font-size: .74rem; color: var(--user-text-hint); }
.u-chip-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 8px;
}
.u-chip-row::-webkit-scrollbar { display: none; }
.u-chip {
    flex-shrink: 0;
    border: 1px solid var(--user-border);
    background: #fff;
    color: var(--user-text-secondary);
    min-height: 34px;
    padding: 0 14px;
    border-radius: 17px;
    font-size: .8rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.u-chip.active {
    background: var(--user-primary);
    border-color: var(--user-primary);
    color: #fff;
}
.u-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--user-card-shadow);
    border: 1px solid rgba(0,0,0,.02);
    overflow: hidden;
}
.u-card + .u-card { margin-top: 10px; }
.u-muted { color: var(--user-text-hint); }
.u-danger { color: var(--user-primary); }
.u-bottom-cta {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    bottom: calc(var(--user-tab-height) + var(--user-safe-bottom) + 10px);
    z-index: 1040;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--user-border);
    box-shadow: 0 -8px 24px rgba(15,23,42,.08);
}

body.user-page-login .page-content,
body.user-page-register .page-content {
    min-height: calc(100vh - var(--user-header-height));
    padding-bottom: calc(16px + var(--user-safe-bottom));
}

@media (max-width: 767.98px) {
    .user-page {
        min-width: 0;
    }
    .user-header,
    .user-tabbar {
        width: 100%;
        max-width: 100vw;
    }
    .page-content,
    .page-content-no-tab {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
        overflow-x: clip;
    }
    .card,
    .u-card,
    .match-card,
    .odds-section,
    .md-header,
    .banner-wrapper,
    .quick-entry {
        max-width: 100%;
    }
    .match-card .match-teams,
    .md-header .md-teams {
        grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    }
    .match-card .match-teams .team,
    .md-header .md-teams .md-team {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .match-card .match-odds,
    .odds-section .odds-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .u-bottom-cta {
        left: 0;
        right: 0;
        transform: none;
        max-width: 100vw;
    }
}

@media (max-width: 420px) {
    .page-content {
        padding-left: 10px;
        padding-right: 10px;
    }
    .game-grid {
        gap: 8px;
    }
    .game-grid .game-item {
        padding-left: 2px;
        padding-right: 2px;
    }
    .game-grid .game-item .game-icon {
        width: 44px;
        height: 44px;
    }
    .match-card {
        border-radius: 14px;
    }
}
@media (min-width: 768px) {
    .u-bottom-cta {
        left: 50%;
        transform: translateX(-50%);
        max-width: 720px;
        border-left: 1px solid var(--user-border);
        border-right: 1px solid var(--user-border);
    }
}

@media (min-width: 1024px) {
    .u-bottom-cta {
        bottom: calc(var(--user-desktop-tab-bottom) + var(--user-desktop-tab-height) + 12px);
    }
}

/* ============================================================
   骨架屏样式
   ============================================================ */
.skeleton-card {
    background: #fff;
    border-radius: var(--user-radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--user-card-shadow);
}

.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: var(--user-radius-sm);
    margin-bottom: 8px;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    flex-shrink: 0;
}

.skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-line.skeleton-title {
    height: 18px;
    width: 70%;
}

.skeleton-line.skeleton-sub {
    height: 14px;
    width: 50%;
}

.skeleton-line.skeleton-text {
    height: 12px;
    width: 90%;
}

.skeleton-line.skeleton-short {
    width: 40%;
}

.skeleton-line.skeleton-medium {
    width: 70%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 简化版加载状态 */
.loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.loading-skeleton .skeleton-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.loading-skeleton .skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.loading-skeleton .skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading-skeleton .skeleton-row {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.loading-skeleton .skeleton-row.short {
    width: 40%;
}

.loading-skeleton .skeleton-row.medium {
    width: 70%;
}

.loading-skeleton .skeleton-row.long {
    width: 100%;
}
