body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* OS desktop shouldn't scroll */
}

#os-desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 10%, #1a2b42, #06111f 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Remove the dark overlay as we don't need it for a clean background */
#os-desktop::before {
    display: none;
}

.window {
    position: absolute;
    z-index: 10;
    display: flex;
    flex-direction: column;
    background: #061525;
    border: 1px solid #15506a;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05) inset;
    width: 940px;
    height: 690px;
    min-width: 320px;
    min-height: 480px;
    overflow: hidden;
    resize: both; /* Native resize, backed up by JS if needed */
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    resize: none;
}

.window.minimized {
    display: none !important;
}

.titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #0d243b, #08192c);
    border-bottom: 1px solid #174257;
    height: 32px;
    padding: 0 10px;
    user-select: none;
    cursor: grab;
    flex: 0 0 32px;
}

.titlebar:active {
    cursor: grabbing;
}

.title-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #dbeaf0;
    font-weight: 600;
}

.title-icon {
    width: 16px;
    height: 16px;
}

#win-size {
    font-size: 11px;
    color: #29e7df;
    font-weight: normal;
    background: #042631;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #0de3da;
    margin-left: 10px;
}

.title-controls {
    display: flex;
    gap: 6px;
}

.title-controls button {
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    color: #93b9c6;
    border-radius: 4px;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 14px;
    line-height: 1;
}

.title-controls button:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

#win-close:hover {
    background: #e81123;
    color: white;
}

.window-content {
    flex: 1;
    position: relative;
    overflow: auto;
    background: #0b1020;
}

/* Fix #app to fill window instead of full screen */
#app {
    width: 100% !important;
    height: 100% !important;
}

/* Mobile responsive adjustments for desktop OS mode */
@media(max-width: 760px) {
    .window {
        width: 100vw !important;
        height: 100vh !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0;
        border: none;
        resize: none;
    }
}
