@import url("fonts/round-pro/stylesheet.css");

/* Hide scrollbar. We have our own custom scrollbar, so we don't need the default one. */
::-webkit-scrollbar {
    display: none;
}

/* Set body that is the same everywhere */
html {
    --theme-hue: 280;
    --gallery-project-size: 150px;
    --sidebar-size: min(90vw, 500px);
    scrollbar-width: none;
}

body {
    margin: 0px;
    margin-top: 100px;
    font-family: "DINRoundPro", Arial, Helvetica, sans-serif;
    background-color: hsla(var(--theme-hue), 30%, 90%, 100%);
}

/* Define global classes and element types */
p {
    background-color: hsla(var(--theme-hue), 30%, 80%, 50%);
    border-radius: 20px;
    padding: 20px;
    color: hsla(var(--theme-hue), 45%, 25%, 100%);
    max-width: 1000px;
    font-size: 20px;
    position: relative;
    transition: transform 0.5s;
}

p.centered, h1.centered{
    left: 50%;
    translate: -50% 0%;
}

p.centered-text {
    text-align: center;
}

@media (max-width: 1000px) {
    p.centered {
        left: 0%;
        translate: 0% 0%;
    }

    p.margin {
        margin: 20px;
        width: calc(100% -80px);
    }
}

p:active {
    transform: scale(0.98);
}

p::selection {
    color: hsla(var(--theme-hue), 30%, 90%, 1);
    background-color: hsla(var(--theme-hue), 30%, 15%, 1);
}

button {
    background-color: hsla(var(--theme-hue), 30%, 50%, 0.2);
    border-radius: 20px;
    outline: none;
    border: none;
    cursor: pointer;
    transition: box-shadow 0.3s, background-color 0.4s;
    padding: 10px;
    font-size: 15px;
    box-shadow: 0px 0px 3px hsla(var(--theme-hue), 30%, 40%, 50%);
}

button:hover, button:active {
    box-shadow: 0px 0px 2px hsla(var(--theme-hue), 30%, 40%, 50%);
    background-color: hsla(var(--theme-hue), 30%, 30%, 0.2);
}

button.square {
    --size: min(65px, 100%);
    width: var(--size);
    height: var(--size);
    margin: min(calc(calc(80px - var(--size)) / 2), 100%);
    padding: min(10px, 100%);
}

button.round {
    border-radius: 50%;
}

button.square img {
    --size: 100%;
    width: var(--size);
    height: var(--size);
    filter: hue-rotate(240deg);
}

h1 {
    font-size: 20px;
    font-weight: bold;
    color: hsla(var(--theme-hue), 30%, 10%, 1);
}

h1.margin, div.margin, h2.margin {
    --margin: 20px;
    margin-top: var(--margin);
    margin-bottom: var(--margin);
}

h1.centered, div.centered, h2.centered {
    position: relative;
    text-align: center;
}

h1.title {
	font-size: 40px;
}

h2 {
	font-size: 25px;
	font-weight: bold;
}

div {
    color: hsla(var(--theme-hue), 30%, 5%, 1);
    font-size: 20px;
}

div.padding {
    height: 150px;
    width: 100%;
}

div.huge {
	font-size: 300px;
}

div.bold {
	font-weight: bold;
}

h1::selection, div::selection, li::selection, h2::selection {
    color: hsla(var(--theme-hue), 30%, 90%, 1);
    background-color: hsla(var(--theme-hue), 30%, 15%, 1);
}


a {
    color: hsla(var(--theme-hue), 40%, 20%, 1);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

a:hover {
    color: hsla(var(--theme-hue), 100%, 40%, 1);
}

a::selection {
    color: hsla(var(--theme-hue), 30%, 90%, 1);
    background-color: hsla(var(--theme-hue), 40%, 25%, 1);
}

img.mirror {
    transform: scaleX(-1);
}

/* Global-html styling

/* Header */
header {
    height: 80px;
    position: fixed;
    width: 100%;
    top: 0px;
    left: 0px;
    background-color: hsla(var(--theme-hue), 90%, 95%, 0.85);
    z-index: 1;
}

#logo {
    text-decoration: none;
    font-weight: bold;
    --border-radius: 30px;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    transition: padding-right 0.2s;
    position: absolute;
    top: 0px;
    left: 0px;
    padding: 10px;
    height: 60px;
}

#logo:hover {
    background-image: linear-gradient(to right, hsla(var(--theme-hue), 63%, 40%, 0.3), hsla(var(--theme-hue), 63%, 40%, 0.1));
    padding-right: 80px;
}

