﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    padding: 1px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

.header {
    background: linear-gradient(135deg, #1e5799, #207cca);
    color: white;
    padding: 8px 12px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.header h1 {
    font-size: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.header .subtitle {
    text-align: center;
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.filter-bar {
    background: white;
    padding: 5px 12px;
    margin-bottom: 8px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-radius: 5px;
    gap: 8px;
}

.filter-row-1 {
    margin-bottom: 5px;
}

.sport-options {
    display: flex;
    gap: 6px;
    align-items: center;
}

.sport-btn {
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sport-btn:hover {
    border-color: #00A0E2;
}

.sport-btn.active {
    background: #00A0E2;
    color: white;
    border-color: #00A0E2;
}

.filter-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 12px;
}

.filter-btn:hover {
    border-color: #00A0E2;
    background: #00A0E2;
    color: white;
}

.filter-btn.active {
    background: #00A0E2;
    color: white;
    border-color: #00A0E2;
}

.filter-row-2 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.language-options {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-right: 10px;
}

.language-btn {
    padding: 5px 8px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.language-btn:hover {
    border-color: #00A0E2;
}

.language-btn.active {
    background: #00A0E2;
    color: white;
    border-color: #00A0E2;
}

.history-buttons {
    display: flex;
    gap: 3px;
    align-items: right;
    margin-right: 0px;
}

.history-btn {
    padding: 5px 8px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: #333;
}

.history-btn:hover {
    border-color: #00A0E2;
    background: #00A0E2;
    color: white;
}

.search-box {
    flex-grow: 1;
    max-width: 150px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 5px 30px 5px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 12px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #00A0E2;
}

.search-clear-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #ccc;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    z-index: 10;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.search-clear-icon:hover {
    color: #00A0E2;
}

.search-clear-icon.show {
    display: flex;
}

.info-toggle-options {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    cursor: pointer;
}

.toggle-checkbox {
    display: none;
}

.toggle-label {
    width: 36px;
    height: 18px;
    background-color: #ccc;
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-checkbox:checked+.toggle-label {
    background-color: #00A0E2;
}

.toggle-label:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    top: 1px;
    left: 1px;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-checkbox:checked+.toggle-label:after {
    transform: translateX(18px);
}

.toggle-text {
    font-size: 12px;
    font-weight: 600;
}

.stats {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    height: 25px;
}

.stat-card {
    background: white;
    padding: 8px 8px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    flex: 1;
    height: 30px;
    gap: 8px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #00A0E2;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: #7f8c8d;
    line-height: 1;
    white-space: nowrap;
}

#goal-notifications {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0px;
    margin-bottom: 0px;
    min-height: 20px;
    background: white;
}

.goal-notification {
    display: none;
    border-radius: 5px;
    padding: 0px 0px;
    align-items: left;
    justify-content: left;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.goal-notification.show {
    display: flex;
}

.goal-notification .league {
    color: #00A0E2;
    font-weight: 500;
    margin-right: 5px;
    padding: 0px 0px;
}

.goal-notification .team-name {
    color: #e74c3c;
    font-weight: 500;
}

.goal-notification .score {
    color: #3498db;
    font-weight: 500;
    margin: 0 0px;
}

.goal-notification .team-name.away {
    color: #333;
}

.match-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.match-table th {
    background: #00A0E2;
    color: white;
    padding: 8px 5px;
    font-weight: bold;
    text-align: center;
    border: none;
    font-size: 14px;
}

.match-table td {
    padding: 6px 5px;
    border-bottom: 1px solid #eaeaea;
    text-align: center;
    vertical-align: middle;
}

.event-row td {
    background-color: #f0f8ff;
    font-size: 12px;
    color: #2c3e50;
    padding: 3px 5px;
    border-bottom: 1px dashed #ccc;
    text-align: center;
}

.event-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.event-item {
    white-space: nowrap;
}

.match-row:hover {
    background-color: #f8f9fa;
}

.highlighted {
    background-color: #ffeaea !important;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.5s ease;
}

.score-highlighted {
    background-color: #FFCCFF !important;
    transition: background-color 0.5s ease;
}

.persistent-highlight {
    animation: persistentHighlight 60s ease-out;
}

@keyframes persistentHighlight {
    0% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.league-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
}

.league-name {
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    width: 70px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 540;
}

.team-name {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    padding: 2px 0;
}

.team-name-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
}

.team-name-main {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.team-name-main.home {
    justify-content: flex-end;
}

.team-name-main.away {
    justify-content: flex-start;
}

.asia-odds-container {
    display: flex;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 4px;
    font-size: 11px;
    color: #7f8c8d;
    align-items: center;
    width: 100%;
}

.over-under-odds-container {
    display: flex;
    justify-content: flex-start;
    gap: 3px;
    margin-top: 4px;
    font-size: 11px;
    color: #7f8c8d;
    align-items: center;
    width: 100%;
}

.odds-handicap {
    color: #3498db;
    font-weight: bold;
    margin: 0 3px;
    text-decoration: none;
    transition: color 0.2s;
}

.odds-handicap:hover {
    color: #00A0E2;
    text-decoration: underline;
}

/* 比分链接：移除静态背景色，保留 hover 背景变化 */
.score-link,
.vs-link {
    color: #e74c3c;
    text-decoration: none;
    font-size: 14px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.2s;
    /* 删除 background: #fff5f5; */
}

.score-link:hover,
.vs-link:hover {
    background: #ffeaea;
}

/* 普通比分文本（非链接）也去掉背景 */
.score {
    color: #e74c3c;
    font-size: 14px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: bold;
    /* 删除 background: #fff5f5; */
}

/* 半场比分样式：小一号灰色，括号显示 */
.half-score {
    color: #7f8c8d;
    font-size: 12px;
    margin-left: 0px;
    display: inline;
    white-space: nowrap;
}

.live {
    color: #e74c3c;
    animation: blink 1.5s infinite;
    background: #ffeaea;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* 时间状态区域改为水平单行，去除时间背景 */
.time-status {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;  /* 约两个空格的距离 */
}

.time {
    color: #7f8c8d;
    font-size: 14px;
    background: none;      /* 去除背景 */
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status {
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 5px;
    font-weight: 500;
    align-items: center;
}

.upcoming-status {
    color: #93C9FF;
}

.half-status {
    background: #CC3300;
    color: white;
}

.finished-status {
    background: #95a5a6;
    color: white;
}

.first-half-status {
    background: #CCCC00;
    color: white;
}

.second-half-status {
    background: #9b59b6;
    color: white;
}

.overtime-status {
    background: #FF6600;
    color: white;
}

.penalty-status {
    background: #990099;
    color: white;
}

.basketball-quarter-1 {
    background: #e74c3c;
    color: white;
}

.basketball-quarter-2 {
    background: #e74c3c;
    color: white;
}

.basketball-quarter-3 {
    background: #6699FF;
    color: white;
}

.basketball-quarter-4 {
    background: #2ecc71;
    color: white;
}

.cancelled-status {
    background: #FF00FF;
    color: white;
}

.abandoned-status {
    background: #e74c3c;
    color: white;
}

.postponed-status {
    background: #CC0000;
    color: white;
}

.interrupted-status {
    background: #FF9900;
    color: white;
}

.pending-status {
    background: #9966CC;
    color: white;
}

/* 半场比分相关样式已在上方定义 */

.live-indicator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff5722;
    animation: live-indicator-pulse 2s infinite;
    display: inline-block;
    margin-right: 4px;   /* 新增这一行 */
}

@keyframes live-indicator-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(255, 87, 34, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0);
    }
}

.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 16px;
}

.error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background: #ffeaea;
    font-size: 16px;
    border-radius: 5px;
}

.no-data {
    text-align: center;
    padding: 25px;
    color: #7f8c8d;
    font-size: 13px;
}

.live-link {
    font-size: 10px;
    color: #e74c3c;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: center;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.live-link:hover {
    background-color: #ffeaea;
    color: #c0392b;
    transform: translateY(-1px);
}

.yellow-card {
    background-color: #FFDE00;
    color: #333333;
    border-radius: 2px;
    width: 12px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.red-card {
    background-color: #e74c3c;
    color: #CCCCCC;
    border-radius: 2px;
    width: 12px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.team-rank {
    color: #7f8c8d;
    font-size: 11px;
    background: #f8f9fa;
    padding: 1px 4px;
    border-radius: 3px;
}

.team-name-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
}

.team-name-link:hover {
    color: #00A0E2;
    text-decoration: underline;
}

.security-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    font-size: 24px;
    flex-direction: column;
}

.security-warning {
    background: #c0392b;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
}

#securityWarning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #f44336;
    color: white;
    text-align: center;
    padding: 12px 20px;
    z-index: 999999;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.popup-settings-btn {
    padding: 5px 8px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
    color: #333;
}

.popup-settings-btn:hover {
    border-color: #00A0E2;
    background: #00A0E2;
    color: white;
}

.popup-settings-menu {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    top: 40px;
    right: 10px;
    min-width: 150px;
}

.popup-settings-menu.show {
    display: block;
}

.popup-settings-menu h4 {
    margin-bottom: 8px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.popup-settings-menu label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    cursor: pointer;
}

.popup-settings-menu input[type="checkbox"] {
    margin-right: 5px;
}

.popup-settings-menu select {
    width: 100%;
    padding: 4px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 8px;
}

.score-popup {
    position: fixed !important;
    background: white;
    border: 2px solid #00A0E2;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000000 !important;
    width: 400px;
    max-width: 90vw;
    box-sizing: border-box;
    animation: popupFadeIn 0.3s ease-out;
    cursor: pointer;
    pointer-events: auto;
}

.score-popup.top {
    left: 50%;
    transform: translateX(-50%);
}

.score-popup.left {
    left: 20px;
    transform: none;
}

.score-popup.right {
    right: 20px;
    transform: none;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.score-popup .popup-first-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    padding-right: 24px;
}

.popup-goal {
    color: #27ae60;
}

.popup-redcard {
    color: #c0392b;
}

.popup-finished {
    color: #3498db;
}

.popup-match-time {
    font-size: 14px;
    font-weight: normal;
    color: #e67e22;
    background: #fef5e7;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.popup-second-row {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: #f5f5f5;
    padding: 6px 8px;
    border-radius: 6px;
    gap: 12px;
    flex-wrap: wrap;
}

.popup-league {
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    flex-shrink: 0;
}

.popup-teams {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    flex-wrap: wrap;
    justify-content: center;
    min-width: 0;
}

.popup-team {
    white-space: nowrap;
}

.popup-team.highlight {
    color: #e74c3c;
    font-weight: bold;
}

.popup-score {
    font-weight: bold;
    color: #2c3e50;
    background: #fff;
    padding: 2px 6px;
    border-radius: 12px;
    flex-shrink: 0;
}

.score-popup-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0 4px;
    z-index: 1000001;
}

.score-popup-close:hover {
    color: #e74c3c;
}