/* --- Global & Frutiger Aero Theme --- */
body {
    /* Frutiger Aero blue/green gradient instead of a wallpaper */
    background: #0093E9;
    background-image: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%);
    
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    margin: 0;
    height: 100vh;
}

#desktop {
    height: calc(100vh - 40px);
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 20px;
}

.desktop-icon {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    text-align: center;
    width: 90px;
    cursor: pointer;
}
.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}
.desktop-icon img { width: 50px; }
.desktop-icon span { display: block; margin-top: 5px; }

#taskbar {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
    backdrop-filter: blur(15px) saturate(150%);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    z-index: 1000;
}

/* --- Window Styling (Aero Glass) --- */
.window {
    position: absolute;
    top: 50px;
    left: 100px;
    width: 70vw; /* Use viewport units for better scaling */
    max-width: 800px;
    height: 60vh;
    max-height: 500px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    resize: both; /* Allow user to resize window */
    overflow: hidden; /* Important for resize */
}

.title-bar {
    background: linear-gradient(to bottom, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
    padding: 8px 12px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    cursor: grab;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    font-weight: bold;
}
.title-bar .buttons button { /* Basic button styling */
    border: none; background: #ccc; width: 20px; height: 20px; border-radius: 50%;
    margin-left: 5px; cursor: pointer; }
.title-bar .buttons .close { background: #ff5f57; }
.title-bar .buttons .minimize { background: #febc2e; }
.title-bar .buttons .maximize { background: #28c840; }


.content {
    background: rgba(240, 248, 255, 0.85); /* A slightly transparent AliceBlue */
    backdrop-filter: blur(5px);
    flex-grow: 1;
    padding: 15px;
    overflow: auto;
    font-size: 16px;
    line-height: 1.6;
}
.content iframe { border: none; }

/* --- RESPONSIVE DESIGN FOR MOBILE --- */
@media (max-width: 768px) {
    /* Hide desktop-specific elements */
    #taskbar { display: none; }

    /* Convert desktop into a vertical app list */
    #desktop {
        height: 100vh;
        padding: 20px;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 25px;
    }

    .desktop-icon {
        width: 80%;
        max-width: 300px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        padding: 15px;
        display: flex;
        align-items: center;
        gap: 20px;
        text-align: left;
    }
    .desktop-icon span { font-size: 1.2em; }

    /* Make windows full-screen modals */
    .window {
        top: 0 !important; /* Overwrite JS positioning */
        left: 0 !important; /* Overwrite JS positioning */
        width: 100vw;
        height: 100vh;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
        resize: none; /* Disable resizing on mobile */
        z-index: 2000;
    }
    .title-bar { border-radius: 0; }
    /* --- Tabbed Interface Styling --- */
.tab-buttons {
    display: flex;
    border-bottom: 1px solid #ccc;
    padding: 0 10px;
    background-color: rgba(255, 255, 255, 0.2);
}

.tab-button {
    padding: 10px 15px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 1em;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    font-weight: bold;
    border-bottom: 3px solid #0078d4; /* A nice Windows-like blue */
}

.tab-content {
    flex-grow: 1; /* Make content fill available space */
    position: relative;
}

.tab-pane {
    display: none; /* Hide all panes by default */
    padding: 10px;
    height: 100%;
    width: 100%;
    position: absolute;
}

.tab-pane.active {
    display: block; /* Show only the active one */
}
}

/* --- Styling for Playlist Window & Tabs --- */

.playlist-container {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Adds space between your playlists */
    height: 100%;
}
