@font-face {
    font-family: 'Segoe UI';
    src: url(assets/SegoeUI.ttf) format('truetype');
}
@font-face {
    font-family: 'Segoe Icons';
    src: url(assets/SegoeIcons.ttf) format('truetype');
}
:root {
    --bgcolor: 97, 97, 97;
}

* {
    user-select: none;
    scrollbar-color: #a0a0a0 #2d2d2d;
}

body {
    margin: 0;
    height: 100vh;
    background-color: #202020;
}

#desktop {
    position: absolute;
    width: 100vw;
    height: 100vh;
    background-image: url(assets/mybg.png);
    background-size: cover;
    background-attachment: fixed;
}

p, a, pre, :not(form) > input, [title-data], textarea, select {
    color: white;
    font-size: 12px;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
}
p:hover {
    cursor: default;
}

h5, h4, h3, h2, h1 {
    font-family: 'Segoe UI', sans-serif;
    color: white;
    margin: 0;
}

h2 a {
    font-size: inherit;
}

select {
    background-color: rgba(var(--bgcolor), 0.3);
    border: none;
    border-radius: 4px;
}
select:hover {
    background-color: rgba(var(--bgcolor), 0.45);
}

#taskbar, #taskbar-apps, #taskbar-icons, .taskbar-icon,
#start-button, #search-button, #controls-button, .window-buttons,
.icon, #rclick, .search-bar, .menu > div, #buttonsHolder {
    display: flex;
    align-items: center;
}

#taskbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 48px;
    z-index: 98;
}
#taskbar.faketransparency {
    background: inherit;
}

#start-button {
    width: 42px;
    height: 42px;
    margin-left: 11px;
}

@keyframes upndown {
    0% {
        transform: translateY(0);
    }
    49%, 51% {
        transform: translateY(var(--direction));
    }
    100% {
        transform: translateY(0);
    }
}

.taskbar-icon {
    width: 40px;
    height: 40px;
    border: none;
    justify-content: center;
    border-radius: 5px;
    margin-right: 4px;
}
.taskbar-icon img {
    width: 25px;
    height: 25px;
    pointer-events: none;
}
.taskbar-icon > pre {
    font-family: Segoe Icons;
    font-size: medium;
    pointer-events: none;
}
.taskbar-icon:hover {
    background-color: rgba(var(--bgcolor), 0.25);
}
.taskbar-icon.active {
    background-color: rgba(var(--bgcolor), 0.25);
}
.taskbar-icon.maximize img {
    animation: upndown ease 0.5s;
    --direction: -15%;
}
.taskbar-icon.minimize img {
    animation: upndown ease 0.5s;
    --direction: 10%;
}
.taskbar-icon.active div:empty {
    width: 40% !important;
    background-color: #4cc2ff;
}
.taskbar-icon.open div:empty {
    width: 15%;
}
.taskbar-icon div:empty {
    position: absolute;
    bottom: 1px;
    height: 3px;
    border-radius: 5px;
    width: 0%;
    background-color: #969ca4;
    transition: all 0.2s ease;
}
.taskbar-icon[title-data] {
    position: relative;
}
.taskbar-icon[title-data]:hover:after {
    opacity: 1;
    transition: all 0.8s ease 0.6s;
    visibility: visible;
}
.taskbar-icon[title-data]:after {
    content: attr(title-data);
    background-color: rgba(var(--bgcolor), 0.3);
    border-radius: 5px;
    position: absolute;
    padding: 8px 10px 8px 10px;
    bottom: 4em;
    white-space: nowrap;
    backdrop-filter: blur(20px);
    z-index: 99999;
    opacity: 0;
    transition: all 0.2s ease;
    visibility: hidden;
}

#search-button {
    width: 100px;
    height: 35px;
    border-radius: 55px;
    background-color: rgba(var(--bgcolor), 0.185);
    margin-right: 4px;
}
#search-button:hover {
    background-color: rgba(var(--bgcolor), 0.25);
}
#search-button svg {
    margin-right: 6px;
    margin-left: 20px;
    pointer-events: none;
}
#search-button p {
    pointer-events: none;
}
#search-button.active {
    background-color: #229fe7;
}

#taskbar-icons {
    right: 0px;
    position: fixed;
    margin: 0 8px;
}
#taskbar-icons .pressed {
    opacity: .8;
}

#sound {
    margin-left: 9px;
}

#controls-button:active img, #clock-button:active p{
    opacity: .8;
}
#controls-button {
    margin-right: 0px;
    width: 58px;
}
#controls-button img {
    width: 16px;
    height: 16px;
}

