@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap');

:root {
    --bg-color: #e0e5ec;
    --shadow-light: #ffffff;
    --shadow-dark: #b8babe;
    --text-color: #2c3e50;
    --button-hover: #d1d9e6;
    --button-active: #c0c6d2;
    --focus-outline: #007acc;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    padding: 10px;
}

/* Container */
.container {
    background: var(--bg-color);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    text-align: center;
    width: 90%;
    max-width: 800px;
}

/* Heading */
h1 {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-color);
}

/* Tagline */
.tagline {
    font-size: 14px;
    color: #444;
    margin-bottom: 20px;
}

/* Color Preview */
.color-preview {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    transition: background 0.3s ease-in-out;
}

/* Input Box */
input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: var(--bg-color);
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

input[type="color"]:focus {
    outline: 2px solid var(--focus-outline);
}

/* Buttons */
.buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    background: var(--bg-color);
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease-in-out, transform 0.1s ease-in-out;
}

button:hover {
    background: var(--button-hover);
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
}

button:active {
    transform: scale(0.95);
    background: var(--button-active);
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

button:focus {
    outline: 2px solid var(--focus-outline);
    outline-offset: 2px;
}

/* Output Box */
.output {
    text-align: left;
    padding: 15px;
    background: var(--shadow-light);
    border-radius: 12px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    max-height: 300px;
    overflow-y: auto;
}

/* Custom Scrollbar */
.output::-webkit-scrollbar {
    width: 8px;
}

.output::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 10px;
}

.output::-webkit-scrollbar-thumb {
    background: var(--shadow-dark);
    border-radius: 10px;
}

/* Output Text */
.output p {
    font-size: 14px;
    color: var(--text-color);
    margin: 10px 0;
}

/* Accessibility: High Contrast Text */
.color-info p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 20px;
    }
    h1 {
        font-size: 22px;
    }
    .tagline {
        font-size: 13px;
    }
    .color-preview {
        height: 40px;
    }
    input[type="color"] {
        height: 35px;
    }
    .buttons {
        flex-direction: column;
        gap: 10px;
    }
    button {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
}
