/* --- Global Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* --- Tiles Container --- */
#tiles-container {
    display: grid;
    /* This is the magic for responsive tiles:
       - Fills the space with columns (auto-fit)
       - Each column is at least 320px wide
       - If there's space, they grow equally (1fr)
    */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Individual Tile Styling --- */
.tile {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 4px solid #3498db; /* Accent color */
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* --- Tile Content --- */
.tile .matchup {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: center;
}

.tile .league-info {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 10px;
}

.tile .details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.tile .detail-item {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.tile .detail-item strong {
    display: block;
    font-size: 1.1rem;
    color: #34495e;
    margin-bottom: 4px;
}

/* Specific color for the prediction */
.tile .prediction strong {
    color: #27ae60; /* Green for prediction */
}

/* Specific color for the odds */
.tile .odds strong {
    color: #e67e22; /* Orange for odds */
}

.tile .date-footer {
    font-size: 0.85rem;
    color: #95a5a6;
    text-align: right;
    margin-top: 15px;
}

/* --- Loading and Error Tiles --- */
.status-tile {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.status-tile h3 {
    color: #e74c3c; /* Red for error */
}

.status-tile pre {
    margin-top: 15px;
    background: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    text-align: left;
    display: inline-block;
    white-space: pre-wrap;
    word-wrap: break-word;
}