* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app {
    max-width: 430px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* 状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 4px;
    background: linear-gradient(135deg, #1a5c3a 0%, #2d7a4d 50%, #1a5c3a 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.status-icons {
    display: flex;
    gap: 6px;
}

/* 比赛头部 */
.match-header {
    background: linear-gradient(135deg, #1a5c3a 0%, #2d7a4d 50%, #1a5c3a 100%);
    color: #fff;
    padding-bottom: 16px;
    position: relative;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
}

.btn-back, .btn-more {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.league-info {
    text-align: center;
    flex: 1;
}

.league-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
}

.match-time {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

/* 球场 */
.pitch-container {
    padding: 0 16px;
    margin: 8px 0;
}

.football-pitch {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(180deg, #3a8c5d 0%, #2d7a4d 50%, #3a8c5d 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
}

.football-pitch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 9%,
        rgba(255,255,255,0.05) 9%,
        rgba(255,255,255,0.05) 10%
    );
}

.pitch-line {
    position: absolute;
    border: 1.5px solid rgba(255,255,255,0.4);
}

.center-line {
    top: 50%;
    left: 5%;
    right: 5%;
    height: 0;
    border-top: 1.5px solid rgba(255,255,255,0.4);
}

.center-circle {
    top: 50%;
    left: 50%;
    width: 18%;
    padding-bottom: 18%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.penalty-area-left {
    top: 2%;
    left: 20%;
    right: 20%;
    height: 18%;
    border-top: none;
}

.penalty-area-right {
    bottom: 2%;
    left: 20%;
    right: 20%;
    height: 18%;
    border-bottom: none;
}

.goal-area-left {
    top: 2%;
    left: 35%;
    right: 35%;
    height: 8%;
    border-top: none;
}

.goal-area-right {
    bottom: 2%;
    left: 35%;
    right: 35%;
    height: 8%;
    border-bottom: none;
}

.corner-top-left,
.corner-top-right,
.corner-bottom-left,
.corner-bottom-right {
    width: 6%;
    padding-bottom: 6%;
    border-radius: 50%;
}

.corner-top-left {
    top: -3%;
    left: -3%;
}

.corner-top-right {
    top: -3%;
    right: -3%;
}

.corner-bottom-left {
    bottom: -3%;
    left: -3%;
}

.corner-bottom-right {
    bottom: -3%;
    right: -3%;
}

/* 球员 */
.player {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 1.5px solid rgba(255,255,255,0.8);
}

.player.home {
    background-color: #ff4444;
}

.player.away {
    background-color: #4444ff;
}

/* 比分区域 */
.score-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 16px 8px;
}

.team {
    text-align: center;
    flex: 1;
}

.team-flag {
    font-size: 28px;
    margin-bottom: 4px;
}

.team-name {
    font-size: 14px;
    font-weight: 600;
}

.score-display {
    text-align: center;
    flex: 1.2;
}

.score {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
}

.match-status {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.match-timer {
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
    opacity: 0.9;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-around;
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: #999;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.tool-btn.active {
    color: #2d7a4d;
}

.tool-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

/* 时间标签 */
.time-tabs {
    display: flex;
    background: #fff;
    padding: 8px 16px;
    gap: 12px;
    border-bottom: 1px solid #eee;
}

.tab {
    background: none;
    border: none;
    font-size: 14px;
    color: #999;
    padding: 6px 16px;
    cursor: pointer;
    position: relative;
    font-weight: 500;
}

.tab.active {
    color: #2d7a4d;
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #2d7a4d;
    border-radius: 1px;
}

/* 投注市场 */
.betting-markets {
    padding: 0 12px;
    background: #f5f5f5;
    padding-top: 8px;
}

.market-section {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #f0f0f0;
}

.market-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.market-arrow {
    font-size: 18px;
    color: #ccc;
    transition: transform 0.2s;
}

.market-header.collapsed .market-arrow {
    transform: rotate(90deg);
}

.market-content {
    padding: 12px;
}

.market-header.collapsed + .market-content {
    display: none;
}

/* 赔率行 */
.odds-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.odds-row:last-child {
    margin-bottom: 0;
}

.odds-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.15s;
}

.odds-item:active {
    background: #f0f0f0;
    transform: scale(0.98);
}

.odds-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.odds-value {
    font-size: 16px;
    font-weight: 700;
    color: #e53935;
}

/* 赔率网格 */
.odds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.odds-grid.correct-score {
    grid-template-columns: repeat(4, 1fr);
}

.odds-grid .odds-item {
    padding: 10px 4px;
}

.odds-grid .odds-label {
    font-size: 11px;
}

.odds-grid .odds-value {
    font-size: 14px;
}

/* 底部占位 */
.bottom-spacer {
    height: 30px;
    background: #f5f5f5;
}

/* 响应式 */
@media (max-width: 380px) {
    .odds-grid.correct-score {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .score {
        font-size: 28px;
    }
    
    .team-name {
        font-size: 13px;
    }
}
