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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #0d1f3c 100%);
    color: #e0e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.app {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 30px;
}

/* ========== 顶部 ========== */
.header {
    background: linear-gradient(180deg, #1e3a5f 0%, #0f2347 100%);
    padding: 16px 16px 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    font-size: 22px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255,215,0,0.3);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.header-tabs {
    display: flex;
    gap: 0;
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: transparent;
    color: #8fa4bd;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.tab-btn.active {
    color: #ffd700;
    border-bottom-color: #ffd700;
    text-shadow: 0 0 8px rgba(255,215,0,0.3);
}

/* ========== 比赛信息区 ========== */
.match-info {
    background: linear-gradient(135deg, rgba(30,58,95,0.6) 0%, rgba(15,35,71,0.8) 100%);
    margin: 16px;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    border: 1px solid rgba(255,215,0,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.flag-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3), inset 0 0 20px rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.flag-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 60%);
}

/* 各国家国旗颜色 */
.flag-brazil { background: linear-gradient(135deg, #009c3b 0%, #002776 100%); }
.flag-argentina { background: linear-gradient(135deg, #74acdf 0%, #fff 50%, #74acdf 100%); color: #333; }
.flag-germany { background: linear-gradient(135deg, #000 0%, #dd0000 50%, #ffcc00 100%); }
.flag-france { background: linear-gradient(135deg, #002395 0%, #fff 50%, #ed2939 100%); }
.flag-spain { background: linear-gradient(135deg, #aa151b 0%, #f1bf00 50%, #aa151b 100%); }
.flag-england { background: linear-gradient(135deg, #fff 0%, #ce1126 100%); color: #333; }
.flag-portugal { background: linear-gradient(135deg, #006600 0%, #ff0000 50%, #006600 100%); }
.flag-netherlands { background: linear-gradient(135deg, #ae1c28 0%, #fff 50%, #21468b 100%); }
.flag-italy { background: linear-gradient(135deg, #009246 0%, #fff 50%, #ce2b37 100%); }
.flag-morocco { background: linear-gradient(135deg, #c1272d 0%, #006233 100%); }

.team-name {
    font-size: 15px;
    font-weight: 600;
    color: #e0e8f0;
}

.vs-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.vs-img {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.3));
}

.match-time {
    font-size: 13px;
    color: #8fa4bd;
    background: rgba(255,255,255,0.05);
    padding: 4px 12px;
    border-radius: 20px;
}

.deadline {
    margin-top: 16px;
    font-size: 13px;
    color: #ff6b6b;
    background: rgba(255,107,107,0.1);
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,107,107,0.2);
}

/* ========== 投注选项 ========== */
.bet-section {
    margin: 16px;
}

.section-title {
    font-size: 15px;
    color: #8fa4bd;
    margin-bottom: 12px;
    padding-left: 4px;
    font-weight: 500;
}

.bet-options {
    display: flex;
    gap: 10px;
}

.bet-option {
    flex: 1;
    padding: 16px 8px;
    border: 2px solid rgba(255,215,0,0.15);
    border-radius: 14px;
    background: rgba(30,58,95,0.5);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    -webkit-user-select: none;
    user-select: none;
}

.bet-option:active {
    transform: scale(0.96);
}

.bet-option.selected {
    border-color: #ffd700;
    background: rgba(255,215,0,0.08);
    box-shadow: 0 0 20px rgba(255,215,0,0.15);
}

.bet-label {
    font-size: 15px;
    font-weight: 700;
    color: #e0e8f0;
}

.bet-odds {
    font-size: 13px;
    color: #ffd700;
    font-weight: 600;
}

/* 已投注显示 */
.my-bets {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.my-bet-item {
    flex: 1;
    text-align: center;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 8px 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

.my-bet-label {
    font-size: 12px;
    color: #6b8299;
}

/* ========== 比赛列表 ========== */
.match-list-section {
    margin: 16px;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.match-list::-webkit-scrollbar {
    width: 4px;
}

.match-list::-webkit-scrollbar-thumb {
    background: rgba(255,215,0,0.2);
    border-radius: 4px;
}

.match-card {
    display: flex;
    align-items: center;
    background: rgba(30,58,95,0.4);
    border-radius: 14px;
    padding: 14px 12px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
    cursor: pointer;
    gap: 10px;
}

.match-card:active {
    transform: scale(0.98);
}

.match-card.active {
    border-color: rgba(255,215,0,0.4);
    background: rgba(255,215,0,0.05);
    box-shadow: 0 0 15px rgba(255,215,0,0.1);
}

.match-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.match-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 56px;
}

.match-card-flag {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.match-card-flag::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 60%);
}

.match-card-vs {
    font-size: 10px;
    color: #8fa4bd;
    margin: 0 2px;
}

.match-card-center {
    flex: 1;
    text-align: center;
}

.match-card-teams {
    font-size: 13px;
    font-weight: 600;
    color: #e0e8f0;
    margin-bottom: 4px;
}

.match-card-time {
    font-size: 11px;
    color: #6b8299;
}

.match-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 70px;
}

.match-card-odds {
    display: flex;
    gap: 6px;
    font-size: 11px;
}

.odds-tag {
    background: rgba(255,215,0,0.1);
    color: #ffd700;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.match-card-total {
    font-size: 11px;
    color: #6b8299;
}

/* ========== 历史记录 ========== */
.history-section {
    margin: 16px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255,215,0,0.2);
    border-radius: 4px;
}

.history-card {
    background: rgba(30,58,95,0.4);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.05);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-time {
    font-size: 12px;
    color: #6b8299;
}

.history-result {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
}

.history-result.win {
    color: #4caf50;
    background: rgba(76,175,80,0.15);
}

.history-result.lose {
    color: #ff6b6b;
    background: rgba(255,107,107,0.15);
}

.history-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.history-flag {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 700;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.history-flag::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 60%);
}

.history-score {
    font-size: 18px;
    font-weight: 800;
    color: #ffd700;
}

.history-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    font-size: 11px;
}

.history-detail-item {
    text-align: center;
    background: rgba(255,255,255,0.03);
    padding: 6px 4px;
    border-radius: 8px;
}

.history-detail-label {
    color: #6b8299;
    margin-bottom: 2px;
}

.history-detail-value {
    color: #e0e8f0;
    font-weight: 600;
}

.history-detail-value.reward {
    color: #4caf50;
}

/* ========== 投注弹窗 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: linear-gradient(135deg, #1a2f4f 0%, #0f1f3c 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    border: 1px solid rgba(255,215,0,0.15);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-title {
    font-size: 17px;
    color: #e0e8f0;
}

.modal-odds {
    color: #ffd700;
    font-size: 14px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: #8fa4bd;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:active {
    background: rgba(255,255,255,0.1);
}

.modal-body {
    padding: 20px;
}

.quick-amounts {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.quick-btn {
    flex: 1;
    padding: 10px 0;
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 10px;
    background: rgba(255,215,0,0.05);
    color: #ffd700;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-btn:active {
    background: rgba(255,215,0,0.15);
    transform: scale(0.96);
}

.amount-input-wrap {
    margin-bottom: 16px;
}

.amount-input-wrap label {
    display: block;
    font-size: 13px;
    color: #8fa4bd;
    margin-bottom: 8px;
}

.amount-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.amount-input:focus {
    border-color: rgba(255,215,0,0.4);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}

.amount-unit {
    font-size: 12px;
    color: #6b8299;
    margin-top: 4px;
    display: block;
}

.modal-tip {
    font-size: 12px;
    color: #ff6b6b;
    text-align: center;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px;
}

.btn-cancel {
    flex: 1;
    padding: 14px 0;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    background: transparent;
    color: #8fa4bd;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:active {
    background: rgba(255,255,255,0.05);
}

.btn-confirm {
    flex: 2;
    padding: 14px 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(255,215,0,0.3);
    letter-spacing: 1px;
}

.btn-confirm:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(255,215,0,0.2);
}

/* ========== Toast 提示 ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    z-index: 2000;
    animation: toastIn 0.3s ease;
    border: 1px solid rgba(255,215,0,0.2);
    backdrop-filter: blur(10px);
    text-align: center;
    max-width: 280px;
}

.toast.hidden {
    display: none;
}

.toast.success {
    border-color: rgba(76,175,80,0.4);
}

.toast.error {
    border-color: rgba(255,107,107,0.4);
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ========== 工具类 ========== */
.hidden {
    display: none !important;
}

/* ========== 响应式 ========== */
@media (max-width: 380px) {
    .flag-circle {
        width: 60px;
        height: 60px;
        font-size: 10px;
    }
    
    .bet-option {
        padding: 12px 6px;
    }
    
    .match-card {
        padding: 10px 8px;
    }
    
    .modal {
        max-width: 340px;
    }
}

@media (min-width: 601px) {
    .app {
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }
}
<!-- 空状态样式 -->

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b8299;
    font-size: 14px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #fff;
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 进行中状态 */
.bet-disabled-msg.live {
    background: linear-gradient(135deg, #ff6b35, #ff4444);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 列表中状态 */
.status-live {
    color: #ff6b35;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

.status-closed {
    color: #999;
}

.status-open {
    color: #4CAF50;
}

/* 进行中的卡片 */
.match-card.live {
    border-left: 3px solid #ff6b35;
}

/* 待结算状态 */
.history-card.pending {
    border-left: 3px solid #409eff;
}

.history-result.pending {
    color: #409eff;
    font-weight: bold;
}

.history-grant-pending {
    color: #909399;
    font-style: italic;
}

.history-grant-win {
    color: #67c23a;
    font-weight: bold;
}

.history-grant-lose {
    color: #909399;
}


/* ========== 猜比分输入框样式 ========== */
.modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 0;
    padding: 0 10px;
}

.modal-row label {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    min-width: 80px;
}

.score-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-input {
    width: 80px;
    height: 36px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 16px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield; /* 去掉数字输入框的上下箭头 */
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-input:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.score-input::placeholder {
    color: #c0c4cc;
    font-size: 12px;
}

.score-colon {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    line-height: 36px;
}

/* 玩法选择按钮组 */
.bet-type-group {
    display: flex;
    gap: 10px;
}

.type-btn {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: #f5f7fa;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.type-btn.active {
    background: #409eff;
    color: white;
    border-color: #409eff;
}

.type-btn:hover {
    border-color: #409eff;
}

/* 猜胜负选项 */
.win-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.win-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    background: #f5f7fa;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.win-btn.selected {
    background: #ecf5ff;
    border-color: #409eff;
    color: #409eff;
}

.win-btn:hover {
    border-color: #409eff;
}

.win-team {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.win-odds {
    display: block;
    font-size: 12px;
    color: #909399;
}

.win-btn.selected .win-odds {
    color: #409eff;
}

/* 猜比分网格 */
.score-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.score-btn {
    padding: 8px 4px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: #f5f7fa;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    transition: all 0.2s;
}

.score-btn.selected {
    background: #ecf5ff;
    border-color: #409eff;
    color: #409eff;
}

.score-btn:hover {
    border-color: #409eff;
}

.score-btn .score-odds {
    display: block;
    font-size: 11px;
    color: #909399;
    margin-top: 2px;
}

.score-btn.selected .score-odds {
    color: #409eff;
}

/* 投注摘要 */
.bet-summary {
    background: #f0f9eb;
    border: 1px solid #e1f3d8;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 14px;
    color: #67c23a;
    text-align: center;
}

/* 隐藏 */
.hidden {
    display: none !important;
}

/* 玩法标签 */
.bet-type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.win-tag {
    background: #ecf5ff;
    color: #409eff;
    border: 1px solid #b3d8ff;
}

.score-tag {
    background: #f0f9eb;
    color: #67c23a;
    border: 1px solid #c2e7b0;
}