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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    height: 100vh;
    overflow: auto;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
}

.top-bar {
    background: #4a5568;
    color: #fff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.breadcrumb {
    opacity: 0.9;
}

.balance {
    font-weight: bold;
    color: #ffd700;
}

.ws-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.ws-status.live {
    background: #27ae60;
    color: #fff;
}

.ws-status.polling {
    background: #7f8c8d;
    color: #fff;
}

.sub-nav {
    background: #fff;
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    position: relative;
    will-change: scroll-position;
}

.sub-nav::-webkit-scrollbar {
    display: none;
}

.sub-tab {
    padding: 10px 14px;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sub-tab.active {
    color: #b8860b;
    border-bottom-color: #b8860b;
    font-weight: 500;
}

.sub-tab.status-tab {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    border-bottom: 2px solid transparent;
}
.sub-tab.status-tab.active {
    color: #b8860b;
    border-bottom-color: #b8860b;
}

.odds-type-nav {
    background: #f5f5f5;
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #e0e0e0;
    padding: 6px 8px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
}
.odds-type-nav::-webkit-scrollbar { display: none; }
.odds-type-tab {
    padding: 6px 14px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.odds-type-tab.active {
    background: #b8860b;
    color: #fff;
    border-color: #b8860b;
}

.sub-nav-extra {
    background: #fff;
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}
.sub-nav-extra::-webkit-scrollbar { display: none; }
.sub-tab.extra-tab {
    padding: 8px 12px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
}
.sub-tab.extra-tab.active {
    color: #b8860b;
    border-bottom-color: #b8860b;
    font-weight: 500;
}

.sub-tab-wrap {
    position: relative;
    flex-shrink: 0;
}

.sub-tab-all {
    padding: 10px 14px;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sub-tab-all.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 500;
}

.sub-tab-all .arrow,
.sub-tab .arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.sub-tab-all.open .arrow,
.sub-tab.open .arrow {
    transform: rotate(180deg);
}

.filter-dropdown {
    display: none;
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 999;
    min-width: 140px;
    padding: 6px 0;
}

.filter-dropdown.show {
    display: block;
}

.filter-opt {
    padding: 11px 16px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-opt:active {
    background: #f5f5f5;
}

.filter-opt.active {
    color: #3498db;
    font-weight: 500;
}

.filter-opt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.filter-opt-dot.red { background: #e74c3c; }
.filter-opt-dot.green { background: #27ae60; }
.filter-opt-dot.gray { background: #999; }
.filter-opt-dot.blue { background: #3498db; }

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.sub-tab-all.has-alert,
.sub-tab.has-alert {
    position: relative;
    border-radius: 6px;
    overflow: visible;
    z-index: 1;
}

.sub-tab-all.has-alert::before,
.sub-tab.has-alert::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 8px;
    background: conic-gradient(
        from var(--border-angle),
        transparent 0%,
        transparent 50%,
        rgba(184, 134, 11, 0.2) 62%,
        #b8860b 72%,
        #d4a017 76%,
        #f0c75e 78%,
        #d4a017 80%,
        #b8860b 84%,
        rgba(184, 134, 11, 0.2) 94%,
        transparent 100%
    );
    z-index: -2;
    animation: topBtnAngleSpin 2s linear infinite;
    filter: blur(1px);
}

.sub-tab-all.has-alert::after,
.sub-tab.has-alert::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fff;
    border-radius: 6px;
    z-index: -1;
}

@keyframes topBtnAngleSpin {
    0%   { --border-angle: 0deg; }
    100% { --border-angle: 360deg; }
}

.filter-opt.has-alert {
    position: relative;
    border-radius: 6px;
    overflow: visible;
    z-index: 1;
}

.filter-opt.has-alert::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px;
    width: 23px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 191, 255, 0.5) 25%, rgba(0, 229, 255, 0.8) 50%, rgba(0, 191, 255, 0.5) 75%, transparent 100%);
    border-radius: 2px;
    offset-path: inset(0 round 6px);
    offset-distance: 0%;
    animation: dropdownNeonTravel 2.2s linear infinite;
    filter: drop-shadow(0 0 3px rgba(0, 191, 255, 0.5));
}

.filter-opt.has-alert::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    border: 2px solid transparent;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-image:
        linear-gradient(#fff, #fff),
        conic-gradient(
            from 0deg,
            transparent 0%,
            transparent 55%,
            rgba(0, 191, 255, 0.1) 65%,
            rgba(0, 191, 255, 0.3) 75%,
            rgba(0, 191, 255, 0.1) 85%,
            transparent 100%
        );
    z-index: -1;
}

@keyframes dropdownNeonTravel {
    0%   { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

.filter-opt-dot.dot-pulse {
    animation: dotPulse 1.2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 currentColor;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 5px transparent;
        transform: scale(1.3);
    }
}

.filter-opt-dot.red.dot-pulse {
    animation: dotPulseRed 1.2s ease-in-out infinite;
}

@keyframes dotPulseRed {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(231, 76, 60, 0);
        transform: scale(1.3);
    }
}

.filter-opt-dot.green.dot-pulse {
    animation: dotPulseGreen 1.2s ease-in-out infinite;
}

@keyframes dotPulseGreen {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(39, 174, 96, 0);
        transform: scale(1.3);
    }
}

.content-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f0f0f0;
    position: relative;
    will-change: scroll-position;
    contain: layout style;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.tournament-group {
    margin-bottom: 8px;
    contain: layout style;
}

.tournament-header {
    background: #fff;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
    height: 40px;
}

.tournament-matches {
    overflow: hidden;
}
.tournament-matches.collapsed {
    display: none;
}

.tournament-header .count {
    color: #a78025;
    font-weight: bold;
    font-size: 13px;
    margin-left: auto;
    background: #f8f4e8;
    border: 1px solid #a78025;
    border-radius: 10px;
    padding: 1px 8px;
}

.league-flag {
    width: 24px;
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
    border-radius: 2px;
}

.important-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.tv-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #27ae60;
    color: #fff;
    font-size: 10px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}
