@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope.ttf');
}

* {
    image-rendering: crisp-edges;
}

/* for electron  */
html, body {
    width: 100vw;
    height: 100vh;
    margin: 0;
}

/* --- bg --- */
body {
    --bg-angle: -5deg;
    padding: 0;
    background: #000;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    transition: filter .5s ease;
    user-select: none;
}

.spaghetti {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1000;
}

/* --- loading ui --- */
#loading-bar {
    --color: #777;
    display: block;

    position: fixed;
    left: 50%;
    bottom: 64px;
    transform: translateX(-100%);
    
    width: 75%;
    height: 64px;

    border: solid 8px var(--color);
    padding: 4px;

    pointer-events: none;
    z-index: calc(infinity);
    scale: 0.5;
    opacity: 50%;
    transition: opacity .5s ease-out;
}
#loading-progress {
    display: block;
    background-color: var(--color);
    height: 100%;
    width: 0%;
    transition: width .5s ease-out;
}

#clicktostart {
    color: #fff;
    opacity: 10%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5vw;
    font-family: monospace;
    transition: opacity .5s ease;
    white-space: pre-wrap;
}

/* --- startup --- */
#startup-text {
    text-shadow: 0px 0px 15px #000;
    color: #fff;
    font-family: 'Manrope', monospace;
    font-weight: bolder;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5vw;
    transition:
        opacity .5s ease-out,
        height 1.5s ease,
        top 1.5s ease,
        text-shadow .5s ease-out;
    opacity: 0%;
    z-index: 100;
}
#startup-logo {
    filter: drop-shadow(0px 0px 25px #fff);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 50vh;
    transition:
        opacity 1s ease-in,
        height 1.5s ease;
    opacity: 0%;
    z-index: 100;
}
/* --- outer ui --- */
.time {
    color: #fff;
    font-family: 'Manrope', monospace;
    font-size: 20px;
}
.time-bar {
    position: fixed;
    left: 50vw;
    top: 0;
    margin-top: 0px;
    margin-left: 4px;
    margin-right: 4px;
    transform: translate(-50%, -125%);
    height: min-content;
    width: max-content;
    padding: 5px 10px;
    background-color: #000a;
    outline: 2px solid #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 0px 0px 10px 10px;
    user-select: none;
    pointer-events: none;
    cursor: default;
    backdrop-filter: saturate(125%) blur(5px);
    transition: transform 1s ease;
}
#clock {
    display: inline-block;
    position: relative;
    width: 24px;
    height: 24px;
    outline: 1px solid #fff;
    background-color: #000;
    border-radius: 16px;
}

@keyframes hourhand-load {
  from {
  	transform: rotateZ(0deg);
  }
  to {
  	transform: rotateZ(360deg);
  }
}
@keyframes minhand-load {
  from {
  	transform: rotateZ(135deg);
  }
  to {
  	transform: rotateZ(495deg);
  }
}
#hourhand, #minhand, #sechand {
    position: absolute;
    transition: transform .75s ease;
}

.infolabel {
    position: fixed;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-weight: bold;
    font-family: monospace;
    font-size: .95em
}

.bubble-text {
    color: #fff;
    position: fixed;
    font-family: monospace;
    font-weight: bold;
    font-size: 16px;
    background-color: #000a;
    padding: 3px;
    border-radius: 15px;
    user-select: none;
    pointer-events: none;
}
#fps {
    color: #fff;
    position: fixed;
    left: 5px;
    top: 5px;
    font-size: 20px;
    background-color: #000a;
    transition: color 1s ease-out;
    padding: 5px;
    border-radius: 0px 15px 15px 15px;
    user-select: none;
    pointer-events: none;
}
#errors {
    color: #fff;
    position: fixed;
    right: 5px;
    top: 5px;
    font-family: monospace;
    font-weight: bold;
    font-size: 20px;
    background-color: #000a;
    padding: 5px;
    border-radius: 15px 0px 15px 15px;
    user-select: none;
    pointer-events: none;
}

#battery-div {
    position: fixed;
    bottom: 10px;
    left: 10px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    overflow: visible;
}
.battery {
    min-width: 50px;
    min-height: 20px;
    max-width: 50px;
    max-height: 20px;
    overflow: visible;
    border-radius: 5px;
    position: relative;
    outline: solid 3px #fff; 
}
#battery-bar {
    display: block;
    width: 100%;
    height: 20px;
    background-color: #fff0;
    position: absolute;
    transition:
        background-color 3s ease,
        width 1s ease;
    z-index: calc(-infinity);
}

