/* 足球竞猜 - 前台样式 */
:root {
    --primary: #15803d;
    --primary-dark: #166534;
    --primary-light: #dcfce7;
    --accent: #22c55e;
    --bg: #eef1f6;
    --card: #fff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(15, 23, 42, .06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, .1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.6;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.container--home { max-width: 640px; }
.container--flash { max-width: 640px; padding-top: .5rem; }

/* Header */
.site-header {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 200;
    padding-top: env(safe-area-inset-top);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; gap: .75rem; position: relative;
}
.logo {
    font-size: 1.1rem; font-weight: 800; color: var(--primary);
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.logo:hover { text-decoration: none; }

.nav-toggle {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px;
    border: none; background: transparent; cursor: pointer;
    border-radius: var(--radius-sm);
}
.nav-toggle span {
    display: block; height: 2px; width: 100%;
    background: var(--text); border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
    display: flex; align-items: center; gap: .85rem 1.1rem; flex-wrap: wrap;
}
.nav__item {
    color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500;
    white-space: nowrap;
}
.nav__item:hover { color: var(--primary); text-decoration: none; }
.nav__balance {
    font-size: .85rem; font-weight: 700; color: var(--primary);
    background: var(--primary-light); padding: .3rem .65rem;
    border-radius: 999px; white-space: nowrap;
}
.btn-nav { padding: .35rem .85rem !important; font-size: .82rem !important; }
.balance { color: var(--primary); font-weight: 600; font-size: .9rem; }

/* Buttons */
.btn { display: inline-block; padding: .5rem 1.25rem; border-radius: var(--radius); font-size: .9rem; cursor: pointer; border: 2px solid transparent; text-decoration: none; transition: all .2s; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-sm { padding: .3rem .75rem; font-size: .8rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Main */
.main {
    min-height: calc(100vh - 120px);
    padding: 1.25rem 0 2rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}
.page-title { font-size: 1.75rem; margin-bottom: 1.5rem; }

.page-header { margin-bottom: 1.25rem; }
.page-header__title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.page-header__sub { font-size: .88rem; color: var(--muted); margin-top: .2rem; }

/* Hero 首页 */
.hero--home {
    position: relative; overflow: hidden;
    text-align: center;
    padding: 2.25rem 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    background: linear-gradient(155deg, #0f3d1f 0%, #15803d 45%, #22c55e 100%);
    background-image: url('/assets/images/ban1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    box-shadow: var(--shadow-lg);
}
.hero--home::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.15) 0%, transparent 50%);
    pointer-events: none;
}
.hero__badge {
    display: inline-block;
    font-size: .7rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase;
    background: rgba(255,255,255,.2);
    padding: .25rem .65rem; border-radius: 999px;
    margin-bottom: .75rem;
}
.hero__title {
    position: relative;
    font-size: 1.75rem; font-weight: 800;
    margin-bottom: .5rem; letter-spacing: -.03em;
}
.hero__desc {
    position: relative;
    font-size: .9rem; opacity: .9;
    margin-bottom: 1.35rem; line-height: 1.5;
}
.hero__actions {
    position: relative;
    display: flex; flex-wrap: wrap; gap: .6rem;
    justify-content: center;
}
.btn-hero-primary {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: .65rem 1.75rem;
    background: #fff; color: var(--primary-dark);
    border: none; border-radius: 999px;
    font-weight: 700; font-size: .95rem;
    text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,.15);
    transition: transform .15s, box-shadow .2s;
}
.btn-hero-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    text-decoration: none; color: var(--primary-dark);
}
.btn-hero-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: .65rem 1.35rem;
    background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,.5);
    border-radius: 999px; font-weight: 600; font-size: .9rem;
    text-decoration: none;
}
.btn-hero-ghost:hover {
    background: rgba(255,255,255,.12);
    text-decoration: none; color: #fff;
}

