/**
 * Matches Schedule Page Styles
 */

.schedule-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.schedule-header h1 {
    font-size: 2rem;
    color: #1a1a1a;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-refresh:active {
    transform: translateY(0);
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-refresh:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.refresh-icon {
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 0.5s;
}

.btn-refresh:hover .refresh-icon {
    transform: rotate(180deg);
}

.auto-update-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
}

.update-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Date Navigation */
.date-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.btn-nav {
    width: 40px;
    height: 40px;
    border: 2px solid #1E90FF;
    background: white;
    color: #1E90FF;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.btn-nav:hover {
    background: #1E90FF;
    color: white;
}

.date-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.btn-today {
    padding: 10px 20px;
    background: #32CD32;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-today:hover {
    background: #28a428;
}

/* Status Tabs */
.status-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #f0f0f0;
}

.tab-btn.active {
    background: #1E90FF;
    color: white;
    border-color: #1E90FF;
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* League Filter */
.league-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.league-filter label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.league-select {
    flex: 1;
    max-width: 400px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s;
}

.league-select:hover {
    border-color: #1E90FF;
}

.league-select:focus {
    outline: none;
    border-color: #1E90FF;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1E90FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.2rem;
}

/* Matches Container */
.matches-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* League Group */
.league-group {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.league-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
}

.league-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.league-info {
    flex: 1;
}

.league-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.league-country {
    font-size: 0.85rem;
    opacity: 0.9;
}

.matches-count {
    padding: 4px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.league-matches {
    display: flex;
    flex-direction: column;
}

/* Match Row */
.match-row {
    display: grid;
    grid-template-columns: 100px 1fr 130px;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    cursor: pointer;
}

.match-row:last-child {
    border-bottom: none;
}

.match-row:hover {
    background: #f8f9fa;
}

.match-row.live {
    background: #fff3e0;
}

/* Match Time */
.match-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.match-time .time {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.match-time .status {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e0e0e0;
    color: #666;
}

.match-time .status.live {
    background: #ff4444;
    color: white;
    animation: pulse-status 2s infinite;
}

.match-time .status.finished {
    background: #4CAF50;
    color: white;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Match Teams */
.match-teams {
    display: flex;
    align-items: center;
    gap: 20px;
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.team.home-team {
    justify-content: flex-end;
}

.team.away-team {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.team-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

.match-score {
    min-width: 60px;
    text-align: center;
}

.match-score .score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1E90FF;
}

.match-row.finished .match-score .score {
    color: #333;
}

.match-row.live .match-score .score {
    color: #ff4444;
}

/* Predict Button */
.btn-predict {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-predict:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-predict:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .schedule-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .match-row {
        grid-template-columns: 80px 1fr 100px;
        gap: 10px;
        font-size: 0.9rem;
    }
    
    .team-name {
        font-size: 0.85rem;
    }
    
    .btn-predict {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}
