/* ============================================
   DESKTOP FOUNDATION
   ============================================ */

.desktop-layer {
    position: fixed;
    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    z-index: 1;
    pointer-events: none;
}

.ui-layer {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    z-index: 10;

    pointer-events: none;

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

    gap: 20px;
}


/* ============================================
   UI TOP
   ============================================ */

.ui-top {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 20px;

    z-index: 11;

    pointer-events: none;

    margin-bottom: auto;
    padding-top: 10vh;
}

.ui-layer h1 {
    color: white;

    text-shadow:
        0 0 20px rgba(0,0,0,0.8);

    font-family: monospace;

    text-align: center;

    pointer-events: none;

    margin: 0;

    font-size: 2.5rem;
}


/* ============================================
   INPUT
   ============================================ */

.input-container {
    pointer-events: auto;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 10px;

    width: 100%;
    max-width: 400px;

    position: relative;

    z-index: 10;
}

#talk-input {
    background: rgba(0, 0, 0, 0.8);

    border: 2px solid #8be9fd;
    border-radius: 10px;

    color: white;

    font-size: 1.2em;

    padding: 15px;

    width: 100%;

    text-align: center;

    font-family: monospace;

    outline: none;

    box-shadow:
        0 0 10px rgba(139, 233, 253, 0.3);

    transition: all 0.3s;

    pointer-events: auto;
}

#talk-input:focus {
    box-shadow:
        0 0 20px rgba(139, 233, 253, 0.6);

    border-color: #50fa7b;
}

#status {
    color: rgba(255,255,255,0.7);

    font-size: 0.9em;

    min-height: 20px;

    font-family: monospace;

    text-align: center;

    pointer-events: none;
}


/* ============================================
   CHARACTER
   ============================================ */

#character {
    pointer-events: auto !important;

    cursor: pointer;

    display: block;

    position: fixed !important;

    left: 50%;
    top: 45%;

    transform: translate(-50%, -50%);

    width: 500px;
    height: auto;

    z-index: 10;

    transition: transform 0.2s;
}


/* ============================================
   INTERACTIVE OBJECTS
   ============================================ */

.interactive-object {
    position: fixed;

    pointer-events: auto;

    cursor: pointer;

    transition: all 0.3s ease;

    z-index: 5;

    user-select: none;
    -webkit-user-select: none;
}


/* ============================================
   DESKTOP ICONS
   ============================================ */

.desktop-icons {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 5;
}

.desktop-icon {
    position: fixed;

    pointer-events: auto;

    cursor: pointer;

    z-index: 5;

    user-select: none;
    -webkit-user-select: none;

    display: flex;

    flex-direction: column;

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

    gap: 6px;

    padding: 8px;

    border-radius: 12px;

    background: transparent;
    border: none;

    transition:
        all 0.25s
        cubic-bezier(0.34, 1.56, 0.64, 1);
}

.desktop-icon img {
    width: 72px;
    height: 72px;

    object-fit: contain;

    pointer-events: none;

    display: block;

    transition:
        all 0.25s
        cubic-bezier(0.34, 1.56, 0.64, 1);

    filter:
        drop-shadow(
            0 2px 8px rgba(0, 0, 0, 0.3)
        );
}

.desktop-icon .icon-label {
    color: white;

    font-family: monospace;

    font-size: 11px;

    pointer-events: none;

    text-align: center;

    max-width: 80px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    text-shadow:
        0 0 20px rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.8);

    background: transparent;

    padding: 2px 6px;

    border-radius: 4px;

    letter-spacing: 0.5px;

    opacity: 0.9;
}


/* ============================================
   DESKTOP ICON HOVER
   ============================================ */

.desktop-icon[data-highlight="true"]:hover {
    transform:
        scale(1.12)
        translateY(-4px);

    background:
        rgba(255, 255, 255, 0.08);
}

.desktop-icon[data-highlight="true"]:hover img {
    filter:
        drop-shadow(
            0 4px 20px rgba(139, 233, 253, 0.3)
        )
        drop-shadow(
            0 2px 8px rgba(0, 0, 0, 0.4)
        );
}

.desktop-icon:hover .icon-label {
    opacity: 1;

    text-shadow:
        0 0 30px rgba(139, 233, 253, 0.3),
        0 0 60px rgba(139, 233, 253, 0.1);
}


/* ============================================
   ACTIVE
   ============================================ */

.desktop-icon[data-highlight="true"]:active {
    transform:
        scale(0.92)
        translateY(0px);

    transition-duration: 0.08s;
}

.desktop-icon[data-highlight="true"]:active img {
    filter:
        drop-shadow(
            0 0 30px rgba(139, 233, 253, 0.4)
        );
}


/* ============================================
   DISABLED
   ============================================ */

.desktop-icon.disabled {
    opacity: 0.4;

    pointer-events: none;
}


/* ============================================
   SELECTED
   ============================================ */

.desktop-icon[data-highlight="true"].selected::after {
    content: '';

    position: absolute;

    bottom: -4px;
    left: 50%;

    transform: translateX(-50%);

    width: 20px;
    height: 2px;

    background: #8be9fd;

    border-radius: 2px;

    box-shadow:
        0 0 10px rgba(139, 233, 253, 0.5);
}


/* ============================================
   WINDOW SYSTEM
   ============================================ */

/*
    IMPORTANT:

    Windows use the viewport as their coordinate
    system here.

    Do NOT put the old 1440x900 transformed
    coordinate system back here while debugging
    the regression.
*/

.window-layer {
    position: fixed;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    pointer-events: none;

    z-index: 3;
}


/* ============================================
   WINDOWS
   ============================================ */

.window {
    position: absolute;

    box-sizing: border-box;

    pointer-events: auto;
}

.window-decoration {
    pointer-events: none !important;
}

.window-content {
    position: relative;

    z-index: 10;

    padding: 20px;

    color: white;
}


/* ============================================
   PAGE IMAGES
   ============================================ */

.page-image {
    position: fixed;

    /*
        x/y represent the CENTER of the image.
    */

    transform:
        translate(-250%, -270%)
        scale(1);

    height: auto;

    cursor: pointer;

    z-index: 5;

    transition:
        transform 0.15s ease;

    user-select: none;

    -webkit-user-drag: none;
}

.page-image:hover {
    transform:
        translate(-250%, -270%)
        scale(var(--hover-scale));
}