/*
 * Rediseño de Estilos de Predicciones MLB - "The Scoreboard"
 * Por: Cline, Diseñador UX/UI
 */

/* --- Fuentes y Variables Globales --- */
:root {
    --sb-bg: #ffffff;
    --sb-header-bg: #f9fafb;
    --sb-row-bg-hover: #f9fafb;
    --sb-primary-text: #1f2937;
    --sb-secondary-text: #6b7280;
    --sb-border-color: #e5e7eb;
    --sb-pick-bg: #e0f2fe; /* Light blue background for the pick */
    --sb-pick-text: #0c4a6e; /* Dark blue text for the pick */
    --sb-pick-winner-text: #1d4ed8;
    --font-family-data: 'Roboto Mono', 'Fira Code', monospace;
    --font-family-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Roboto+Mono:wght@500&display=swap');

/* --- Contenedor Principal --- */
.mlb-predictions-grid-container {
    font-family: var(--font-family-ui);
    background-color: var(--sb-bg);
    padding: 20px 10px;
    max-width: 900px;
    margin: 0 auto;
}

.mlb-predictions-grid-container h1 {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: var(--sb-primary-text);
}

/* --- Contenedor de la Tabla de Juegos --- */
.scoreboard-container {
    border: 1px solid var(--sb-border-color);
    border-radius: 8px;
    overflow: hidden;
}

.scoreboard-header {
    display: grid;
    grid-template-columns: 1fr 120px 200px;
    background-color: var(--sb-header-bg);
    padding: 10px 15px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sb-secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--sb-border-color);
}

.scoreboard-header .header-pick {
    text-align: center;
}

/* --- Fila de Juego --- */
.game-row {
    display: grid;
    grid-template-columns: 1fr 120px 200px;
    align-items: center;
    border-bottom: 1px solid var(--sb-border-color);
    transition: background-color 0.2s ease;
}

.game-row:last-child {
    border-bottom: none;
}

.game-row:hover {
    background-color: var(--sb-row-bg-hover);
}

/* --- Celda de Enfrentamiento --- */
.matchup-cell {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.team-info {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.team-name {
    font-weight: 600;
    color: var(--sb-primary-text);
    font-size: 0.9rem;
}

.team-record {
    font-weight: 400;
    color: var(--sb-secondary-text);
    margin-left: 5px;
    font-size: 0.85rem;
}

.team-pitcher {
    font-size: 0.8rem;
    color: var(--sb-secondary-text);
}

/* --- Celda de Hora/Cuotas --- */
.meta-cell {
    padding: 15px;
    font-size: 0.85rem;
    color: var(--sb-secondary-text);
    text-align: center;
    border-left: 1px solid var(--sb-border-color);
}

.game-time {
    display: block;
    font-weight: 500;
}

.game-odds {
    display: block;
    font-size: 0.8rem;
}

/* --- Celda de Predicción --- */
.pick-cell {
    padding: 15px;
    background-color: var(--sb-pick-bg);
    text-align: center;
    border-left: 1px solid var(--sb-border-color);
    font-family: var(--font-family-data);
}

.pick-winner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sb-pick-winner-text);
}

.pick-winner .team-logo {
    width: 20px;
    height: 20px;
}

.pick-total {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--sb-pick-text);
}

.no-prediction {
    font-size: 0.85rem;
    color: var(--sb-secondary-text);
    font-style: italic;
}

/* --- Responsive --- */
@media (max-width: 700px) {
    .scoreboard-header {
        display: none; /* Ocultar encabezado en móvil */
    }
    .game-row {
        grid-template-columns: 1fr 1fr;
        padding: 10px;
    }
    .matchup-cell {
        grid-column: 1 / 2;
        padding: 5px;
    }
    .meta-cell {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        border: none;
        padding: 5px;
        text-align: right;
    }
    .pick-cell {
        grid-column: 1 / -1;
        grid-row: 2 / 3;
        border: none;
        border-top: 1px solid var(--sb-border-color);
        margin: 10px -10px -10px -10px;
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 450px) {
    .team-name { font-size: 0.85rem; }
.team-pitcher { display: none; } /* Ocultar pitcher en pantallas muy pequeñas */
}

/* --- Botones --- */
.pick-button, .view-more-button {
    display: inline-block;
    background-color: var(--sb-pick-winner-text);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.pick-button:hover, .view-more-button:hover {
    background-color: #1e40af; /* Un azul más oscuro al pasar el ratón */
}

.view-more-container {
    text-align: center;
    margin-top: 25px;
}

/* --- Single Prediction Page Styles ("The Analyst's Desk") --- */
.single-prediction-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid var(--sb-border-color);
    border-radius: 12px;
}

.single-prediction-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--sb-primary-text);
    text-align: center;
    margin-bottom: 15px;
}

.single-matchup {
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    padding: 20px;
    background-color: var(--sb-header-bg);
    border-radius: 8px;
}

.matchup-team {
    width: 40%;
}

.matchup-team .team-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.matchup-team .team-name {
    font-size: 1.5rem;
}

