body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1600px;
    gap: 20px;
}

/* CHANGED: Main content takes more space, sidebar takes less */
.main-content {
    flex: 4; /* Increased from 3 */
    display: flex;
    flex-direction: column;
}

.sidebar {
    flex: 1; /* Stays at 1, making it proportionally smaller */
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

h1 { border-bottom: none; padding-bottom: 0; }
h2, h3 { color: #ffffff; border-bottom: 2px solid #333; padding-bottom: 10px; }

/* CHANGED: Grid ratio adjusted to make the graph wider */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.5fr; /* Video area vs Graph area */
    gap: 20px;
    align-items: flex-start;
}

.video-area {
    display: flex;
    flex-direction: column;
}

.video-wrapper {
    width: 100%;
    margin-bottom: 10px; /* Space between video and status label */
}

#videoPlayer {
    background-color: #000;
    border-radius: 8px;
}

/* CHANGED: Status label is now positioned under the video */
#statusLabel {
    margin-top: 0; /* Resets previous margin */
    font-style: italic;
    color: #f44336;
    text-align: center; /* Center the text under the video */
    min-height: 24px; /* Prevents layout shifts */
}

/* The chart and yolo containers are now styled independently */
.chart-container {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
}

.yolo-container {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
}

#yoloTextLabel { font-size: 1.2em; font-weight: bold; color: #4CAF50; min-height: 25px; }
#yoloImageFrame { width: 100%; height: auto; border-radius: 4px; background-color: #333; min-height: 150px; margin-top: 10px; }

/* Styles for controls in the sidebar */
.custom-select {
    width: 100%;
    padding: 12px 15px;
    background-color: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #bb86fc;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
}
.custom-select:hover { background-color: #4a4a4a; }

.separator { border: none; border-top: 1px solid #333; margin: 20px 0; }
.upload-section { display: flex; flex-direction: column; gap: 10px; }
#videoUpload { color: #e0e0e0; }
#videoUpload::file-selector-button { font-weight: bold; color: #bb86fc; background-color: #3a3a3a; padding: 8px 12px; border: 1px solid #bb86fc; border-radius: 4px; cursor: pointer; transition: background-color 0.2s; }
#videoUpload::file-selector-button:hover { background-color: #4a4a4a; }
#uploadButton { padding: 10px 20px; font-size: 16px; font-weight: bold; color: white; background-color: #03dac6; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.2s; }
#uploadButton:hover { background-color: #018786; }
#resetButton { padding: 10px 20px; font-size: 16px; font-weight: bold; color: white; background-color: #f44336; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.2s; }
#resetButton:hover { background-color: #d32f2f; }