button {
    padding: 12px 25px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    background: linear-gradient(90deg, #4CAF50, #388E3C);
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

button:hover {
    background: linear-gradient(90deg, #66BB6A, #43A047);
    transform: scale(1.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}


label {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: bold;
    color: white;
    z-index: 3;
}


#gravitySlider {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    z-index: 3;
    -webkit-appearance: none;
    appearance: none;
    height: 12px;
    background: linear-gradient(
            90deg,
            black,
            green 50%
    );
    border-radius: 6px;
    outline: none;
    transition: background 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

#gravitySlider:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}


#gravitySlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

#gravitySlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

#gravitySlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

#gravitySlider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

#gravitySlider::before,
#gravitySlider::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-size: cover;
    z-index: 2;
}

#gravitySlider::before {
    left: -50px;
    background-image: url('assets/moon.png');
}

#gravitySlider::after {
    right: -50px;
    background-image: url('assets/earth.png');
}

#gravitySlider {
    pointer-events: auto;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

canvas {
    pointer-events: all;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#scoreDisplay,
#hitDisplay {
    position: absolute;
    font-size: 28px;
    font-weight: bold;
    color: white;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

/* Specific Positions */
#scoreDisplay {
    top: 20px;
    left: 20px;
}

#hitDisplay {
    top: 20px;
    right: 20px;
}

#modeControls {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

#modeControls button {
    margin: 5px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    color: white;
    background: #444;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#modeControls button:hover {
    background: #555;
}

#modeControls button.active {
    background: #4CAF50;
    color: white;
    border: 2px solid #388E3C;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

#start-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9));
    backdrop-filter: blur(8px);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
    animation: fadeIn 1.2s ease-in-out;
}

#start-menu h1 {
    font-size: 36px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
    color: #4CAF50;
}

#start-menu p {
    font-size: 18px;
    margin-bottom: 30px;
    font-family: 'Arial', sans-serif;
}

#start-menu button {
    font-size: 18px;
    margin-top: 10px;
}

#controls-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
    padding: 20px;
}

#controls-menu h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

#controls-menu p {
    font-size: 20px;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 30px;
    max-width: 80%;
}

#controls-menu button {
    padding: 12px 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(90deg, #4CAF50, #388E3C);
    color: white;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#controls-menu button:hover {
    background: linear-gradient(90deg, #66BB6A, #43A047);
    transform: scale(1.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#win-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)); /* Vignette effect */
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
    animation: fadeIn 1.2s ease-in-out;
}

/* Fade-In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Congratulatory Message */
#win-menu h1 {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Button Styling */
#win-menu button {
    padding: 12px 30px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(90deg, #4CAF50, #388E3C); /* Green gradient */
    color: white;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

#win-menu button:hover {
    background: linear-gradient(90deg, #66BB6A, #43A047);
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

@keyframes confetti {
    0% {
        transform: translateY(-100vh) rotateZ(0);
    }
    100% {
        transform: translateY(100vh) rotateZ(360deg);
    }
}

.confetti {
    position: absolute;
    width: 20px;
    height: 40px;
    background: linear-gradient(90deg, #FF4081, #FFD740);
    animation: confetti 4s linear infinite;
    top: -10vh;
    left: 50%;
    opacity: 0.7;
}

.active {
    background-color: #4CAF50;
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}