body {
    margin: 0;
    padding: 20px;
    font-family: system-ui, -apple-system, sans-serif;
    background: #1e1e1e;
    color: #d4d4d4;
}

.top-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(37, 37, 38, 0.8);
    border: 1px solid #3e3e42;
    border-radius: 4px;
    width: fit-content;
}

.header-link {
    color: #569cd6;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.header-link:hover {
    color: #87ceeb;
    text-decoration: underline;
}

#gpuCanvas {
    display: block;
    margin-bottom: 8px;
}

.perf-stats {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 12px;
    background: rgba(37, 37, 38, 0.8);
    border: 1px solid #3e3e42;
    border-radius: 4px;
    width: fit-content;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}

.perf-value {
    color: #4ec9b0;
    font-weight: 600;
}

.perf-value.perf-decode {
    color: #87ceeb;
    /* Light blue for decode */
}

.perf-value.perf-raytrace {
    color: #1e90ff;
    /* Blue for raytrace */
}

.perf-value.perf-overall {
    color: #ffffff;
    /* White for overall */
}

.perf-separator {
    color: #3e3e42;
}

#toggleLogging {
    padding: 8px 16px;
    background: #0e639c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#toggleLogging:hover {
    background: #1177bb;
}

#toggleLogging.active {
    background: #16825d;
}

#toggleLogging.active:hover {
    background: #1a9870;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #d4d4d4;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.control-item .icon {
    text-align: center;
    color: #0e639c;
}

.control-item .icon:first-child {
    font-size: 24px;
    width: 28px;
}

.control-item .icon:nth-child(2) {
    font-size: 32px;
    width: 36px;
}

.control-item .text-key {
    display: inline-block;
    padding: 4px 8px;
    background: #0e639c;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.control-item .plus {
    font-size: 16px;
    color: #0e639c;
    margin: 0 2px;
    font-weight: bold;
}

/* Lighting controls panel */
.panel-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 20px;
    flex-wrap: wrap;
}

.lighting-panel,
.label-panel {
    padding: 16px;
    background: #252526;
    border-radius: 8px;
    border: 1px solid #3e3e42;
    max-width: 520px;
    box-sizing: border-box;
}

.lighting-panel {
    flex: 1 1 360px;
}

.label-panel {
    flex: 0 0 320px;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #0e639c;
    border-bottom: 1px solid #3e3e42;
    padding-bottom: 8px;
}

.lighting-panel .control-item {
    font-size: 14px;
    margin-bottom: 8px;
}

.lighting-panel label {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    cursor: help;
}

.lighting-panel .label-text {
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lighting-panel input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-left: auto;
}

.lighting-panel .help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 10px;
    font-weight: bold;
    color: #0e639c;
    background: #1e1e1e;
    border: 1px solid #0e639c;
    border-radius: 50%;
    cursor: help;
    margin-left: 2px;
}

.status-pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    font-size: 12px;
    color: #9cdcfe;
}

.status-pill.error {
    color: #f88070;
    border-color: #f88070;
}

.lighting-panel .help-icon:hover {
    background: #0e639c;
    color: #fff;
}

.lighting-panel input[type="range"] {
    flex: 1;
    cursor: pointer;
}

.lighting-panel span:not(.label-text):not(.help-icon) {
    min-width: 40px;
    text-align: right;
    font-family: monospace;
    color: #4ec9b0;
}

/* Label panel */
.label-list {
    border: 1px solid #3e3e42;
    border-radius: 6px;
    padding: 8px;
    background: #1e1e1e;
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}


.label-list .label-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}


/* Remove checkbox styles, no longer needed */

.label-list .label-chip {
    padding: 4px 8px;
    border-radius: 10px;
    background: #2d2d30;
    border: 1px solid #3e3e42;
    color: #9cdcfe;
    font-size: 12px;
    min-width: 80px;
    text-align: center;
    transition: color 0.2s, text-decoration 0.2s, opacity 0.2s;
}

.label-list .label-chip.hidden {
    color: #666a6d;
    text-decoration: line-through;
    opacity: 0.6;
}

.label-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.label-panel-footer button {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #0e639c;
    background: #0e639c;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.label-panel-footer button:hover {
    background: #1177bb;
}