:root {
    --navbar-image-size: 42px;
    --navbar-github-size: 28px;
    --navbar-fold-size: 24px;
    --navbar-height: 64px;
    --font-scale: 1;
    --countdown-scale: 1;
}

*[data-tooltip] {
    position: relative;
}

*[data-tooltip]:hover:after {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translate(-50%, -.5rem) scale(1);
    transform: translate(-50%, -.5rem) scale(1);
    pointer-events: none;
}

*[data-tooltip]:after {
    position: absolute;
    content: attr(data-tooltip);
    background: rgb(251, 251, 251);
    padding: .75rem;
    text-align: center;
    color: #000;
    font-size: 12px;
    white-space: nowrap;
    border-radius: .625rem;
    -webkit-transform: translate(-50%, 0) scale(0);
    transform: translate(-50%, 0) scale(0);
    display: flex;
    align-items: center;
    height: 12px;
    pointer-events: none;
    box-shadow: 0 0 16px 4px rgba(0, 0, 0, .15);
    transform-origin: bottom center;
    top: auto;
    bottom: 100%;
    left: 50%;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: 0.15s ease-in-out;
    transition: 0.15s ease-in-out;
}

a {
    color: unset;
    text-decoration: none;
}

html {
    overflow-x: hidden;
    background: rgb(17, 17, 17);
    color: #efefef;
}

body {
    margin: 0;
}

*::selection {
    background-color: rgba(255, 255, 255, .2);
}

* {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color emoji;
    box-sizing: border-box;
}

.navbar *,
.controller * {
    transition: all .1s ease-in-out;
}

.navbar,
.controller {
    transition: all .2s ease-in-out;
}

.app {
    width: 100vw;
    height: 100vh;
    position: absolute;
    display: flex;
    flex-direction: column;
    z-index: 9999;
}

.app-background {
    width: inherit;
    height: inherit;
    position: absolute;
    display: flex;
    flex-direction: column;
    z-index: 0;
    transition: opacity .2s ease-in-out;
    /*background: radial-gradient(circle at 20% 30%, #0061ff1c 0%, transparent 30%), radial-gradient(circle at 70% 60%, #ff8d001c 0%, transparent 30%), radial-gradient(circle at 40% 80%, #ff00201c 0%, transparent 30%);*/
}

.background-glow {
    width: inherit;
    height: inherit;
    position: absolute;
    display: flex;
    flex-direction: column;
    z-index: 0;
}

.app-content {
    width: -webkit-fill-available;
    height: -webkit-fill-available;
    z-index: 99999;
    overflow: hidden;
}

.navbar {
    position: fixed;
    height: 3.75rem;
    top: 1rem;
    left: 50%;
    right: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: .5rem;
    gap: 2rem;
    box-shadow: 0 0 0px 1px rgb(49 49 49);
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    z-index: 99999999;
    background: rgb(30 30 30 / 75%);
    backdrop-filter: blur(32px);
    width: fit-content;
    border-radius: 1.325rem;
    transform: translateX(-50%);
    transition: all .25s ease-in-out;
}

.navbar-icon {
    width: var(--navbar-image-size);
    height: var(--navbar-image-size);
    min-width: var(--navbar-image-size);
    min-height: var(--navbar-image-size);
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.navbar-icon-image {
    width: var(--navbar-image-size);
    height: var(--navbar-image-size);
    border-radius: 12px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    background-image: url("./icon.svg");
    background-size: 2rem;
    background-position: center;
    background-repeat: no-repeat;
}

.navbar-items {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-item,
.menu-item {
    cursor: pointer;
    font-size: 14px;
    color: rgb(156, 163, 175);
    text-decoration: none;
}

.navbar-left,
.navbar-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: hidden;
}

.navbar-left {
    padding: 0 .5rem;
    padding-right: .25rem;
}

.navbar-right {
    margin-left: auto;
    gap: 0rem;
    overflow: visible;
}

.navbar-button {
    --size: 2.75rem;
    min-width: var(--size);
    min-height: var(--size);
    width: var(--size);
    height: var(--size);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .875rem;
}

.navbar-button:hover svg {
    transform: scale(1.1);
}

.navbar-button svg {
    width: 1.625rem;
    height: 1.625rem;
}

.navbar-title {
    font-size: 16px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min-content;
    flex: auto;
    min-width: 0;
    width: auto;
    padding-left: .25rem;
}

.navbar-left {
    gap: 12px;
}

.countdown-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.countdown-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.countdown-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all .2s ease-in-out;
}

