/**
 * Game Detail Page Styles
 * Styles specific to the individual game detail page (game.html)
 */

/* Game Header */
.game-detail-header-bg {
    position: absolute;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, #172334 0%, #174354 100%);
    z-index: 0;
}

.game-detail-header {
    padding: 100px 20px 30px;
    position: relative;
    max-width: var(--container-width);
    margin: 0 auto;
    z-index: 1;
    text-align: center;
}

/* Stage and Group Badges */
.game-detail-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.game-detail-status {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 4px;
}

.game-detail-status.scheduled {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

.game-detail-status.live {
    background: rgba(220, 38, 38, 0.8);
    color: white;
    animation: pulse-live 2s ease-in-out infinite;
}

.game-detail-status.final {
    background: rgba(4, 135, 142, 0.3);
    color: #5fd4db;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Scoreboard */
.game-scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.game-scoreboard-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 280px;
}

.game-scoreboard-team-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.game-scoreboard-team-link:hover {
    opacity: 0.8;
}

.game-scoreboard-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.game-scoreboard-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.3;
}

.game-scoreboard-abbreviation {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.game-scoreboard-center {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.game-scoreboard-score {
    font-size: 48px;
    font-weight: 900;
    color: white;
    min-width: 50px;
    text-align: center;
    line-height: 1;
}

.game-scoreboard-vs {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

/* Game Meta (date, time, venue) */
.game-detail-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.game-detail-meta span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.game-detail-meta-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

/* Info Bar (below header) */
.game-info-bar {
    background: #171F36;
    width: 100%;
}

.game-info-bar-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.game-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-info-icon {
    width: 20px;
    height: 20px;
    fill: var(--primary-gold);
    flex-shrink: 0;
}

.game-info-item-text {
    display: flex;
    flex-direction: column;
}

.game-info-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.game-info-value {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

/* Content Sections */
.game-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 40px 20px 80px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.game-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 24px;
}

/* Probabilities Section */
.game-probability-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.game-probability-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.game-probability-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.game-probability-label.home {
    text-align: left;
}

.game-probability-label.away {
    text-align: right;
}

.game-probability-label.draw {
    text-align: center;
}

.game-prob-team-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.game-probability-label.draw .game-prob-team-name {
    color: #616161;
}

.game-prob-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-navy);
}

.game-probability-label.draw .game-prob-value {
    color: #616161;
}

.game-probability-bar {
    display: flex;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #e0e0e0;
}

.game-probability-segment {
    height: 100%;
    transition: width 0.5s ease;
}

.game-probability-segment.draw {
    background: linear-gradient(90deg, #616161, #757575);
}

.game-probability-link {
    text-align: center;
    margin-top: 16px;
}

.game-probability-link a {
    color: var(--primary-teal);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.game-probability-link a:hover {
    color: var(--primary-navy);
    text-decoration: underline;
}

/* Probability Error State */
.game-probability-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
}

.game-probability-error-icon {
    width: 32px;
    height: 32px;
    fill: var(--text-light);
    opacity: 0.5;
}

.game-probability-error p {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
}

/* Game Stats Section */
.game-stats-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-stat-row {
    background: white;
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.game-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.game-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-navy);
}

.game-stat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-stat-bar {
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    background: var(--secondary-light);
}

.game-stat-bar-fill {
    height: 100%;
    transition: width 0.6s ease;
    min-width: 2px;
}

.game-stat-bar-fill.home {
    border-radius: 5px 0 0 5px;
}

.game-stat-bar-fill.away {
    border-radius: 0 5px 5px 0;
}

.game-stat-bar-gap {
    width: 2px;
    background: white;
}

/* Game Leaders Section — Tabbed Interface */
.game-leaders-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.game-leaders-tabs {
    display: flex;
    border-bottom: 2px solid var(--secondary-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.game-leader-tab {
    flex: 1;
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    min-width: 0;
}

.game-leader-tab:hover {
    color: var(--primary-navy);
}

.game-leader-tab.active {
    color: var(--primary-teal);
    border-bottom-color: var(--primary-teal);
}

.game-leaders-panels {
    padding: 32px 24px;
}

.game-leader-panel {
    display: none;
}

.game-leader-panel.active {
    display: block;
}

.game-leader-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.game-leader-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 200px;
    text-align: center;
}

.game-leader-photo-wrapper {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid var(--secondary-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-light);
}

.game-leader-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.game-leader-name {
    color: var(--primary-navy);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.game-leader-name:hover {
    color: var(--primary-teal);
    text-decoration: underline;
}

.game-leader-team-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-leader-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-navy);
}

.game-leader-vs {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-light);
    flex-shrink: 0;
}

/* Timeline Section */
.game-timeline-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.game-timeline-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.game-timeline-header .game-timeline-bar-area {
    height: auto;
}

.game-timeline-header .game-timeline-half {
    justify-content: center;
}