#clock-button {
    width: 77px;
    height: 40px;
}
#clock-button div {
    pointer-events: none;
}
#clock-button p {
    text-align: right;
}

#icons {
    display: flex;
    flex-direction: column;
    margin-top: 5px;
    row-gap: 15px;
    height: calc(100vh - 50px);
    width: fit-content;
    flex-wrap: wrap;
    pointer-events: none;
}
#icons.medium .icon img {
    width: 65%;
}
#icons.large .icon {
    width: 115px;
}
#icons.large .icon img {
    width: 82%;
}

.icon {
    width: 75px;
    border-radius: 5px;
    flex-direction: column;
    pointer-events: all;
}
.icon p {
    text-align: center;
    max-width: 95%;
    margin-bottom: 2px;
    pointer-events: none;
    text-overflow: ellipsis;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: break-word;
}
.icon:hover {
    background-color: rgba(var(--bgcolor), 0.25);
}
.icon img {
    width: 42.5%;
    aspect-ratio: 1 / 1;
    pointer-events: none;
    margin-top: 2px;
}
.icon textarea {
    resize: none;
    margin-top: 2px;
    border-radius: 0;
    border-width: 1px;
    min-width: 6ch;
    max-width: 11ch;
    min-height: 1em;
    color: black;
    text-align: center;
    word-break: break-all;
    outline: none;
    overflow: hidden;
    padding: 0 1px;
}

.selected {
    background-color: rgba(var(--bgcolor), 0.5);
}

@keyframes shrink {
    0% {transform: scale(1);}
    100% {transform: scale(.8);}
}

@keyframes grow {
    0% {transform: scale(.8);}
    100% {transform: scale(1);}
}

.pressed:not(#controls-button) img, .pressed svg {
    animation: shrink .1s ease;
    animation-fill-mode: forwards;
}

.released:not(#controls-button) img, .released svg {
    animation: grow .1s ease;
}

.window {
    position: fixed;
    left: 25vw;
    top: 20vh;
    width: 50vw;
    height: calc(50vw / 1.6);
    border-radius: 8px;
    background-color: #202020;
    border: solid 1px rgba(50, 63, 83, 0.6);
}
.window > p {
    margin-left: 5px;
    display: inline;
    pointer-events: none;
}
.window iframe {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: calc(100% - 20px);
    border: 0;
    border-radius: 0 0 8px 8px;
}

.window-buttons {
    top: 0;
    right: 0;
    position: absolute;
}
.window-buttons p {
    width: 20px;
    height: 20px;
    font-size: 10px;
    padding: 0px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.window-buttons > :hover {
    background-color: grey;
}
.window-buttons .close:hover {
    background-color: red;
    border-radius: 0 6px 0 0;
}

#box {
    background-color: rgba(15, 110, 195, .2);
    border: 1px solid #106abc;
    position: fixed;
    pointer-events: none;
    z-index: 1;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

#rclick, .vertical-box {
    flex-direction: column;
    border-radius: 5px;
    pointer-events: all;
    z-index: 98;
    opacity: 0 1;
    animation: fadeIn 0.1s ease-in;
}
#rclick {
    width: 284px;
    background-color: #2c2c2c;
    position: fixed;
    border: solid 1px #36383b;
}
#rclick.sub {
    width: 210px;
    z-index: 99;
    animation: fadeIn 0.15s ease-in;
}
#rclick div, .vertical-box div {
    width: calc(100% - 4px);
    height: 20px;
    margin: 2px;
    display: flex;
    position: relative;
    align-items: center;
}
#rclick div:hover {
    background-color: rgba(var(--bgcolor), 0.15);
    border-radius: 5px;
}
#rclick div p, .vertical-box div p {
    position: absolute;
    display: inline;
    margin-left: 3em;
    pointer-events: none;
    text-align: left;
}
#rclick div pre {
    display: inline;
    position: absolute;
    margin-left: 1.2em;
    text-align: center;
    font-family: "Segoe Icons";
    pointer-events: none;
}
#rclick div:has(> p:nth-of-type(2)) p:last-child,
.vertical-box div:has(> p:nth-of-type(2)) p:last-child,
.vertical-box .button:has(> p:nth-of-type(2)) p:nth-child(3) {
    right: 10px;
    font-family: "Segoe Icons";
}
#rclick div:empty {
    height: 1px;
    background-color: #36383b;
}
#rclick div[disabled] p, pre[disabled] {
    color: grey;
}
#rclick.tbRclick {
    width: 160px;
    background-color: rgba(var(--bgcolor), 0.2);
    border-radius: 6px;
    border-width: 0;
}
#rclick.tbRclick div:empty {
    width: 100%;
    background-color: rgba(131, 131, 131, 0.2);
}
#rclick.tbRclick p {
    font-size: small;
}
#rclick.tbRclick div:not(:empty) {
    height: 25px;
}
#rclick.tbRclick pre {
    font-size: 14px;
    margin-left: 0.9em;
}