#logo img {
    height: 60px;
    vertical-align: top;
}

#logo span {
    position: relative;
    bottom: 10px;
}

#logo .big-text {
    font-size: 60px;
    color: hsla(var(--theme-hue), 30%, 50%, 1);
    margin-left: 10px;
}

#logo .small-text {
    font-size: 30px;
    color: hsla(var(--theme-hue), 15%, 50%, 1);
}

@media (max-width: 420px) {
    #logo .big-text, #logo .small-text {
        display: none;
    }
}

div.menu-buttons {
    position: absolute;
    top: 0px;
    right: 0px;
    display: flex;
    flex-direction: row-reverse;
}

div.menu-buttons button {
    --size: 65px;
    width: var(--size);
    height: var(--size);
    margin: calc(calc(80px - var(--size)) / 2);
}

div.menu-buttons button img {
    --size: 100%;
    width: var(--size);
    height: var(--size);
    filter: hue-rotate(240deg);
}

/* Footer */
footer {
    background-color: hsla(var(--theme-hue), 95%, 95%, 0.85);
    padding: 20px;
    left: 0px;
    width: calc(100% - 40px);
    --top: 0px;
    position: absolute;
    top: max(100vh, var(--top));
}

#footer-links {
    list-style: none;
    display: flex;
    flex-direction: row;
    width: 100%;
    column-gap: 20px;
    row-gap: 20px;
    justify-content: center;
}

@media (max-width: 1100px) {
    #footer-links {
        flex-direction: column;
    }
}

#footer-links div {
    padding: 20px;
    border-radius: 20px;
    background-color: hsla(var(--theme-hue), 60%, 70%, 0.2);
}

#footer-links div h1 {
    padding: 20px;
    border-radius: 20px;
    background-color: hsla(var(--theme-hue), 60%, 70%, 0.4);
    text-align: center;
    width: calc(100% - 40px);
    margin-top: 0px;
}

#footer-links div ul {
    list-style: none;
    padding: 0px;
}

/* Custom scrollbar */
#custom-scrollbar {
    position: fixed;
    top: 0px;
    left: 0px;
    --scroll: 0;
    height: calc(100% * max(var(--scroll), 0.005));
    width: 4px;
    background-color: hsla(var(--theme-hue), 100%, 50%, 1);
    opacity: 0;
    transition: opacity 1s, height 0.2s, width 0.4s;
    z-index: 2;
}

/* Sidebars */
menu, config {
    z-index: 3;
    position: fixed;
    top: 0px;
    height: 100%;
    width: var(--sidebar-size);
    background-color: hsla(var(--theme-hue), 90%, 86%, 0.9);
    margin: 0px;
    padding: 0px;
    transition: right 0.2s, left 0.2s;
}

/* Menu */
menu {
    right: calc(var(--sidebar-size) * -1);
}

#menu-links {
    position: absolute;
    top: 80px;
    margin: 20px;
    display: flex;
    flex-direction: column;
    row-gap: 20px;
    width: calc(100% - 40px);
}

#menu-links button {
    width: 100%;
    height: 70px;
    font-weight: bold;
    font-size: 25px;
    background-color: hsla(var(--theme-hue), 30%, 50%, 0.2);
    color: hsla(var(--theme-hue), 30%, 18%, 1);
    font-family: inherit;
    padding: 0px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

#menu-links button:hover {
    background-color: hsla(var(--theme-hue), 30%, 30%, 0.2);
}

#menu-links button img {
    --size: 40px;
    width: var(--size);
    height: var(--size);
    left: 0px;
    position: relative;
    object-fit: contain;
    display: inline-block;
    background-color: hsla(0deg, 40%, 60%, 0.2);
    margin: 0px;
    padding: 15px;
}

#menu-links button span {
    width: calc(100% - 100px);
    height: 100%;
    position: relative;
    right: 0px;
    top: -30px;
    text-align: center;
    font-size: 20px;
    display: inline-block;
}

/* Settings */
config {
    left: calc(var(--sidebar-size) * -1);
}

#configurables {
    position: absolute;
    top: 80px;
    left: 0px;
    padding: 20px;
    width: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

#configurables div.config-object {
    background-color: hsla(var(--theme-hue), 60%, 70%, 0.2);
    border-radius: 20px;
    --margin: 0px;
    margin-left: var(--margin);
    margin-right: var(--margin);
    padding: 0px;
    width: 100%;
    overflow: hidden;
}

