/* =========================================================
   SECTION 1 — GENERAL PAGE & DESKTOP BACKGROUND
   ========================================================= */

body {
    margin: 0;
    font-family: Tahoma, Verdana, sans-serif;
    user-select: none;
}

.desktop {
    width: 100vw;
    height: 100vh;
    background: url("https://wallpapercrafter.com/desktop/20985-green-grass-field-nature-4k.jpg");
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
}


/* XP Mouse Cursor */
body, .desktop, .icon, .window, .taskbar, .start-menu {
    cursor: url('https://cur.cursors-4u.net/cursors/cur-2/cur117.cur'), default;
}

/* =========================================================
   SECTION 2 — DESKTOP ICONS
   ========================================================= */

.icon {
    width: 80px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
}

.icon img {
    width: 64px;
    height: 64px;
    display: block;
    margin: 0 auto;
}

.icon:hover {
    transform: scale(1.15);
    filter: brightness(1.25);
}

.icon span {
    text-shadow: 2px 2px 3px black;
    font-size: 14px;
}



/* =========================================================
   SECTION 3 — WINDOWS (General Styling)
   ========================================================= */

.window {
    position: absolute;
    top: 120px;
    left: 180px;
    width: 300px;
    background: #ececec;
    border: 2px solid #3a3a3a;
    border-radius: 3px;
    display: none;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.4);
}

.window-header {
    background: #1a4bb8;
    color: white;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    cursor: grab;
}

.window-header:active {
    cursor: grabbing;
}

.window-btns button {
    width: 22px;
    height: 22px;
    border: none;
    margin-left: 2px;
    cursor: pointer;
    font-weight: bold;
}

/* XP Classic Window Borders */
.window {
    border: 3px solid #0a246a;
    border-top-color: #3a6ea5;
    border-left-color: #3a6ea5;
    border-radius: 0;
}

