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

body {
    font-family: sans-serif;
    background: linear-gradient(120deg, #3494e6, #ec6ead);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    transition: background 0.4s ease;
    padding: 20px;
}

.container {
    background-color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    text-align: center;
    padding: 30px 20px;
    width: 100%;
    max-width: 500px;
}

.animated-title {
    animation: fadeSlide 1.2s ease forwards;
    opacity: 0;
    transform: translateY(-20px);
}

@keyframes fadeSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.color-display {
    width: 100%;
    height: 180px;
    margin: 20px 0;
    border-radius: 12px;
    transition: background-color 0.3s ease-in-out;
}

.controls {
    width: 100%;
}

.control {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
}

.slider-container {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 5px;
}

label {
    font-weight: bold;
}

input {
    flex: 1;
    margin-right: 10px;
}

#copyButton {
    background-color: red;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 15px;
    margin-top: 15px;
    width: 100%;
    transition: background 0.3s;
}

#copyButton:hover {
    background-color: darkred;
}

@media (min-width: 600px) {
    .control {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    label {
        width: 100px;
    }

    .slider-container {
        margin-top: 0;
        width: 70%;
    }
}