/* --- notifications --- */
.notif-div {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    position: fixed;
    top: 10vh;
    right: 0;
    z-index: calc(infinity);
}
.notif {
    display: flex;
    flex-direction: row;
    height: calc-size(auto);
    opacity: 0;
    width: max-content;
    height: max-content;
    max-width: 75vw;
    transform: translateX(100%);
    border: solid 1px #fff;
    background-color: #0008;
    backdrop-filter: saturate(500%) blur(5px) opacity(95%) brightness(50%);
    text-align: right;
    overflow-wrap: normal;
    white-space: pre-wrap;
    transition:
        height 1s ease,
        transform 1s ease,
        opacity .25s ease-out;
}
.notif-title {
    color: #fff;
    font-size: 1.5em;
    font-weight: bolder;
    font-family: 'Manrope', monospace;
}
.notif-text {
    color: #fff;
    font-family: 'Manrope', monospace;
}
.notif-icon {
    float: left;
    padding: 5px;
    height: 32px;
}


/* --- main ui --- */
.ui {
    position: fixed;
    display: block;
    top: -50%;
    left: 50%;
    width: 80vw;
    height: 70vh;
    transform: translate(-50%, -50%) scale(95%);
    background-color: #0001;
    outline: 3px solid #fff8;
    padding: 5vh 5vw;
    border-radius: 50px;
    overflow: hidden;
    overscroll-behavior: none;
    text-wrap: nowrap;
    transition:
        top 1s ease,
        background-color 1s ease-out,
        outline 1.25s ease,
        border-radius 1s ease,
        width 1.25s ease,
        height 1.25s ease-out,
        transform 1.25s ease,
        backdrop-filter 1.25s ease;
    padding-top: 40px;
    backdrop-filter: saturate(125%) blur(20px) opacity(90%);    
    overscroll-behavior: contain;
    z-index: 100;
    user-select: none;
    pointer-events: none;
    cursor: none;
}
.ui.open {
    background-color: #0000;
    outline: 0px solid #fff0;
    width: 90vw;
    height: 75vh;
    top: 55vh;
    border-radius: 1px;
    backdrop-filter: none;
    transform: translate(-50%, -50%);
}
.ui.inactive {
    transition:
        top 1s ease,
        background-color 1s ease-out,
        opacity 2.5s ease,
        width 1.25s ease,
        height 1.25s ease;
    opacity: 15%;
}

#icon {
    position: fixed;
    bottom: 0px;
    left: 0px;
    background-color: #0004;
    width: 50px;
    border-radius: 25px;
    padding: 5px;
}

.ui-options {
    height: max-content;
    position: fixed;
    margin-bottom: -20px;
    padding-bottom: 20px;
    padding-top: 20px;
    margin-top: -20px;
    overflow: visible;
    transition: left .2s linear;
    z-index: 110;
}
.ui-option {
    font-family: 'Manrope', monospace;
    background-color: #0000;
    color: #fff;
    font-size: 30px;
    text-decoration-color: transparent;
    text-decoration-line: underline;
    text-underline-offset: 10px;
    font-weight: lighter;
    width: fit-content;
    transition:
        font-weight .5s ease,
        text-decoration-color 250ms ease-out;
    white-space: nowrap;
    border-radius: 50px;
    padding: 10px 15px 15px 15px;
    margin: 0px 20px;
    user-select: none;
}
@keyframes highlight-option {
  from {
  	box-shadow: 0px 0px 5px #0004;
  }
  to {
  	box-shadow: 0px 0px 10px 5px #0004;
  }
}
.ui-option.selected {
    font-weight: bolder;
    text-decoration-color: #fff;
    background-color: #0004;
  	box-shadow: 0px 0px 10px 5px #0004;
    animation: highlight-option linear 1s infinite alternate;
}

.ui-content {
    position: absolute;
    overflow: visible;
    opacity: 0%;
    left: 50vw;
    height: 90%;
    top: 80px;
    margin-top: -40px;
    margin-left: -40px;
    padding-left: 40px;
    opacity: 0%;
    mask-image: linear-gradient(to bottom,
    #0000 0%,
    #000 20%,
    #000 90%,
    #0000 100%
    );
    display: none;
    transition:
        left .5s ease,
        top 1.5s ease,
        opacity .15s ease-in,
        display 1s allow-discrete;
    z-index: -50;
}
.ui-content.selected {
    left: 25vw;
    opacity: 100%;
    z-index: 105;
}

