:root {
    --amethist-100: #e7d8fe;
    --amethist-200: #c7a6fd;
    --amethist-300: #a874fc;
    --amethist-400: #8A42FB;
    --amethist-500: #6a10fa;
    --amethist-600: #5404d3;
    --amethist-700: #4003a1;
    --bg: #F0F8FF;
    --body: #426685;
    --white: #FFFFFF;
    --shadow: #dbe7f1;
    --poppins: 'Poppins', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400&display=swap');

body {
    font-family: var(--poppins);
    color: var(--body);
    background-color: var(--bg);
    margin: 0 5rem;
}

.main {
    max-width: 93.75rem;
    display: grid;
    grid-template-areas:
        "header header header"
        "aside article article"
        "footer footer footer";
    grid-template-rows: auto 1fr 4.5rem;
    grid-template-columns: 23.125rem 2fr;
    grid-row-gap: 1.5rem;
    grid-column-gap: 5rem;
    height: 100vh;
    margin: 0 auto;
}

.header {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2.5rem 0 1rem 0;
}

.header__title {
    margin: 0;
    font-weight: 300;
    font-size: 3rem;
    width: fit-content;
    line-height: 100%;
}

.header__subtitle {
    margin: 0;
    font-weight: 400;
    font-size: 1rem;
}

.aside {
    grid-area: aside;
}

.color-picker__title {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.color-picker__controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.color-picker__input {
    background-color: white;
    height: 1.25rem;
    border: none;
    width: 100%;
    padding: 1rem;
    border-radius: 0.25rem;
    -webkit-box-shadow: 0rem 0.5rem 2rem 0rem var(--shadow);
    -moz-box-shadow: 0rem 0.5rem 2rem 0rem var(--shadow);
    box-shadow: 0rem 0.5rem 2rem 0rem var(--shadow);
}

.color-picker__input:hover {
    outline: solid 0.125rem var(--amethist-600);
}

.color-picker__input:focus-visible {
    outline: solid 0.125rem var(--amethist-600);
}

.color-picker__picker {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    height: 3.75rem;
    min-width: 3.5625rem;
    cursor: pointer;
    background-color: transparent;
    padding: 0;
    margin: 0;
}

.color-picker__picker::-webkit-color-swatch {
    border-radius: 0.25rem;
    border: none;
}

.color-picker__picker::-moz-color-swatch {
    border-radius: 0.25rem;
    border: none;
}

.color-picker__separator {
    margin: 0 0.5rem;
}

.button-group {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.button-group__generate {
    display: flex;
    justify-content: center;
}

.button {
    font-family: var(--poppins);
    align-items: center;
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem;
    height: 2.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.button--generate {
    background-image: linear-gradient(130deg, var(--amethist-300), var(--amethist-400), var(--amethist-500));
    border: none;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 500;
    height: 3.5rem;
    padding: 0 1.6rem;
    text-shadow: rgba(0, 0, 0, 0.25) 0 0.1875rem 0.5rem;
    transition: all .5s;
}

.button--generate:hover {
    box-shadow: var(--amethist-200) 0 0.0625rem 1.875rem;
    transition-duration: .1s;
}

.button--outline {
    background-color: transparent;
    border: none;
    color: var(--amethist-400);
    transition: all 250ms;
}

.button--outline:hover {
    background-color: var(--amethist-100);
}

.button-group__random {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.settings__title {
    margin-bottom: 1.5rem;
}

.settings__amount,
.settings__step {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.settings__amount input,
.settings__step input {
    margin-top: 1.5rem;
}

.settings__tips {
    margin-top: 2rem;
    font-size: 0.75rem;
    line-height: 140%;
}

a {
    color: var(--body);
    text-decoration-style: dotted;
    text-underline-offset: 0.125rem;
}

a:hover {
    text-decoration-style: dotted;
    color: var(--amethist-400);
}

.article {
    grid-area: article;
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    -webkit-box-shadow: 0rem 0.5rem 2rem 0rem var(--shadow);
    -moz-box-shadow: 0rem 0.5rem 2rem 0rem var(--shadow);
    box-shadow: 0rem 0.5rem 2rem 0rem var(--shadow);
}

.colors__title {
    margin-bottom: 1rem;
}

.colors__selected .color-box {
    border-radius: 0.5rem;
}

.colors__container {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.colors__column {
    width: 100%;
}

.colors__column__title {
    margin-bottom: 1rem;
}

.colors__generated {
    display: flex;
    flex-direction: column;
}

.colors__generated .color-box:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.colors__generated .color-box:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

.colors__generated .color-box:only-child {
    border-radius: 0.5rem 0.5rem;
}

.color-box {
    align-items: center;
    border-radius: 0;
    color: white;
    display: flex;
    flex-direction: row;
    font-size: 0.875rem;
    height: 2.25rem;
    justify-content: space-between;
    padding: 0.5rem 3rem 0.5rem 1rem;
    position: relative;
}

.copy-btn {
    background-color: transparent;
    border-radius: 0.25rem;
    border: none;
    color: currentColor;
    cursor: pointer;
    font-size: 1.2em;
    height: 2.25rem;
    position: absolute;
    right: 0.5rem;
    top: 0.625rem;
    width: 2.25rem;
}

.colors__download {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
}


.footer {
    grid-area: footer;
}

.footer__text {
    align-items: center;
    display: flex;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.rismirez {
    color: var(--body);
    text-decoration: none;
    text-decoration-style: none;
}

.rismirez:hover {
    color: var(--amethist-400);
    text-decoration: underline;
    text-decoration-style: dotted;
}

h1, h2, h3, h4 {
    font-weight: 400;
    margin: 0;
}

small {
    font-size: 0.75rem;
}

hr {
    width: 100%;
    margin: 2rem 0;
    border: 0;
    border-top: 0.125rem solid #dbe6f0;
}

*:focus {
    outline: none;
}

input[type=range] {
    -webkit-appearance: none;
    margin-right: 0.9375rem;
    width: 100%;
    height: 0.25rem;
    border-radius: 0.3125rem;
    background-size: 70% 100%;
    background-repeat: no-repeat;
    background-color: var(--amethist-200);
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: var(--amethist-400);
    cursor: ew-resize;
    transition: .1s ease-in-out;
}

input[type=range]::-webkit-slider-thumb:hover {
    width: 1.25rem;
    height: 1.25rem;
}

input[type=range]::-moz-range-thumb {
    -webkit-appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: var(--amethist-200);
    cursor: ew-resize;
    transition: .1s ease-in-out;
}

input[type=range]::-moz-range-thumb:hover {
    width: 1.25rem;
    height: 1.25rem;
}

input[type=range]::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    box-shadow: none;
    border: none;
    background: rgba(0, 0, 0, 0);
}


.settings__toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    color: var(--body);
    font-family: var(--poppins);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.settings__toggle h3 {
    margin: 0;
}

.settings__chevron {
    transition: transform 0.3s ease;
}

.settings__toggle[aria-expanded="true"] .settings__chevron {
    transform: rotate(180deg);
}

.settings__content {
    display: none;
}

.settings__content--expanded {
    display: block;
}


@media all and (max-width: 64rem) {
    .settings__title {
        margin-bottom: 0;
    }
}

@media all and (max-width: 90rem) {
    body {
        margin: 0 3rem;
    }
    .main {
        grid-column-gap: 3rem;
        grid-template-columns: 21.25rem 2fr;
    }
}

@media all and (max-width: 75rem) {
    .colors__container {
        flex-direction: column;
    }
    .header__title {
        font-size: 2rem;
    }
}

@media all and (max-width: 64rem) {
    body {
        margin: 0 2.5rem;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        row-gap: 1rem;
    }
    .main {
        grid-template-areas:
            "header"
            "aside"
            "article"
            "footer";
        grid-template-rows: auto 1fr 2fr 4.375rem;
        grid-template-columns: 100%;
    }
    .colors__container {
        flex-direction: row;
    }
    .article {
        padding: 1.5rem;
    }
}

@media all and (max-width: 48rem) {
    body {
        margin: 0 2.5rem;
    }
    .colors__container {
        flex-direction: column;
    }
}

@media all and (max-width: 30rem) {
    body {
        margin: 0 1.5rem;
    }
    .article {
        padding: 1rem;
    }
}

@media all and (max-width: 25rem) {
    .button-group__generate {
        width: 100%;
    }
    .button--generate {
        width: 100%;
        justify-content: center;
    }
    .button-group__random {
        width: 100%;
    }
    .button--outline {
        width: 100%;
        justify-content: center;
    }
}

.toast {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--white);
    color: var(--body);
    border: solid 0.125rem var(--amethist-400);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, top 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    top: 2.5rem;
}

.toast.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-1.25rem);
    top: 1.25rem;
}

@media all and (max-width: 30rem) {
    .toast {
        width: 90%;
        padding: 0.625rem 1rem;
        font-size: 0.75rem;
    }
}

.visually-hidden {
    position: absolute;
    width: 0.0625rem;
    height: 0.0625rem;
    padding: 0;
    margin: -0.0625rem;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

::selection {
    background: var(--amethist-100);
    color: var(--amethist-500);
}

::-moz-selection {
    background: var(--amethist-100);
    color: var(--amethist-500);
}

::-webkit-scrollbar {
    width: 0.75rem;
    height: 0.75rem;
}

::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 0.375rem;
}

::-webkit-scrollbar-thumb {
    background: var(--amethist-300);
    border-radius: 0.375rem;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--amethist-400);
}