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

:root {
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-green: #4caf50;
    --accent-gold: #f5a623;
    --banner-bg: linear-gradient(135deg, #1a2a1a 0%, #2d4a2d 50%, #1a3a1a 100%);
    --border-radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
}

/* 头部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #1a1a2e;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-img {
    height: 28px;
    width: auto;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
}

.user-icon {
    color: #fff;
}

/* 头部右侧 */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 语言切换器 */
.lang-switcher {
    position: relative;
}
.lang-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}
.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 6px 0;
    z-index: 100;
    min-width: 120px;
}
.lang-menu.show {
    display: block;
}
.lang-option {
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.lang-option:hover {
    background: #f0f9f0;
    color: #4caf50;
}

/* 横幅区域 */
.banner {
    background: url('banner-bg.png') center/cover no-repeat;
    padding: 24px 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    height: 200px;
}

.banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-trophy-img {
    position: absolute;
    right: 8px;
    bottom: 8px;
    height: 110px;
    width: auto;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(255,215,0,0.4));
    max-width: 80px;
    object-fit: contain;
}

.banner h1 {
    font-size: 22px;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.banner-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.95);
    margin-bottom: 16px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.banner-viewers {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.viewer-avatars {
    display: flex;
    align-items: center;
}

.avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    margin-left: -6px;
    object-fit: cover;
}

.avatar-img:first-child {
    margin-left: 0;
}