.tv-icon:active {
    transform: scale(0.9);
}

.tournament-header .refresh-btn {
    cursor: pointer;
    color: #999;
    font-size: 18px;
}

/* ============================================================
   比赛卡片 - 皇冠HGA风格
   ============================================================ */
.match-card {
    background: #fff;
    padding: 0;
    border-bottom: 1px solid #eee;
    display: flex;
    contain: layout style;
    min-height: 150px;  /* 默认150px，可增高 */
}

/* 左侧区域 - 队伍信息 (固定184px) */
.match-info {
    flex: 0 0 184px;
    min-width: 184px;
    max-width: 184px;
    padding: 10px 0 10px 12px;  /* 上下各10px */
    display: flex;
    flex-direction: column;
    justify-content: space-between;  /* 两端对齐 */
    overflow: hidden;  /* 隐藏溢出内容 */
}

/* 队伍区域 - 包含比分和队名 */
.match-team-section {
    display: flex;
    align-items: center;  /* 垂直居中 */
    gap: 8px;
    flex: 1;  /* 占据中间空间 */
}

/* 比分区域 - 棕色背景 */
.score-box {
    display: flex;
    flex-direction: column;
    background: #352A21;
    border-radius: 4px;
    padding: 2px 7px;  /* 缩小到1.2倍 */
    gap: 2px;
    flex-shrink: 0;
    transform: scale(1.2);  /* 整体放大1.2倍 */
}

.score-box .score-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;  /* 缩小到1.2倍 */
    line-height: 24px;
    font-size: 18px;  /* 缩小到1.2倍 */
    font-weight: bold;
    color: #DEBB69;
}

/* 队名区域 */
.match-team-names {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    transform: scale(1.2);  /* 整体放大1.2倍 */
    transform-origin: left center;  /* 从左侧中心缩放 */
}

/* 队伍行 - 每队一行 */
.match-team-row {
    display: flex;
    align-items: center;
    height: 24px;
    line-height: 24px;
}

.match-team-row .team-name {
    font-size: 15px;
    color: #000;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-team-row .team-name.strong_team {
    font-weight: bold;
}

/* 红牌指示器 - CSS图标 */
.match-team-row .team-name.red_1::before,
.match-team-row .team-name.red_2::before,
.match-team-row .team-name.red_3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 11px;
    background: #e74c3c;
    margin-right: 3px;
    vertical-align: middle;
    border-radius: 1px;
}
.match-team-row .team-name.red_2::before {
    box-shadow: 10px 0 0 #e74c3c;
    width: 18px;
}
.match-team-row .team-name.red_3::before {
    box-shadow: 10px 0 0 #e74c3c, 20px 0 0 #e74c3c;
    width: 28px;
}

/* 顶部行 - 收藏按钮 + 状态 */
.match-top-row {
    display: flex;
    align-items: center;
    height: 20px;
    margin-bottom: 0;
    gap: 6px;
    transform: scale(1.2);  /* 整体放大1.2倍 */
    transform-origin: left center;
}

.match-top-row .fav-star-btn {
    font-size: 16px;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
}

.match-top-row .fav-star-btn.active {
    color: #a78025;
}

.match-top-row .state-time {
    font-size: 11px;
    color: #a78025;
    font-weight: 500;
}

.match-top-row .state-time.live {
    color: #a78025;
}

.match-top-row .state-time.ended {
    color: #999;
}

.match-top-row .state-time.soon {
    color: #e67e22;
}

.match-top-row .state-ptype {
    font-size: 10px;
    color: #fff;
    background: #9b59b6;
    padding: 0 4px;
    border-radius: 2px;
    line-height: 14px;
}

.match-top-row .state-midfield {
    font-size: 10px;
    color: #fff;
    background: #3498db;
    padding: 0 4px;
    border-radius: 2px;
    line-height: 14px;
}

/* 顶部行 - 收藏按钮 + 状态 */
.match-top-row {
}
.match-team-row .team-name.red_3::before {
    box-shadow: 10px 0 0 #e74c3c, 20px 0 0 #e74c3c;
    width: 28px;
}

/* 发球指示器 */
.serve-indicator {
    display: inline-block;
    width: 3px;
    height: 14px;
    background: #27ae60;
    border-radius: 2px;
    margin-right: 4px;
    flex-shrink: 0;
}

/* 状态行 */
.match-state-row {
    display: flex;
    align-items: center;
    height: 20px;
    padding-top: 2px;
}

