@font-face {
    font-family: "w95";
    src: url("../fonts/W95F.otf");
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "w95";
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: #008080;
}

#desktop {
    position: relative;
    width: 100vw;
    height: calc(100vh - 36px);
    overflow: hidden;
}

/* Window Container */
.window {
    position: absolute;
    top: 50px;
    left: 50px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #404040 #404040 #dfdfdf;
    box-shadow: 2px 2px 0 #000000;
    min-width: 320px;
    z-index: 1;
}

.window[hidden] {
    display: none !important;
}

.title-bar {
    background: #000080;
    color: #ffffff;
    padding: 3px 6px;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.title-bar-buttons {
    display: flex;
    gap: 2px;
}

.title-bar-button {
    background: #c0c0c0;
    border: 2px solid;
    padding: 1px;
    border-color: #dfdfdf #404040 #404040 #dfdfdf;
    width: 1.5rem;
    height: fit-content;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000000;
    cursor: pointer;
}

.title-bar-button:active {
    border-color: #404040 #ffffff #ffffff #404040;
}

.window-body {
    padding: 12px;
}

.explorer-desc {
    margin-bottom: 12px;
    font-size: 14px;
}

/* Win95 Buttons */
.btn, .return-btn, .reset {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: 1px 1px 0 #000000;
    padding: 4px 10px;
    font-size: 1rem;
    color: #000000;
    cursor: pointer;
}

.btn:active, .return-btn:active, .reset:active {
    border-color: #404040 #ffffff #ffffff #404040;
    box-shadow: none;
    outline: none;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4vh;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 2px 4px;
    z-index: 1000;
}

/* Taskbar Items */
.taskbar-items {
    height: 100%;
    display: flex;
    flex-direction: row;
    width: 100%;
}

.taskbar-item-btn {
    margin-left: 4px;
    width: 15vw;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: 1px 1px 0 #000000;
    cursor: pointer;

    &:active {
        border-color: #404040 #ffffff #ffffff #404040;
        box-shadow: none;
    }
}

/* Start Menu Button */
.start-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: 1px 1px 0 #000000;
    font-size: 1rem;
    cursor: pointer;
    height: 100%;
    width: 5vw;
    background-image: url("../img/Start Button.png");
    background-position: left;
    background-size: 50px;
    background-repeat: no-repeat;
    & :active {
        border-color: #404040 #ffffff #ffffff #404040;
        box-shadow: none;
    }
}

.start-menu-btn:active,
.start-menu-btn[aria-expanded="true"] {
    border-color: #404040 #ffffff #ffffff #404040;
    box-shadow: inset 1px 1px 0 #000000;
}

/* Start Menu Popup */
.start-menu {
    position: absolute;
    bottom: 4vh;
    left: 4px;
    display: flex;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: 2px 2px 0 #000000;
    min-width: 200px;
    z-index: 1001;
}

.start-menu[hidden] {
    display: none;
}

.start-menu-sidebar {
    background: #7f7f7f;
    width: 28px;
    display: flex;
    align-items: flex-end;
    padding: 8px 4px;
}

.start-menu-sidebar span {
    transform: rotate(-90deg);
    transform-origin: bottom left;
    white-space: nowrap;
    color: #c0c0c0;
    font-size: 15px;
    letter-spacing: 1px;
}

.start-menu-sidebar b {
    color: #ffffff;
}

.start-menu-apps {
    list-style: none;
    flex: 1;
    padding: 3px;
    display: flex;
    flex-direction: column;
}

.start-menu-item {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: none;
    border: none;
    font-size: 13px;
    cursor: pointer;
}

.start-menu-item:hover {
    background-color: #000080;
    color: #ffffff;
}

.menu-separator {
    height: 1px;
    background: #808080;
    border-bottom: 1px solid #ffffff;
    margin: 4px 2px;
}
/* Desktop Icons */
.desktop-icon {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: grab;
    text-align: center;
    font-size: 14px;
    user-select: none;
    z-index: 5;
    & img {
        width: 40px;
        height: 40px;
    }
}

.desktop-icon:active {
    cursor: grabbing;
}

.desktop-icon .icon-img {
    font-size: 36px;
    margin-bottom: 4px;
    pointer-events: none;
}

.desktop-icon span {
    background: transparent;
    padding: 2px 4px;
    pointer-events: none;
}

.desktop-icon:focus span, 
.desktop-icon:active span {
    background: #000080;
    color: #ffffff;
    border: 1px dotted #ffffff;
}

/* File Manager Layout */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 15px;
    min-width: 250px;
    min-height: 150px;
    background: #ffffff;
    border: 2px inset #c0c0c0;
    padding: 10px;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    
    & img {
        width: 32px;
        height: 32px;
        pointer-events: none;
    }
}

.file-item .icon-img {
    font-size: 32px;
    margin-bottom: 5px;
}

.file-item:hover span {
    background: #000080;
    color: #ffffff;
}