.cta-btn {
    display: inline-block;
    background: var(--accent-green);
    color: #fff;
    padding: 12px 32px;
    border-radius: 24px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.banner-trophy {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    opacity: 0.9;
}

/* 热门赛事区域 */
.hot-matches {
    padding: 20px 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.match-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    position: relative;
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
}

.match-teams .flag {
    font-size: 20px;
}

.match-info {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.match-info .heat {
    color: #e74c3c;
}

.match-info .score {
    color: var(--accent-gold);
}

.match-status {
    font-size: 12px;
    color: var(--accent-green);
    margin-top: 4px;
}

.match-btn {
    position: absolute;
    right: 16px;
    bottom: 16px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 最近更新区域 */
.recent-updates {
    padding: 0 16px 20px;
}

.section-title-sm {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.more-link {
    font-size: 13px;
    color: var(--accent-green);
    text-decoration: none;
}

.update-tags {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.update-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f9f0;
    border: 1px solid #d4efd4;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
}

.update-tag .check {
    color: var(--accent-green);
}

.update-tag .result {
    font-weight: 600;
}

.update-tag .label {
    color: var(--text-secondary);
}

/* 为什么赛前数据重要 */
.why-section {
    padding: 20px 16px 40px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.why-item {
    text-align: center;
    background: #fff;
    border-radius: var(--border-radius);
    padding: 16px 8px;
    box-shadow: var(--shadow);
}

.why-item .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 20px;
}

.why-item .icon.green { background: #e8f5e9; color: #4caf50; }
.why-item .icon.gold { background: #fff8e1; color: #f5a623; }
.why-item .icon.blue { background: #e3f2fd; color: #2196f3; }
.why-item .icon.purple { background: #ede7f6; color: #7c4dff; }

.why-item .title {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

.why-item .desc {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.no-match {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
}

.no-match .sub {
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.7;
}

/* 比赛状态样式 */
.match-status.live {
    color: #e74c3c;
    font-weight: 600;
}

.match-status.upcoming {
    color: var(--accent-green);
}

.match-status.finished {
    color: var(--text-secondary);
}

/* 日期标签 */
.date-badge {
    font-size: 12px;
    font-weight: 500;
    background: #e8f5e9;
    color: #4caf50;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

/* 小组标签 */
.match-group-tag {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 11px;
    background: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    border-radius: 8px;
}

/* VS样式 */
.match-teams .vs {
    color: #999;
    font-weight: 400;
    font-size: 14px;
}

/* 比赛时间/状态徽章 */
.match-time-badge {
    color: var(--accent-green);
    font-size: 13px;
}

.match-live-badge {
    color: #e74c3c;
    font-weight: 600;
    font-size: 13px;
    animation: pulse 1.5s infinite;
}

.match-finished-badge {
    color: var(--text-secondary);
    font-size: 13px;
}

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

/* 比赛场地 */
.match-venue {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* 卡片可点击 */
.match-card {
    cursor: pointer;
    transition: transform 0.15s;
}
.match-card:active {
    transform: scale(0.98);
}

/* ===== 弹窗样式 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.show {
    display: flex;
}

.modal-body {
    background: #fff;
    border-radius: 20px 20px 0 0;
    max-width: 430px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.modal-header h3 {
    font-size: 18px;
}
.modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    cursor: pointer;
    font-size: 14px;
}
.modal-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
}

/* 预测区域 */
.prediction-section {
    background: #f8faf8;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}
.prediction-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
}
.prediction-bar {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    height: 32px;
    margin-bottom: 10px;
}
.pred-home {
    background: #4caf50;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}
.pred-draw {
    background: #ff9800;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}
.pred-away {
    background: #2196f3;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}
.pred-detail {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555;
}

/* 赔率表格 */
.odds-section {
    margin-bottom: 16px;
}
.odds-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
}
.odds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.odds-table th {
    background: #f5f5f5;
    padding: 8px;
    text-align: center;
    font-weight: 600;
    color: #555;
}
.odds-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}
.platform-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
}
.platform-badge.bet365 { background: #027b5b; }
.platform-badge.pinnacle { background: #cc0000; }
.platform-badge.william { background: #1b3668; }
.platform-badge.betfair { background: #ffb80c; color: #333; }

/* AI分析 */
.analysis-section {
    margin-bottom: 16px;
}
.analysis-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
}
.analysis-item {
    margin-bottom: 10px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #4caf50;
}
.analysis-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}
.analysis-item p {
    font-size: 12px;
    color: #555;
    margin-top: 4px;
    line-height: 1.5;
}

/* 注册引导钩子 */
.register-hook {
    border-top: 1px solid #eee;
    padding-top: 16px;
}
.hook-blur {
    background: linear-gradient(to bottom, rgba(248,248,248,0.5), rgba(248,248,248,1));
    padding: 12px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}
.hook-blur p {
    font-size: 12px;
    color: #999;
    filter: blur(2px);
    user-select: none;
}
.hook-cta {
    text-align: center;
    padding-top: 12px;
}
.hook-cta > p:first-child {
    font-size: 13px;
    color: #e65100;
    font-weight: 600;
    margin-bottom: 12px;
}
.register-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}
.register-btn:active {
    transform: scale(0.98);
}
.hook-sub {
    font-size: 11px;
    color: #999;
}

/* 锁定内容列表 */
.register-hook h4 {
    font-size: 14px;
    margin-bottom: 12px;
}
.locked-items {
    margin-bottom: 16px;
}
.locked-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 10px;
    margin-bottom: 8px;
    position: relative;
    opacity: 0.7;
}
.locked-icon {
    font-size: 18px;
}
.locked-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.locked-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.locked-desc {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.locked-tag {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f5a623, #e65100);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ===== 新闻资讯区域 ===== */
.news-section {
    padding: 20px 16px 40px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.news-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #1a73e8;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.news-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.news-preview {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    position: relative;
}

.news-fade {
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    margin-top: -40px;
    position: relative;
    z-index: 1;
}

.news-cta {
    text-align: center;
    padding: 12px 0 8px;
    position: relative;
    z-index: 2;
}

.news-register-btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 3px 10px rgba(26,115,232,0.25);
}

.news-register-btn:active {
    transform: scale(0.98);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

/* 今日方案弹窗 */
.plan-subtitle {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
}
.plan-match {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}
.plan-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}
.plan-time {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}
.plan-summary {
    font-size: 12px;
    color: #1a73e8;
    margin-top: 8px;
}

/* ===== 响应式适配 ===== */

/* 小屏手机 (<=375px) */
@media (max-width: 375px) {
    .banner h1 { font-size: 18px; }
    .banner-trophy-img { height: 80px; max-width: 70px; }
    .match-teams { font-size: 15px; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .section-title { font-size: 16px; }
}

/* 平板及桌面端 (>430px) */
@media (min-width: 431px) {
    body {
        background: #f5f5f5;
    }
    .header, .banner, .hot-matches, .recent-updates, .why-section, .news-section {
        max-width: 430px;
        margin-left: auto;
        margin-right: auto;
    }
    .header {
        border-radius: 0 0 12px 12px;
        margin-top: 10px;
    }
    .modal-body {
        border-radius: 20px;
        margin-bottom: 20px;
        max-height: 80vh;
    }
    .modal-overlay {
        align-items: center;
    }
}