.acrylic {
    backdrop-filter: blur(55px);
}

.fullscreen {
    border-radius: 0;
    border: 0;
}
.fullscreen iframe {
    border-radius: 0;
}

@keyframes up {
    0% {
        transform: translateY(var(--startingY));
    }
    100% {
        transform: translateY(0);
    }
}

.menu {
    max-width: calc(100vw - 24px);
    max-height: calc(90vh - 48px);
    bottom: 62px;
    position: fixed;
    background-color: rgba(19, 64, 127, .9);
    border: solid 1px rgba(50, 63, 83, 0.6);
    border-radius: 10px;
    z-index: 97;
    --startingY: 102%;
    animation: up 0.15s;
    box-shadow: -1px 4px 10px 0px rgba(0, 0, 0, 0.45);
}
.menu.close {
    transition: all 0.15s;
    transform: translateY(102%);
}

.menu.left {
    left: 12px;
    width: 640px;
    aspect-ratio: 8 / 9;
}
.menu h5 {
    display: inline;
    margin: 10px 0 10px 24px;
}
.menu div h5 {
    display: inline;
    margin: 15px 450px 15px 60px;
}
.menu .button, .button.active {
    background-color: rgba(var(--bgcolor), 0.2);
}
.button {
    display: flex;
    height: 24px;
    width: 45px;
    text-align: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 5px;
}
.button:hover {
    background-color: rgba(var(--bgcolor), 0.3);
}
.button:active:not(:has(select:active)) {
    background-color: rgba(var(--bgcolor), 0.1);
    opacity: .8;
}

.menu.right {
    right: 12px;
}

#search-menu {
    width: 775px;
    aspect-ratio: 155 / 144;
}

#pinnedApps {
    display: flex;
    flex-direction: row;
    margin: 0 30px;
}
#pinnedApps .icon {
    width: 90px;
    height: 80px;
}
#pinnedApps .icon:hover {
    background-color: rgba(var(--bgcolor), 0.18);
}
#pinnedApps .icon img {
    width: 35%;
    margin-bottom: 5px;
    margin-top: 10px;
}

.search-bar {
    background-color: rgb(27, 40, 58);
    height: 30px;
    border-radius: 55px;
    margin: 30px 24px;
    cursor: text;
}
.search-bar svg {
    margin: 0 10px 0 15px;
}
.search-bar input {
    background: none;
    border: none;
    width: 100%;
}
.search-bar input:focus {
    outline: none;
}

.horizontal-spaced-box {
    display: flex;
    flex-direction: row;
    column-gap: 3px;
    background-color: #2c2c2c;
    border-bottom: solid #3a3a3a 1px;
}
.horizontal-spaced-box pre {
    margin: 17px;
    font-family: "Segoe Icons";
}

#mainExplorer, #mainExplorer .horizontal-spaced-box, #bottomExplorer {
    background-color: #191919;
}
#mainExplorer {
    display: flex;
    flex-direction: row;
    height: calc(100% - 116.6px);
}
#explorerLeft, #explorerMiddle {
    border-right: solid #3a3a3a 1px;
}
#explorerMiddle, #explorerRight {
    border-left: solid #202020 1px;
}
#bottomExplorer {
    position: fixed;
    width: 100vw;
    bottom: 0;
    background-color: #1c1c1c;
}

#settingsMenuHolder {
    display: flex;
    flex-direction: row;
}
#settingsMenuHolder .button {
    justify-content: left;
    flex-direction: row;
}
#settingsMenuHolder div :is(p, select) {
    font-size: 13px;
}
#settingsMenuHolder .button p span {
    font-size: 12px;
    opacity: 0.8;
}
#settingsMenuHolder .button:has(> *:nth-child(2):last-child) p:nth-child(1),
#menusHolder .vertical-box > .button:has(p) p:first-of-type {
    max-width: calc(100% - 100px);
    position: relative;
}
#settingsMenuHolder .button:has(> *:nth-child(3):last-child) p:nth-child(1),
#settingsMenuHolder .button:has(> *:nth-child(4):last-child) p:nth-child(2) {
    max-width: calc(100% - 230px);
    position: relative;
}

