﻿      @import url("https://fonts.googleapis.com/css2?family=Tahoma:wght@400;700&display=swap");

      :root {
        --xp-blue: #245edb;
        --xp-blue-dark: #0831d9;
        --xp-green: #3c813f;
        --xp-orange: #f47b20;
        --xp-taskbar: linear-gradient(
          to bottom,
          #245edb 0%,
          #3f8cf3 9%,
          #245edb 18%,
          #245edb 92%,
          #333 100%
        );
        --xp-window-header: linear-gradient(
          to bottom,
          #0058e6 0%,
          #3a93ff 10%,
          #0058e6 20%,
          #0058e6 90%,
          #0036a6 100%
        );
      }

      body {
        font-family: "Tahoma", sans-serif;
        overflow: hidden;
        background-color: #000;
        user-select: none;
        margin: 0;
      }

      /* Login Screen Styles */
      #login-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #5a7edc;
        display: flex;
        flex-direction: column;
        z-index: 10000;
        transition: opacity 0.8s ease-in-out;
      }

      .login-top,
      .login-bottom {
        height: clamp(64px, 12vh, 120px);
        background: #003399;
        display: flex;
        align-items: center;
        padding: 0 clamp(16px, 5vw, 40px);
      }

      .login-top {
        border-bottom: 2px solid #ffffff44;
      }
      .login-bottom {
        border-top: 2px solid #ffffff44;
        margin-top: auto;
        justify-content: space-between;
      }

      .login-middle {
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(
          to right,
          #5a7edc 0%,
          #7da2f4 50%,
          #5a7edc 100%
        );
        border-top: 1px solid #ffffff22;
        border-bottom: 1px solid #ffffff22;
      }

      .login-panel {
        display: flex;
        width: min(800px, 92vw);
        height: min(400px, 52vh);
      }

      .login-left {
        width: 45%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        padding-right: clamp(16px, 5vw, 50px);
        border-right: 2px solid #ffffff66;
        color: white;
        text-align: right;
      }

      .login-right {
        width: 55%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-left: clamp(16px, 5vw, 50px);
      }

      .user-row {
        display: flex;
        align-items: center;
        padding: 10px;
        cursor: pointer;
        border: 2px solid transparent;
        border-radius: 6px;
        transition: all 0.2s;
        color: white;
      }

      .user-row:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
      }

      .user-row.selected {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.5);
      }

      .user-avatar {
        width: clamp(40px, 7vw, 54px);
        height: clamp(40px, 7vw, 54px);
        border: 2px solid #fff;
        border-radius: 4px;
        margin-right: 15px;
        background: white;
      }

      .password-input {
        margin-top: 10px;
        padding: 2px 5px;
        border: 1px solid #003399;
        width: 150px;
        font-size: 14px;
        outline: none;
      }

      .login-btn {
        background: #3c813f;
        border: 1px solid #fff;
        color: white;
        padding: 0 5px;
        cursor: pointer;
        margin-left: 5px;
        border-radius: 3px;
      }

      .login-btn:hover {
        background: #4caf50;
      }

      /* Desktop Styles */
      .desktop {
        width: 100vw;
        height: 100vh;
        background: url("https://upload.wikimedia.org/wikipedia/en/2/27/Bliss_%28Windows_XP%29.png")
          no-repeat center center fixed;
        background-size: cover;
        position: relative;
        opacity: 0;
        transition:
          opacity 1s,
          filter 0.5s;
      }

      .desktop.visible {
        opacity: 1;
      }
      .desktop.grayscale {
        filter: grayscale(100%) brightness(50%);
      }

      /* Taskbar */
      .taskbar {
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 30px;
        background: var(--xp-taskbar);
        display: flex;
        align-items: center;
        z-index: 5000;
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
      }

      .start-button {
        height: 100%;
        padding: 0 15px;
        background: linear-gradient(
          to bottom,
          #388e3c 0%,
          #4caf50 10%,
          #388e3c 20%,
          #388e3c 90%,
          #1b5e20 100%
        );
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
        color: white;
        font-weight: bold;
        font-style: italic;
        font-size: 16px;
        display: flex;
        align-items: center;
        cursor: pointer;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
        text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
      }

      .start-button:hover {
        filter: brightness(1.1);
      }

      .system-tray {
        margin-left: auto;
        height: 100%;
        background: #09adff;
        background: linear-gradient(to bottom, #09adff 0%, #0090f7 100%);
        border-left: 1px solid #0831d9;
        padding: 0 10px;
        color: white;
        display: flex;
        align-items: center;
        font-size: 11px;
      }

      /* Start Menu */
      .start-menu {
        position: absolute;
        bottom: 30px;
        left: 0;
        width: 380px;
        background: white;
        border-top-left-radius: 6px;
        border-top-right-radius: 6px;
        display: none;
        flex-direction: column;
        box-shadow: 2px -2px 10px rgba(0, 0, 0, 0.3);
        z-index: 4999;
        overflow: hidden;
      }

      .start-menu-header {
        background: linear-gradient(to bottom, #1d5cc5 0%, #4282d6 100%);
        padding: 10px;
        display: flex;
        align-items: center;
        color: white;
        border-bottom: 1px solid #1038a3;
      }

      .start-menu-avatar {
        width: 42px;
        height: 42px;
        border: 2px solid #fff;
        border-radius: 4px;
        background: #fff;
        margin-right: 10px;
      }

      .start-menu-body {
        display: flex;
        height: 400px;
      }

      .start-left {
        width: 50%;
        background: white;
        padding: 10px 0;
        border-right: 1px solid #d3d3d3;
      }

      .start-right {
        width: 50%;
        background: #dbeafe;
        padding: 10px 0;
      }

      .menu-item {
        padding: 5px 15px;
        display: flex;
        align-items: center;
        font-size: 11px;
        cursor: pointer;
      }

      .menu-item:hover {
        background: #316ac5;
        color: white;
      }

      .start-footer {
        background: linear-gradient(to bottom, #4282d6 0%, #1d5cc5 100%);
        padding: 8px;
        display: flex;
        justify-content: flex-end;
      }

      /* Windows */
      .window {
        position: absolute;
        min-width: 300px;
        min-height: 200px;
        background: #ece9d8;
        border: 3px solid var(--xp-blue);
        border-radius: 8px 8px 0 0;
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
        z-index: 10;
        display: flex;
        flex-direction: column;
      }

      .window-header {
        background: var(--xp-window-header);
        height: 28px;
        display: flex;
        align-items: center;
        padding: 0 5px;
        color: white;
        font-weight: bold;
        font-size: 12px;
        cursor: move;
        border-radius: 5px 5px 0 0;
      }

      .window-controls {
        margin-left: auto;
        display: flex;
        gap: 2px;
      }

      .win-btn {
        width: 21px;
        height: 21px;
        border: 1px solid white;
        border-radius: 3px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        cursor: pointer;
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
      }

      .btn-min {
        background: #3c813f;
      }
      .btn-max {
        background: #2151d1;
      }
      .btn-close {
        background: #e04343;
        margin-left: 2px;
      }

      .window-body {
        padding: 10px;
        flex-grow: 1;
        background: white;
        margin: 2px;
        overflow: auto;
        display: flex;
        flex-direction: column;
      }

      .window-fullscreen {
        width: 100vw !important;
        height: calc(100vh - 30px) !important;
        border-radius: 0;
      }

      .window-fullscreen .window-header {
        border-radius: 0;
      }

      .window-fullscreen .window-body {
        margin: 0;
        padding: 0;
      }

      /* Icons */
      .desktop-icons {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        height: calc(100% - 40px);
        padding: 10px;
        gap: 15px;
      }

      .icon {
        width: 75px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        color: white;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        cursor: pointer;
        padding: 5px;
        border: 1px solid transparent;
      }

      .icon:hover {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
      }

      .icon img {
        width: 32px;
        height: 32px;
        margin-bottom: 4px;
      }

      .icon span {
        font-size: 11px;
      }

      .hidden {
        display: none !important;
      }

      /* Notepad specific */
      .notepad-textarea {
        width: 100%;
        height: 100%;
        flex-grow: 1;
        outline: none;
        resize: none;
        font-family: "Courier New", Courier, monospace;
        font-size: 13px;
        padding: 2px;
        border: none;
      }

      .notepad-menu {
        display: flex;
        gap: 10px;
        font-size: 11px;
        padding: 2px 5px;
        border-bottom: 1px solid #d3d3d3;
        background: #ece9d8;
      }

      /* Minesweeper Specific Styling */
      .minesweeper-container {
        background-color: #bdbdbd;
        padding: 10px;
        border: 3px solid #eee;
        border-right-color: #7b7b7b;
        border-bottom-color: #7b7b7b;
        display: inline-block;
        margin: auto;
      }

      .minesweeper-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #bdbdbd;
        border: 2px solid #7b7b7b;
        border-right-color: #eee;
        border-bottom-color: #eee;
        padding: 5px;
        margin-bottom: 10px;
      }

      .minesweeper-lcd {
        background-color: black;
        color: red;
        font-family: "Courier New", Courier, monospace;
        font-size: 20px;
        padding: 2px 5px;
        border: 1px solid #7b7b7b;
        min-width: 40px;
        text-align: center;
      }

      .minesweeper-face {
        width: 26px;
        height: 26px;
        background: #bdbdbd;
        border: 2px solid #eee;
        border-right-color: #7b7b7b;
        border-bottom-color: #7b7b7b;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 18px;
      }

      .minesweeper-face:active {
        border: 2px solid #7b7b7b;
        border-right-color: #eee;
        border-bottom-color: #eee;
      }

      .minesweeper-grid {
        display: grid;
        grid-template-columns: repeat(9, 20px);
        border: 3px solid #7b7b7b;
        border-right-color: #eee;
        border-bottom-color: #eee;
      }

      .ms-cell {
        width: 20px;
        height: 20px;
        background-color: #bdbdbd;
        border: 2px solid #eee;
        border-right-color: #7b7b7b;
        border-bottom-color: #7b7b7b;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 14px;
        cursor: default;
      }

      .ms-cell.revealed {
        border: 1px solid #7b7b7b;
        background-color: #bdbdbd;
      }

      .ms-cell.mine {
        background-color: red !important;
      }

      .ms-cell.flagged::after {
        content: "­ƒÜ®";
        font-size: 10px;
      }

      /* Shutdown Dialog Styles */
      #shutdown-dialog {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 320px;
        background: #003399;
        border: 1px solid #fff;
        border-radius: 4px;
        z-index: 11000;
        display: none;
        flex-direction: column;
        color: white;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
      }

      .shutdown-header {
        padding: 10px;
        font-weight: bold;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
      }

      .shutdown-body {
        background: linear-gradient(to right, #5a7edc, #7da2f4, #5a7edc);
        padding: 20px;
        display: flex;
        justify-content: space-around;
      }

      .shutdown-opt {
        display: flex;
        flex-direction: column;
        align-items: center;
        cursor: pointer;
        transition: transform 0.1s;
      }

      .shutdown-opt:hover {
        transform: scale(1.1);
      }

      .shutdown-icon {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #fff;
        margin-bottom: 5px;
      }

      .opt-standby {
        background: #ffcc00;
      }
      .opt-turnoff {
        background: #cc0000;
      }
      .opt-restart {
        background: #33cc33;
      }

      .shutdown-footer {
        padding: 10px;
        display: flex;
        justify-content: flex-end;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
      }

      /* Transitions */
      #shutdown-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #003399;
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: white;
        z-index: 12000;
      }

      /* BIOS Screen Styles */
      #bios-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #000;
        color: #fff;
        font-family: "Courier New", Courier, monospace;
        padding: 20px;
        font-size: 14px;
        line-height: 1.2;
        z-index: 13000;
        display: none;
        flex-direction: column;
        overflow: hidden;
      }

      .bios-cursor {
        display: inline-block;
        width: 10px;
        height: 2px;
        background: #fff;
        animation: blink 0.5s infinite;
      }

      @keyframes blink {
        0% {
          opacity: 0;
        }
        50% {
          opacity: 1;
        }
        100% {
          opacity: 0;
        }
      }

      .num-1 {
        color: blue;
      }
      .num-2 {
        color: green;
      }
      .num-3 {
        color: red;
      }
      .num-4 {
        color: darkblue;
      }
      .num-5 {
        color: darkred;
      }
      .num-6 {
        color: darkcyan;
      }
      .num-7 {
        color: black;
      }
      .num-8 {
        color: gray;
      }
    </style>