#configurables div.config-object h1 {
    background-color: hsla(var(--theme-hue), 60%, 70%, 0.4);
    width: calc(100% - 40px);
    padding: 20px;
    text-align: center;
    margin: 0px;
    box-shadow: 0px 0px 3px hsla(var(--theme-hue), 30%, 40%, 50%);
}

#configurables div.config-body {
    padding: 20px;
    width: calc(100% - 40px);
    position: relative;
    user-select: none;
}

.slider {
    cursor: pointer;
}

.slider .background {
    background-color: hsla(var(--theme-hue), 80%, 50%, 1);
    --offset: 20px;
    width: calc(100% - calc(var(--offset) * 2));
    height: 5px;
    border-radius: 5px;
    position: absolute;
    top: 20px;
    transform: translateY(-50%);
}

.slider .foreground {
    background-color: hsla(var(--theme-hue), 80%, 50%, 1);
    --size: 20px;
    height: var(--size);
    width: var(--size);
    border-radius: var(--size);
    position: absolute;
    top: 20px;
    left: var(--value);
    transform: translateY(-50%);
    transition: box-shadow 0.2s;
}

.slider .foreground:hover, .slider .foreground:active {
    background-color: hsla(var(--theme-hue), 80%, 40%, 1);
    box-shadow: 0px 0px 2px hsla(var(--theme-hue), 80%, 30%, 1);
}

#configurables div.config-body.boolean {
    width: 60px;
    height: 40px;
    padding: 0px;
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
}

.boolean {
    cursor: pointer;
}

.boolean .background {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background-color: hsla(var(--theme-hue), 80%, 85%, 1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: filter 0.2s;
}

.boolean .background.true {
    background-color: hsla(var(--theme-hue), 80%, 60%, 1);
}

.boolean .foreground {
    background-color: hsla(var(--theme-hue), 50%, 30%, 1);
    --size: 20px;
    height: var(--size);
    width: var(--size);
    border-radius: var(--size);
    top: 50%;
    position: absolute;
    left: 20px;
    transform: translate(-50%, -50%);
    transition: filter 0.2s, left 0.2s;
}

.boolean .foreground.true {
    background-color: hsla(var(--theme-hue), 80%, 80%, 1);
    left: calc(100% - 20px);
}

/* Global archetypes */

/* Gallery */
.gallery {
    background-color: hsla(var(--theme-hue), 70%, 90%, 0.9);
    border-radius: 20px;
    min-height: 300px;
    min-width: 100px;
    padding: 20px;
    display: flex;
    flex-direction: row;
    column-gap: 20px;
    overflow-x: scroll;
    scrollbar-width: none;
    margin-bottom: 40px;
    position: relative;
    padding-top: 60px;
}

.gallery.centered {
    left: 50%;
    transform: translateX(-50%);
    max-width: min(80vw, 1500px);
}

.gallery h1 {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    --margin: 20px;
    max-width: calc(100% - calc(var(--margin) * 2));
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery .title-button-right {
    position: absolute;
    top: 0px;
    right: 0px;
    margin: 10px;
}

.gallery div:not(.name) {
    position: relative;
    background-color: hsla(var(--theme-hue), 60%, 70%, 0.2);
    padding: 20px;
    border-radius: 20px;
    justify-content: center;
    transition: transform 0.4s;
    max-height: calc(var(--gallery-project-size) + calc(20px * 7));
    min-width: calc(var(--gallery-project-size) + calc(20px * 2));
    overflow-y: scroll;
    scrollbar-width: none;
    width: 200px;
}

.gallery div:not(.name):hover {
    transform: scale(1);
    transform: rotate(-0deg);
}

.gallery div:not(.name):active {
    transform: rotate(-1deg);
}

.gallery div img {
    border-radius: 40px;
    width: var(--gallery-project-size);
    height: var(--gallery-project-size);
    background-color: hsla(var(--theme-hue), 60%, 70%, 0.8);
    padding: 20px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
}

.gallery div img.contain {
	object-fit: contain;
}

.gallery div .name {
    --margin: 10px;
    margin: var(--margin);
    margin-top: var(--margin);
    margin-bottom: calc(var(--margin) + 0px);
    font-weight: bold;
    width: calc(100% - calc(var(--margin) * 2));
    text-align: center;
}

.gallery div a {
    position: relative;
    width: 100%;
}

.gallery div a button {
    position: absolute;
    left: 0%;
    transform: translateX(-50%);
}

.gallery div p {
	margin-top: 60px;
    font-size: 17px;
}

.gallery div p:hover {
    transform: scale(1);
}
