/* ============================================================
   Windows 95 Classroom Desktop — styles.css
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    background-color: #008080; /* Classic Win95 teal */
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    user-select: none;
    cursor: default;
    background-image:url('https://cdn.arstechnica.net/wp-content/uploads/2023/06/bliss-update.jpg');
}

/* === DESKTOP === */
#desktop {
    position: relative;
    width: 100%;
    height: calc(100vh - 28px); /* Leave room for taskbar */
    overflow: hidden;
    padding: 8px 4px;
}

/* === ICON GRID === */
/*
 * Icons flow top-to-bottom, then into the next column.
 * We use a CSS column layout to mimic real Win95 desktop behavior.
 */
#icon-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    height: 100%;
    gap: 0;
}

/* === DESKTOP ICON === */
.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 80px;
    height: 72px;
    padding: 4px;
    margin: 2px;
    text-decoration: none;
    color: white;
    text-shadow: 1px 1px 1px #000000;
    border: 1px solid transparent;
    cursor: default;
    overflow: hidden;
}

.desktop-icon:hover {
    border: 1px dotted white;
}

.desktop-icon.selected {
    background-color: #000080;
    border: 1px dotted white;
}

.desktop-icon.selected .icon-label {
    background-color: #000080;
    color: white;
}

/* Icon image wrapper */
.icon-img-wrapper {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* The actual icon image — a hand-drawn Win95-style pixel SVG via inline data URI */
.icon-img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

/* Icon label text */
.icon-label {
    font-size: 11px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    color: white;
    text-shadow: 1px 1px 0px #000;
    text-align: center;
    line-height: 1.2;
    max-width: 76px;
    word-break: break-word;
    white-space: normal;
}

/* === TASKBAR === */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 28px;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 2px 4px;
    gap: 4px;
    z-index: 9999;
}

/* Start button */
#start-button {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 6px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    cursor: pointer;
    white-space: nowrap;
}

#start-button:active {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.start-logo {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}

/* Taskbar separator */
.taskbar-separator {
    width: 2px;
    height: 22px;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    flex-shrink: 0;
}

/* Taskbar middle (empty space for open windows) */
#taskbar-middle {
    flex: 1;
}

/* Clock area */
#taskbar-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    min-width: 70px;
    padding: 0 8px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    background-color: #c0c0c0;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
}

/* === WELCOME POPUP WINDOW === */
#welcome-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    z-index: 10000;
    box-shadow: 2px 2px 0px #000000;
}

#welcome-window.hidden {
    display: none;
}

/* Title bar */
.win-title-bar {
    background: linear-gradient(to right, #000080, #1084d0);
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    cursor: move;
}

.win-title-text {
    color: white;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
}

.win-title-icon {
    width: 14px;
    height: 14px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

/* Title bar buttons */
.win-title-buttons {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.win-btn {
    width: 16px;
    height: 14px;
    background-color: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
    font-family: "MS Sans Serif", Arial, sans-serif;
    cursor: pointer;
    line-height: 1;
}

.win-btn:active {
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
}

/* Window body */
.win-body {
    padding: 12px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    color: #000000;
    line-height: 1.5;
}

.win-body p {
    margin-bottom: 8px;
}

.win-body-buttons {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.win-ok-btn {
    width: 75px;
    height: 23px;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
}

.win-ok-btn:active {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

/* Overlay behind welcome window */
#overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
}

#overlay.visible {
    display: block;
}
