* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #0a0e1a;
    color: #e0e0e0;
    min-height: 100vh;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 60px;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 12px;
}

/* ====== Header ====== */
header {
    background: linear-gradient(135deg, #1a237e 0%, #4a148c 100%);
    padding: 20px 0 14px;
    text-align: center;
    border-bottom: 2px solid #ffd700;
}

header h1 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 2px;
}

header .subtitle {
    color: #ffd700;
    font-size: 0.8rem;
    letter-spacing: 3px;
}

/* Countdown */
.countdown {
    margin-top: 10px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.25);
    display: inline-block;
    padding: 4px 14px;
    border-radius: 12px;
}

/* ====== Tabs ====== */
.tabs {
    background: #12172b;
    border-bottom: 1px solid #2a2f45;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tabs .container {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs .container::-webkit-scrollbar {
    display: none;
}

.tab {
    background: none;
    border: none;
    color: #888;
    padding: 12px 13px;
    font-size: 0.8rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tab:hover {
    color: #fff;
}

.tab.active {
    color: #ffd700;
    border-bottom-color: #ffd700;
}

/* ====== Live Bar ====== */
.live-bar {
    background: linear-gradient(90deg, #b71c1c, #e53935);
    padding: 8px 0;
    text-align: center;
    font-size: 0.78rem;
    color: #fff;
    font-weight: 500;
    position: sticky;
    top: 42px;
    z-index: 99;
}

.live-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ff5252;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.2s infinite;
}

/* ====== Live Quick Entry ====== */
.live-quick {
    background: #12172b;
    border-bottom: 1px solid #252b45;
    padding: 8px 0;
}

.live-quick-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-quick-label {
    font-size: 0.75rem;
    color: #aaa;
    white-space: nowrap;
    font-weight: 500;
}

.live-quick.is-live .live-quick-label {
    color: #e53935;
    animation: pulse 1.5s infinite;
}

.live-quick-links {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.live-quick-links::-webkit-scrollbar {
    display: none;
}

.quick-link {
    background: #1e2440;
    border: 1px solid #2a3050;
    color: #ccc;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.72rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.quick-link:active {
    background: #ffd700;
    color: #000;
    border-color: #ffd700;
}

.quick-link-lottery {
    background: rgba(255, 215, 0, 0.15);
    border-color: #ffd700;
    color: #ffd700;
}

.live-quick.is-live .quick-link {
    border-color: #e53935;
    background: rgba(229, 57, 53, 0.1);
}

.live-quick.is-live .quick-link:active {
    background: #e53935;
    color: #fff;
}

/* Watch Live Button in Match Card */
.watch-live-btn {
    display: inline-block;
    margin-top: 6px;
    background: linear-gradient(90deg, #e53935, #ff5252);
    color: #fff;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.68rem;
    text-decoration: none;
    font-weight: 500;
    animation: pulse 1.5s infinite;
}

.watch-live-btn:active {
    opacity: 0.8;
}

/* ====== Tab Content ====== */
.tab-content {
    display: none;
    padding: 16px 0;
    animation: fadeIn 0.25s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== Date Filter ====== */
.date-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.date-btn {
    background: #1e2440;
    border: 1px solid #2a3050;
    color: #aaa;
    padding: 6px 16px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.date-btn:hover,
.date-btn.active {
    background: #ffd700;
    color: #000;
    border-color: #ffd700;
}

.auto-refresh-note {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    color: #666;
    font-size: 0.7rem;
    margin-top: 12px;
    padding: 8px;
}

/* ====== Date Divider ====== */
.date-divider {
    padding: 10px 4px 6px;
    font-size: 0.75rem;
    color: #ffd700;
    font-weight: 600;
    border-bottom: 1px solid #252b45;
    margin-bottom: 8px;
}

/* ====== Match Card ====== */
.match-card {
    background: #161b30;
    border: 1px solid #252b45;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    position: relative;
}

.match-card.is-live {
    border-color: #e53935;
    box-shadow: 0 0 12px rgba(229, 57, 53, 0.2);
}

.match-card .team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-card .team-home {
    justify-content: flex-end;
    text-align: right;
}

.match-card .team-away {
    justify-content: flex-start;
}

.match-card .team-flag {
    font-size: 1.4rem;
}

.match-card .team-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.match-card .score {
    text-align: center;
    min-width: 60px;
}

.match-card .score-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.match-card .match-time {
    font-size: 0.68rem;
    color: #888;
    margin-top: 2px;
}

.match-card .match-status {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    margin-top: 3px;
    display: inline-block;
}

.match-card .match-minute {
    font-size: 0.65rem;
    color: #e53935;
    font-weight: 600;
}

.match-card .share-match-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 4px;
}

.match-card .share-match-btn:active {
    opacity: 1;
}

.status-live {
    background: #e53935;
    color: #fff;
    animation: pulse 1.5s infinite;
}

.status-finished {
    background: #2e7d32;
    color: #fff;
}

.status-upcoming {
    background: #1565c0;
    color: #fff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ====== Groups ====== */
.groups-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.group-card {
    background: #161b30;
    border: 1px solid #252b45;
    border-radius: 10px;
    overflow: hidden;
}

.group-card h3 {
    background: linear-gradient(135deg, #1a237e, #4a148c);
    padding: 8px 14px;
    color: #ffd700;
    font-size: 0.82rem;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
}

.group-table th,
.group-table td {
    padding: 7px 6px;
    text-align: center;
    font-size: 0.75rem;
}

.group-table th {
    background: #1e2440;
    color: #888;
    font-weight: 500;
}

.group-table tr:not(:last-child) td {
    border-bottom: 1px solid #252b45;
}

.group-table .team-cell {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.group-table .qualify {
    background: rgba(46, 125, 50, 0.12);
}

/* ====== Knockout ====== */
.knockout-bracket {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.round h3 {
    text-align: center;
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.bracket-matches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bracket-match {
    background: #161b30;
    border: 1px solid #252b45;
    border-radius: 8px;
    padding: 8px 10px;
}

.bracket-match .bracket-team {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 0.78rem;
}

.bracket-match .bracket-team:first-child {
    border-bottom: 1px solid #252b45;
    padding-bottom: 5px;
    margin-bottom: 3px;
}

.bracket-team .goals {
    font-weight: 700;
    color: #ffd700;
}

.bracket-team.winner {
    color: #4caf50;
}

/* ====== Scorers ====== */
.scorers-table {
    width: 100%;
    border-collapse: collapse;
    background: #161b30;
    border-radius: 10px;
    overflow: hidden;
}

.scorers-table th {
    background: linear-gradient(135deg, #1a237e, #4a148c);
    padding: 10px 8px;
    text-align: left;
    color: #ffd700;
    font-size: 0.75rem;
}

.scorers-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #252b45;
    font-size: 0.8rem;
}

.scorers-table tr:last-child td {
    border-bottom: none;
}

.scorers-table .rank {
    font-weight: 700;
    color: #ffd700;
    width: 36px;
}

/* ====== Predict Section ====== */
.predict-section h2 {
    text-align: center;
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.section-desc {
    text-align: center;
    color: #888;
    font-size: 0.78rem;
    margin-bottom: 16px;
}

.predict-card {
    background: #161b30;
    border: 1px solid #252b45;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

.predict-card .predict-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.75rem;
    color: #888;
}

.predict-card .predict-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.predict-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.predict-btn {
    background: #1e2440;
    border: 1px solid #2a3050;
    color: #ccc;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.78rem;
    text-align: center;
    transition: all 0.2s;
}

.predict-btn:active,
.predict-btn.selected {
    background: #ffd700;
    color: #000;
    border-color: #ffd700;
}

.predict-stats {
    background: #161b30;
    border: 1px solid #252b45;
    border-radius: 10px;
    padding: 14px;
    margin-top: 16px;
    text-align: center;
}

.predict-stats h4 {
    color: #ffd700;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.predict-stats .stats-row {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
}

.predict-stats .stat-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffd700;
}

/* ====== News Section ====== */
.news-section h2 {
    text-align: center;
    margin-bottom: 14px;
    font-size: 1.2rem;
}

.news-item {
    background: #161b30;
    border: 1px solid #252b45;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.news-item .news-time {
    font-size: 0.68rem;
    color: #888;
    margin-bottom: 4px;
}

.news-item .news-title {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: #fff;
}

.news-item .news-desc {
    font-size: 0.75rem;
    color: #999;
    line-height: 1.5;
}

.news-item .news-tag {
    display: inline-block;
    font-size: 0.65rem;
    background: #1a237e;
    color: #ffd700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 6px;
}

/* ====== Live Section ====== */
.live-section {
    text-align: center;
}

.live-section h2 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.live-note {
    color: #888;
    margin-bottom: 16px;
    font-size: 0.8rem;
}

.live-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.live-card {
    background: #161b30;
    border: 1px solid #252b45;
    border-radius: 10px;
    padding: 16px 12px;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.2s;
}

.live-card:active {
    transform: scale(0.97);
    border-color: #ffd700;
}

.live-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.live-card h3 {
    color: #fff;
    margin-bottom: 4px;
    font-size: 0.82rem;
}

.live-card p {
    color: #888;
    font-size: 0.72rem;
}

/* ====== Share FAB ====== */
.share-fab {
    position: fixed;
    bottom: 24px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ffd700, #ffab00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #1a1a2e;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
    z-index: 200;
    transition: transform 0.2s;
}

.share-fab:active {
    transform: scale(0.9);
}

/* ====== Share Panel ====== */
.share-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 300;
    align-items: flex-end;
    justify-content: center;
}

.share-overlay.show {
    display: flex;
}

.share-panel {
    background: #1a1f35;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    width: 100%;
    max-width: 640px;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.share-panel h3 {
    text-align: center;
    margin-bottom: 16px;
    color: #fff;
    font-size: 0.95rem;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.share-btn {
    background: #252b45;
    border: none;
    border-radius: 12px;
    padding: 12px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #ccc;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.share-btn:active {
    background: #3a4060;
}

.share-icon {
    font-size: 1.5rem;
}

.share-close {
    width: 100%;
    background: #252b45;
    border: none;
    color: #aaa;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* ====== Toast ====== */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s;
    z-index: 400;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ====== Goal Celebration ====== */
.goal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
}

.goal-overlay.show {
    display: flex;
}

.goal-content {
    text-align: center;
    z-index: 501;
    animation: goalBounce 0.6s ease;
}

.goal-text {
    font-size: 3rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    animation: goalPulse 0.5s ease infinite alternate;
}

.goal-detail {
    margin-top: 12px;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
}

@keyframes goalBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes goalPulse {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

#confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

/* ====== Notification Bar ====== */
.notification-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #1a237e, #4a148c);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.78rem;
    color: #fff;
    z-index: 600;
    flex-wrap: wrap;
}

.notification-bar button {
    background: #ffd700;
    border: none;
    color: #000;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.72rem;
    cursor: pointer;
    font-weight: 600;
}

.notification-bar button:last-child {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ====== Footer ====== */
footer {
    background: #0d1020;
    border-top: 1px solid #252b45;
    padding: 20px 0;
    margin-top: 30px;
}

.disclaimer {
    background: #111528;
    border: 1px solid #252b45;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
}

.disclaimer h4 {
    color: #ffd700;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.disclaimer p {
    color: #777;
    font-size: 0.72rem;
    line-height: 1.6;
    margin-bottom: 4px;
}

.disclaimer p:last-child {
    margin-bottom: 0;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: #555;
    font-size: 0.7rem;
}

/* ====== PC端适配 ====== */
@media (min-width: 641px) {
    .container {
        max-width: 900px;
        padding: 0 24px;
    }

    header {
        padding: 28px 0 18px;
    }

    header h1 {
        font-size: 2rem;
    }

    .tab {
        padding: 14px 18px;
        font-size: 0.88rem;
    }

    .tab-content {
        padding: 24px 0;
    }

    .match-card {
        padding: 16px 20px;
    }

    .match-card .team-name {
        font-size: 0.95rem;
    }

    .match-card .score-num {
        font-size: 1.5rem;
    }

    .groups-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .knockout-bracket {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    .round {
        flex: 1;
    }

    .bracket-matches {
        grid-template-columns: 1fr;
    }

    .live-links {
        grid-template-columns: repeat(4, 1fr);
    }

    .live-card:hover {
        transform: translateY(-3px);
        border-color: #ffd700;
        box-shadow: 0 6px 24px rgba(255, 215, 0, 0.12);
    }

    .quick-link:hover {
        background: #ffd700;
        color: #000;
        border-color: #ffd700;
    }

    .live-quick.is-live .quick-link:hover {
        background: #e53935;
        color: #fff;
    }

    .share-options {
        grid-template-columns: repeat(5, 1fr);
        max-width: 400px;
        margin: 0 auto 16px;
    }

    .share-fab {
        bottom: 32px;
        right: 32px;
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1000px;
    }

    .groups-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
