/* --- GLOBAL SYSTEM DEFINITIONS (DEFAULT TO LIGHT MODE) --- */
:root {
    --window-bg: rgba(255, 255, 255, 0.45);   /* Frosted tint for glass panels */
    --window-border: rgba(255, 255, 255, 0.6); /* Clear glass rim borders */
    --text-color: #1a2a3a;                    /* Dark text for visibility */
    --accent-ui: #0088ff;                     /* Focus color for buttons/headers */
    --header-bg: rgba(255, 255, 255, 0.4);    /* Upper bar tint */
    --input-bg: rgba(255, 255, 255, 0.5);     /* Inner textarea fill */
}

body, html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    background-color: #000000;                /* Match your black wallpaper layer */
}

#desktop-canvas {
    width: 100vw;
    height: 100vh;
    background-image: url('assets/default_background.jpg'); 
    background-size: cover;          
    background-position: center;     
    background-repeat: no-repeat;
    position: relative;
}  

/* --- FROSTED GLASS WINDOW CONTAINER --- */
.os-window {   
    position: absolute;              
    width: 450px; 
    height: 350px;      
    box-sizing: border-box;          
    display: none;      
    z-index: 5;         
    border: 1px solid var(--window-border); 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    
    /* GLASSMORPHISM ENGINE */
    background-color: var(--window-bg); 
    backdrop-filter: blur(16px);     
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2); 
    border-radius: 8px;
}

/* --- WINDOW HEADER --- */
.window-header {
    width: 100%;
    height: 34px;
    background-color: var(--header-bg); 
    border-bottom: 1px solid var(--window-border);
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    padding-left: 12px;
    box-sizing: border-box;
    cursor: move; 
    user-select: none;               
}

.window-title {
    color: var(--text-color);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.window-controls {
    display: flex;
    height: 100%;
}

/* --- CONTROL ACTION BUTTONS --- */
.minimize-button button, 
.maximize-button button, 
.close-button button {
    width: 40px;
    height: 100%; 
    background-color: transparent;
    border: none;
    border-left: 1px solid var(--window-border);
    color: var(--text-color);
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimize-button button:hover, 
.maximize-button button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.close-button button:hover {
    background-color: #ff3b30; 
    color: #ffffff;
}

/* --- WINDOW INTERNAL WORKSPACE --- */
.window-content {
    flex-grow: 1;                    
    padding: 12px;
    box-sizing: border-box;
    color: var(--text-color);
}

#taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 50px;
    z-index: 10;                     
    display: flex;
    align-items: center;
    
    /* Forces the icon group to center perfectly */
    justify-content: center; 
    
    box-sizing: border-box;
    border-top: 1px solid var(--window-border);
    background-color: var(--window-bg);
    backdrop-filter: blur(20px);
}

/* --- ROUNDED ICON FRAMES --- */
.taskbar-icon {
    width: 36px; 
    height: 32px;
    margin: 0 4px; /* perfectly even spacing on both sides */
    background-color: var(--header-bg);
    color: var(--text-color);
    border: 1px solid var(--window-border);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center; 
    border-radius: 8px;              
}

/* --- TASKBAR TIME MODULE --- */
#taskbar-clock {
    /* Pin the clock to the right side so it doesn't mess with the centered icons */
    position: absolute;
    right: 20px;
    
    text-align: right;
    font-family: 'Courier New', Courier, monospace;
    user-select: none;
}

#clock-time {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-color);
}

#clock-date {
    font-size: 10px;
    color: var(--text-color);
    opacity: 0.7;
}

/* --- INTERACTIVE COMPONENTS --- */
.explorer-toolbar {
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--window-border);
    margin-bottom: 12px;
}

.explorer-btn {
    background-color: var(--header-bg);
    border: 1px solid var(--window-border);
    color: var(--text-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    padding: 4px 10px;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 4px;
}

.explorer-btn:hover {
    background-color: var(--text-color);
    color: var(--input-bg);
}

.file-icon-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

#notes-textarea {
    width: 100%;
    height: 100%;
    border: none;
    resize: none;                    
    outline: none;                   
    font-family: 'Courier New', Courier, monospace;
    box-sizing: border-box;
    background-color: var(--input-bg); 
    color: var(--text-color);
    padding: 10px;
    border: 1px solid var(--window-border);
}