/* General body styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    margin: 0;
    color: #333;
    background-color: #f4f4f4; /* Light background for better contrast */
}

/* Container styling with glassmorphism effect */
.color-picker-container {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 1.5rem; /* Reduced padding for smaller screens */
    width: 90%; /* Adjust width for mobile screens */
    max-width: 400px; /* Limit the maximum width */
    text-align: center;
    margin: 1rem auto; /* Add spacing around the container */
    transition: transform 0.3s, box-shadow 0.3s;
}

.color-picker-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Title styling */
h1 {
    text-align: center;
    color: #fff;
    margin-bottom: 1rem; /* Reduced margin for smaller screens */
    font-size: 1.8rem; /* Adjusted font size */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* Color display styling */
.color-display {
    width: 100%;
    height: 120px; /* Reduced height for mobile */
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, box-shadow 0.3s;
    border: 1px solid #ddd;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-display:hover {
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2);
}

#colorValue {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 0.4rem 0.8rem; /* Reduced padding */
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem; /* Adjusted font size */
}

/* Controls styling */
.controls {
    display: flex;
    flex-direction: column;
    gap: 0.8rem; /* Reduced gap for compact layout */
}

.sliders {
    display: flex;
    flex-direction: column;
    gap: 0.4rem; /* Reduced gap */
}

.sliders label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem; /* Adjusted font size */
}

.sliders input[type="range"] {
    width: 100%;
    margin: 0.4rem 0; /* Reduced margin */
    cursor: pointer;
}

.color-modes {
    margin: 0.8rem 0; /* Reduced margin */
}

#colorMode {
    width: 100%;
    padding: 0.4rem; /* Reduced padding */
    font-size: 0.9rem; /* Adjusted font size */
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: #333;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
}

button {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 0.6rem; /* Reduced padding */
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem; /* Adjusted font size */
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #3a5a8f;
    transform: scale(1.03);
}

/* Footer styling */
footer {
    text-align: center;
    font-size: 0.8rem; /* Reduced font size for mobile */
    color: #555;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem; /* Reduced padding */
    border-radius: 8px;
    backdrop-filter: blur(5px);
    margin-top: auto;
}

/* Responsive adjustments for very small screens */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .color-display {
        height: 100px; /* Further reduced height */
    }

    button {
        padding: 0.5rem;
        font-size: 0.85rem; /* Smaller font size */
    }

    #colorMode {
        font-size: 0.85rem; /* Smaller font size */
        padding: 0.3rem;
    }
}