:root {
    --win98-grey: #c0c0c0;
    --win98-white: #ffffff;
    --win98-dark-grey: #808080;
    --win98-black: #000000;
    --win98-blue: #000080;
    --win98-teal: #008080;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
}

body {
    background: var(--win98-teal) url('assets/win98wallpaper.jpg');
    background-size: cover;
    font-family: 'Tahoma', 'Verdana', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- Desktop --- */
.desktop {
    flex: 1;
    position: relative;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    grid-template-rows: repeat(auto-fill, 100px);
    gap: 20px;
    align-content: start;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    text-decoration: none;
    font-size: 11px;
    cursor: default;
}

.desktop-icon img, .desktop-icon .icon-placeholder {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
}

.desktop-icon:hover span {
    background-color: var(--win98-blue);
}

.desktop-icon span {
    padding: 2px 4px;
}

/* --- Windows --- */
.window {
    position: absolute;
    background-color: var(--win98-grey);
    border: 2px solid;
    border-color: var(--win98-white) var(--win98-dark-grey) var(--win98-dark-grey) var(--win98-white);
    box-shadow: 1px 1px 0 0 var(--win98-black);
    min-width: 400px;
    padding: 2px;
    z-index: 10;
}

.window.main-window {
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
}

.title-bar {
    background: linear-gradient(90deg, var(--win98-blue), #1084d0);
    padding: 3px 2px 3px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.title-bar-text {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.win-btn {
    width: 16px;
    height: 14px;
    background-color: var(--win98-grey);
    border: 1px solid;
    border-color: var(--win98-white) var(--win98-dark-grey) var(--win98-dark-grey) var(--win98-white);
    box-shadow: inset 1px 1px 0 0 rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: black;
    cursor: default;
    font-weight: bold;
}

.win-btn:active {
    border-color: var(--win98-dark-grey) var(--win98-white) var(--win98-white) var(--win98-dark-grey);
    box-shadow: none;
    padding: 1px 0 0 1px;
}

.window-content {
    padding: 20px;
    background-color: var(--win98-grey);
    color: black;
}

.welcome-text {
    font-size: 14px;
    margin-bottom: 20px;
}

/* --- Taskbar --- */
.taskbar {
    height: 28px;
    background-color: var(--win98-grey);
    border-top: 2px solid var(--win98-white);
    display: flex;
    align-items: center;
    padding: 2px;
    z-index: 100;
}

.start-button {
    height: 22px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    font-size: 11px;
    border: 2px solid;
    border-color: var(--win98-white) var(--win98-dark-grey) var(--win98-dark-grey) var(--win98-white);
    box-shadow: 1px 1px 0 0 var(--win98-black);
    cursor: default;
}

.start-button img {
    width: 16px;
    height: 16px;
}

.start-button:active {
    border-color: var(--win98-dark-grey) var(--win98-white) var(--win98-white) var(--win98-dark-grey);
    box-shadow: none;
    padding: 1px 4px 0 6px;
}

.taskbar-divider {
    width: 2px;
    height: 20px;
    background-color: var(--win98-dark-grey);
    border-right: 1px solid var(--win98-white);
    margin: 0 5px;
}

.task-item {
    height: 22px;
    background-color: var(--win98-grey);
    border: 2px solid;
    border-color: var(--win98-dark-grey) var(--win98-white) var(--win98-white) var(--win98-dark-grey);
    padding: 0 10px;
    display: flex;
    align-items: center;
    font-size: 11px;
    min-width: 100px;
}

.systray {
    margin-left: auto;
    height: 22px;
    border: 2px solid;
    border-color: var(--win98-dark-grey) var(--win98-white) var(--win98-white) var(--win98-dark-grey);
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    gap: 10px;
}

/* --- Buttons --- */
.classic-btn {
    padding: 5px 20px;
    background-color: var(--win98-grey);
    border: 2px solid;
    border-color: var(--win98-white) var(--win98-dark-grey) var(--win98-dark-grey) var(--win98-white);
    box-shadow: 1px 1px 0 0 var(--win98-black);
    font-family: inherit;
    font-size: 12px;
    cursor: default;
}

.classic-btn:active {
    border-color: var(--win98-dark-grey) var(--win98-white) var(--win98-white) var(--win98-dark-grey);
    box-shadow: none;
}

/* --- Icons SVGs --- */
.icon-svg {
    fill: white;
}

/* Scrollbar retro */
::-webkit-scrollbar {
    width: 16px;
}
::-webkit-scrollbar-track {
    background: url('assets/win98wallpaper.jpg');
}
::-webkit-scrollbar-thumb {
    background: var(--win98-grey);
    border: 2px solid;
    border-color: var(--win98-white) var(--win98-dark-grey) var(--win98-dark-grey) var(--win98-white);
    box-shadow: 1px 1px 0 0 var(--win98-black);
}

/* --- Notepad Window --- */
.notepad-window {
    width: 350px;
    height: 300px;
    top: 35%;
    left: 55%;
    display: none;
    flex-direction: column;
}

.notepad-content {
    background: white;
    flex: 1;
    border: 1px solid var(--win98-dark-grey);
    padding: 2px;
    display: flex;
    flex-direction: column;
}

.notepad-textarea {
    width: 100%;
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    padding: 5px;
    white-space: pre-wrap;
    background: white;
    color: black;
}

.notepad-menu {
    display: flex;
    gap: 10px;
    padding: 2px 5px;
    font-size: 11px;
    border-bottom: 1px solid var(--win98-dark-grey);
    background: var(--win98-grey);
}