.match-state-row .state-time {
    font-size: 12px;
    color: #a78025;
    font-weight: 500;
}

.match-state-row .state-time.live {
    color: #a78025;
    animation: livePulse 1.5s ease-in-out infinite;
}

.match-state-row .state-time.ended {
    color: #999;
}

.match-state-row .state-time.soon {
    color: #e67e22;
}

.match-state-row .state-ptype {
    font-size: 10px;
    color: #fff;
    background: #9b59b6;
    padding: 0 4px;
    border-radius: 2px;
    margin-left: 4px;
    line-height: 14px;
}

.match-state-row .state-midfield {
    font-size: 10px;
    color: #fff;
    background: #3498db;
    padding: 0 4px;
    border-radius: 2px;
    margin-left: 4px;
    line-height: 14px;
}

/* 右侧区域 - 快速赔率 (24%) */
/* 右侧区域 - 横向滚动赔率按钮 */
.match-odds-quick {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 76%;
    max-width: calc(100% - 184px);
    padding-left: 8px;
    padding-bottom: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.match-odds-quick::-webkit-scrollbar {
    display: none;
}

.quick-odd-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 80px;
    flex-shrink: 0;
}

.quick-odd-header {
    display: flex;
    width: 100%;
    height: 28px;
    font-size: 11px;
    text-align: center;
    align-items: center;
    justify-content: center;
    color: rgba(0,0,0,0.56);
    padding: 2px 0;
    flex-shrink: 0;
}

.quick-odd-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 40px;
    padding: 3px 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: none;
}

.quick-odd-btn:active {
    background: #f0f0f0;
}

.quick-odd-btn.selected {
    background: #c99a2c;
    border-color: #c99a2c;
}

.quick-odd-btn.selected * {
    color: #fff !important;
}

.quick-odd-btn.locked {
    background: #f8f8f8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ccc'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
    cursor: default;
}

.quick-odd-line {
    font-size: 11px;
    color: #666;
    line-height: 1.2;
}

.quick-odd-val {
    font-size: 14px;
    font-weight: bold;
    color: #c8250a;
    line-height: 1.2;
}

.quick-odd-btn .odd-label {
    font-size: 11px;
    color: #666;
}

.quick-odd-btn .odd-value {
    font-size: 14px;
    font-weight: bold;
    color: #c8250a;
}

/* 底部栏 */
.match-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 210px;  /* 宽度210px */
    height: 32px;
    padding: 0;  /* 左边间隙0px */
    background: #f8f8f8;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #888;
    transform: scale(1.2);
    transform-origin: left center;
    background-clip: padding-box;  /* 背景宽度220px */
}

.match-bottom-bar .bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-bottom-bar .bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-bottom-bar .game-total {
    color: #a78025;
    font-weight: 500;
}

