:root,
body,
.preset-color {
    --hsl-p: var(--base-hue), 100%, 50%;
    --hsl-h1: var(--base-hue), 100%, 70%;
    --hsl-h2: var(--base-hue), 50%, 45%;
    --hsl-c1: var(--base-hue), 40%, 100%;
    --hsl-c2: var(--base-hue), 40%, 90%;
    --hsl-l1: var(--base-hue), 40%, 80%;
    --hsl-l2: var(--base-hue), 40%, 75%;
    --hsl-l3: var(--base-hue), 40%, 70%;
    --hsl-l4: var(--base-hue), 40%, 50%;
    --hsl-d1: var(--base-hue), 20%, 35%;
    --hsl-d2: var(--base-hue), 20%, 30%;
    --hsl-d3: var(--base-hue), 20%, 25%;
    --hsl-d4: var(--base-hue), 20%, 20%;
    --hsl-d5: var(--base-hue), 20%, 15%;
    --hsl-d6: var(--base-hue), 20%, 10%;
    --hsl-f1: var(--base-hue), 10%, 60%;
    --hsl-b1: var(--base-hue), 10%, 40%;
    --hsl-b2: var(--base-hue), 10%, 30%;
    --hsl-b3: var(--base-hue), 10%, 25%;
    --hsl-b4: var(--base-hue), 10%, 20%;
    --hsl-b5: var(--base-hue), 10%, 15%;
    --hsl-b6: var(--base-hue), 10%, 10%;
    --hsl-btn: var(--base-hue), 60%, 50%;
    --hsl-btn2: var(--base-hue), 60%, 40%;
}
body {
    background-color: hsl(var(--hsl-b6));
    font-family: "Comfortaa", "Noto Sans SC", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, sans-serif;
    color: #fff;
    padding: 0 30px;
    box-sizing: border-box;
    accent-color: hsl(var(--hsl-h1));
}
a {
    color: hsl(var(--hsl-h1));
}
.container {
    max-width: 1000px;
    margin: auto;
}
.title {
    font-size: 60px;
    text-align: center;
    margin-top: 60px;
}
.subtitle {
    font-size: 30px;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 20px;
}
.card {
    margin: auto;
    margin-top: 30px;
    padding: 20px 20px;
    background-color: hsl(var(--hsl-b5));
    box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
    background-image: url(triangles.png);
    background-position: bottom;
    background-size: contain;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    flex-direction: column;
    flex-wrap: nowrap;
    border-radius: 4px;
    margin-bottom: 20px;
}
input.textfield {
    width: 300px;
    background: transparent;
    border: none;
    border-bottom: 2px solid hsl(var(--hsl-h1));
    font-size: 26px;
    text-align: center;
    color: #fff;
    outline: none;
    padding: 10px 20px;
    font-family: "Comfortaa", "Noto Sans SC", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, sans-serif;
}
input.textfield.small {
    font-size: 18px;
    padding: 6px 10px;
}
input.textfield::placeholder {
    color: #fff;
    opacity: 0.4;
}
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}
input[type="range"] {
    width: 250px;
    -webkit-appearance: none;
    background-color: hsl(var(--hsl-b4)) !important;
    border-radius: 100px;
    outline: none;
    background: none;
}
#playmode,
#cardmode,
#language,
#fullmode-info-display {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    align-items: center;
    justify-content: center;
}
.mode-btn,
.language-btn {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    background: hsl(var(--hsl-b4));
    padding: 12px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 50px;
    margin-right: 5px;
    border: solid 1px transparent;
}
.mode-btn:last-child,
.language-btn:last-child {
    margin-right: 0;
}
.mode-btn.active,
.language-btn.active {
    border: solid 1px hsl(var(--hsl-h1));
}
.mode-btn > div {
    margin-top: 8px;
}
.language-btn {
    line-height: 24px;
    height: 24px;
    background: hsl(var(--hsl-b5));
}

#fullmode-info-display > div {
    white-space: nowrap;
    line-height: 20px;
    padding-left: 20px;
    padding-right: 20px;
}

#options {
    margin-top: 25px;
}
.option {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    width: 350px;
    font-size: 20px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
}
button {
    font-size: 26px;
    padding: 10px 20px;
    background: hsl(var(--hsl-btn));
    color: #fff;
    border: none;
    border-radius: 4px;
    margin: auto;
    cursor: pointer;
    box-shadow: hsl(var(--hsl-btn2)) 0px 3px 0px 0px, rgba(0, 0, 0, 0.25) 0px 4px 3px 0px;
    background-image: url(triangles.svg);
    background-size: 300%;
    background-position: 50%;
    transition: all 0.12s ease-in-out;
    font-family: "Comfortaa", "Noto Sans SC", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, sans-serif;
}
button[disabled] {
    opacity: 0.2;
    pointer-events: none;
}
button:hover {
    background-position: 55% 50%;
    filter: brightness(0.9);
}
button:active {
    transform: translateY(2px);
    box-shadow: hsl(var(--hsl-btn2)) 0px 1px 0px 0px, rgba(0, 0, 0, 0.25) 0px 4px 3px 0px;
}
.div-btn{
    user-select: none;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    width: 350px;
    margin-top: 15px;
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
}

.preset-color {
    font-size: 15px;
    background: hsl(var(--hsl-h1));
    color: hsl(var(--hsl-b4));
    border-radius: 100px;
    min-width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    display: inline-block;
    cursor: pointer;
    opacity: 0.8;
    user-select: none;
    padding: 0px 10px;
    margin-right: 5px;
}
.preset-color:last-child {
    margin-right: 0;
}

#cardmodes {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    max-width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}
.cardmode {
    display: flex;
    flex-direction: column;
    text-align: center;
    background: hsl(var(--hsl-b4));
    padding: 3px;
    border-radius: 4px;
    cursor: pointer;
    align-items: center;
    border: solid 1px transparent;
}
.cardmode.active {
    border: solid 1px hsl(var(--hsl-h1));
}
.cardmode > img {
    display: block;
    user-select: none;
    flex: 1;
    max-width: min(200px, calc((100vw - 80px) * 0.2));
    transform-origin: center bottom;
    transition: all .25s ease;
    pointer-events: none;
}
.cardmode:hover > img {
    transform: scale(2);
    transition-delay: 0.4s;
}
.cardmode-label {
    font-size: 16px;
    padding-top: 8px;
    padding-bottom: 3px;
}

select {
    color: #fff;
    border: none;
    padding: 8px;
    background: hsl(var(--hsl-b4));
    outline: none;
    border-radius: 4px;
    text-align: center;
    width: max-content;
    font-size: 16px;
    font-family: "Comfortaa", "Noto Sans SC", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, sans-serif;
}

#results {
    width: 100%;
    display: flex;
    margin-bottom: 20px;
    flex-direction: column;
    align-items: center;
}

#generate-btns {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-content: center;
    justify-content: center;
    align-items: center;
}

#open-generated-svg {
    height: 49px;
}

#open-generated-svg svg {
    fill: #fff;
    height: 80%;
}

#codes {
    width: 100%;
}
.code-section {
    margin-bottom: 15px;
}

#codes input.generated-code {
    font-size: 14px;
    width: 100%;
    text-align: left;
}