.game-timeline-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-timeline-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.game-timeline-team-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-navy);
}

.game-timeline-col-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.game-timeline-col-header.set {
    width: 32px;
    text-align: center;
}

.game-timeline-col-header.score {
    width: 60px;
    text-align: center;
}

.game-timeline-sets {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-timeline-set-row {
    display: flex;
    align-items: center;
}

.game-timeline-set-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.game-timeline-bar-area {
    flex: 1;
    height: 32px;
    display: flex;
    align-items: center;
}

.game-timeline-half {
    flex: 1;
    display: flex;
    align-items: center;
    height: 100%;
}

.game-timeline-half.home {
    justify-content: flex-end;
}

.game-timeline-half.away {
    justify-content: flex-start;
}

.game-timeline-center {
    width: 2px;
    background: var(--secondary-light);
    align-self: stretch;
    flex-shrink: 0;
}

.game-timeline-bar {
    height: 28px;
    border-radius: 4px;
    min-width: 20px;
    flex-shrink: 0;
    transition: width 0.4s ease;
}

.game-timeline-point-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    flex-shrink: 0;
    min-width: 28px;
    padding: 0 4px;
}

.game-timeline-half.home .game-timeline-team {
    padding-right: 20px;
}

.game-timeline-half.away .game-timeline-team {
    padding-left: 20px;
}

.game-timeline-half.home .game-timeline-point-label {
    text-align: right;
}

.game-timeline-half.away .game-timeline-point-label {
    text-align: left;
}

.game-timeline-set-score {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-navy);
    width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.game-timeline-cumulative {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--secondary-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 32px;
}

.game-timeline-final {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-navy);
}

.game-timeline-final-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}

/* Placeholder State */
.game-placeholder {
    background: var(--secondary-light);
    padding: 50px 40px;
    border-radius: 12px;
    text-align: center;
}

.game-placeholder h3 {
    color: var(--primary-navy);
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 700;
}

.game-placeholder p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
}

/* Not Found State */
.game-not-found {
    text-align: center;
    padding: 100px 20px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.game-not-found h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 16px;
}

.game-not-found p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.game-not-found a {
    color: var(--primary-teal);
    text-decoration: none;
    font-weight: 600;
}

.game-not-found a:hover {
    text-decoration: underline;
}

/* Loading State */
.game-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    gap: 20px;
}

.game-loading p {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-navy);
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    .game-scoreboard {
        gap: 16px;
    }

    .game-scoreboard-logo {
        width: 64px;
        height: 64px;
    }

    .game-scoreboard-score {
        font-size: 40px;
    }

    .game-leaders-panels {
        padding: 24px 16px;
    }
}

/* Responsive: Mobile */
@media (max-width: 768px) {
    .game-detail-header {
        padding: 80px 16px 24px;
    }

    .game-scoreboard {
        gap: 10px;
    }

    .game-scoreboard-team {
        max-width: 120px;
    }

    .game-scoreboard-logo {
        width: 48px;
        height: 48px;
    }

    .game-scoreboard-name {
        font-size: 13px;
    }

    .game-scoreboard-score {
        font-size: 32px;
        min-width: 36px;
    }

    .game-scoreboard-vs {
        font-size: 13px;
    }

    .game-scoreboard-abbreviation {
        font-size: 11px;
    }

    .game-info-bar-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .game-content {
        padding: 24px 16px 60px;
        gap: 36px;
    }

    .game-section-title {
        font-size: 20px;
    }

    .game-stat-row {
        padding: 16px;
    }

    .game-stat-value {
        font-size: 18px;
    }

    .game-leader-comparison {
        gap: 20px;
    }

    .game-leader-photo-wrapper {
        width: 68px;
        height: 68px;
    }

    .game-leader-value {
        font-size: 26px;
    }

    .game-leader-name {
        font-size: 13px;
    }

    .game-leader-tab {
        padding: 12px 8px;
        font-size: 11px;
    }

    .game-probability-card,
    .game-timeline-card {
        padding: 20px;
    }

    .game-timeline-set-number {
        width: 28px;
        font-size: 11px;
    }

    .game-timeline-col-header.set {
        width: 28px;
    }

    .game-timeline-set-score {
        width: 50px;
        font-size: 12px;
    }

    .game-timeline-col-header.score {
        width: 50px;
    }

    .game-timeline-cumulative {
        padding-left: 28px;
    }

    .game-timeline-point-label {
        font-size: 11px;
        min-width: 20px;
    }

    .game-detail-meta {
        gap: 8px;
    }

    .game-detail-meta span {
        font-size: 12px;
    }
}

/* Responsive: Small Mobile */
@media (max-width: 480px) {
    .game-scoreboard-team {
        max-width: 100px;
    }

    .game-scoreboard-logo {
        width: 40px;
        height: 40px;
    }

    .game-scoreboard-name {
        font-size: 12px;
    }

    .game-scoreboard-score {
        font-size: 28px;
    }
}
