@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

html{
    scroll-behavior: smooth;
}

:root{
    --background-color: #101010;
    --background-hover-color: #1F1F1F;
    --text-color: #EEEEEE;
    --sub-text-color: #B5B5B5;
    --underline-color: #3A3A3A;

    --border-shadow: 0 0 0 1px #ffffff14,0 1px 2px -1px #ffffff14,0 1px 2px #ffffff0f;
}

body{
    margin: 0;
    padding: 1rem 2rem;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'DM Sans', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

h1 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0;
}

h2 {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0;
}

p {
    font-size: 1rem;
    color: var(--sub-text-color);
    margin: 0;
}

header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 3rem;
}

button {
    background-color: transparent;
    color: var(--text-color);
    border: none;
    box-shadow: var(--border-shadow);
    border-radius: 10px;
    cursor: pointer;
    padding: 1rem;
}

button:hover {
    background-color: var(--background-hover-color);
}

svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--text-color);
}

footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.playground {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.properties {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.options {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    row-gap: .35rem;
}

.options a {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--underline-color);
    white-space: nowrap;
}

.options a:hover {
    text-decoration-color: var(--text-color);
}

.options a.active {
    text-decoration-color: var(--text-color);
    font-weight: bold;
}

.buttons {
    width: 30%;
    display: flex;
    justify-content: space-between;
}

.code {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.code div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.code button {
    display: none;
    height: 2.5rem;
    width: 2.5rem;
    padding: 0;
}

.code code {
    width: 100%;
    padding: 1rem;
    background-color: var(--background-hover-color);
    color: var(--text-color);
    box-shadow: var(--border-shadow);
    border-radius: 10px;
}

.container {
    width: 100%;
    height: 600px;

    box-shadow: var(--border-shadow);
    border-radius: 10px;

    display: flex;
    gap: 20px;
}

.item {
    --size: 80px;
    width: var(--size);
    height: var(--size);
    text-align: center;
    line-height: var(--size);

    box-shadow: var(--border-shadow);
    border-radius: 10px;
    font-size: calc(var(--size) / 4);
}

.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 999;
    backdrop-filter: blur(4px) saturate(200%);
    border-radius: 10px;
    box-shadow: var(--border-shadow);
    padding: 0.7rem 0.9rem;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 1024px) {
    body {
        padding: 2rem 4rem;
    }

    .playground {
        display: grid;
        grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
        align-items: start;
        gap: 1.5rem;
    }

    .code button {
        display: block;
    }
}