* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #4A2F23;

    cursor: default;
}

body.ubuntu-crashed {
    cursor: none;
}


#ubuntu-desktop {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #4A2F23 url("ibex-wallpaper.1787428289.jpg") center center / cover no-repeat;
}


#ubuntu-window {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;

    font-family: "Ubuntu", "Ubuntu Sans", "Noto Sans", "DejaVu Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: #565656;

    display: flex;
    flex-direction: column;
    width: 71em;
    max-width: 96vw;
    height: 50em;
    max-height: 85vh;

    background: #FAFAFA;
    border-radius: 0.9em;
    overflow: hidden;

    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.18),
        0 0.3em 1em rgba(0, 0, 0, 0.22),
        0 1.6em 4.5em rgba(0, 0, 0, 0.45);
}

@media (min-width: 1200px) {
    #ubuntu-window {
        font-size: 15px;
    }
}

@media (min-width: 1600px) {
    #ubuntu-window {
        font-size: 18px;
    }
}

@media (min-width: 2400px) {
    #ubuntu-window {
        font-size: 25px;
    }
}


.ubuntu-titlebar {
    position: relative;
    flex: 0 0 auto;
    height: 3.35em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #E2E2E2;
    user-select: none;
}

.ubuntu-title {
    font-size: 1.08em;
    font-weight: 500;
    color: #333333;
}

.ubuntu-close {
    position: absolute;
    right: 0.67em;
    top: 50%;
    transform: translateY(-50%);

    width: 1.78em;
    height: 1.78em;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #E6E6E6;
    color: #3A3A3A;
    cursor: default;

    display: flex;
    align-items: center;
    justify-content: center;
}

.ubuntu-close:hover {
    background: #DADADA;
}

.ubuntu-close:active {
    background: #CFCFCF;
}

.ubuntu-close svg {
    display: block;
    width: 0.85em;
    height: 0.85em;
}


.ubuntu-slides {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.ubuntu-slide {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    display: grid;
    grid-template-columns: 25em 1fr;
    gap: 0 5.5em;
    align-content: center;
    padding: 2em 3em 2em 10em;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease;
}

.ubuntu-slide.ubuntu-slide-on {
    opacity: 1;
    visibility: visible;
}

.ubuntu-slide h1 {
    font-size: 2.22em;
    font-weight: 300;
    line-height: 1.1;
    color: #2E2E2E;
    margin: 0 0 0.75em;
}

.ubuntu-slide p {
    font-size: 1em;
    line-height: 1.55;
    margin: 0 0 1.2em;
}

.ubuntu-slide p:last-child {
    margin-bottom: 0;
}

.ubuntu-aside-title {
    font-size: 2.1em;
    font-weight: 300;
    line-height: 1.1;
    color: #2E2E2E;
    margin: 0 0 1.8em;
}

.ubuntu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    color: #3A3A3A;
}

.ubuntu-list li {
    position: relative;
    padding-left: 1em;
    line-height: 1.5;
    margin-bottom: 0.6em;
}

.ubuntu-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    top: -0.05em;
    color: #7A7A7A;
}


.ubuntu-ask {
    display: flex;
    align-items: center;
    gap: 0.6em;
    margin: 0 0 3.8em;
}

.ubuntu-ask-bubble {
    position: relative;
    flex: 0 0 auto;
    width: 2.35em;
    height: 2.35em;
    border-radius: 50%;
    background: #DD5A26;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1em;
    color: #FFFFFF;
    letter-spacing: 0.01em;
}

.ubuntu-ask-bubble::after {
    content: "";
    position: absolute;
    right: 0.28em;
    bottom: -0.45em;
    width: 0;
    height: 0;
    border-left: 0.5em solid transparent;
    border-right: 0.2em solid transparent;
    border-top: 0.75em solid #DD5A26;
}

.ubuntu-ask-word {
    font-size: 2.4em;
    font-weight: 300;
    line-height: 1;
    color: #1F1F1F;
}


.ubuntu-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    padding: 0 1.15em 1.5em 2.2em;
}

.ubuntu-controls {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2.4em;
    height: 1.9em;
    padding-right: 2.4em;
}

.ubuntu-ctl {
    padding: 0;
    border: 0;
    background: none;
    color: #4A4A4A;
    cursor: default;
    line-height: 0;
}

.ubuntu-ctl-next {
    color: #BEBEBE;
}

.ubuntu-ctl svg {
    display: block;
    width: 1.25em;
    height: 1.25em;
}

.ubuntu-footer-main {
    flex: 1 1 auto;
    min-width: 0;
}

