body {
    /* Authentic Windows 95 Teal background */
    background-color: #008080;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Custom Font Setup for FT88 School */
@font-face {
    font-family: 'FT88 School';
    /* Looks for the font in your assets/otf folder */
    src: url('assets/otf/FT88-School.otf') format('opentype');
}

/* Fullscreen Background Video */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1;
    /* Keeps it behind the main window */
}

/* Glassy Window Effect */
.window {
    /* Almost completely transparent classic grey */
    background: rgba(192, 192, 192, 0.05) !important;
    /* Improve text readability against the video */
    color: rgb(21, 255, 0);
    text-shadow: none;
}

.window label,
.window p {
    color: rgb(255, 255, 255);
}

#drop-zone p {
    color: black !important;
}

/* Draggable Title Bar */
.title-bar {
    cursor: grab;
    user-select: none;
}

.title-bar:active {
    cursor: grabbing;
}

/* Utility to hide elements */
.hidden {
    display: none !important;
}

/* Fix link styling inside buttons so it doesn't look blue/underlined */
a {
    text-decoration: none;
    color: inherit;
}

/* Solid white readme window */
#readme-window {
    background: transparent !important;
    text-shadow: none !important;
}

#readme-window .window-body {
    background: white !important;
}

#readme-window p {
    color: black !important;
}

.popup-window .sunken-panel {
    color: black !important;
}


.window-body textarea {
    box-sizing: border-box;
}

/* Glassy Reopen Buttons when GIF is fullscreen */
body.has-gif-bg #reopen-container button {
    background: rgba(192, 192, 192, 0.05) !important;
    color: white !important;
    text-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(2px);
}

#reopen-container {
    transition: opacity 0.5s ease-in-out;
}

/* Idle state when GIF is playing */
body.has-gif-bg.idle,
body.has-gif-bg.idle * {
    cursor: none !important;
}

body.has-gif-bg.idle #reopen-container {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Responsive: allow scrolling on small viewports */
body {
    min-height: 100vh;
    height: auto;
}

/* Main window responsive */
#main-window {
    box-sizing: border-box;
}

/* Popup windows: override dragging transform on small screens */
@media (max-width: 500px) {
    #main-window {
        max-width: 95% !important;
    }

    .popup-window {
        width: 95% !important;
        max-width: 95% !important;
    }

    .window-body {
        padding: 8px;
    }

    .window-body textarea {
        font-size: 11px;
    }

    #video-url {
        min-width: 0;
    }
}
