/**
 * Vao Loi TV - Styles cho hiển thị trận đấu bóng đá
 * Giao diện dark theme với header đỏ và accent vàng
 */

/* Reset và base styles */
.vaoluoitv-wrapper {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Container chính */
.vaoluoitv-matches,
.vaoluoitv-match {
    margin: 0;
    font-family: inherit;
    background: transparent;
}

/* ============================================
   HEADER SECTION (Red Background)
   ============================================ */
.vaoluoitv-header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    padding: 40px 20px 30px;
    position: relative;
    overflow: hidden;
}

.vaoluoitv-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><text x="50" y="100" font-size="80" fill="rgba(255,255,255,0.1)" font-weight="bold">LUCK8</text></svg>') center/contain no-repeat;
    opacity: 0.3;
    pointer-events: none;
}

.vaoluoitv-header-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.vaoluoitv-main-title {
    font-size: 42px;
    font-weight: bold;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.vaoluoitv-subtitle {
    font-size: 16px;
    color: #ffffff;
    margin: 0 0 30px 0;
    opacity: 0.95;
}

/* ============================================
   DATE SELECTOR BAR
   ============================================ */
.vaoluoitv-date-selector {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.vaoluoitv-date-selector::-webkit-scrollbar {
    display: none;
}

.vaoluoitv-date-card {
    min-width: 90px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.vaoluoitv-date-card:hover {
    background: rgba(0, 0, 0, 0.4);
}

.vaoluoitv-date-card.active {
    background: #dc2626;
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.vaoluoitv-date-card-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.vaoluoitv-date-card.active .vaoluoitv-date-card-label {
    color: #ffffff;
}

.vaoluoitv-date-card-number {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    margin: 0 0 5px 0;
    line-height: 1;
}

.vaoluoitv-date-card-month {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.vaoluoitv-date-card.active .vaoluoitv-date-card-month {
    color: #ffffff;
}

/* ============================================
   MATCH LISTING SECTION (Dark Background)
   ============================================ */
.vaoluoitv-matches-section {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    padding: 30px 20px;
    min-height: 100vh;
}

.vaoluoitv-matches-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Filter Bar */
.vaoluoitv-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 41, 59, 0.8);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    gap: 15px;
}

.vaoluoitv-filter-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 0 0 50%;
    width: 50%;
}

.vaoluoitv-filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 50%;
    width: 50%;
    justify-content: flex-end;
}

.vaoluoitv-filter-label {
    color: #cbd5e1;
    font-size: 16px;
    display: flex;
    align-items: center;
    margin: 0;
    font-weight: 600;
}

.vaoluoitv-filter-select {
    background: #334155;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 10px 35px 10px 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 90px;
    max-width: 200px;
    margin-bottom: unset !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fbbf24' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    transition: all 0.3s ease;
}

.vaoluoitv-filter-select:hover {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.vaoluoitv-filter-select:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.vaoluoitv-filter-select option {
    background: #1e293b;
    color: #ffffff;
    padding: 10px 12px;
    font-size: 14px;
}

.vaoluoitv-filter-select option:checked,
.vaoluoitv-filter-select option:focus {
    background: #fbbf24;
    color: #1e293b;
    font-weight: 600;
}

.vaoluoitv-filter-select option:hover {
    background: #475569;
}

/* Loading state */
.vaoluoitv-loading {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 18px;
}

.vaoluoitv-loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* League Header (Red background for each group) */
.vaoluoitv-league-header {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    border-radius: 12px 12px 0 0;
    padding: 20px 25px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.vaoluoitv-league-header:first-child {
    margin-top: 0;
}

.vaoluoitv-league-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.vaoluoitv-league-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vaoluoitv-league-header-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.vaoluoitv-league-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vaoluoitv-league-header-datetime {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.vaoluoitv-league-header-logo {
    position: absolute;
    bottom: 10px;
    right: 25px;
    z-index: 0;
    opacity: 0.6;
}

.vaoluoitv-league-header-logo .vaoluoitv-match-logo {
    height: 24px;
}

/* Danh sách trận đấu - Grid 2 cột */
.vaoluoitv-matches-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
    padding: 20px 25px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0 0 12px 12px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .vaoluoitv-matches-list {
        grid-template-columns: 1fr;
        padding: 15px;
    }
}

/* Match Card */
.vaoluoitv-match-item {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.vaoluoitv-match-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(251, 191, 36, 0.3);
}

/* Background player image */
.vaoluoitv-match-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle cx="100" cy="100" r="80" fill="rgba(220,38,38,0.1)"/><text x="100" y="110" font-size="60" fill="rgba(220,38,38,0.15)" text-anchor="middle">⚽</text></svg>') center/contain no-repeat;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.vaoluoitv-match-item > * {
    position: relative;
    z-index: 1;
}

/* Match Header (Top row) */
.vaoluoitv-match-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.vaoluoitv-match-league-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vaoluoitv-trophy-icon {
    width: 18px;
    height: 18px;
    fill: #fbbf24;
}

.vaoluoitv-match-league {
    font-size: 13px;
    color: #cbd5e1;
    font-weight: 500;
}

/* Status Button */
.vaoluoitv-match-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: default;
}

.vaoluoitv-match-status.upcoming {
    background: #7c3aed;
    color: #ffffff;
}

.vaoluoitv-match-status.live {
    background: #dc2626;
    color: #ffffff;
    animation: pulse 2s infinite;
}

.vaoluoitv-match-status.finished {
    background: #059669;
    color: #ffffff;
}

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

/* Match Date/Time */
.vaoluoitv-match-datetime {
    font-size: 12px;
    color: #94a3b8;
    text-align: right;
}

/* Teams Section */
.vaoluoitv-match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    gap: 15px;
}

