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

/* ComposeApp base styles */
#ComposeApp {
    width: 100%;
    height: 100%;
    background: #b8987d;
    background-image: url("images/beauty_logo.svg");
    background-repeat: no-repeat;
    background-position: center;
}

/* Mobile styles - when moved to body by JS */
body > #ComposeApp {
    position: fixed;
    /* Use inset shorthand so the safe areas define the box. Avoid 100vh/100vw to prevent double-subtract issues on mobile browsers. */
    inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    width: auto;
    height: auto;
    overflow: hidden;
}

/* Desktop styles - phone frame wrapper */
@media (min-width: 768px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        background: linear-gradient(135deg, #e3d7cc 0%, #d1c4b8 100%);
    }

    .phone-device {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        width: 100vw;
    }

    .phone-frame-wrapper {
        position: relative;
        /* Make device larger on desktop */
        height: 92vh;
        aspect-ratio: 0.46;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .phone-inner-wrapper {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .phone-frame-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        z-index: 2;
        pointer-events: none;
    }

    .phone-screen-content {
        position: absolute;
        /* Tighter fit to the visible glass area */
        border-radius: 42px;
        top: 3.3%;
        bottom: 3.3%;
        left: 4.2%;
        right: 4.2%;
        overflow: hidden;
        background: white;
        z-index: 1;
    }

    /* Desktop: ComposeApp fills the phone screen when inside it */
    .phone-screen-content > #ComposeApp {
        width: 100%;
        height: 100%;
        border-radius: 42px;
        overflow: hidden;
    }

    .device-info {
        position: absolute;
        bottom: 2%;
        left: 50%;
        transform: translateX(-50%);
        color: rgba(0, 0, 0, 0.7);
        font-family:
            -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: 14px;
        font-weight: 500;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        z-index: 3;
    }
}