.ubuntu-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    height: 1.9em;
}

#ubuntu-status {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #3C3C3C;
}

.ubuntu-term {
    flex: 0 0 auto;
    padding: 0.25em;
    border: 1px solid #8A8A8A;
    border-radius: 0.25em;
    background: none;
    color: #3C3C3C;
    cursor: default;
    line-height: 0;
}

.ubuntu-term svg {
    display: block;
    width: 0.85em;
    height: 0.85em;
}


.ubuntu-progress {
    position: relative;
    height: 0.52em;
    margin-top: 0.8em;
    border-radius: 0.52em;
    background: #F7EDE4;
}

.ubuntu-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(to right, #F7EDE4 0%, #F4DACA 35%, #EDA47F 78%, #E95420 100%);
    box-shadow: 0 0 0.55em rgba(233, 84, 32, 0.45);
    overflow: hidden;
}

.ubuntu-progress-fill::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 62%);
    background-size: 260% 100%;
    animation: ubuntu-sweep 2.6s linear infinite;
}

@keyframes ubuntu-sweep {
    from {
        background-position: 160% 0;
    }
    to {
        background-position: -160% 0;
    }
}


#ubuntu-bsod {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 3;

    background: #000000;
    color: #DDDDDD;
    font-family: "Ubuntu Mono", "DejaVu Sans Mono", "Liberation Mono", "Courier New", Courier, monospace;
    font-size: 14px;
    line-height: 1.4;

    padding: 4vh 4vw;
    overflow: hidden;
}

@media (min-width: 1600px) {
    #ubuntu-bsod {
        font-size: 17px;
    }
}

@media (min-width: 2400px) {
    #ubuntu-bsod {
        font-size: 23px;
    }
}

body.ubuntu-crashed #ubuntu-bsod {
    display: block;
}

body.ubuntu-crashed #ubuntu-desktop,
body.ubuntu-crashed #ubuntu-window,
body.ubuntu-crashed #ubuntu-hint {
    display: none;
}

.ubuntu-bsod-cols {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 4vw;
}

#ubuntu-bsod pre {
    flex: 0 1 auto;
    margin: 0;
    font: inherit;
    white-space: pre-wrap;
    max-width: 74ch;
}

.ubuntu-bsod-tech {
    color: #A9A9A9;
}

.ubuntu-bsod-prank {
    display: block;
    margin-top: 1.6em;
    color: #FFFFFF;
    font-weight: bold;
}

#ubuntu-cursor {
    animation: ubuntu-blink 1s steps(1, end) infinite;
}

@keyframes ubuntu-blink {
    50% {
        opacity: 0;
    }
}

.ubuntu-bsod-logo {
    position: absolute;
    right: 3vw;
    bottom: 3vh;
    z-index: 0;
    width: 26vh;
    height: 26vh;
    filter:
        drop-shadow(0 0 0.35vh rgba(255, 120, 40, 0.9))
        drop-shadow(0 0 1.6vh rgba(255, 60, 0, 0.55))
        drop-shadow(0 0 4vh rgba(200, 40, 130, 0.4));
}


#ubuntu-hint {
    position: fixed;
    left: 50%;
    bottom: 1.5em;
    transform: translateX(-50%);
    z-index: 4;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 20px;
    padding: 9px 18px;
    white-space: nowrap;
    max-width: 92vw;
    overflow: hidden;
    text-overflow: ellipsis;

    transition: opacity 0.6s ease;
}

#ubuntu-hint kbd {
    font-family: inherit;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 1px 6px;
}

#ubuntu-hint.ubuntu-hint-gone {
    opacity: 0;
    pointer-events: none;
}


@media (max-width: 900px) {
    #ubuntu-window {
        font-size: 12px;
        width: 96vw;
        height: 80vh;
        max-height: 80vh;
    }

    .ubuntu-slide {
        grid-template-columns: 1fr;
        padding: 2em 2.5em;
    }

    .ubuntu-slide-aside {
        display: none;
    }

    .ubuntu-footer {
        padding-left: 1.15em;
    }

    .ubuntu-controls {
        gap: 1.6em;
        padding-right: 1.6em;
    }

    #ubuntu-bsod {
        font-size: 11px;
    }

    .ubuntu-bsod-cols {
        flex-direction: column;
        gap: 1.4em;
    }

    .ubuntu-bsod-trace {
        display: none;
    }

    .ubuntu-bsod-logo {
        width: 16vh;
        height: 16vh;
        opacity: 0.75;
    }
}
