body {
    font-family: 'MS Sans Serif', sans-serif;
    background-color: #008080;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-logo {
    display: block; /* Visible on desktop by default */
    margin-bottom: 10px;
}

.header-logo img {
    max-width: 480px;
    display: block;
}

.title-bar-text {
    display: flex;
    align-items: end;
    }

.title-bar-text img {
    margin-right: 4px;
    }

.window {
    width: 360px;
    min-height: 450px;
    margin: 0;
    display: flex;
    flex-direction: column; /* Allows window-body to grow */
}

.window-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1; /* Makes body fill available space */
}

/* --- The Robust Capture Button --- */
.capture-button-wrapper {
    position: relative; /* This is key for the overlay trick */
    width: 130px;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.capture-button-visual {
    width: 100%;
    height: 100%;
    border: 2px outset #c0c0c0;
    background-color: #c0c0c0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #000;
}

.capture-button-visual i {
    margin-bottom: 8px;
}

.capture-button-visual:active {
    border-style: inset;
}

/* This is the magic: the real input is invisible and laid over the visual button */
#media-capture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Makes it transparent */
    cursor: pointer;
    z-index: 10;
}

/* --- Preview Area Styling --- */
#preview-container {
    width: 100%;
    flex-grow: 1; /* Allow it to fill space */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    border: 2px inset #c0c0c0;
    padding: 5px;
    box-sizing: border-box;
}

#image-preview, #video-preview {
    display: none; /* Hide both by default */
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensures aspect ratio is maintained */
}

/* --- Upload Form --- */
#upload-form-container {
    margin-top: 10px;
    width: 100%;
}
.field-row-submit {
    text-align: center;
}

/* =========================================== */
/* --- MOBILE FULLSCREEN STYLES --- */
/* =========================================== */
@media (max-width: 479px) {
    body {
        padding: 0; /* Remove all body padding */
    }
    .app-container, .window {
        width: 100%;
        height: 100vh; /* Full viewport height */
    }
    .window {
        border-radius: 0;
        height: calc(100vh) !important; box-sizing: border-box !important;
    }
    .header-logo {
        display: none; /* Hide the logo on mobile to save space */
    }
}
