*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "IBM Plex Sans", sans-serif;
    background-color: #f4f5f7;
    color: #1c1c1c;
    min-height: 100vh;
}

#game-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 69px);
}

#game-controls {
    background-color: #fff;
    border-right: 1px solid #dde1e7;
    padding: 18px 16px 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.section {
    padding: 14px 0;
    border-bottom: 1px solid #eaecef;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section:last-of-type { border-bottom: none; }

.section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #aaa;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.slider-body { flex: 1; min-width: 0; }

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.slider-name    { font-size: 12px; font-weight: 400; color: #555; }

.slider-readout {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    color: #0b5190;
    font-weight: 500;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #aaa;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.slider:not(:disabled)::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #0b5190;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(11, 81, 144, 0.18);
}

.slider:not(:disabled)::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #0b5190;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 3px rgba(11, 81, 144, 0.18);
}

.slider:disabled { opacity: 0.5; cursor: not-allowed; }

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px solid #f4f5f7;
    gap: 10px;
}

.result-row:last-child { border-bottom: none; }

.result-label { font-size: 11px; color: #666; flex: 1; }

.result-value {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    color: #0b5190;
    font-weight: 500;
    text-align: right;
}

#launch-btn {
    margin-top: 16px;
    width: 100%;
    padding: 10px;
    background-color: #0b5190;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    font-family: "IBM Plex Sans", sans-serif;
    cursor: pointer;
}

#launch-btn:hover    { background-color: #094477; }
#launch-btn:disabled { background-color: #5e8db5; cursor: not-allowed; }

#game-result { margin-top: 14px; }

#game-result-text {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

#new-challenge-btn {
    width: 100%;
    padding: 8px;
    background-color: #eef1f5;
    color: #0b5190;
    border: 1px solid #aab0ba;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    font-family: "IBM Plex Sans", sans-serif;
    cursor: pointer;
}

#new-challenge-btn:hover { background-color: #dce2ea; }

#game-display {
    padding: 16px 20px;
    overflow-y: auto;
    background-color: #f4f5f7;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#challenge-target {
    background-color: #fff;
    border: 1px solid #dde1e7;
    padding: 10px 14px;
}

#challenge-target-text {
    font-size: 13px;
    font-weight: 600;
    color: #0b5190;
}

#game-graph-placeholder {
    background-color: #fff;
    border: 1px solid #dde1e7;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-graph-loading {
    color: #bbb;
    font-size: 13px;
}

#game-graph-img {
    width: 100%;
    display: block;
    background-color: #fff;
    border: 1px solid #dde1e7;
}

@media (max-width: 900px) {
    #game-layout          { grid-template-columns: 1fr; height: auto; }
    #game-controls        { border-right: none; border-bottom: 1px solid #dde1e7; }
    #game-display         { padding: 16px; }
}

@media (max-width: 600px) {
    #game-graph-placeholder { height: 220px; }
}