.ui-suboption {
    position: relative;
    padding: 2px 10px;
    left: -20px;
    transition:
        border-left .25s ease,
        margin-top .5s ease-out,
        margin-bottom .5s ease-out,
        top .5s ease,
        left .25s ease,
        opacity .15s linear,
        background-color .5s ease;
    border-radius: 10px;
    width: min-content;
    white-space: pre;
    opacity: 100%;
}
.ui-suboption.inactive:not(.selected) {
    transition:
        border-left .25s ease,
        top .5s ease,
        left .25s ease,
        opacity 3s ease-out,
        background-color .5s ease;
    opacity: 15%;
}
@keyframes highlight-text {
  from {
  	text-shadow: 0px 0px 5px #fff;
  }
  to {
  	text-shadow: 0px 0px 5px #fff, 0px 0px 10px #fff;
  }
}
.ui-suboption.selected {
    margin-top: 5px;
    margin-bottom: 5px;
    border-radius: 3px 10px 10px 3px;
    left: 0px;
    border-left: 5px solid #fff;
    background-color: #0006;
    color: #fff;
    transition:
        border-left .25s ease,
        top .5s ease,
        margin-top .5s ease-out,
        margin-bottom .5s ease-out,
        left .25s ease;
  	text-shadow: 0px 0px 5px #fff;
    animation: highlight-text linear 1s infinite alternate;
}

.ui-suboption-title {
    font-family: 'Manrope', monospace;
    font-weight: bold;
    font-size: 20px;
}

.ui-suboption-text {
    font-family: 'Manrope', monospace;
    font-weight: light;
    font-size: 12px;
}

@keyframes highlight-icon {
  from {
  	filter: drop-shadow(0px 0px 2px #fff);
  }
  to {
  	filter: drop-shadow(0px 0px 5px #fff);
  }
}
.ui-suboption-icon {
    position: relative;
    padding: 0;
    top: 2px;
    width: 16px;
    padding: 0px 4px;
    filter: contrast(0%) brightness(0%);
    animation: none;
}
.ui-suboption-icon.selected {
    width: 24px;
    top: 6px;
    filter: contrast(0%) brightness(200%) drop-shadow(0px 0px 2px #fff);
    animation: highlight-icon linear 1s infinite alternate;
}

#game-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000000;
    opacity: 0%;
    pointer-events: none;
}


/* --- misc --- */
.more-arrow {
    position: fixed;
    opacity: 0%;
    transition: opacity .5s ease;
    background-color: #0005;
    z-index: 200;
    mask-image: radial-gradient(#000, #0000 55%);
    padding: 20px;
    top: 25px;
}

.band-dialog {
    display: block;

    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);


    width: 100vw;
    max-height: 50vh;

    text-align: center;
    overflow: auto;

    padding: 5px 0px;

    opacity: 0%;

    background-color: #0008;
    backdrop-filter: contrast(120%) blur(10px);

    transition: opacity .15s ease;

    z-index: 1000;
}
button {
    box-shadow: 0px 0px 3px #000;
    border: 1px solid #000;
    border-radius: 15px;
    background-color: #fff;
    font-family: 'Manrope', monospace;
}

.darken {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0%;
    transition: opacity 1s ease;
    z-index: calc(infinity);
    pointer-events: none;
    user-select: none;
}

.loadingdiv {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
    z-index: 10000000;
    background-color: #0000;
    opacity: 0%;
    backdrop-filter: saturate(2.5) blur(8px) brightness(75%) opacity(0%);
    transition:
        opacity .75s ease,
        background-color 1s ease,
        backdrop-filter 1s ease;
}
.loadingdiv:has(> .loadingwheel.rotate) {
    background-color: #000a;
    backdrop-filter: saturate(2.5) blur(8px) brightness(75%);
    opacity: 100%;
}
@keyframes spin-wheel {
  from {
  	transform: rotate(360deg);
  }
  to {
  	transform: rotate(0deg);
  }
}
.loadingwheel {
    position: fixed;
    z-index: 10000001;
    animation: spin-wheel linear 1.5s infinite;
}
