/* CSS bez zmian w stosunku do poprzedniej wersji v7.7 */
body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: white;
    overscroll-behavior: none;
}

canvas {
    display: block;
    touch-action: none;
    background-color: #050505;
}

#controls {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(40, 40, 40, 0.85);
    backdrop-filter: blur(5px);
    padding: 10px;
    border-bottom-right-radius: 12px;
    color: white;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 15px;
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.control-group {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

#controls label,
#controls .label-like {
    white-space: nowrap;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    color: #eee;
    gap: 5px;
    cursor: pointer;
}

#controls input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #888;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    cursor: pointer;
    margin-right: 3px;
}

#controls input[type="radio"]:checked {
    border-color: #4CAF50;
}

#controls input[type="radio"]:checked::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#controls input[type="checkbox"] {
    margin-right: 4px;
    vertical-align: middle;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

#controls input[type="range"] {
    vertical-align: middle;
    width: 90px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    padding: 0;
    background: transparent;
    appearance: none;
}

#controls input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #555;
    border-radius: 3px;
}

#controls input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #555;
    border-radius: 3px;
}

#controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    margin-top: -5px;
}

#controls input[type="range"]::-moz-range-thumb {
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.slider-container .min-max-label {
    font-size: 11px;
    color: #aaa;
    min-width: 15px;
    text-align: center;
}

.number-input-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

#controls input[type="number"] {
    width: 50px;
    height: 26px;
    vertical-align: middle;
    background-color: #333;
    color: white;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 14px;
    text-align: center;
    -moz-appearance: textfield;
}

#controls input[type="number"]::-webkit-outer-spin-button,
#controls input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input-button {
    width: 26px;
    height: 26px;
    background-color: #555;
    color: white;
    border: 1px solid #777;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    line-height: 24px;
    text-align: center;
    transition: background-color 0.2s;
    user-select: none;
}

.number-input-button:hover {
    background-color: #666;
}

.number-input-button:active {
    background-color: #444;
}

#controls button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    min-height: 30px;
}

#controls button:hover {
    background-color: #45a049;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

#controls button:active {
    background-color: #3e8e41;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

#resetButton {
    background-color: #f44336;
}

#resetButton:hover {
    background-color: #e53935;
}

#resetButton:active {
    background-color: #d32f2f;
}

#pauseButton.paused {
    background-color: #ff9800;
}

#pauseButton.paused:hover {
    background-color: #fb8c00;
}

#pauseButton.paused:active {
    background-color: #f57c00;
}

#starOptions.hidden {
    display: none;
}

.value-display {
    min-width: 30px;
    text-align: right;
    font-weight: bold;
    font-size: 13px;
    background-color: rgba(0,0,0,0.4);
    padding: 3px 6px;
    border-radius: 4px;
}

#info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: #aaa;
    font-size: 12px;
    pointer-events: none;
    background-color: rgba(0,0,0,0.5);
    padding: 3px 6px;
    border-radius: 4px;
}

#speedLabel {
    position: absolute;
    color: white;
    font-size: 13px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 3px 6px;
    border-radius: 4px;
    display: none;
    pointer-events: none;
    white-space: nowrap;
    z-index: 11;
}

#score {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 22px;
    font-weight: bold;
    z-index: 10;
    text-shadow: 1px 1px 3px black;
}

@media (max-width: 700px) {
    #controls {
        gap: 8px 10px;
        padding: 8px;
    }
    #controls label,
    #controls .label-like {
        font-size: 13px;
    }
    #controls input[type="range"] {
        width: 80px;
    }
    #controls input[type="number"] {
        width: 45px;
        height: 28px;
        font-size: 13px;
    }
    .number-input-button {
        width: 28px;
        height: 28px;
        font-size: 15px;
        line-height: 26px;
    }
    #controls button {
        font-size: 13px;
        padding: 5px 10px;
        min-height: 28px;
    }
    #score {
        font-size: 20px;
    }
    .slider-container .min-max-label {
        display: none;
    }
}

@media (max-width: 550px) {
    #controls {
        flex-direction: column;
        align-items: flex-start;
        border-radius: 0 0 12px 0;
        gap: 12px;
        max-height: 70vh;
        overflow-y: auto;
    }
    .control-group {
        width: 100%;
        justify-content: space-between;
        padding-right: 5px;
        box-sizing: border-box;
    }
    #starOptions {
        width: 100%;
    }
    .slider-container {
        width: auto;
    }
    #controls input[type="range"] {
        width: 100px;
    }
}