.vaoluoitv-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.vaoluoitv-team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    padding: 5px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.vaoluoitv-team-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    line-height: 1.3;
}

/* VS Icon trong vòng tròn vàng */
.vaoluoitv-vs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #fbbf24;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
    flex-shrink: 0;
}

.vaoluoitv-vs-icon {
    font-size: 16px;
    font-weight: bold;
    color: #0f172a;
    text-shadow: none;
    padding: 0;
}

/* Match Footer */
.vaoluoitv-match-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vaoluoitv-match-commentator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    flex: 1;
    justify-content: center;
}

.vaoluoitv-microphone-icon {
    width: 14px;
    height: 14px;
    fill: #94a3b8;
}

.vaoluoitv-match-logo {
    height: 20px;
    object-fit: contain;
}

.vadluonn-logo {
    height: 18px;
}

/* Empty state */
.vaoluoitv-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 16px;
}

/* Error state */
.vaoluoitv-error {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.5);
    border-radius: 8px;
    padding: 15px 20px;
    color: #fca5a5;
    margin: 20px 0;
    text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .vaoluoitv-main-title {
        font-size: 32px;
    }
    
    .vaoluoitv-header {
        padding: 30px 15px 20px;
    }
    
    .vaoluoitv-date-card {
        min-width: 75px;
        padding: 12px 10px;
    }
    
    .vaoluoitv-date-card-number {
        font-size: 24px;
    }
    
    .vaoluoitv-matches-list {
        grid-template-columns: 1fr;
    }
    
    .vaoluoitv-filter-bar {
        flex-wrap: wrap;
    }
    
    .vaoluoitv-filter-title {
        flex: 0 0 100%;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .vaoluoitv-filter-controls {
        flex: 0 0 100%;
        width: 100%;
        justify-content: flex-start;
    }
    
    .vaoluoitv-match-teams {
        flex-direction: column;
        gap: 20px;
    }
    
    .vaoluoitv-vs-icon {
        transform: rotate(90deg);
    }
}

/* Custom scrollbar */
.vaoluoitv-date-selector::-webkit-scrollbar {
    height: 6px;
}

.vaoluoitv-date-selector::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.vaoluoitv-date-selector::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.vaoluoitv-date-selector::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   PAGINATION
   ============================================ */
.vaoluoitv-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
}

.vaoluoitv-pagination-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vaoluoitv-pagination-btn {
    background: transparent;
    border: 2px solid #475569;
    border-radius: 8px;
    padding: 10px 20px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vaoluoitv-pagination-btn:hover {
    border-color: #fbbf24;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.vaoluoitv-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vaoluoitv-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vaoluoitv-pagination-number {
    min-width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #475569;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vaoluoitv-pagination-number:hover {
    border-color: #fbbf24;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.vaoluoitv-pagination-number.active {
    background: #fbbf24;
    border-color: #fbbf24;
    color: #0f172a;
    font-weight: 700;
}

.vaoluoitv-pagination-ellipsis {
    color: #94a3b8;
    font-size: 14px;
    padding: 0 5px;
}

@media (max-width: 768px) {
    .vaoluoitv-pagination-container {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .vaoluoitv-pagination-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .vaoluoitv-pagination-number {
        min-width: 35px;
        height: 35px;
        font-size: 12px;
    }
}