.match-bottom-bar .bar-tv-icon {
    width: 20px;
    height: 20px;
    background: #27ae60;
    color: #fff;
    font-size: 8px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.match-bottom-bar .bar-tracker {
    width: 20px;
    height: 20px;
    background: #3498db;
    color: #fff;
    font-size: 8px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.match-bottom-bar .bar-star {
    font-size: 16px;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
}

.match-bottom-bar .bar-star.active {
    color: #a78025;
}

/* 展开按钮 */

.action-btn-wrap {
    position: relative;
    display: inline-block;
}

.action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f0f0f0;
    border: 1px solid #ddd;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

.action-btn.play.active {
    background: #e8e8e8;
}

.action-btn .plus-icon {
    display: inline-block;
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
    color: #333;
}

.action-btn-wrap .market-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #e53935;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: dotBreathe 2s ease-in-out infinite;
}

.action-btn-wrap .market-dot.hidden {
    display: none;
}

@keyframes dotBreathe {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.action-btn.chart {
    background: #27ae60;
    color: #fff;
}

.fav-star-btn {
    font-size: 18px;
    cursor: pointer;
    color: #ccc;
    background: none;
    border: none;
    padding: 0 4px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.fav-star-btn.fav-active {
    color: #f39c12;
}

.bottom-nav {
    background: #fff;
    display: flex;
    border-top: 1px solid #ddd;
    padding: 6px 0;
    align-items: center;
}

.nav-fixed {
    flex: 0 0 auto;
    text-align: center;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 11px;
    color: #666;
    min-width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.nav-scroll {
    flex: 1;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
}

.nav-scroll::-webkit-scrollbar {
    display: none;
}

.nav-item {
    flex: 0 0 auto;
    text-align: center;
    cursor: pointer;
    padding: 4px 6px;
    color: #666;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-width: 48px;
}

.nav-item.active {
    color: #e74c3c;
}

.nav-icon {
    font-size: 20px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.nav-label {
    font-size: 10px;
    line-height: 1;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes navBounce {
    0% { transform: scale(1); }
    30% { transform: scale(0.85); }
    50% { transform: scale(1.08); }
    70% { transform: scale(0.97); }
    100% { transform: scale(1); }
}

.nav-item.bounce .nav-icon {
    animation: navBounce 0.35s ease;
}

.nav-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.25);
    transform: scale(0);
    animation: rippleExpand 0.45s ease-out forwards;
    pointer-events: none;
}

.nav-item.active .nav-ripple {
    background: rgba(231, 76, 60, 0.3);
}

@keyframes rippleExpand {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    background: #fff;
}

.error-msg {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background: #fff;
    margin: 10px;
    border-radius: 6px;
}

.match-wrapper {
    border-bottom: 1px solid #eee;
    contain: layout style;
    will-change: auto;
}

.match-wrapper .match-card {
    border-bottom: none;
    contain: layout style;
}

.action-btn.play.active {
    background: #e0e0e0;
}

.odds-panel {
    display: none;
    padding: 0 14px 12px;
    background: #e8e8e8;
    contain: layout style;
}

.odds-panel.show {
    display: block;
}

.odds-header {
    padding: 8px 0;
    border-top: 1px dashed #e0e0e0;
    margin-bottom: 4px;
}

.odds-teams {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.odds-score {
    font-size: 13px;
    color: #e74c3c;
    font-weight: bold;
    margin-left: 8px;
}

.odds-status {
    font-size: 12px;
    color: #27ae60;
    margin-left: 8px;
}

.odds-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
}

.odds-column {
    flex: 1 1 calc(25% - 8px);
    min-width: 80px;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 4px;
    padding: 8px;
}

.odds-col-title {
    font-size: 12px;
    color: #444;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 600;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
}

.odds-line {
    font-size: 13px;
    color: #000;
    text-align: center;
    margin-bottom: 6px;
    font-weight: 600;
}

.odds-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f5f5f5;
}

.odds-row:last-child {
    border-bottom: none;
}

.odds-label {
    font-size: 11px;
    color: #666;
}

.odds-value {
    font-size: 12px;
    color: #333;
    font-weight: bold;
}

.odds-value.red {
    color: #e74c3c;
}

.odds-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
}

.odds-btn {
    background: #fff;
    color: #1e497d;
    border: 1px solid #ebebeb;
    border-radius: 3px;
    padding: 0 8px;
    height: 48px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    min-width: 64px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    transition: background 0.15s;
}

.odds-btn:active,
.odds-btn.selected {
    background: #a78025;
    color: #fff;
    border-color: #a78025;
}

.odds-btn.locked {
    background: #f8f8f8;
    color: #ccc;
    cursor: default;
}

@keyframes oddsBtnPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.odds-changed {
    animation: oddsFlash 1.5s ease;
    position: relative;
}

.odds-changed::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: #e74c3c;
    border-radius: 50%;
    animation: dotPulse 1s ease infinite;
}

@keyframes oddsFlash {
    0% { background: #fff3c3; }
    100% { background: transparent; }
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

.bet-slip-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
}

.bet-slip-overlay.show {
    display: block;
}

.bet-slip {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    z-index: 1101;
    border-radius: 12px 12px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.bet-slip.show {
    display: block;
    transform: translateY(0);
}

.bs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #4a5568;
    color: #fff;
    border-radius: 12px 12px 0 0;
    font-size: 15px;
    font-weight: 500;
}

.bs-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
}

.bs-title {
    font-weight: 500;
}

.bs-match {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}

.bs-market {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.bs-teams {
    font-size: 13px;
    color: #555;
    margin-bottom: 2px;
}

.bs-league {
    font-size: 11px;
    color: #999;
}

.bs-odds-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.bs-odds-label {
    font-size: 13px;
    color: #666;
}

.bs-odds-value {
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
    padding: 2px 10px;
    background: #fdecea;
    border-radius: 4px;
    animation: oddsPulse 2s ease-in-out infinite;
}

@keyframes oddsPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.bs-amount-section {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}

.bs-amount-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bs-currency {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.bs-amount-display {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 15px;
    text-align: center;
    outline: none;
    cursor: pointer;
    background: #fff;
    min-height: 20px;
    user-select: none;
}

.bs-amount-display:active {
    border-color: #3498db;
}

.bs-amt-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bs-amt-btn:active {
    background: #e0e0e0;
}

.bs-quick-amounts {
    display: flex;
    gap: 8px;
}

.bs-quick-btn {
    flex: 1;
    padding: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.bs-quick-btn:active {
    background: #e0e0e0;
}

.bs-info {
    padding: 10px 16px;
}

.bs-info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
    color: #666;
}

.bs-info-row span:last-child {
    font-weight: 500;
    color: #333;
}

.bs-bet-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 10px 16px 16px;
    padding: 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.bs-bet-btn:active {
    background: #c0392b;
}

.numpad {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1200;
}

.numpad.show {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.numpad-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1200;
}

.numpad-panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px 12px 0 0;
    padding: 16px;
    z-index: 1201;
}

.numpad-display {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
    color: #333;
    min-height: 40px;
}

.numpad-keys {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.nk {
    padding: 14px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f5f5f5;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

.nk:active {
    background: #e0e0e0;
}

.nk-red {
    background: #fdecea;
    color: #e74c3c;
    border-color: #e74c3c;
}

.nk-red:active {
    background: #e74c3c;
    color: #fff;
}

.numpad-confirm {
    display: block;
    width: 100%;
    padding: 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.numpad-confirm:active {
    background: #c0392b;
}

.fav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.fav-overlay.show {
    display: block;
}

.fav-panel {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    z-index: 999;
    border-radius: 12px 12px 0 0;
    max-height: 85vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.fav-panel.show {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
}

.fav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #4a5568;
    color: #fff;
    border-radius: 12px 12px 0 0;
    font-size: 15px;
    font-weight: 500;
    flex-shrink: 0;
}

.fav-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
}

.fav-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.fav-sidebar {
    width: 90px;
    flex-shrink: 0;
    border-right: 1px solid #eee;
    overflow-y: auto;
    background: #f9f9f9;
}

.fav-sport-item {
    padding: 12px 8px;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    color: #555;
    background: #f9f9f9;
}

.fav-sport-item.active {
    background: #fff;
    color: #e74c3c;
    font-weight: 600;
    border-left: 3px solid #e74c3c;
}

.fav-sport-count {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 10px;
    color: #fff;
    background: #00bfff;
    border-radius: 8px;
    margin-left: 4px;
    padding: 0 4px;
    vertical-align: middle;
}

.fav-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.fav-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.fav-match-info {
    flex: 1;
}

.fav-match-tournament {
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}

.fav-match-teams {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.fav-match-time {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.fav-star {
    font-size: 22px;
    cursor: pointer;
    color: #f39c12;
    padding: 4px 8px;
    flex-shrink: 0;
}

.fav-star:active {
    opacity: 0.6;
}

.fav-match-odds {
    font-size: 12px;
    color: #e74c3c;
    font-weight: bold;
    margin-left: 8px;
    flex-shrink: 0;
}

.fav-match-wrapper {
    border-bottom: 1px solid #eee;
}

.fav-match {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.fav-match:active {
    background: #f5f5f5;
}

.fav-odds-panel {
    padding: 0 14px 12px;
}

.fav-odds-loading {
    text-align: center;
    padding: 12px;
    color: #999;
    font-size: 12px;
}

.fav-odds-section {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 10px;
}

.fav-odds-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
}

.fav-odds-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fav-odds-col {
    flex: 1 1 calc(33.33% - 6px);
    min-width: 70px;
    background: linear-gradient(180deg, #ffffff 0%, #ececec 100%);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.06);
}

.fav-odds-col-title {
    font-size: 11px;
    color: #444;
    text-align: center;
    margin-bottom: 6px;
    font-weight: 500;
}

.fav-odds-line {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-bottom: 4px;
    font-weight: 500;
}

.fav-odds-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.fav-odds-row span {
    font-size: 11px;
    color: #666;
}

.fav-match-team1, .fav-match-team2 {
    font-weight: 500;
}

.more-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.more-overlay.show { display: block; }

.more-panel {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 260px;
    height: 100%;
    background: #fff;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.more-panel.show {
    display: flex;
    flex-direction: column;
    transform: translateX(0);
}

.more-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #4a5568;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.more-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.more-body {
    flex: 1;
    overflow-y: auto;
}

.more-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.more-item:active { background: #f5f5f5; }

.more-item-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.sport-display-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.sport-display-overlay.show { display: block; }

.sport-display-panel {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    z-index: 999;
    border-radius: 12px 12px 0 0;
    max-height: 85vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sport-display-panel.show {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
}

.sport-display-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #4a5568;
    color: #fff;
    border-radius: 12px 12px 0 0;
    font-size: 14px;
    flex-shrink: 0;
}

.sport-display-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.sport-display-save {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.sport-display-save:active { background: #c0392b; }

.sport-display-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.sd-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.sd-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 14px;
    color: #fff;
}

.sd-checkbox.checked {
    background: #e74c3c;
    border-color: #e74c3c;
}

.sd-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sd-icon { font-size: 18px; }

.sd-name {
    font-size: 13px;
    color: #333;
}

.sd-order {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: auto;
}

.sd-arrow {
    width: 24px;
    height: 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

.sd-arrow:active { background: #ddd; }
.sd-arrow:disabled { opacity: 0.3; }

.sd-pos {
    font-size: 11px;
    color: #999;
    text-align: center;
    min-width: 24px;
}

/* ============ Login Panel ============ */
.login-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
}
.login-overlay.show { display: block; }

.login-panel {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 380px;
    background: #fff;
    border-radius: 16px;
    z-index: 1101;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-panel.show { display: block; }

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.login-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.login-close {
    width: 32px; height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.login-body {
    padding: 24px 20px;
}

.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.login-field input {
    width: 100%;
    height: 44px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fafafa;
}

.login-field input:focus {
    border-color: #0066ff;
    background: #fff;
}

.login-error {
    color: #e53935;
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 10px;
}

.login-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: #0066ff;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:active { background: #0052cc; }
.login-btn:disabled { background: #99bbff; cursor: not-allowed; }

.login-link {
    display: block;
    width: 100%;
    border: none;
    background: none;
    color: #0066ff;
    font-size: 14px;
    margin-top: 14px;
    cursor: pointer;
    text-align: center;
}

/* Balance display */
.balance { cursor: pointer; }
.balance.logged-in { font-size: 11px; }

/* ============ Statement Panel ============ */
.stmt-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
}
.stmt-overlay.show { display: block; }

.stmt-panel {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #f5f6fa;
    z-index: 1051;
    flex-direction: column;
}
.stmt-panel.show { display: flex; }

.stmt-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #1a1a2e;
    color: #fff;
}

.stmt-back {
    width: 32px; height: 32px;
    border: none;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stmt-title {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
}

.stmt-balance {
    font-size: 13px;
    color: #8eff8e;
    font-weight: 600;
}

.stmt-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.stmt-tab {
    flex: 1;
    height: 42px;
    border: none;
    background: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    position: relative;
    font-weight: 500;
}

.stmt-tab.active {
    color: #0066ff;
    font-weight: 700;
}

.stmt-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 20%; right: 20%;
    height: 3px;
    background: #0066ff;
    border-radius: 2px;
}

.stmt-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.ptr-indicator {
    height: 0;
    overflow: hidden;
    text-align: center;
    color: #888;
    font-size: 13px;
    background: #f0f0f0;
    transition: height 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ptr-indicator.ptr-show {
    height: 50px;
}

.ptr-indicator .ptr-arrow {
    display: inline-block;
    font-size: 18px;
    color: #999;
}

.ptr-indicator .ptr-arrow.ptr-spin {
    animation: ptrSpin 0.8s linear infinite;
}

.ptr-indicator.ptr-loaded .ptr-arrow {
    animation: none;
    transform: rotate(0deg);
}

@keyframes ptrSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.stmt-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

.stmt-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.stmt-card__league {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.stmt-card__teams {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.stmt-card__pick {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.stmt-card__selection {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.stmt-card__odds {
    font-size: 14px;
    font-weight: 700;
    color: #00aa00;
}

.stmt-card__meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

.stmt-card__status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.stmt-card__status--pending { background: #fff3cd; color: #856404; }
.stmt-card__status--won { background: #d4edda; color: #155724; }
.stmt-card__status--lost { background: #f8d7da; color: #721c24; }
.stmt-card__status--void { background: #e2e3e5; color: #383d41; }

/* ============ Logout Panel ============ */
.logout-panel {
    max-width: 320px;
}

/* ============ Settings Panel ============ */
.settings-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}
.settings-overlay.show { display: block; }

.settings-panel {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    z-index: 999;
    border-radius: 12px 12px 0 0;
    max-height: 85vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.settings-panel.show {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
}
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #4a5568;
    color: #fff;
    border-radius: 12px 12px 0 0;
    font-size: 14px;
    flex-shrink: 0;
}
.settings-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.settings-title { font-weight: 600; }
.settings-spacer { width: 40px; }
.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.stg-section-title {
    font-size: 12px;
    color: #999;
    padding: 8px 16px 4px;
}

.stg-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}
.stg-option:active { background: #f5f5f5; }
.stg-option-text { font-size: 15px; color: #333; }

.stg-option-radio {
    width: 18px; height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
}
.stg-option.active .stg-option-radio {
    border-color: #e74c3c;
}
.stg-option.active .stg-option-radio::after {
    content: '';
    display: block;
    width: 10px; height: 10px;
    background: #e74c3c;
    border-radius: 50%;
    margin: 2px;
}

.early-view {
    padding: 0;
}
.early-dates {
    display: flex;
    overflow-x: auto;
    padding: 10px 8px;
    gap: 8px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    -webkit-overflow-scrolling: touch;
}
.early-dates::-webkit-scrollbar { display: none; }
.date-pill {
    padding: 6px 14px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.3;
}
.date-pill.active {
    background: #b8860b;
    color: #fff;
    border-color: #b8860b;
}
.early-leagues {
    padding: 8px;
}
.early-league-group {
    margin-bottom: 12px;
}
.early-league-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 4px;
}
.early-league-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #333;
}
.early-radio {
    width: 18px; height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
}
.early-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* ============================================================
   皇冠风格 - 全部字段样式
   ============================================================ */

/* --- 强强势方高亮 --- */
.strong_team {
    color: #a78025;
    font-weight: 700;
}

/* --- 红牌标识 --- */
.red_1::after { content: '🟥'; font-size: 10px; margin-left: 2px; }
.red_2::after { content: '🟥🟥'; font-size: 10px; margin-left: 2px; }
.red_3::after { content: '🟥🟥🟥'; font-size: 10px; margin-left: 2px; }

/* --- 球衣号码 --- */
.gnum {
    display: inline-block;
    font-size: 10px;
    color: #888;
    margin-right: 3px;
    font-weight: 400;
}

/* --- 中场休息标识 --- */
.midfield-badge {
    display: inline-block;
    font-size: 10px;
    background: #f39c12;
    color: #fff;
    border-radius: 3px;
    padding: 0 4px;
    margin-left: 4px;
    font-weight: 600;
}

/* --- 盘口关闭提示 --- */
.odds-closed {
    background: #fee;
    color: #c0392b;
    text-align: center;
    padding: 4px;
    font-size: 12px;
    border-bottom: 1px solid #fcc;
}
.half-closed {
    color: #e67e22;
    font-size: 11px;
    margin-left: 6px;
}

/* --- 比分样式 --- */
.score {
    font-weight: 700;
    color: #27ae60;
    margin-right: 6px;
}

/* --- 蓝色文字（加时/点球模式） --- */
.txt_bl {
    color: #3498db;
}

/* --- 比赛类型标签 PTYPE --- */
.ptype-badge {
    display: inline-block;
    font-size: 10px;
    background: #8e44ad;
    color: #fff;
    border-radius: 3px;
    padding: 0 4px;
    margin-left: 4px;
    font-weight: 600;
    vertical-align: middle;
}
.ptype-badge.pk {
    background: #e74c3c;
}
.ptype-badge.et {
    background: #3498db;
}

/* --- 球队球衣图标 (PFCOLOR) --- */
.team-shirt {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    margin-right: 3px;
    vertical-align: middle;
    border: 1px solid #ddd;
}
.team-shirt.pf_Red { background: #e74c3c; }
.team-shirt.pf_Blue { background: #3498db; }
.team-shirt.pf_Yellow { background: #f1c40f; }
.team-shirt.pf_Green { background: #27ae60; }
.team-shirt.pf_White { background: #ecf0f1; }
.team-shirt.pf_Black { background: #2c3e50; }
.team-shirt.pf_Orange { background: #e67e22; }
.team-shirt.pf_Purple { background: #9b59b6; }
.team-shirt.pf_Navy { background: #1a237e; }
.team-shirt.pf_Gold { background: #b8860b; }

/* --- 队伍图片 (IMAGE_ID) --- */
.team-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    object-fit: contain;
    background: #f5f5f5;
}

/* --- 封盘锁图标 (ALLCLOSE) --- */
.odds-lock {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #ccc;
    border-radius: 3px;
    position: relative;
    margin: 0 auto;
}
.odds-lock::after {
    content: '🔒';
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.odds-btn.locked {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    pointer-events: none;
    opacity: 0.6;
}
.odds-btn.locked::after {
    content: '🔒';
    font-size: 10px;
    display: block;
    text-align: center;
}

/* --- 角球盘口 (TK) --- */
.tk-section {
    border-top: 1px solid #eee;
    padding: 6px 0;
    margin-top: 4px;
}
.tk-title {
    font-size: 11px;
    color: #888;
    text-align: center;
    margin-bottom: 4px;
}
.tk-row {
    display: flex;
    gap: 6px;
    padding: 0 8px;
}
.tk-btn {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
}
.tk-btn .tk-label {
    font-size: 10px;
    color: #888;
    display: block;
}
.tk-btn .tk-odds {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

/* --- 比赛追踪 (MT) --- */
.match-tracker-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #3498db;
    cursor: pointer;
    padding: 2px 6px;
    border: 1px solid #3498db;
    border-radius: 3px;
    background: #fff;
    margin-left: 6px;
}
.match-tracker-btn:hover {
    background: #3498db;
    color: #fff;
}
.match-tracker-btn .mt-icon {
    font-size: 10px;
}

/* --- 主赛事标识 (ISMASTER) --- */
.master-badge {
    display: inline-block;
    font-size: 9px;
    background: #b8860b;
    color: #fff;
    border-radius: 2px;
    padding: 0 3px;
    margin-left: 3px;
    font-weight: 600;
}

/* --- 幻想体育标识 (ISFANTASY) --- */
.fantasy-badge {
    display: inline-block;
    font-size: 9px;
    background: #1abc9c;
    color: #fff;
    border-radius: 2px;
    padding: 0 3px;
    margin-left: 3px;
    font-weight: 600;
}

/* --- 半场60分钟大小 (RATIO_XROUU) --- */
.xrou-section {
    border-top: 1px solid #eee;
    padding: 6px 0;
    margin-top: 4px;
}
.xrou-title {
    font-size: 11px;
    color: #888;
    text-align: center;
    margin-bottom: 4px;
}

/* --- 点球大战模式 (GID2) --- */
.penalty-mode {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 4px;
}
.penalty-title {
    font-size: 12px;
    font-weight: 600;
    color: #856404;
    text-align: center;
    margin-bottom: 6px;
}
.penalty-odds {
    display: flex;
    gap: 6px;
}
.penalty-btn {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
}
.penalty-btn .pk-label {
    font-size: 10px;
    color: #856404;
    display: block;
}
.penalty-btn .pk-odds {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

/* --- 半场盘口按钮 --- */
.half-tab {
    display: inline-block;
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 6px;
    background: #fff;
    color: #666;
}
.half-tab.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}
.half-tab.disabled {
    background: #f5f5f5;
    color: #ccc;
    pointer-events: none;
}

/* ============================================================
   OBT子菜单 - 横向滚动标签
   ============================================================ */
.obt-menu {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 8px 10px;
    background: #f5f5f5;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-top: 5px;  /* 与match-card间距5px */
}
.obt-menu::-webkit-scrollbar { display: none; }
.obt-tab {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.2s;
}
.obt-tab.active {
    color: #fff;
    background: #a78025;
    border-color: #a78025;
    font-weight: 600;
}
.obt-tab:active {
    background: #f0f0f0;
}
.obt-content {
    padding: 6px 0;
}

/* ============================================================
   波胆网格 (RPD)
   ============================================================ */
.cs-grid {
    width: 100% !important;
}
.cs-grid .cs-cell {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 12px;
}
.cs-grid .cs-score {
    color: #666;
    font-weight: 600;
    min-width: 36px;
}
.cs-grid .cs-btn {
    font-size: 12px;
    padding: 3px 8px;
    min-width: 50px;
}
.cs-header {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    font-size: 11px;
    color: #888;
    border-bottom: 1px solid #eee;
}

/* ============================================================
   赔率面板通用样式
   ============================================================ */
.odds-section {
    padding: 4px 8px;
}
.odds-column {
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
}
.odds-col-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    padding: 4px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
}
.odds-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
}
.odds-label {
    font-size: 12px;
    color: #666;
    flex: 1;
}
.odds-line {
    font-size: 11px;
    color: #888;
    font-weight: 600;
}
.odds-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}
.odds-status {
    font-size: 11px;
    color: #27ae60;
    font-weight: 600;
    margin-left: 6px;
}

/* ============================================================
   红牌数字显示
   ============================================================ */
.red-count {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    min-width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    border-radius: 50%;
    margin-left: 2px;
    font-weight: 700;
    vertical-align: middle;
}

/* ============================================================
   最后进球方标识
   ============================================================ */
.last-goal {
    font-size: 11px;
    margin-left: 2px;
    animation: goalFlash 1s ease-in-out infinite;
}
@keyframes goalFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================================
   MORE盘口提示
   ============================================================ */
.more-odds-hint {
    display: inline-block;
    font-size: 10px;
    color: #3498db;
    margin-left: 4px;
    cursor: pointer;
}

/* ============================================================
   联赛筛选面板
   ============================================================ */
.league-filter-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
}
.league-filter-panel {
    background: #fff;
    width: 100%;
    max-height: 70vh;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
}
.league-filter-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.league-filter-header h3 {
    font-size: 16px;
    margin: 0;
}
.league-filter-close {
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 4px 8px;
}
.league-filter-search {
    padding: 8px 16px;
    border-bottom: 1px solid #eee;
}
.league-filter-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}
.league-filter-search input:focus {
    border-color: #b8860b;
}
.league-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}
.league-filter-section {
    margin-bottom: 12px;
}
.league-filter-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}
.league-filter-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f8f8;
    cursor: pointer;
}
.league-filter-item:hover {
    background: #fafafa;
}
.league-filter-item input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #b8860b;
}
.league-filter-item label {
    flex: 1;
    font-size: 13px;
    cursor: pointer;
}
.league-filter-item .match-count {
    font-size: 11px;
    color: #999;
}
.league-filter-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}
.league-filter-footer button {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.league-filter-footer .btn-reset {
    background: #f5f5f5;
    color: #666;
}
.league-filter-footer .btn-apply {
    background: #b8860b;
    color: #fff;
}

/* ============================================================
   日期筛选按钮
   ============================================================ */
.date-filter-bar {
    display: flex;
    gap: 6px;
    padding: 6px 12px;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #eee;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.date-filter-bar::-webkit-scrollbar { display: none; }
.date-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
    color: #333;
    white-space: nowrap;
    transition: all 0.2s;
}
.date-btn.active {
    background: #b8860b;
    color: #fff;
    border-color: #b8860b;
}

/* ============================================================
   分页加载
   ============================================================ */
.pagination-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #eee;
}
.page-btn {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
}
.page-btn.active {
    background: #b8860b;
    color: #fff;
    border-color: #b8860b;
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.load-more-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: #fff;
    border: none;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #b8860b;
    cursor: pointer;
}

/* ============================================================
   更多菜单
   ============================================================ */
.more-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.more-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.more-panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
    z-index: 2001;
    transform: translateY(100%);
    transition: transform 0.3s;
    max-height: 70vh;
    overflow-y: auto;
}
.more-panel.show {
    transform: translateY(0);
}
.more-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
}
.more-close {
    font-size: 22px;
    cursor: pointer;
    color: #999;
    padding: 0 8px;
}
.more-body {
    padding: 8px 0;
}
.more-item {
    padding: 14px 20px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f5f5f5;
}
.more-item:hover {
    background: #fafafa;
}
.more-item span {
    color: #333;
}

/* ============================================================
   比分闪烁动画
   ============================================================ */
.score-flash {
    animation: scoreFlash 1.5s ease-in-out;
    background: #fff3cd !important;
    border-radius: 4px;
}
@keyframes scoreFlash {
    0% { background: #fff3cd; color: #b8860b; transform: scale(1.2); }
    50% { background: #ffeeba; color: #e74c3c; transform: scale(1.3); }
    100% { background: #fff3cd; color: inherit; transform: scale(1); }
}

/* ============================================================
   悬浮刷新按钮动画
   ============================================================ */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#floating-refresh-btn:active {
    transform: scale(0.9) !important;
}

/* ============================================================
   横幅广告
   ============================================================ */
.banner-carousel {
    background: linear-gradient(135deg, #b8860b, #d4a017);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 8px 12px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.banner-carousel::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    animation: bannerShine 3s infinite;
}
@keyframes bannerShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================================
   拖拽滚动
   ============================================================ */
.drag-scroll {
    cursor: grab;
    user-select: none;
}
.drag-scroll:active {
    cursor: grabbing;
}

/* ============================================================
   热门标识
   ============================================================ */
.hot-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
    font-weight: 600;
}

/* ============================================================
   冠军/综合过关视图
   ============================================================ */
.champion-group {
    margin-bottom: 12px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.champion-header {
    padding: 10px 12px;
    background: #f8f8f8;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 6px;
}
.champion-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.champion-team {
    font-size: 13px;
    flex: 1;
}
.champion-odds {
    display: flex;
    gap: 6px;
}


