body {
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    position: relative;
}

.game-container {
    background-color: white;
    border: 2px solid #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    font: bold;
    padding: 5px;
    border-radius: 5px;
    background-color: #3c9a4a52;
    margin: 0 0 20px 0;
}

#gameCanvas {
    display: block;
}

#startButton, #restartButton, #resetSliders, #jumpButton {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#startButton, #restartButton {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 20px;
}

#restartButton {
    display: none;
}

#jumpButton {
    display: none;
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 25vw;
    height: 12vh;
    min-width: 120px;
    min-height: 70px;
    background-color: #4CAF50 !important;
    color: white !important;
    border: none !important;
    border-radius: 15px !important;
    font-size: 5vw;
    font-weight: bold !important;
    cursor: pointer !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    z-index: 1000;
}

#jumpButton:hover,
#jumpButton:active {
    background-color: #45a049 !important;
    transform: scale(0.95) !important;
}

#startButton:hover, #restartButton:hover, #resetSliders:hover {
    background-color: #45a049;
}

.controls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 800px;
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.settings-container {
    display: flex;
    flex-direction: row;
    gap: 10px; /* Reducido de 20px a 10px para acercar los sliders a las configuraciones */
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 600px;
    align-items: flex-start;
    border-right: 2px solid #333; /* Línea vertical que separa sliders de configuraciones */
    padding-right: 10px; /* Reducido de 15px a 10px para acercar los sliders */
}

.config-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 200px; /* Limitamos el ancho de la sección de configuraciones */
}

.config-section h2 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    font-weight: bold;
}

#resetSliders {
    padding: 5px 10px;
    margin-top: 10px; /* Espacio arriba del botón */
    width: fit-content;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#resetSliders:hover {
    background-color: #45a049;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 5px; /* Reducido de 10px a 5px para acercar los sliders a las etiquetas */
    position: relative;
}

.control-row label {
    font-size: 14px;
    color: #333;
    width: 170px;
}

.control-row .min-value, .control-row .max-value {
    font-size: 12px;
    color: #666;
    width: 30px;
    text-align: center;
}

.control-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 200px;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    position: relative;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 20px;
    background: #4CAF50;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.control-row input[type="range"]::-moz-range-thumb {
    width: 40px;
    height: 20px;
    background: #4CAF50;
    border-radius: 4px;
    cursor: pointer;
}

.control-row input[type="range"]::-webkit-slider-thumb:hover,
.control-row input[type="range"]::-moz-range-thumb:hover {
    background: #45a049;
}

.slider-value {
    position: absolute;
    bottom: 50%;
    left: 0;
    width: 40px;
    text-align: center;
    font-size: 12px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 3px;
    padding: 2px 0;
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, 50%);
}

/* Estilo para los interruptores ON/OFF */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* Texto "ON" y "OFF" dentro del interruptor */
.slider:after {
    position: absolute;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    top: 50%;
    transform: translateY(-50%);
}

input:checked + .slider:after {
    content: "ON";
    left: 8px;
}

input:not(:checked) + .slider:after {
    content: "OFF";
    right: 8px;
    color: #999;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

footer {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}