/**
 * School Scoreboard System - Display Styles
 */

/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background-color: #000;
    color: #fff;
}

.scoreboard-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* School logos and names */
.teams-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
}

.team-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
}

.team-name {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
}

.school-name {
    font-size: 1.5rem;
    text-align: center;
    opacity: 0.8;
}

.versus {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 20px;
}

/* Score display */
.score-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 20px 0;
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
}

.score {
    font-size: 8rem;
    font-weight: bold;
    line-height: 1;
}

.score-label {
    font-size: 1.5rem;
    margin-top: 10px;
}

/* Rugby specific styles */
.rugby-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    width: 100%;
}

.period, .timer {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 20px;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.penalties {
    font-size: 1.5rem;
    margin-top: 10px;
}

.scorers-container {
    width: 100%;
    margin-top: 20px;
}

.scorers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.scorers-title {
    font-size: 1.8rem;
    font-weight: bold;
}

.scorers-toggle {
    background: none;
    border: 1px solid #fff;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.scorers-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.scorers-list {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.team-scorers {
    width: 45%;
}

.scorer {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.scorer-name {
    font-weight: bold;
}

.score-type {
    opacity: 0.8;
}

/* Cricket specific styles */
.cricket-scoreboard {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cricket-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.innings-info {
    font-size: 2rem;
    font-weight: bold;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.cricket-score {
    font-size: 6rem;
    font-weight: bold;
}

.cricket-detail {
    font-size: 2.5rem;
    margin: 10px 0;
}

.batsmen-container {
    width: 100%;
    margin: 20px 0;
}

.batsman {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
}

.batsman.on-strike .batsman-name::after {
    content: " *";
}

.batsman-stats {
    display: flex;
}

.batsman-stat {
    margin-left: 20px;
    min-width: 50px;
    text-align: center;
}

.bowler-container {
    width: 100%;
    margin: 20px 0;
}

.bowler {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
}

.bowler-stats {
    display: flex;
}

.bowler-stat {
    margin-left: 20px;
    min-width: 50px;
    text-align: center;
}

.partnership {
    font-size: 1.5rem;
    margin: 10px 0;
}

.rates-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin: 20px 0;
}

.rate {
    font-size: 1.5rem;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.target {
    font-size: 2rem;
    font-weight: bold;
    margin: 20px 0;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Controls */
.controls {
    position: fixed;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.control-button {
    background: none;
    border: 1px solid #fff;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.control-button:hover {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .team-logo {
        width: 120px;
        height: 120px;
    }
    
    .team-name {
        font-size: 2rem;
    }
    
    .school-name {
        font-size: 1.2rem;
    }
    
    .score {
        font-size: 6rem;
    }
    
    .period, .timer {
        font-size: 2rem;
    }
    
    .cricket-score {
        font-size: 5rem;
    }
    
    .cricket-detail {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .team-logo {
        width: 80px;
        height: 80px;
    }
    
    .team-name {
        font-size: 1.5rem;
    }
    
    .school-name {
        font-size: 1rem;
    }
    
    .score {
        font-size: 4rem;
    }
    
    .versus {
        font-size: 1.5rem;
    }
    
    .period, .timer {
        font-size: 1.5rem;
        margin: 0 10px;
    }
    
    .cricket-score {
        font-size: 3.5rem;
    }
    
    .cricket-detail {
        font-size: 1.5rem;
    }
    
    .batsman, .bowler {
        font-size: 1.2rem;
    }
}

/* Prevent stacking on smaller screens */
@media (max-width: 600px) {
    .teams-container, .score-container, .scorers-list {
        flex-direction: row;
    }
    
    .team, .score-box, .team-scorers {
        width: 45%;
    }
}
