#navigation ul li a {
    min-width: 0px;
}

.settings {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.search {
    width: 150px;
    margin: 0;
    padding: 0.44em;
    font-size: 14px;
}

.toggle {
    font-weight: bold;
    cursor: pointer;
    font-size: 20px;
    padding: 1px;
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

.toggle:focus,
.toggle:hover {
    outline: none;
    background: rgba(0, 0, 0, 0.15);
}

.toggle.active {
    background-color: #2ecc71;
    border-color: #27ae60;
}

.toggle:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

#gallery {
    position: fixed;
    height: 100vh;
    width: 100vw;
    overflow: auto;
}

.sections {
    min-height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: safe center;
    padding-top: 64px;
    padding-bottom: 34px;
    box-sizing: border-box;
}

.horizontal {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: safe center;
}

.separated {
    gap: 34px;
}

.stack {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.card {
    width: 150px;
    height: 150px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:has(.thumbnail.loaded) {
    visibility: visible;
    opacity: 1;
}

.thumbnail {
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.lightbox.active,
#lightbox-img.active {
    opacity: 1;
    pointer-events: auto;
    cursor: zoom-out;
}

#lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    cursor: wait;
}

.tags {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    pointer-events: none;
    align-content: flex-start;
}
.tags > div {
    display: flex;
    flex-direction: row;
}

.tags > div > span {
    align-self: baseline;
    color: white;
    font-size: 12px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1px 3px;
    line-height: 1em;
}

.tags > .popup {
    pointer-events: all;
    cursor: help;
}

.keys {
    display: flex;
    flex-direction: row;
    pointer-events: none;
    position: absolute;
    bottom: 0;
    left: 2px;
    gap: 2px;
}

.keys > * {
    align-self: center;
    text-align: center;
}

.key {
    font-size: 10px;
    padding: 0 3px 4px 3px;
    min-width: 10px;
    border-radius: 2px;
    background-color: rgb(240, 240, 240);
    box-shadow:
        inset 1px 0 0 0 gray,
        inset -1px 0 0 0 gray,
        inset 0 -3px 0 0 gray;
}

.key.duck::before,
.key.crouch::before {
    content: 'Ctrl';
}

.key.jump::before {
    content: 'Space';
}

.key.w::before {
    content: 'W';
}

.key.a::before {
    content: 'A';
}

.key.s::before {
    content: 'S';
}

.key.d::before {
    content: 'D';
}

.mouse {
    position: relative;
    width: 16px;
    height: 24px;
    border-radius: 12px;
    box-shadow:
        inset 1px 0 0 0 gray,
        inset -1px 0 0 0 gray,
        inset 0 -3px 0 0 gray;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 2px;
    height: 6px;
    border-radius: 2px;
    background-color: rgba(0, 0, 0, 0.7);
}

.mouse.l {
    background: linear-gradient(to right, red 50%, rgb(240, 240, 240) 50%) top /
        100% 10px no-repeat rgb(240, 240, 240);
}

.mouse.r {
    background: linear-gradient(to left, red 50%, rgb(240, 240, 240) 50%) top /
        100% 10px no-repeat rgb(240, 240, 240);
}

.mouse.m,
.mouse.lr {
    background: linear-gradient(to left, red 50%) top / 100% 10px no-repeat
        rgb(240, 240, 240);
}
