/**
 * AI Predictions Page Styles
 */

.predictions-page {
    padding: 2rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    font-size: 1.1rem;
    color: #666;
}

/* Date Selector */
.date-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-date {
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 2px solid #1E90FF;
    border-radius: 8px;
    color: #1E90FF;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-date:hover {
    background: #1E90FF;
    color: white;
}

.date-input {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.btn-today {
    padding: 0.5rem 1.5rem;
    background: #32CD32;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-today:hover {
    background: #28a428;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #333;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: #1E90FF;
}

/* State Messages */
.loading-state,
.error-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1E90FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: #dc3545;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.btn-retry {
    padding: 0.5rem 1.5rem;
    background: #1E90FF;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    background: #1873cc;
}

.empty-state p {
    font-size: 1.3rem;
    color: #666;
}

/* Predictions Grid */
.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .predictions-grid {
        grid-template-columns: 1fr;
    }
}

/* Prediction Card */
.prediction-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.prediction-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.league-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.league-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.league-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.match-time {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.win-probabilities {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.75rem;
    background: rgba(30, 144, 255, 0.05);
    border-radius: 8px;
    gap: 0.5rem;
}

.prob-item {
    text-align: center;
    flex: 1;
}

.prob-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.prob-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1E90FF;
}

/* Teams Section */
.teams-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.team-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.team-info {
    flex: 1;
}

.team-name {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.team-form {
    font-size: 0.85rem;
    color: #666;
}

.form-value {
    font-weight: 600;
    color: #1E90FF;
}

.vs-divider {
    font-weight: 700;
    color: #999;
    font-size: 1.2rem;
    padding: 0 0.5rem;
}

/* Prediction Info */
.prediction-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Load Prediction Section */
.load-prediction-section {
    text-align: center;
    padding: 2rem 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 1rem 0;
}

.btn-load-prediction {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #1E90FF 0%, #32CD32 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-load-prediction:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 144, 255, 0.3);
}

.btn-load-prediction:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.load-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #666;
}

.prediction-winner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.winner-label {
    font-weight: 500;
    color: #666;
}

.winner-value {
    font-weight: 700;
    color: #1E90FF;
    font-size: 1.1rem;
}

.prediction-advice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 4px solid #32CD32;
}

.advice-label {
    font-weight: 600;
    color: #32CD32;
}

.advice-value {
    flex: 1;
    color: #333;
    font-size: 0.95rem;
}

.prediction-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .prediction-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.detail-item {
    text-align: center;
}

.detail-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.detail-value {
    display: block;
    font-weight: 700;
    color: #1a1a2e;
    font-size: 1rem;
}

.detail-value:empty::after {
    content: 'N/A';
    color: #999;
    font-weight: 400;
}

/* Charts Section */
.charts-section {
    margin-top: 1rem;
}

.toggle-charts-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #1E90FF 0%, #32CD32 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.toggle-charts-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
}

.charts-container {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.chart-wrapper {
    margin-bottom: 2rem;
}

.chart-wrapper:last-child {
    margin-bottom: 0;
}

.chart-wrapper h4 {
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.chart-wrapper canvas {
    max-height: 300px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .predictions-page {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .filters-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .teams-section {
        flex-direction: column;
    }
    
    .vs-divider {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
}
