/* ===========================================
   Livescore Esport - Table Layout Styles
   =========================================== */

/* Root variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
    --border-color: #e0e0e0;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Container styles */
.livescore-esport-container {
  }

/* Header styles */
.livescore-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.livescore-title {
}

.livescore-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.game-filter {
    padding: 3px 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-width: 180px;
}

.game-filter:hover,
.game-filter:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.refresh-btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--primary-color);
    color: #000;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin:0;
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn i {
    transition: transform 0.3s ease;
}

.refresh-btn:hover i {
    transform: rotate(180deg);
}

/* Table container */
.livescore-table-container {
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid #434355
    overflow: hidden;
}

/* Table styles */
.livescore-table {
    width: 100%;
    border-collapse: collapse;
}

.livescore-table thead {
        background: linear-gradient(135deg, #24263a, #14142b);
    color: white;
}

.livescore-table th {
    padding: 6px 3px !important;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.livescore-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.livescore-table tbody tr:hover {
    background: rgba(52, 152, 219, 0.05);
}

.livescore-table tbody tr:last-child {
    border-bottom: none;
}

.livescore-table td {
    padding: 3px !important;
    vertical-align: middle;
    text-align: center;
}

/* Column specific styles */
.col-time {
    width: 10%;
    min-width: 120px;
}

.col-team1 {
    width: 30%;
    min-width: 150px;
    text-align: left !important;
}
.col-score {
    width: 10%;
    text-align: center;
}

.col-status {
    width: 10%;
    text-align: center;
}

/* Time display */
.match-time-info {
    display: flex;
    gap: 4px;
    align-items: center;
}

.start-time {
    font-weight: 600;
        text-align: left;
}

.time-remaining {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Game icon */
.game-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-icon-svg {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    transition: var(--transition);
}

.game-icon-svg:hover {
}

.game-icon-fallback {
    font-size: 20px;
    opacity: 0.7;
}

/* League name */
.league-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
    font-size:11px;
}

/* Team info */
.team-info, .score-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom:5px;
}
.score-info {
    justify-content: center;
}
span.team-score {
    font-weight: 600;
}
.team-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background: var(--light-bg);
    flex-shrink: 0;
}

.team-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Score display */
.score-display {
    font-weight: 700;
    min-width: 60px;
    text-align: center;
    transition: var(--transition);
}

.score-display.team1-winner {
}

/* Match status */
.match-status {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}

