html, body, input, button {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    color: white;
}

hr {
    width: 100%;
    border-color: white;
    opacity: 0.4;
}

.unselectable-text {
    -webkit-user-select: none;
    user-select: none;
}

.background-div {
    width: 100vw;
    height: 100vh;
    background-image: url(./assets/wallpapers/default.png);
    background-size: cover;
    overflow: hidden;
}

.top-bar {
    position: absolute;
    container-type: inline-size; 
    white-space: nowrap; 
    width: 100vw;
    height: 4vh;
    display: flex; 
    justify-content: space-between;
    align-items: center;
    border-radius: 15px;
    box-sizing: border-box;
}

.top-bar-group {
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-bar-item {
    padding: 5px 10px;
    border-radius: 15px;
    background-color: rgba(256, 256, 256, 0);
    backdrop-filter: blur(0px);
    font-size: clamp(10px, 2.0cqw, 14px);
}

.top-bar-item:hover {
    background-color: rgba(256, 256, 256, 0.1);
    backdrop-filter: blur(5px); 
}

.window {
    box-sizing: border-box;
    border: 2px solid gray;
    position: absolute;
    backdrop-filter: blur(10px); 
    border-radius: 15px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.window-header {
    box-sizing: border-box;
    width: 100%; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px 0px 5px 0px;
    border-bottom: 1px solid gray;
}

.window-content {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    flex: 1;
    padding: 5px 0px 0px 0px;
    min-height: 0;
}

.window-active {
    border-color: white
}

.window-active .window-header {
    border-color: white
}

.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: se-resize;
}

#calc {
    box-sizing: border-box;
    border: 2px solid white;
    position: absolute;
    backdrop-filter: blur(15px); 
    border-radius: 15px;
    padding: 10px;
    top: 50vh;
    left: 50vw;
    width: 30vw;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-width: 250px;
}

#calc-searchbar {
    box-sizing: border-box;
    background-color: transparent;
    border-radius: 10px;
    border: 2px solid gray;
    padding-left: 10px;
    width: 100%;
    height: 75px;
    color: gray;
    display: flex;
    justify-content: space-between;
    overflow-x: scroll;
    white-space: nowrap;
}

#calc-searchbar:focus-within {
    color: white;
    border-color: white;
}

#calc-input {
    box-sizing: border-box;
    background-color: transparent;
    border: none;
    width: 65%;
    height: 100%;
    font-size: inherit;
    color: white;
    outline: none;
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
}

#calc-result {
    height: 100%;
    padding-right: 10px;
    padding-left: 5px;
    width: 35%;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: inherit !important;
    line-height: 1.5;
    overflow: hidden;
    white-space: nowrap;
    overflow-x: scroll; 
    text-size-adjust: none;
}

#calc-suggestions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    border: none;
    border: 2px solid gray;
    border-radius: 8px;
}

.calc-suggestion + .calc-suggestion {
    border-top: 1px solid gray;
}

#calc-suggestions:has(.calc-suggestion:hover) {
    border-color: white;
}

.calc-suggestion {
    box-sizing: border-box;
    padding: 10px;
    flex: 1;
    width: 100%;
    background-color: transparent;
    color: gray;
    font-size: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-suggestion:hover {
    color: white;
}

#calc-main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    height: 100%;
    border: none;
}

.calc-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.calc-cell {
    box-sizing: border-box;
    border: 2px solid gray;
    border-radius: 8px;
    padding: 10px;
    flex: 1;
    min-width: 25px;
    min-height: 25px;
    max-width: 150px;
    max-height: 150px;
    background-color: transparent;
    color: gray;
    font-size: inherit;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-cell:hover {
    border-color: white;
    color: white;
}

.calc-cell:active {
    transform: scale(0.97) translateY(2px);
}

#toggle-calculator {
    display: flex;
    align-items: center;
    justify-content: center;
}

#mplus-panel {
    position: absolute;
    top: 4vh;
    left: 0;
    backdrop-filter: blur(15px); 
    border: 2px solid white;
    border-radius: 15px;
    padding: 10px;
    min-width: 200px;
    width: 10vw;
    display: flex;
    flex-direction: row;
    gap: 5px;
}

#mplus-open-windows {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: top;
    flex: 1;
    width: 100%;
    gap: 5px;
}

.mplus-window-item {
    box-sizing: border-box;
    border: 1px solid gray;
    border-radius: 10px;;
    padding: 10px;
    flex: 1;
    width: 100%;
    background-color: transparent;
    color: gray;
    font-size: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mplus-window-item:hover {
    color: white;
    border-color: white;
}

.mplus-label {
    font-size: 12px;
    color: gray;
}