#buttonsHolder {
    width: 300px;
    background-color: #202020;
}
#buttonsHolder div {
    width: 262px;
    height: 35px;
}
#buttonsHolder div:hover {
    background-color: rgba(var(--bgcolor), .15);
}

#menusHolder {
    margin: 20px;
    flex: 1;
}
#menusHolder h2{
    margin-bottom: 20px;
}
#menusHolder h5 {
    margin-top: 34px;
    margin-left: 2px;
    margin-bottom: 10px;
}
#menusHolder h2 a:not(:hover) {
    opacity: 0.8;
}
#menusHolder > div, #menusHolder > div > div {
    display: none;
}
#menusHolder > div > div {
    --startingY: 10%;
    animation: up .1s ease-out;
}
#menusHolder > div > div.swipeleft {
    transform: translateX(-102%);
    transition: all .25s ease-in;
}
#menusHolder > div.active, #menusHolder > div > div.active {
    display: block;
}
#menusHolder .vertical-box {
    width: 100%;
}
#menusHolder .vertical-box > div {
    height: 60px;
    background-color: rgba(var(--bgcolor), .15);
}
#menusHolder .vertical-box > * > .button:has(p), #menusHolder .vertical-box > .button:has(p) {
    min-height: 46px;
    height: fit-content;
    padding-bottom: 10px;
    padding-top: 10px;
}
#menusHolder .vertical-box > .button:hover {
    background-color: rgba(var(--bgcolor), .25);
}
#menusHolder #desktop {
    position: relative;
    width: 320px;
    height: auto;
    aspect-ratio: 16 / 9;
    border: solid 8px black;
    border-radius: 10px;
    margin-bottom: 12px;
    background-attachment: local;
}
#menusHolder .button pre {
    font-family: "Segoe Icons";
    text-align: center;
    font-size: 21px;
    margin-left: 19.5px;
    position: absolute;
}
#menusHolder .button:has(*:nth-child(2)) p:first-of-type {
    margin-left: 60px;
}

.vertical-box select {
    position: absolute;
    right: 26px;
    height: 28px;
    width: 125px;
}

#settingsMenuHolder .dropdown div div .button {
    position: absolute;
    right: 26px;
    height: 28px;
    width: 125px;
    background-color: rgba(var(--bgcolor), 0.3);
    justify-content: center;
    margin: 0;
}
#menusHolder .dropdown.help:has(div.active) {
    border-radius: 5px 5px 0 0;
}
#menusHolder .dropdown.help .horizontal-box {
    margin-bottom: 8px;
}
#menusHolder .dropdown.help .horizontal-box a {
    font-size: 13px;
}
#menusHolder .dropdown.help .horizontal-box:last-child {
    margin-bottom: 20px;
}
#menusHolder .vertical-box .dropdown {
    display: flex;
    flex-direction: column;
    border-radius: 5px;
    height: fit-content;
}
#menusHolder .vertical-box .dropdown div p {
    display: inline;
}
#menusHolder .vertical-box .dropdown > div > div > p {
    max-width: calc(100% - 230px);
    position: relative;
}
.dropdown div:empty {
    height: 1px;
    background-color: #202020;
    width: 100%;
    margin: 0;
    margin-bottom: 10px;
    display: block;
}
.dropdown div div .button:hover {
    background-color: rgba(var(--bgcolor), 0.4);
}
.dropdown div div .button p {
    margin-left: 0;
}
.dropdown > div {
    margin: 0;
    width: 100%;
    height: auto;
}
.dropdown:has(.active) > div {
    border-radius: 5px 5px 0 0;
}
.dropdown div:not(.button) > :is(p, a) {
    margin-left: 60px;
}
.dropdown div:not(.button) {
    flex-direction: column;
}
.dropdown .button:hover {
    background-color: rgba(var(--bgcolor), .15);
}
.dropdown .horizontal-box {
    align-items: normal;
    margin-bottom: 12px;
    height: fit-content;
    justify-content: center;
}
.dropdown a {
    color: #8ed8ea;
    text-decoration: none;
    border-radius: 4px;
    width: fit-content;
}
.dropdown a:hover {
    cursor: pointer;
    background-color: rgba(var(--bgcolor), 0.3);
}

.dropdownMenu:not(.active) {
    display: none;
}