html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(to bottom, #ffffff 0%, #f2f8ff 55%, #d9ebff 100%);
    padding: 24px 0;
    box-sizing: border-box;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: #fff;
    opacity: 1;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 360ms ease;
}

body.is-ready::before {
    opacity: 0;
}

body.is-leaving::before {
    opacity: 1;
}

.page-window {
    opacity: 0;
    transition: opacity 360ms ease;
}

body.is-ready .page-window {
    opacity: 1;
}

/* Main white app body */
.page-window {
    width: 80vw;
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    background: #fff;
    border: 2px solid #2f2f2f;
    border-radius: 14px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Optional inner spacing for content */
.page-content {
    padding: 24px;
}

.window-titlebar {
    position: relative;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 56px 0 16px;

    /* Vista-ish cool blue gradient */
    background: linear-gradient(to bottom, #dbe9f8 0%, #b8d2ef 45%, #8db6e3 100%);
    border-bottom: 1px solid #5e84ad;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.window-titlebar h1 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #10243b;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.window-close {
    position: absolute;
    top: 8px;
    right: 10px;
    display: inline-block;
    text-decoration: none;
    line-height: 0;
    background: none;
    border: 0;
    padding: 0;
}

.window-close img {
    width: 32px;
    height: 32px;
    display: block;
}

/* Mobile fallback */
@media (max-width: 839px) {
    body {
        padding: 12px 0;
    }

    .page-window {
        width: 92vw;
        min-height: calc(100vh - 24px);
        border-radius: 12px;
    }

    .page-content {
        padding: 16px;
    }
}