body, html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    background-color: #f0f2f5;
    color: #1a1a1a;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden; /* Prevents scrollbars */
    box-sizing: border-box;
}

#dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 100%;
    height: 100%;
    gap: 2vh;
    padding: 2vh;
    box-sizing: border-box;
}

.field-card {
    background-color: #ffffff;
    border: 0.4vh solid #e0e0e0;
    border-radius: 2vh;
    padding: 2vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1vh 2vh rgba(0,0,0,0.1);
    box-sizing: border-box;
    overflow: hidden;
    position: relative; /* Required for absolute positioning of the chart */
}

.chart-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.35; /* Semi-transparent background overlay */
    pointer-events: none;
}

/* Ensure text and UI elements stay above the background chart */
.field-header, .teams, .time-left, .flags, .no-game {
    position: relative;
    z-index: 1;
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.4vh solid #e0e0e0;
    padding-bottom: 1vh;
}

.field-title {
    font-size: 3.5vh;
    font-weight: bold;
    text-transform: uppercase;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 2vh;
}

.field-status {
    font-size: 2.5vh;
    padding: 1vh 2vh;
    border-radius: 1vh;
    background: #e0e0e0;
    color: #333;
    font-weight: bold;
    letter-spacing: 0.2vh;
    flex-shrink: 0;
}

.teams {
    display: flex;
    justify-content: space-between;
    flex-grow: 1;
    align-items: center;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
    gap: 1vh;
}

.team-name {
    font-size: 3vh;
    text-align: center;
    word-break: break-word;
    font-weight: 600;
}

.team-score {
    font-size: 11vh;
    font-weight: bold;
    line-height: 1;
}

.red-team { color: #d32f2f; }
.blue-team { color: #1976d2; }

.time-left {
    font-size: 9vh;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #333333;
}

.flags {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5vh;
    justify-content: center;
    padding: 1.5vh;
}

.flag {
    display: flex;
    align-items: center;
    padding: 0.5vh 1vh;
    font-size: 2vh;
    color: #333;
}

.flag-indicator {
    width: 7vh;
    height: 7vh;
    border-radius: 50%;
    margin-right: 1.5vh;
}

/* Flag colors matching the enum */
.bg-green { background-color: #4caf50; box-shadow: 0 0 1.5vh rgba(76, 175, 80, 0.5); }
.bg-red { background-color: #d32f2f; box-shadow: 0 0 1.5vh rgba(211, 47, 47, 0.5); }
.bg-blue { background-color: #1976d2; box-shadow: 0 0 1.5vh rgba(25, 118, 210, 0.5); }
.bg-dark { background-color: #999999; border: 0.2vh solid #666; }

.no-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    font-size: 5vh;
}
