.dark {
    --text: #f9f9f9;
    --taskbar-bg: #4f4f4f;
    --taskbar-section-bg: #2f2f2f;
    --taskbar-text: white;

    --app-hover-bg: rgba(255, 255, 255, 0.2);

    --startmenu-bg: rgba(51, 51, 51, 0.7);
    --startmenu-hover-bg: #444;
    --startmenu-text: white;

    --window-bg: #f0f8ff;
    --window-border: #000;
    --window-title-bg: #7c7cff;
    --window-inactive-title-bg: #6060c5;
    --window-content-bg: #282828;
}

.light {
    --text: #000;
    --taskbar-bg: #e0e0e0;
    --taskbar-section-bg: #c8c8c8;
    --taskbar-text: #000;

    --app-hover-bg: rgba(0, 0, 0, 0.1);

    --startmenu-bg: rgba(255, 255, 255, 0.7);
    --startmenu-hover-bg: #ddd;
    --startmenu-text: #000;

    --window-bg: #ffffff;
    --window-border: #000;
    --window-title-bg: #c0d8ff;
    --window-inactive-title-bg: #a0b8e0;
    --window-content-bg: #f5f5f5;
}

/*--------------------------------------*/

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: Arial, sans-serif;
    overflow: hidden; 
    user-select: none;
}

.desktop {
    background-color: #282828;
    background-image: url(../images/wallpaper1.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: calc(100vh - 40px);
    position: relative;
}

.taskbar {
    background-color: var(--taskbar-bg);
    height: 40px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.taskbar .start {
    width: 100px;
    height: 100%;
    background-color: var(--taskbar-section-bg);
    color: var(--taskbar-text);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.taskbar .time {
    width: 150px;
    height: 100%;
    background-color: var(--taskbar-section-bg);
    color: var(--taskbar-text);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop .apps {
    position: absolute;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 60px);
}

.desktop .apps .app {
    width: 90px;
    height: 90px;
    text-align: center;
    margin: 15px;
    cursor: pointer;
    border-radius: 7px;
}

.desktop .apps .app:hover {
    background-color: var(--app-hover-bg);
}

.desktop .apps .app img{
    width: 48px;
    height: 48px;
    border-radius: 3px;
}

.desktop .apps .app .appName {
    font-size: 16px;
    color: var(--text);
}

.startMenu {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 230px;
    height: 350px;
    background-color: var(--startmenu-bg);
    color: var(--startmenu-text);
    padding: 10px;
    display: none;
    backdrop-filter: blur(10px);
    z-index: 999998;
}

.startMenu .menuItem {
    padding: 5px;
    cursor: pointer;
    display: flex;
}

.startMenu .menuItem img {
    width: 20px;
    height: 20px;
    padding-right: 8px;
}

.startMenu .menuItem:hover {
    background-color: var(--startmenu-hover-bg);
}

.startMenu.visible {
    display: block;
}

.window {
    position: absolute;
    background-color: var(--window-bg);
    display: flex;
    flex-direction: column;
    border: 3px solid var(--window-border);
    border-radius: 2px;
    box-sizing: border-box;
}

.window .titleBar {
    height: 30px;
    background-color: var(--window-title-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    flex-shrink: 0;
    cursor: move;
}

.window .windowContent {
    flex: 1;
    border-top: 3px solid var(--window-border);
    background-color: var(--window-content-bg);
    min-height: 0px;
    min-width: 0px;
}

.window .windowContent iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.window .controls {
    display: flex;
    gap: 5px;
}

.window .controls:hover {
    cursor: pointer;
}

.window .titleBar .icon {
    display: block;
    width: 25px;
    height: 25px;
}

.window.inactive {
    opacity: 0.8;
}

.window.maximized {
    border-radius: 0;
    border: none;
}

.window.inactive .titleBar {
    background-color: var(--window-inactive-title-bg);
}

#dragOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    background-color: transparent;
    cursor: move;
}

.focusOverlay {
    position: absolute;
    width: 100%;
    height: calc(100% - 32px);
    z-index: 1;
    background: transparent;
    pointer-events: auto;
    display: none;
}
