/* Livescore Styles - Final Version (No Conflict with Sidebar) */

.livescore-wrapper {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1rem;
}

/* Header layout: LIVE indicator inline with league filter */
.livescore-header {
    margin-bottom: 2rem;
}

.live-and-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: bold;
    white-space: nowrap;
    color: #0a9396;
    margin-bottom: 0;
}

.live-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #0a9396;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    margin-right: 0.8rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.league-dropdown {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    background: #001219;
    color: #e9d8a6;
    border: 2px solid #0a9396;
    border-radius: 12px;
}

.league-filter {
    flex: 1;
    max-width: 500px;
    min-width: 280px;
}

.ls-matches-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ls-league-group {
    background: #001f2b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.ls-league-title {
    background: #0a9396;
    color: #fff;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ls-league-title img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.ls-match-item {  
    background: #002b3d;
    padding: 0.6rem 1.2rem; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #003d55; 
}

.ls-match-item:last-child {
    border-bottom: none;
}

.ls-match-teams { 
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0; 
    overflow: hidden; 
}

.ls-team-home {   
    text-align: right;
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.ls-team-away {   
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.team-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    flex-shrink: 0;
}

.team-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px; 
}

.ls-match-score { 
    font-size: 1.6rem;
    font-weight: 700;
    color: #0a9396;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.ls-match-status {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0a9396;
    min-width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.loading-message {
    text-align: center;
    padding: 4rem 1rem;
    color: #666;
    font-size: 1.2rem;
}

.spinner i {
    font-size: 3rem;
    color: #0a9396;
}

/* Goal Popup */
.goal-popup {
    display: none;
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    background: #0a9396;
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: 700;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    animation: goalAnim 4s ease-in-out;
}

@keyframes goalAnim {
    0% { opacity: 0; transform: translate(-50%, -30px); }
    10% { opacity: 1; transform: translateX(-50%); }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .live-and-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .live-indicator {
        font-size: 1.0rem;
        margin-bottom: 0.8rem;
    }
    
    .league-filter {
        width: 100%;
        max-width: none;
    }
    
    .team-logo { width: 26px; height: 26px; }
    .team-name { font-size: 0.9rem; max-width: 100px; }
    .ls-match-score { font-size: 1.5rem; }
    .ls-match-status { font-size: 0.9rem; }
    .ls-match-item { padding: 0.5rem 1rem; }
    .goal-popup { font-size: 1.2rem; padding: 0.8rem 2rem; top: 10%; }
}

@media (max-width: 480px) {
    .team-name { font-size: 0.85rem; max-width: 80px; }
    .ls-match-score { font-size: 1.3rem; }
}