/* 区块标题 */
.section--matches { margin-bottom: 1rem; }
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem; gap: .5rem;
}
.section-head__title { font-size: 1.15rem; font-weight: 800; }
.section-head__link {
    font-size: .85rem; font-weight: 600; color: var(--primary);
    text-decoration: none; white-space: nowrap;
}
.section-head__link:hover { text-decoration: underline; }
.section-more { margin-top: 1.25rem; text-align: center; }
.btn-block-mobile { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* 赛事列表 */
.match-list {
    display: flex; flex-direction: column; gap: .85rem;
    max-width: 640px; margin: 0 auto;
}
.match-list--home { max-width: 100%; }

.match-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem 1.15rem 1.1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .15s;
}
.match-card:hover { box-shadow: var(--shadow-lg); }
.match-card .match-meta {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5rem; margin-bottom: .65rem;
    font-size: .78rem;
}
.match-card .match-datetime { color: var(--muted); }
.match-card .match-league-name {
    font-size: .72rem; font-weight: 600;
    color: var(--primary); background: var(--primary-light);
    padding: .15rem .5rem; border-radius: 4px;
}
.match-card .team-logo {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #f9fafb;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.match-card .match-center { font-size: .95rem; }
.match-card .match-faceoff--link:hover { text-decoration: none; }
.match-card .match-faceoff--link:hover .team-name { color: var(--primary); }

.match-card__odds {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: .4rem; margin-top: .85rem;
}
.match-card__odd {
    display: flex; flex-direction: column; align-items: center;
    padding: .45rem .25rem;
    background: var(--bg); border-radius: var(--radius-sm);
    font-size: .75rem;
}
.match-card__odd em {
    font-style: normal; color: var(--muted);
    font-size: .68rem; margin-bottom: .1rem;
}
.match-card__odd strong {
    font-size: 1rem; font-weight: 800; color: var(--primary);
}

.match-card__cta {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 44px; margin-top: .75rem;
    padding: .6rem 1rem;
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    color: #fff; font-weight: 700; font-size: .9rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(21, 128, 61, .3);
    transition: transform .15s, box-shadow .2s;
}
.match-card__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(21, 128, 61, .35);
    text-decoration: none; color: #fff;
}

/* 兼容旧类名 */
.match-card-btn { margin-top: .75rem; display: block; text-align: center; }
.match-card-odds { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; font-size: .8rem; }
.match-card-odds span { background: var(--bg); padding: .2rem .5rem; border-radius: 4px; color: var(--muted); }
.match-card-odds strong { color: var(--primary); }