.countdown {
    display: flex;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    transform: scale(var(--countdown-scale));
    transition: all .1s ease-in-out;
}

.countdown * {
    transition: all .1s ease-in-out;
}

.countdown-number {
    padding: 0 2rem;
    font-size: calc(6rem*var(--font-scale));
    font-weight: 800;
}

.countdown-unit {
    background: rgb(30 30 30 / 65%);
    padding: .5rem .75rem;
    border-radius: 999rem;
    box-shadow: 0 0 0px 1px rgb(49 49 49);
    backdrop-filter: blur(16px) saturate(1.5);
}

.controller-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: -webkit-fill-available;
    display: flex;
    justify-content: center;
    padding-bottom: 1rem;
}

.controller {
    background: rgb(31 31 31 / 64%);
    backdrop-filter: blur(16px) saturate(1.5);
    padding: .5rem;
    border-radius: 1rem;
    display: flex;
    box-shadow: 0 0 0px 1px rgb(49 49 49);
    gap: .5rem;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.controller-group {
    display: flex;
    gap: .5rem;
}

.controller-group+.controller-group:before {
    content: '';
    width: 1.5px;
    background: rgb(49 49 49);
    height: 1.5rem;
    margin: auto 0;
}

.controller-button {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    background: none;
    border: none;
    border-radius: .625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.controller-button:is(:hover, :focus-visible) {
    background: rgb(48, 48, 48);
    box-shadow: 0 1px 1px 1px rgba(0, 0, 0, .15);
}

.controller-button:focus-visible {
    outline: none;
    box-shadow: 0px 0px 0px 2px rgb(62, 123, 255);
}

.controller-button:active svg {
    transform: scale(.9);
}

.controller-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.controller-font-size-current {
    height: 2.5rem;
    padding: 0 1rem;
    background: rgb(24, 24, 24);
    border-radius: .5rem;
    box-shadow: 0 0 0px 1px rgb(49 49 49);
    display: flex;
    align-items: center;
}

@media screen and (max-width: 768px) {
    .countdown-number {
        font-size: calc(6rem*var(--font-scale));
    }
}

@media screen and (max-width: 640px) {
    .countdown-number {
        font-size: calc(5rem*var(--font-scale));
    }
}

@media screen and (max-width: 320px) {
    .countdown-number {
        font-size: calc(4rem*var(--font-scale));
    }
}

.invisible {
    display: none;
}

.options-window-container {
    top: 90px;
    left: 496px;
    position: absolute;
    width: fit-content;
    height: fit-content;
    z-index: -1;
    pointer-events: none;
    transition: transform .2s ease-in-out, opacity .1s ease-in-out;
    transform: scale(.8) translate(0, -3rem);
    opacity: 0;
}

.options-window-container.active {
    position: absolute;
    width: fit-content;
    height: fit-content;
    z-index: 999999;
    transform: translate(0);
    opacity: 1;
}

.options-window {
    background: rgb(30 30 30 / 75%);
    width: 15rem;
    height: 20rem;
    border-radius: 1rem;
    backdrop-filter: blur(32px);
    box-shadow: 0 0 0px 1px rgb(49 49 49);
}

/*
.atomsphere-container {
    width: 100%;
    height: 100%;
    position: absolute;
}

.atomsphere-light {
    position: absolute;
    left: 50%;
    top: 0%;
    width: 0%;
    height: 0%;
    transform: translateX(-50%);
    display: block;
    background: conic-gradient(at 50% 0%, transparent 150deg, #fff1bf 180deg, transparent 210deg);
    mask-image: linear-gradient(to bottom, black, transparent);
    transition: all .1s ease-out;
    animation: light-up 300ms ease-out 1 forwards;
}

@keyframes light-up {
    to {
        width: 100%;
        height: 100%;
    }
}*/

.happy-new-year {
    position: fixed;
    left: 50%;
    top: 50%;
    text-align: center;
    transform: translate(-50%, -50%) scale(0);
    font-weight: bold;
    font-size: calc(6rem*var(--countdown-scale));
    user-select: none;
    color: #ffffff;
    pointer-events: none;
    animation: show-happy-new-year 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275) 1 forwards;
}

@keyframes show-happy-new-year {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}