.window-header {
    background: linear-gradient(#3a6ea5, #1a4bb8);
    border-bottom: 1px solid #0a246a;
}

.window-btns button:nth-child(1) { background: #d7d7d7; }
.window-btns button:nth-child(2) { background: #d7d7d7; }
.window-btns .close { background: red; color: white; }

.window-body {
    padding: 10px;
}



/* =========================================================
   SECTION 4 — TASKBAR & START BUTTON
   ========================================================= */

.taskbar {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(#245edc, #1a4bb8);
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-sizing: border-box;
}

.start-button {
    background: linear-gradient(#4bb34b, #2e8b2e);
    border-radius: 5px;
    padding: 5px 15px;
    color: white;
    font-weight: bold;
    border: 1px solid #1f5f1f;
    cursor: pointer;
    box-shadow: 2px 2px 4px black;
}

#taskButtons {
    display: flex;
    gap: 6px;
    margin-left: 10px;
}

.taskbar-btn {
    background: #ececec;
    border: 1px solid #333;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
}

.taskbar-btn:hover {
    background: #ffffff;
}

.taskbar-time {
    margin-left: auto;
    color: white;
    font-size: 14px;
}



/* =========================================================
   SECTION 5 — START MENU
   ========================================================= */

.start-menu {
    width: 200px;
    background: #f0f0f0;
    border: 2px solid #3a3a3a;
    position: absolute;
    bottom: 40px;
    left: 0;
    display: none;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.4);
}

.start-menu h3 {
    background: #1a4bb8;
    color: white;
    padding: 6px;
    margin: 0;
    font-size: 16px;
}

.start-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.start-menu li {
    padding: 8px 10px;
    cursor: pointer;
}

.start-menu li:hover {
    background: #d0d0d0;
}



/* =========================================================
   SECTION 6 — SHUTDOWN DIALOG
   ========================================================= */

.shutdown-window {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
}

.shutdown-box {
    background: white;
    padding: 20px;
    border-radius: 6px;
    width: 260px;
    text-align: center;
    border: 2px solid #333;
}

.shutdown-box button {
    margin: 5px;
    padding: 6px 10px;
    cursor: pointer;
}
/* =========================================================
   SECTION 9 — XP SPLASH SCREEN
   ========================================================= */

.splash {
    position: fixed;
    inset: 0;
    background: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.splash-logo {
    width: 320px;
    margin-bottom: 40px;
}

.splash-loading {
    width: 160px;
    height: 12px;
    border: 2px solid #0047c0;
    position: relative;
}

.splash-loading::after {
    content: "";
    position: absolute;
    inset: 1px;
    background: #245edc;
    animation: splashLoad 3s linear forwards;
}

@keyframes splashLoad {
    from { width: 0; }
    to { width: 100%; }
}

/* =========================================================
   SECTION 11 — DESKTOP CONTEXT MENU
   ========================================================= */

.context-menu {
    position: fixed;
    width: 150px;
    background: #f0f0f0;
    border: 2px solid #3a3a3a;
    display: none;
    z-index: 9999;
}

.context-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.context-menu li {
    padding: 8px;
    cursor: pointer;
}

.context-menu li:hover {
    background: #d0d0d0;
}

/* =========================================================
   SECTION 12 — LOGIN SCREEN
   ========================================================= */
.login-screen {
    position: fixed;
    inset: 0;
    background: #0047c0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    color: white;
    font-family: Tahoma, sans-serif;
}

.login-box {
    background: #c0c0c0;
    padding: 30px;
    border: 3px solid #1a4bb8;
    border-radius: 5px;
    text-align: center;
    position: relative;
}

.login-box input {
    display: block;
    width: 80%;
    margin: 15px auto;
    padding: 8px;
    font-size: 16px;
}

.login-box button {
    padding: 8px 15px;
    font-size: 16px;
    cursor: pointer;
}

/* Sticky Note */
.sticky-note {
    position: absolute;
    top: -30px;
    right: -40px;
    width: 120px;
    background: #fffa65;
    color: black;
    padding: 5px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #ccc;
    transform: rotate(-5deg);
}

/* =========================================================
   SECTION 13 — POPUP WINDOWS
   ========================================================= */
.popup-window {
    position: absolute;
    width: 280px;
    background: #c0c0c0;
    border: 3px solid #1a4bb8;
    z-index: 10001;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.5);
}

.popup-header {
    background: #1a4bb8;
    color: white;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    cursor: grab;
}

.popup-body {
    padding: 10px;
}

.popup-header button {
    background: red;
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* =========================================================
   SECTION 14 — START MENU HIGHLIGHT ANIMATION
   ========================================================= */
.start-menu li:hover {
    background: linear-gradient(to right, #1a4bb8, #245edc);
    color: white;
    transition: background 0.2s, color 0.2s;
}

/* =========================================================
   SECTION 15 — WINDOW RESIZE HANDLE
   ========================================================= */
.window {
    resize: both;
    overflow: auto;
}

/* =========================================================
   SECTION 16 — SYSTEM TRAY
   ========================================================= */
.system-tray {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 30px;
    background: #c0c0c0;
    display: flex;
    align-items: center;
    padding: 0 5px;
    border-top: 2px solid #3a6ea5;
    border-left: 2px solid #3a6ea5;
    z-index: 9999;
    font-family: Tahoma, sans-serif;
    font-size: 14px;
}

#trayIcons {
    display: flex;
    gap: 5px;
    margin-right: 10px;
}

.tray-icon {
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#trayClock {
    min-width: 60px;
    text-align: right;
}

/* =========================================================
   SECTION 17 — ANIMATED DESKTOP ICONS
   ========================================================= */
.icon {
    transition: transform 0.2s;
}

.icon:hover {
    transform: scale(1.1) rotate(-5deg);
}

/* =========================================================
   SECTION 18 — ACTIVE DESKTOP ANIMATION
   ========================================================= */
.desktop {
    background: url('https://i.imgur.com/ZfZ4hJb.jpg') no-repeat center center fixed;
    background-size: cover;
    animation: bgMove 30s linear infinite alternate;
}

@keyframes bgMove {
    0% { background-position: center top; }
    100% { background-position: center bottom; }
}

/* =========================================================
   SECTION 19 — WINDOW SHADOWS
   ========================================================= */
.window {
    box-shadow: 5px 5px 20px rgba(0,0,0,0.5);
}


