/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: transparent;
    font-family: 'Arial', 'Helvetica', sans-serif;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Outer container */
.outer-container {
    width: 1080px;
    height: 720px;
    background: transparent;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
}

/* Main scoreboard container */
.scoreboard {
    display: flex;
    background: rgba(0, 0, 0, 0.85);
    border: 3px solid #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    gap: 12px;
    width: 350px;
    height: 125px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Teams section */
.teams-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.team-name {
    color: #ffffff;
    font-size: 21px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    flex: 1;
    min-width: 0;
}

.team-score {
    color: #ffcc00;
    font-size: 38px;
    font-weight: bold;
    min-width: 40px;
    text-align: right;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Score change animation */
@keyframes scoreChange {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        color: #00ff00;
    }

    100% {
        transform: scale(1);
    }
}

.team-score.score-change {
    animation: scoreChange 0.3s ease;
}

/* Game info section */
.game-info-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 70px;
}

/* Inning display */
.inning-display {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inning-label {
    color: #cccccc;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.3px;
}

.inning-value {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.inning-indicator {
    font-size: 16px;
    color: #ffcc00;
}

/* Count and Bases Row */
.count-bases-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Count display (balls, strikes, outs) */
.count-display {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.count-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.count-label {
    color: #cccccc;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.3px;
    min-width: 8px;
}

.count-value {
    color: #ffffff;
    font-size: 19px;
    font-weight: bold;
    min-width: 12px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Bases display */
.bases-display {
    display: flex;
    justify-content: center;
    align-items: center;
}

.base-diamond {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.base-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.base {
    width: 10px;
    height: 10px;
    background: transparent;
    border: 1.5px solid #ffffff;
    transform: rotate(45deg);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.base.occupied {
    background: #00ff00;
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.6);
}

/* Responsive design */
@media (max-width: 768px) {
    .scoreboard {
        flex-direction: column;
        padding: 12px 16px;
        gap: 16px;
    }

    .team-name {
        font-size: 35px;
    }

    .team-score {
        font-size: 57px;
        min-width: 60px;
    }

    .game-info-section {
        flex-direction: row;
        justify-content: space-around;
        min-width: auto;
    }

    .inning-display {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .count-display {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .scoreboard {
        padding: 8px 12px;
        gap: 12px;
    }

    .team-name {
        font-size: 28px;
    }

    .team-score {
        font-size: 44px;
        min-width: 50px;
    }

    .inning-value {
        font-size: 32px;
    }

    .count-indicator {
        width: 12px;
        height: 12px;
    }

    .count-label {
        font-size: 19px;
    }

    .base {
        width: 16px;
        height: 16px;
    }

    .base-row {
        gap: 24px;
    }
}

/* High contrast mode for better readability */
@media (prefers-contrast: high) {
    .scoreboard {
        border-width: 4px;
        background: rgba(0, 0, 0, 0.95);
    }

    .team-name,
    .inning-value {
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 1);
    }

    .team-score {
        text-shadow: 4px 4px 8px rgba(0, 0, 0, 1);
    }
}