.matchup-vs {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sb-secondary-text);
}

.single-game-meta {
    text-align: center;
    margin: 15px 0;
    color: var(--sb-secondary-text);
    font-size: 0.9rem;
}

.prediction-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.summary-card {
    background-color: var(--sb-header-bg);
    border: 1px solid var(--sb-border-color);
    border-left-width: 5px;
    border-radius: 8px;
    padding: 20px;
}

.summary-card.winner-card {
    border-left-color: var(--sb-pick-winner-text);
}

.summary-card.total-card {
    border-left-color: #f59e0b; /* Amber */
}

.summary-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--sb-secondary-text);
    margin: 0 0 10px 0;
}

.summary-card .card-pick {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sb-primary-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-card .card-pick .team-logo {
    width: 32px;
    height: 32px;
}

.analysis-section {
    margin-top: 30px;
}

.analysis-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--sb-primary-text);
    border-bottom: 2px solid var(--sb-border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.analysis-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
}

.analysis-content p {
    margin-bottom: 1em;
}

/* --- Single Prediction Page Styles ("The Pro Sheet") --- */
.pro-sheet-container {
    max-width: 850px;
    margin: 30px auto;
    font-family: var(--font-family-ui);
}
.pro-sheet-card {
    background-color: #ffffff;
    border: 1px solid var(--sb-border-color);
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
}
.pro-sheet-card-header {
    padding: 15px 20px;
    background-color: var(--sb-header-bg);
    border-bottom: 1px solid var(--sb-border-color);
}
.pro-sheet-card-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sb-primary-text);
}
.pro-sheet-card-body {
    padding: 25px;
}

/* Matchup Card */
.ps-matchup-header {
    text-align: center;
    margin-bottom: 20px;
}
.ps-matchup-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}
.ps-matchup-header .meta {
    font-size: 0.9rem;
    color: var(--sb-secondary-text);
}
.ps-matchup-teams {
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
}
.ps-team {
    width: 40%;
}
.ps-team .team-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 10px;
}
.ps-team .team-name {
    font-size: 1.25rem;
    font-weight: 600;
}
.ps-team .team-record {
    font-size: 0.9rem;
    color: var(--sb-secondary-text);
}
.ps-vs {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sb-secondary-text);
}

/* Picks Card */
.ps-picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.ps-pick-card {
    text-align: center;
    background-color: var(--sb-header-bg);
    padding: 20px;
    border-radius: 8px;
}
.ps-pick-card .card-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--sb-secondary-text);
    margin-bottom: 10px;
}
.ps-pick-card .card-pick {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sb-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.ps-pick-card .card-pick .team-logo {
    width: 32px;
    height: 32px;
}

/* Pitchers Card */
.ps-pitchers-grid {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 20px;
}
.ps-pitcher {
    width: 45%;
    text-align: center;
}
.ps-pitcher img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid var(--sb-border-color);
}
.ps-pitcher .pitcher-name {
    font-size: 1.1rem;
    font-weight: 600;
}
.ps-pitcher .pitcher-stats {
    font-size: 0.9rem;
    color: var(--sb-secondary-text);
    line-height: 1.5;
}

/* Analysis Card */
.ps-analysis-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
}
.ps-analysis-content p { margin-bottom: 1em; }
.ps-analysis-content h2, .ps-analysis-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5em 0 0.5em;
}

/* Author Card */
.ps-author-box {
    display: flex;
    gap: 15px;
    align-items: center;
}
.ps-author-box img {
    border-radius: 50%;
}
.ps-author-box .author-name {
    font-weight: 600;
}
.ps-author-box .author-desc {
    font-size: 0.9rem;
    color: var(--sb-secondary-text);
}

/* --- Parlay Ticket Styles --- */
.parlay-ticket {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid var(--sb-border-color);
    border-radius: 16px;
    max-width: 600px;
    margin: 30px auto;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.parlay-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px dashed var(--sb-border-color);
}

.parlay-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sb-primary-text);
    margin: 0;
}

.parlay-legs {
    padding: 20px;
}

.parlay-leg {
    display: flex;
    align-items: center;
    position: relative;
}

.parlay-leg:not(:last-child) {
    padding-bottom: 25px;
}

.parlay-leg:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 45px;
    bottom: -15px;
    width: 2px;
    background-color: #d1d5db; /* Light gray connector */
}

.leg-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--sb-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    flex-shrink: 0;
}

.leg-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.leg-icon .icon-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--sb-pick-text);
}

.leg-details {
    margin-left: 15px;
}

.leg-matchup {
    font-size: 0.85rem;
    color: var(--sb-secondary-text);
    margin-bottom: 4px;
}

.leg-pick {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sb-primary-text);
}

.parlay-footer {
    padding: 20px;
    background-color: #eef2ff; /* Light indigo background */
    border-top: 1px dashed var(--sb-border-color);
    text-align: center;
}

.parlay-footer .footer-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4338ca;
    margin: 0 0 5px 0;
}

.parlay-footer .footer-odds {
    font-size: 1.75rem;
    font-weight: 700;
    color: #3730a3;
}