.match-banner { width: 100%; }
.match-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
    font-size: .85rem; color: var(--muted); margin-bottom: .75rem;
}
.match-datetime { color: #374151; }
.match-league-name { color: var(--muted); }

.match-faceoff {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem; padding: .5rem 0;
}
.match-faceoff--link { text-decoration: none; color: inherit; }
.match-faceoff--link:hover .team-name { color: var(--primary); }

.team-side { flex: 0 0 56px; display: flex; justify-content: center; }
.team-logo {
    width: 48px; height: 48px; object-fit: contain;
    border-radius: 4px; background: #f9fafb;
}

.match-center {
    flex: 1; text-align: center; font-weight: 600; font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .35rem .5rem;
}
.match-center .team-name { color: var(--text); }
.match-center .vs-text { color: var(--muted); font-size: .9rem; font-weight: 500; margin: 0 .25rem; }

.odds-row {
    display: flex; justify-content: space-around;
    background: var(--bg); border-radius: 4px;
    padding: .5rem; margin-top: .75rem; font-size: .9rem;
}

/* Match detail & 投注面板 */
.match-detail {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 1rem;
    max-width: 520px; margin-left: auto; margin-right: auto;
    overflow: hidden;
}
.container--narrow { max-width: 640px; }
.container--bet { max-width: 560px; padding-bottom: 2rem; }

.match-detail--bet { padding: 0; }

/* 赛事顶栏 */
.match-hero {
    background: linear-gradient(160deg, #0f3d1f 0%, #15803d 55%, #22c55e 100%);
    color: #fff; padding: 1.25rem 1.5rem 1.5rem;
}
.match-hero .match-meta { color: rgba(255,255,255,.75); margin-bottom: 1rem; }
.match-hero .match-datetime { color: rgba(255,255,255,.9); }
.match-hero .match-league-name { color: rgba(255,255,255,.65); }
.match-hero .match-center { font-size: 1.1rem; }
.match-hero .team-name { color: #fff; }
.match-hero .vs-text { color: rgba(255,255,255,.55); }
.match-hero .team-logo {
    background: rgba(255,255,255,.95);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    border-radius: 50%;
    width: 52px; height: 52px; padding: 4px;
}

/* 投注区 */
.bet-panel { padding: 1.25rem 1.5rem 1.5rem; }
.bet-panel__toolbar {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; margin-bottom: 1.25rem;
}
.bet-panel__title { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.bet-panel__sub { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.bet-panel__wallet {
    text-align: right; background: var(--bg);
    padding: .5rem .85rem; border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.bet-panel__wallet-label { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bet-panel__wallet-value { font-size: 1.1rem; color: var(--primary); font-weight: 700; }
.bet-panel--empty { text-align: center; padding: 2.5rem 1.5rem; }
.bet-panel--empty-text { color: var(--muted); margin-bottom: 1rem; }

/* 投注摘要 */
.bet-slip-preview {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm);
    padding: 1rem 1.15rem;
    margin-bottom: 1.15rem;
    min-height: 64px;
    display: flex; align-items: center;
}
.bet-slip-preview__inner { width: 100%; }
.bet-slip-preview__placeholder { color: var(--muted); font-size: .9rem; display: block; text-align: center; }
.bet-slip-preview__content {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: .4rem .75rem; width: 100%;
}
.bet-slip-preview__tag {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    background: var(--primary); color: #fff;
    padding: .2rem .5rem; border-radius: 4px; letter-spacing: .03em;
}
.bet-slip-preview__pick { font-size: 1.1rem; font-weight: 700; }
.bet-slip-preview__odds { color: var(--muted); font-size: .85rem; }
.bet-slip-preview__win { font-size: .9rem; margin-left: auto; }
.bet-slip-preview__win strong { color: var(--primary); font-size: 1.15rem; }

/* 玩法切换 */
.bet-segment {
    display: flex; gap: 0; padding: 4px;
    background: var(--bg); border-radius: 10px;
    margin-bottom: 1.15rem;
}
.bet-segment__btn {
    flex: 1; padding: .6rem 1rem;
    border: none; background: transparent;
    border-radius: 8px; cursor: pointer;
    font-size: .9rem; font-weight: 500; color: var(--muted);
    transition: all .2s;
}
.bet-segment__btn:hover { color: var(--text); }
.bet-segment__btn.is-active {
    background: #fff; color: var(--primary); font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.bet-tab-panel { display: none; }
.bet-tab-panel.is-active { display: block; animation: betFadeIn .25s ease; }
@keyframes betFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.bet-panel-block__title {
    font-size: .75rem; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em;
    margin-bottom: .75rem;
}

/* 胜平负选项 */
.bet-options {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: .6rem; margin-bottom: 1.25rem;
}
.bet-option {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    padding: 1rem .5rem .85rem;
    min-height: 128px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #fff;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.bet-option:hover {
    border-color: #86efac;
    box-shadow: 0 4px 12px rgba(21, 128, 61, .08);
}
.bet-option:has(input:checked) {
    border-color: var(--primary);
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
    box-shadow: 0 0 0 1px var(--primary), 0 6px 16px rgba(21, 128, 61, .12);
}
.bet-option:has(input:checked)::after {
    content: '✓';
    position: absolute; top: 6px; right: 8px;
    width: 18px; height: 18px; line-height: 18px;
    text-align: center; font-size: .65rem; font-weight: 700;
    background: var(--primary); color: #fff; border-radius: 50%;
}
.bet-option input { display: none; }
.bet-option__media { margin-bottom: .4rem; }
.bet-option__logo { width: 44px; height: 44px; object-fit: contain; }
.bet-option__badge {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--bg); font-weight: 800; font-size: 1rem; color: var(--muted);
}
.bet-option__label { font-weight: 700; font-size: .9rem; }
.bet-option__team {
    font-size: .7rem; color: var(--muted); margin-top: .1rem;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bet-option__odds {
    margin-top: auto; padding-top: .35rem;
    font-size: 1.05rem; font-weight: 800; color: var(--primary);
}
.bet-option__odds::before { content: '@ '; font-weight: 500; font-size: .8rem; color: var(--muted); }

/* 比分波胆 */
.score-bet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: .5rem; margin-bottom: 1.25rem;
}
.score-bet-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: .75rem .35rem; min-height: 68px;
    border: 2px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; background: #fff;
    transition: all .2s;
}
.score-bet-item:hover { border-color: #86efac; transform: translateY(-1px); }
.score-bet-item:has(input:checked) {
    border-color: var(--primary);
    background: #f0fdf4;
    box-shadow: 0 0 0 1px var(--primary);
}
.score-bet-item input { display: none; }
.score-bet-item__score {
    font-weight: 800; font-size: 1.05rem; line-height: 1;
    font-variant-numeric: tabular-nums;
}
.score-bet-item__score em { font-style: normal; opacity: .45; margin: 0 1px; }
.score-bet-item__odds {
    margin-top: .25rem; font-size: .8rem; font-weight: 700; color: var(--primary);
}
.score-bet-item__odds::before { content: '@ '; font-weight: 500; color: var(--muted); }

/* 金额区 */
.bet-stake {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 1.15rem;
    margin-bottom: 1rem;
}
.bet-stake__label {
    display: block; font-weight: 600; font-size: .85rem;
    margin-bottom: .65rem; color: var(--text);
}
.bet-stake__chips {
    display: flex; flex-wrap: wrap; gap: .4rem;
    margin-bottom: .75rem;
}
.amount-chip {
    flex: 1; min-width: 52px;
    padding: .45rem .5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: .85rem; font-weight: 600;
    transition: all .15s;
}
.amount-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.amount-chip.is-active,
.amount-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(21, 128, 61, .25);
}
.bet-stake__input-wrap {
    position: relative;
    display: flex; align-items: center;
}
.bet-stake__currency {
    position: absolute; left: 1rem;
    font-size: 1.1rem; font-weight: 600; color: var(--muted);
    pointer-events: none;
}
.bet-stake__input {
    width: 100%;
    padding: .85rem 1rem .85rem 2.25rem;
    font-size: 1.25rem; font-weight: 700;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.bet-stake__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, .12);
}
.bet-stake__hint {
    font-size: .72rem; color: var(--muted);
    margin-top: .5rem; text-align: center;
}

/* 提交按钮 */
.bet-submit-bar { margin-top: .25rem; }
.btn-bet-submit {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; padding: .95rem 1.5rem;
    border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    color: #fff; cursor: pointer;
    box-shadow: 0 4px 14px rgba(21, 128, 61, .35);
    transition: transform .15s, box-shadow .2s;
}
.btn-bet-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(21, 128, 61, .4);
}
.btn-bet-submit:active { transform: translateY(0); }
.btn-bet-submit__text { font-size: 1.05rem; font-weight: 700; }
.btn-bet-submit__sub { font-size: .72rem; opacity: .85; margin-top: .15rem; }

.back-link--bet {
    display: inline-block;
    margin-top: 1rem;
    padding-left: .25rem;
    color: var(--muted);
    font-size: .88rem;
}
.back-link--bet:hover { color: var(--primary); }

/* 兼容旧类名 */
.bet-panel__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.bet-panel__balance { font-size: .9rem; color: var(--muted); }
.bet-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.bet-tab { flex: 1; padding: .65rem; border: 2px solid var(--border); background: #fff; border-radius: var(--radius-sm); cursor: pointer; }
.bet-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.bet-form--hidden { display: none; }
.bet-option-icon, .bet-option-logo { width: 44px; height: 44px; object-fit: contain; }
.option-label, .option-team, .option-odds { /* legacy */ }
.score-bet-label, .score-bet-odds { /* legacy */ }

.final-score { text-align: center; font-size: 1.1rem; margin-top: .5rem; }
.final-score strong { color: var(--primary); font-size: 1.35rem; }

/* 我的投注 */
.bets-summary {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1.25rem;
}
.bets-summary__item {
    background: var(--card); border-radius: var(--radius); padding: 1rem;
    text-align: center; box-shadow: var(--shadow);
}
.bets-summary__num { display: block; font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.bets-summary__label { font-size: .75rem; color: var(--muted); margin-top: .2rem; }

.bet-record-list { display: flex; flex-direction: column; gap: .75rem; }
.bet-record-card {
    background: var(--card); border-radius: var(--radius); padding: 1rem 1.15rem;
    box-shadow: var(--shadow); border-left: 4px solid var(--border);
}
.bet-record-card--pending { border-left-color: #f59e0b; }
.bet-record-card--won { border-left-color: #22c55e; }
.bet-record-card--lost { border-left-color: #ef4444; }

.bet-record-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.bet-type-tag {
    font-size: .7rem; padding: .15rem .5rem; border-radius: 4px;
    background: var(--bg); color: var(--muted); font-weight: 600;
}
.bet-record-card__match { margin-bottom: .65rem; }
.bet-record-card__teams { font-weight: 700; font-size: 1rem; display: block; }
.bet-record-card__league { font-size: .8rem; color: var(--muted); }

.bet-record-card__pick {
    display: flex; align-items: baseline; gap: .5rem; margin-bottom: .75rem;
    padding: .5rem .75rem; background: var(--bg); border-radius: 6px;
}
.bet-record-card__score, .bet-record-card__choice { font-size: 1.2rem; font-weight: 800; }
.bet-record-card__odds { color: var(--primary); font-weight: 600; font-size: .9rem; }

.bet-record-card__footer {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem;
    border-top: 1px solid var(--border); padding-top: .65rem;
}
.bet-record-card__footer small { display: block; color: var(--muted); font-size: .7rem; margin-bottom: .15rem; }
.bet-record-card__footer strong { font-size: 1rem; }
.text-win { color: #16a34a; }
.text-pending { color: #d97706; }

.empty-state { text-align: center; padding: 3rem 1rem; background: var(--card); border-radius: var(--radius); }
.empty-state p { color: var(--muted); margin-bottom: 1rem; }

/* H5 / 移动端适配 */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav {
        position: fixed;
        top: calc(56px + env(safe-area-inset-top));
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: .5rem 1rem 1rem;
        transform: translateY(-110%);
        opacity: 0;
        visibility: hidden;
        transition: transform .25s ease, opacity .2s, visibility .2s;
        z-index: 199;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }
    body.nav-open .nav {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .nav__item, .nav__balance, .btn-nav {
        display: block;
        padding: .85rem .5rem;
        border-bottom: 1px solid var(--border);
        text-align: left;
        font-size: 1rem;
    }
    .nav__balance {
        border-radius: var(--radius-sm);
        margin: .25rem 0;
        text-align: center;
    }
    .btn-nav {
        margin-top: .5rem;
        text-align: center !important;
        border-bottom: none !important;
        min-height: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .nav .nav__item:last-of-type { border-bottom: none; }

    .main { padding: 1rem 0 1.5rem; }
    .container { padding: 0 .85rem; }

    .hero--home { padding: 1.75rem 1.15rem 1.65rem; margin-bottom: 1.15rem; }
    .hero__title { font-size: 1.45rem; }
    .hero__actions { flex-direction: column; width: 100%; max-width: 280px; margin: 0 auto; }
    .btn-hero-primary, .btn-hero-ghost { width: 100%; }

    .section-head__title { font-size: 1.05rem; }
    .btn-block-mobile { width: 100%; }

    .match-card { padding: .9rem 1rem; }
    .match-card .match-center {
        flex-direction: column;
        gap: .15rem;
        font-size: .88rem;
    }
    .match-card .match-center .vs-text { font-size: .75rem; }
    .match-card .team-side { flex: 0 0 48px; }
    .match-card .team-logo { width: 40px; height: 40px; }

    .page-header__title { font-size: 1.3rem; }

    .empty-state { padding: 2rem 1rem; }
    .auth-card { margin: 0 .5rem; padding: 1.5rem; }

    .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table th, .table td { padding: .6rem .75rem; font-size: .85rem; }

    .bets-summary { grid-template-columns: 1fr; }
    .bet-record-card__footer { grid-template-columns: 1fr; gap: .35rem; }
}

@media (max-width: 520px) {
    .match-hero { padding: 1rem 1.15rem 1.25rem; }
    .bet-panel { padding: 1rem 1.15rem 1.25rem; }
    .bet-options { grid-template-columns: 1fr; gap: .5rem; }
    .bet-option {
        min-height: auto; flex-direction: row;
        justify-content: flex-start; align-items: center;
        gap: .75rem; padding: .85rem 1rem;
    }
    .bet-option__media { margin-bottom: 0; flex-shrink: 0; }
    .bet-option__odds { margin-top: 0; margin-left: auto; padding-top: 0; }
    .bet-slip-preview__win { margin-left: 0; width: 100%; text-align: center; margin-top: .25rem; }
    .bets-summary { grid-template-columns: 1fr; }
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .4rem; font-weight: 500; }
.form-group input, .form-group select { width: 100%; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; }
.form-group small { color: var(--muted); font-size: .8rem; }

/* Auth */
.auth-container { display: flex; justify-content: center; padding: 2rem 0; }
.auth-card { background: var(--card); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 400px; }
.auth-card h1 { text-align: center; margin-bottom: 1.5rem; }
.auth-footer { text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--muted); }

/* Table */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: var(--bg); font-weight: 600; font-size: .85rem; }
.table tr:last-child td { border-bottom: none; }

/* Status */
.status { padding: .2rem .5rem; border-radius: 4px; font-size: .8rem; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-won { background: #d1fae5; color: #065f46; }
.status-lost { background: #fee2e2; color: #991b1b; }

/* Profile */
.profile-card { background: var(--card); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.profile-item { display: flex; justify-content: space-between; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.profile-item:last-child { border-bottom: none; }
.balance-lg { font-size: 1.5rem; color: var(--primary); font-weight: 700; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* 钱包 */
.container--wallet { max-width: 520px; }
.wallet-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem;
}
.wallet-header__title { font-size: 1.35rem; font-weight: 800; }
.wallet-header__link { font-size: .88rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.wallet-header__link:hover { text-decoration: underline; }

.wallet-balance-card {
    background: linear-gradient(155deg, #0f3d1f 0%, #15803d 50%, #22c55e 100%);
    color: #fff; border-radius: var(--radius);
    padding: 1.5rem 1.25rem; margin-bottom: 1.25rem;
    box-shadow: var(--shadow-lg);
}
.wallet-balance-card__label { font-size: .8rem; opacity: .85; }
.wallet-balance-card__amount { font-size: 2rem; font-weight: 800; margin: .35rem 0 1rem; }
.wallet-balance-card__actions { display: flex; gap: .65rem; }
.btn-wallet-recharge {
    flex: 1; text-align: center; padding: .65rem;
    background: #fff; color: var(--primary-dark);
    border-radius: var(--radius-sm); font-weight: 700;
    text-decoration: none; border: none;
}
.btn-wallet-recharge:hover { text-decoration: none; color: var(--primary-dark); background: #f0fdf4; }
.btn-wallet-withdraw {
    flex: 1; padding: .65rem;
    background: rgba(255,255,255,.15); color: #fff;
    border: 2px solid rgba(255,255,255,.5);
    border-radius: var(--radius-sm); font-weight: 700; cursor: pointer;
}
.btn-wallet-withdraw:hover { background: rgba(255,255,255,.25); }

.wallet-section {
    background: var(--card); border-radius: var(--radius);
    padding: 1.15rem 1.25rem; margin-bottom: 1rem;
    box-shadow: var(--shadow);
}
.wallet-section__title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.wallet-hint { font-size: .78rem; color: var(--muted); margin-top: .75rem; }
.wallet-empty { color: var(--muted); text-align: center; padding: 1rem; font-size: .9rem; }

.wallet-pay-type { display: flex; gap: .5rem; }
.wallet-pay-type__item {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: .55rem; border: 2px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; font-size: .85rem; font-weight: 600;
}
.wallet-pay-type__item input { margin-right: .35rem; }

.wallet-log-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.wallet-log-item {
    background: var(--card); border-radius: var(--radius-sm);
    padding: .85rem 1rem; box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.04);
}
.wallet-log-item__main { display: flex; justify-content: space-between; align-items: center; }
.wallet-log-item__type { font-weight: 600; font-size: .92rem; }
.wallet-log-item__amount { font-weight: 800; font-size: 1.05rem; }
.wallet-log-item__amount.is-plus { color: var(--primary); }
.wallet-log-item__amount.is-minus { color: #dc2626; }
.wallet-log-item__remark { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.wallet-log-item__footer {
    display: flex; justify-content: space-between; margin-top: .4rem;
    font-size: .75rem; color: var(--muted);
}

.wallet-withdraw-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.wallet-withdraw-item {
    padding: .75rem; border-radius: var(--radius-sm);
    background: var(--bg); border-left: 3px solid var(--border);
}
.wallet-withdraw-item--pending { border-left-color: #f59e0b; }
.wallet-withdraw-item--approved { border-left-color: var(--primary); }
.wallet-withdraw-item--rejected { border-left-color: #dc2626; }
.wallet-withdraw-item__top { display: flex; justify-content: space-between; font-weight: 700; }
.wallet-withdraw-item__amount { color: #dc2626; }
.wallet-withdraw-item__status { font-size: .8rem; }
.wallet-withdraw-item--pending .wallet-withdraw-item__status { color: #d97706; }
.wallet-withdraw-item--approved .wallet-withdraw-item__status { color: var(--primary); }
.wallet-withdraw-item--rejected .wallet-withdraw-item__status { color: #dc2626; }
.wallet-withdraw-item__meta, .wallet-withdraw-item__time { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.wallet-withdraw-item__remark { font-size: .78rem; color: #dc2626; margin-top: .35rem; }

.nav__balance { text-decoration: none !important; }
.nav__balance:hover { opacity: .9; }

/* Misc */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin: 1rem 0; }
.alert-info { background: #dbeafe; color: #1e40af; }
.empty { text-align: center; color: var(--muted); padding: 3rem; }
.notice { text-align: center; color: var(--muted); padding: 1rem; }
.back-link { color: var(--muted); font-size: .9rem; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.section-title { font-size: 1.25rem; margin-bottom: 1rem; }

/* Footer */
.site-footer {
    background: var(--card); border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    text-align: center; color: var(--muted); font-size: .8rem;
}

/* 触控优化 */
@media (hover: none) and (pointer: coarse) {
    .match-card:hover { transform: none; box-shadow: var(--shadow); }
    .match-card:active { transform: scale(.99); }
    .match-card__cta:hover { transform: none; }
    .match-card__cta:active { opacity: .92; }
    .btn-hero-primary:hover { transform: none; }
}