.status-live {
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

.status-upcoming {
    color: var(--warning-color);
}

.status-finished {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

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

/* Loading skeleton */
.loading-skeleton td {
    padding: 20px;
}

.skeleton-row {
    height: 20px;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

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

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* No matches state */
.no-matches td {
    text-align: center;
    padding: 60px 20px;
}

.no-matches-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.no-matches-icon {
    font-size: 3rem;
    opacity: 0.5;
    color: var(--text-secondary);
}

.no-matches-content h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.no-matches-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.livescore-footer {
    text-align: center;
    padding: 10px;
    color: var(--text-secondary);
    
    border-top: 1px solid var(--border-color);
}

.last-update {
    font-weight: 500;
}

#last-update-time {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .league-name {max-width:70px}
    .team-name {max-width: 70px;}
    .game-icon-svg {
    width: 20px;
    height: 20px;
    }
    .livescore-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .col-time,.col-team1 {min-width: auto;}
    .livescore-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .livescore-controls {
        justify-content: center;
    }
    
    .game-filter {
        min-width: 150px;
    }
    
    .livescore-table {
        font-size: 12px;
    }
    
    .livescore-table th,
    .livescore-table td {
        font-size: 11px;
    }
    
    .col-league {
        display: none;
    }
    
    .team-info {
        gap: 5px;
        text-align: center;
    }
    
    .team-name {
        font-size: 11px;
    }
    .team-logo {width:18px;height:18px;}
    .score-display {
        padding: 2px 4px;
        min-width: 35px;
    }
    span.tructiep {display:none}
    button.btn-live-stream {font-size:14px}
    .col-live-time {width:12% !important}
    span.team-score {font-size:13px !important}
    .close-odds {font-size:12px !important}
}

@media (max-width: 480px) {
    .livescore-title {
        font-size: 1.5rem;
    }
    
    .livescore-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .game-filter,
    .refresh-btn {
        width: 100%;
    }
    

    .livescore-table th,
    .livescore-table td {
    }
    
    .team-info {
        gap: 3px;
    }
    
    .match-status {
        font-size: 10px;
        padding: 0px;
    }
}
/* Thêm vào file CSS của bạn */
.live-time {
    color: lawngreen;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    position: relative;
    justify-content: center;
    flex-direction: column;
}
.game-round {
  color: var(--primary-color); /* vàng để nổi bật */
}

.game-time {
  animation: pulse 1s infinite;/* giống đồng hồ */
  font-size:13px;
}
.live-updating {
    font-family: monospace;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
button.btn-live-stream {
        margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    width: 100%;
    justify-content: center;
    line-height: 1;
    min-height: auto;
}
span.tructiep {
    line-height: normal;
    font-size: 9px;
}
.col-live-time {
    text-align: center;
    width:10%;
    max-width: 80px;
}
/* CSS cho game filter checkbox */
.filter-options-visible {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.2s ease;
        gap: 5px;margin:0;
}

.filter-option input[type="checkbox"] {
       margin: 0;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-clear-all, .btn-select-all {
        padding: 5px 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin: 0;
}
/* Ẩn checkbox mặc định */
.filter-option input[type="checkbox"] {
  display: none;
}

/* Tạo hình tròn */
.filter-option .checkmark {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid #666;
  border-radius: 50%; /* tròn */
  background: #fff;
  vertical-align: middle;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

/* Khi checkbox được chọn */
.filter-option input[type="checkbox"]:checked + .checkmark {
  background: lawngreen;
  border-color: #4CAF50;
}

/* Thêm vào file CSS của bạn */
.odds-row {
    background: #0aff3f30;
}
.odds-content {

}
.odds-container {
    padding: 5px;
}

.odds-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.odds-header h4 {margin:0}

.bookmaker-name {
    font-weight: bold;
    text-align: center;
}
.team-odd {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
}

.odd-value {
    font-weight: bold;
    color: var(--primary-color);
}

.odds-toggle {
    background: none;
    border: none;
    cursor: pointer;
    margin:0;
    padding:0;
}

.close-odds {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #a3a3a3;
    margin:0;
    min-height:unset;
}

.odds-loading, .odds-error {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}
img.odds-icon {
    width: 20px;
    border-radius: 4px;
    height: 20px;
}
.odds-footer {
    text-align: center;
}
.odds-table-container {
    margin: 10px 0;
}

.odds-table {
    width: 100%;
    border-collapse: collapse;
    margin:0;
}

.odds-table th,
.odds-table td {
    text-align: center;
    width: 33.33%; /* chia đều 3 cột */
    border: 1px solid #ddd;
}

.odds-table th {
    font-weight: bold;
}

/* Hiệu ứng cho bảng odds */

.team-odds {
    font-weight: bold;
    position: relative;
}

/* Hiệu ứng tăng giảm odds */
.team-odds.increase {
    color: #4caf50;
}

.team-odds.decrease {
    color: #f44336;
}

.team-odds.animate {
    animation: oddsChange 0.6s ease-in-out;
    transform: scale(1.05);
}

@keyframes oddsChange {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
    }
    100% {
        transform: scale(1.05);
    }
}

/* Mũi tên chỉ hướng thay đổi */
.odds-arrow {
    position: relative;
    margin-left: 4px;
    font-size: 16px;
    font-weight: bold;
    animation: arrowBlink 1s infinite;
    display: inline-block;
}

.odds-arrow.increase {
    color: #4caf50;
}

.odds-arrow.decrease {
    color: #f44336;
}

@keyframes arrowBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}


/* Hiệu ứng loading khi đang cập nhật */
.odds-updating {
    position: relative;
    opacity: 0.7;
}

.odds-updating::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}
