body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
}

/* --- LOADING SCREEN --- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -10vh;
    /* Shift slightly up like the real one */
}

.loading-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: white;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    margin-bottom: 60px;
}

.ms-logo-text {
    font-size: 24px;
    font-weight: normal;
    font-style: italic;
    letter-spacing: 1px;
    margin-bottom: -5px;
    margin-left: 5px;
}

.xp-logo-text {
    font-size: 72px;
    font-weight: bold;
    font-style: italic;
    letter-spacing: -2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(to bottom, #ffffff 0%, #d4d0c8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-bar-container {
    width: 200px;
    height: 15px;
    border: 2px solid #b2b2b2;
    border-radius: 4px;
    padding: 2px;
    background-color: #000;
    position: relative;
    overflow: hidden;
}

.loading-bar {
    display: flex;
    gap: 2px;
    position: absolute;
    top: 2px;
    left: -40px;
    /* Start outside the left edge */
    height: 11px;
    animation: loadingAnim 2.5s infinite linear;
}

.loading-box {
    width: 8px;
    height: 11px;
    background: linear-gradient(to right, #245edb, #3f8cf3, #245edb);
    border-radius: 1px;
}

@keyframes loadingAnim {
    0% {
        left: -40px;
    }

    100% {
        left: 210px;
        /* Move past the right edge */
    }
}

/* ---------------------- */


#video-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1920px;
    height: 1080px;
    margin-left: -960px;
    margin-top: -540px;
    overflow: hidden;
    /* transform: scale(...) managed by script.js */
}

#bg-video,
#flicker-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: 1;
}

#flicker-video {
    z-index: 2;
    /* Needs to sit on top of bg-video when active */
}

/* This container will map the actual PC screen to the video */
#monitor-screen {
    z-index: 3;
    /* Increased z-index so it sits on top of everything */
    position: absolute;
    /* We'll calibrate these values: */
    top: 33.1%;
    left: 40.9%;
    width: 19%;
    height: 25.9%;
    z-index: 2;
    transform-origin: center center;
    /* initial flat transform */
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.99);

    background-image: url('bliss.jpeg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    /* Inner shadow for CRT feel */
    border-radius: 0px;
    /* Slight CRT curvature */

    /* Initially hidden for boot sequence */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
    /* To indicate it can be clicked to turn on */
}

#monitor-screen.powered-on {
    cursor: default;
}

/* Inside the screen */
.desktop {
    position: relative;
    width: 800px;
    height: 600px;
    transform-origin: top left;
    /* 
       For width: 19% of 1920 = 364.8px. Scale = 364.8 / 800 = 0.456
       For height: 25.9% of 1080 = 279.72px. Scale = 279.72 / 600 = 0.4662
    */
    transform: scaleX(0.456) scaleY(0.4662);
    pointer-events: none;
    /* Prevent interacting with apps while screen is off */
}

#monitor-screen.powered-on .desktop {
    pointer-events: auto;
}

.icon-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 15px;
    padding: 10px;
    height: calc(100% - 80px);
    /* Leave room at the bottom for the taskbar */
    box-sizing: border-box;
    width: 100%;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
    color: white;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    text-shadow: 1px 1px 2px black;
    width: 75px;
    word-break: break-word;
}

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

.desktop-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, #245edb 0%, #3f8cf3 9%, #245edb 18%, #245edb 92%, #333 100%);
    display: flex;
    align-items: center;
    padding: 0 4px;
    box-sizing: border-box;
    z-index: 9999;
}

.start-button {
    font-family: 'Trebuchet MS', 'Tahoma', sans-serif;
    font-weight: bold;
    font-style: italic;
    font-size: 14px;
    color: white;
    background: linear-gradient(to bottom, #4fbc77 0%, #3e9e3e 15%, #257e25 85%, #185a18 100%);
    background-color: #3e9e3e;
    border: 1px solid #144614;
    border-radius: 0 8px 8px 0;
    padding: 0 12px 0 6px;
    height: 26px;
    display: flex;
    align-items: center;
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.4), 1px 1px 3px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.taskbar-divider {
    width: 2px;
    height: 80%;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 6px;
}

.taskbar-tasks {
    flex-grow: 1;
    display: flex;
    gap: 4px;
}

.taskbar-task {
    background: #1d4bb8;
    color: white;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    border: 1px solid #133481;
    border-radius: 2px;
    padding: 2px 6px;
    height: 22px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.2);
}

.taskbar-task.active {
    background: #133481;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.taskbar-systray {
    margin-right: 10px;
    background: #0f8ddd;
    /* system tray color approx */
    height: 100%;
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0 5px;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.taskbar-systray img {
    height: 16px;
    cursor: pointer;
    margin-right: 8px;
}

.taskbar-time {
    color: white;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
}

.volume-panel {
    position: absolute;
    bottom: 30px;
    right: 5px;
    width: 60px;
    height: 150px;
    background-color: #d4d0c8;
    /* Classic win colors or white */
    border: 1px solid white;
    border-right-color: #808080;
    border-bottom-color: #808080;
    box-shadow: 1px 1px 2px #000;
    z-index: 9999999 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Tahoma', sans-serif;
    padding: 5px 0;
}

.volume-title {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 10px;
}

.volume-slider-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    width: 100%;
}

.volume-slider-container input[type=range] {
    writing-mode: bt-lr;
    /* IE */
    -webkit-appearance: slider-vertical;
    /* WebKit */
    appearance: slider-vertical;
    /* Standard */
    width: 20px;
    height: 80px;
}

.volume-mute {
    font-size: 11px;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.window {
    position: absolute;
    width: 400px;
    height: 350px;
    display: flex;
    flex-direction: column;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.window-body {
    flex-grow: 1;
    background: white;
    color: black;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    display: block;
    z-index: 10;
}

.resize-handle-n {
    top: -3px;
    left: 0;
    width: 100%;
    height: 6px;
    cursor: n-resize;
}

.resize-handle-e {
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    cursor: e-resize;
}

.resize-handle-s {
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 6px;
    cursor: s-resize;
}

.resize-handle-w {
    top: 0;
    left: -3px;
    width: 6px;
    height: 100%;
    cursor: w-resize;
}

.resize-handle-ne {
    top: -3px;
    right: -3px;
    width: 6px;
    height: 6px;
    cursor: ne-resize;
}

.resize-handle-nw {
    top: -3px;
    left: -3px;
    width: 6px;
    height: 6px;
    cursor: nw-resize;
}

.resize-handle-se {
    bottom: -3px;
    right: -3px;
    width: 6px;
    height: 6px;
    cursor: se-resize;
}

.resize-handle-sw {
    bottom: -3px;
    left: -3px;
    width: 6px;
    height: 6px;
    cursor: sw-resize;
}

.title-bar {
    flex-shrink: 0;
    cursor: default;
}

.title-bar-text {
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1;
}

.title-bar-text img {
    margin-right: 4px;
}

/* Start Menu */
.start-menu {
    position: absolute;
    bottom: 30px;
    /* Above taskbar */
    left: 0;
    width: 380px;
    height: 480px;
    background-color: white;
    border: 1px solid #1034a6;
    border-radius: 5px 5px 0 0;
    box-shadow: 2px -2px 5px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    font-family: 'Tahoma', sans-serif;
    overflow: hidden;
}

.start-menu-header {
    background: linear-gradient(to bottom, #1d4bb8 0%, #133481 100%);
    color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #ff8c00;
}

.start-menu-header img {
    width: 48px;
    height: 48px;
    border: 2px solid white;
    border-radius: 3px;
    margin-right: 10px;
}

.start-menu-header span {
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
}

.start-menu-body {
    flex-grow: 1;
    display: flex;
    background-color: white;
}

.start-menu-left {
    width: 60%;
    background-color: white;
    padding: 5px;
    display: flex;
    flex-direction: column;
}

.start-menu-right {
    width: 40%;
    background-color: #d3e5fa;
    border-left: 1px solid #aebfde;
    padding: 5px;
    display: flex;
    flex-direction: column;
}

.start-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    color: black;
    font-size: 11px;
    transition: background-color 0.1s;
}

.start-menu-item:hover {
    background-color: #2f71cd;
    color: white;
}

.start-menu-right .start-menu-item {
    font-weight: bold;
    color: #1034a6;
}

.start-menu-right .start-menu-item:hover {
    color: white;
}

.start-menu-item img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.start-menu-right .start-menu-item img {
    width: 24px;
    height: 24px;
}

.start-menu-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1) 10%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.1) 90%, transparent);
    margin: 5px 10px;
}

.start-menu-footer {
    background: linear-gradient(to bottom, #1d4bb8 0%, #133481 100%);
    padding: 5px;
    display: flex;
    justify-content: flex-end;
}

.start-menu-footer .start-menu-item {
    color: white;
}

.start-menu-footer .start-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.start-menu-footer .start-menu-item img {
    width: 24px;
    height: 24px;
    margin-right: 0;
}

/* Media Player Styles */
.mp-body {
    background: #ece9d8;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.mp-display {
    background: #000;
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    padding: 10px;
    border: 2px inset #fff;
    margin-bottom: 10px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.mp-display marquee {
    flex-grow: 1;
    margin-right: 10px;
}

.mp-time {
    font-weight: bold;
    min-width: 45px;
    text-align: right;
}

.mp-controls {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.mp-btn {
    width: 40px;
    height: 30px;
    background: #ece9d8;
    border: 2px outset #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-btn:active {
    border-style: inset;
}

.mp-playlist-container {
    flex-grow: 1;
    background: #fff;
    border: 2px inset #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mp-playlist-title {
    background: #000080;
    color: #fff;
    padding: 2px 5px;
    font-size: 11px;
    font-weight: bold;
}

.mp-playlist {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
}

.mp-playlist li {
    padding: 3px 5px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.mp-playlist li:hover {
    background: #e0e0e0;
}

.mp-playlist li.active {
    background: #316ac5;
    color: #fff;
}

#calc-window .window-body button {
    min-width: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Tahoma', sans-serif;
    font-size: 14px;
}

/* Projects Folder */
.projects-body {
    background: #ffffff;
    color: #000;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
}

.projects-toolbar {
    flex-shrink: 0;
    padding: 4px 8px;
    border-bottom: 1px solid #b7b7b7;
    background: linear-gradient(to bottom, #f7f8fb 0%, #e6e8ef 100%);
    color: #1f3f8f;
    font-weight: bold;
}

.project-card {
    margin: 10px;
    padding: 10px;
    border: 1px solid #9cb6dd;
    background: linear-gradient(to bottom, #f7faff 0%, #edf3ff 100%);
    box-shadow: inset 0 0 0 1px #ffffff;
}

.project-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.project-card-head img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.project-card-title {
    font-size: 13px;
    font-weight: bold;
    color: #103d8e;
}

.project-card-subtitle {
    color: #2d4f95;
    font-size: 11px;
}

.project-card-summary {
    margin: 8px 0;
    padding: 7px;
    border: 1px solid #c3cde0;
    background: #ffffff;
    line-height: 1.35;
}

.project-card-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 9px;
    color: #122f64;
}

.project-card-links {
    display: flex;
    gap: 8px;
}

.project-card-links a {
    display: inline-block;
    border: 1px solid #7f9db9;
    background: linear-gradient(to bottom, #f9fafc 0%, #e5ebf9 100%);
    color: #103b8a;
    text-decoration: none;
    font-weight: bold;
    padding: 3px 8px;
    box-shadow: inset 1px 1px 0 #ffffff;
}

.project-card-links a:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #edf2fe 100%);
}

.project-card-links a:active {
    box-shadow: inset -1px -1px 0 #ffffff;
}

/* Clippy Chat */
.clippy-chat-window {
    display: none;
    position: absolute;
    width: 318px;
    padding: 8px;
    box-sizing: border-box;
    font-family: Tahoma, sans-serif;
    font-size: 12px;
    color: #111;
    z-index: 9990;
    pointer-events: auto;
    border: 1px solid #7f9db9;
    border-radius: 4px;
    background: #ece9d8;
    box-shadow: 0 0 0 1px #ffffff inset, 2px 2px 4px rgba(0, 0, 0, 0.22);
}

.clippy-chat-window::before {
    content: "";
    position: absolute;
    right: -13px;
    bottom: 26px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 12px solid #7f9db9;
}

.clippy-chat-window::after {
    content: "";
    position: absolute;
    right: -11px;
    bottom: 27px;
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 11px solid #ece9d8;
}

.clippy-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: -8px -8px 6px -8px;
    padding: 4px 6px;
    border: 1px solid #1d3f92;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(to bottom, #4f80d4 0%, #2d62cc 44%, #1f4aa8 100%);
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.35);
}

.clippy-chat-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.clippy-chat-title-icon {
    width: 10px;
    height: 12px;
    box-sizing: border-box;
    border: 2px solid #eef4ff;
    border-radius: 6px;
    transform: rotate(-16deg);
    position: relative;
    display: inline-block;
}

.clippy-chat-title-icon::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: 3px;
    height: 6px;
    box-sizing: border-box;
    border: 2px solid #eef4ff;
    border-radius: 4px;
}

#clippy-chat-output {
    height: 106px;
    margin-bottom: 6px;
    padding: 6px;
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.35;
    font-size: 12px !important;
    color: #111 !important;
    background: #f7f7f7 !important;
    border: 1px solid #7f9db9 !important;
    border-radius: 1px;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #b8b8b8;
}

#clippy-chat-output::-webkit-scrollbar {
    width: 14px;
}

#clippy-chat-output::-webkit-scrollbar-track {
    background: #ece9d8;
    border-left: 1px solid #b8b8b8;
}

#clippy-chat-output::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #c7d5f0 0%, #a9bfe7 100%);
    border: 1px solid #7f9db9;
}

#clippy-chat-status {
    margin: 0 0 6px 0;
    font-size: 11px !important;
    font-weight: 700;
    color: #3b4c73 !important;
}

#clippy-chat-status[data-state="busy"] {
    color: #2d5aa2 !important;
}

#clippy-chat-status[data-state="error"] {
    color: #9b1e11 !important;
}

.clippy-chat-controls {
    display: grid;
    grid-template-columns: 1fr 82px;
    gap: 6px;
    align-items: stretch;
}

#clippy-chat-input {
    width: 100%;
    min-width: 0;
    height: 34px;
    box-sizing: border-box;
    border: 1px solid #7f9db9 !important;
    border-top-color: #6f8dad !important;
    border-left-color: #6f8dad !important;
    border-right-color: #bfc7d4 !important;
    border-bottom-color: #bfc7d4 !important;
    background: #ffffff !important;
    color: #111;
    font-family: Tahoma, sans-serif !important;
    font-size: 12px !important;
    padding: 0 7px !important;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #c4c4c4;
}

#clippy-chat-send {
    width: 82px;
    min-width: 0 !important;
    height: 34px;
    box-sizing: border-box;
    padding: 0 !important;
    font-family: Tahoma, sans-serif !important;
    font-size: 12px !important;
    color: #111;
    cursor: pointer;
    border: 1px solid #7f9db9 !important;
    border-radius: 2px !important;
    background: linear-gradient(to bottom, #fdfdfd 0%, #ece9d8 100%) !important;
    box-shadow: inset 0 1px 0 #ffffff;
}

#clippy-chat-send:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #f0edde 100%) !important;
}

#clippy-chat-send:active {
    background: linear-gradient(to bottom, #e0ddcf 0%, #ece9d8 100%) !important;
    box-shadow: inset 1px 1px 0 #c9c6bc;
}

#clippy-chat-close {
    min-width: 18px !important;
    width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    line-height: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 3px !important;
    border: 1px solid #7e1b14 !important;
    background: linear-gradient(to bottom, #fca59d 0%, #e65d4f 55%, #cf3125 100%) !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 0 rgba(0, 0, 0, 0.12) !important;
}

#clippy-chat-close:hover {
    filter: brightness(1.06);
}

#clippy-chat-close:active {
    filter: brightness(0.9);
}

.clippy-chat-line {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    padding: 5px 6px;
    border: 1px solid #c4c4c4;
    box-shadow: inset 1px 1px 0 #ffffff;
}

.clippy-chat-line:last-child {
    margin-bottom: 0;
}

.clippy-chat-line-user {
    background: #eaf2ff;
    border-color: #b7c8ea;
}

.clippy-chat-line-user .clippy-chat-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clippy-chat-line-clippy {
    background: #fffbe6;
    border-color: #d8cda2;
}

.clippy-chat-role {
    min-width: 0;
    font-weight: 700;
    color: #1f3f7a;
}

.clippy-chat-text {
    flex: 1;
    color: #111;
    word-break: break-word;
    line-height: 1.35;
}

.clippy-chat-empty {
    color: #4f5d78;
    font-style: normal;
    padding-top: 2px;
}

.paint-enhance-status {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #0a246a;
    margin-left: auto;
}

.paint-enhance-status.active {
    display: inline-flex;
}

.paint-menu-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1px;
    background: #ece9d8;
    border-bottom: 1px solid #9a988f;
    padding: 2px 6px;
    font-size: 11px;
}

.paint-menu-btn {
    border: 1px solid transparent;
    background: transparent;
    padding: 1px 8px;
    font-size: 11px;
    font-family: Tahoma, sans-serif;
    cursor: default;
}

.paint-menu-btn:hover {
    border: 1px solid #8fa9cb;
    background: #dce9f8;
}

.paint-menu-dropdown {
    position: absolute;
    top: calc(100% - 1px);
    min-width: 132px;
    background: #ece9d8;
    border: 1px solid #5c5c5c;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 10;
    padding: 2px;
}

.paint-menu-dropdown.open {
    display: block;
}

.paint-menu-item {
    position: relative;
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    font-size: 11px;
    font-family: Tahoma, sans-serif;
    padding: 3px 8px;
    cursor: default;
}

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

.paint-menu-separator {
    height: 1px;
    background: #aca899;
    margin: 3px 2px;
}

.paint-ai-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #d4d0c8;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #8d8d8d;
    padding: 3px 6px;
    font-size: 11px;
}

.paint-ai-row label {
    color: #222;
}

.paint-ai-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 4px;
    border: 1px solid #7f9db9;
    background: linear-gradient(#f5fbff, #dbeaff);
    color: #0f3a7a;
    font-weight: 700;
    font-size: 10px;
}

.paint-enhance-style-select {
    font-size: 11px;
    font-family: Tahoma, sans-serif;
    color: #111;
    line-height: 1.2;
    height: 22px;
    min-width: 116px;
    padding: 0 20px 0 4px;
    border: 1px solid #7f9db9;
    background-color: #fff !important;
    background-image:
        linear-gradient(45deg, transparent 50%, #3f3f3f 50%),
        linear-gradient(135deg, #3f3f3f 50%, transparent 50%),
        linear-gradient(#ece9d8, #d4d0c8);
    background-position:
        calc(100% - 11px) 8px,
        calc(100% - 7px) 8px,
        calc(100% - 17px) 0;
    background-size: 4px 4px, 4px 4px, 16px 100%;
    background-repeat: no-repeat;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.paint-enhance-style-select option {
    font-family: Tahoma, sans-serif;
    font-size: 11px;
}

.paint-enhance-style-select::-ms-expand {
    display: none;
}

.paint-enhance-style-select:hover {
    border-color: #5f88bc;
}

.paint-enhance-main-btn {
    font-size: 11px;
    height: 22px;
    line-height: 1;
    padding: 0 10px;
    font-weight: 700;
    color: #111;
    border: 1px solid #8c6f00;
    background: linear-gradient(#ffe799, #f7c948);
    box-shadow: inset 0 1px 0 #fff4bf;
    cursor: pointer;
}

.paint-enhance-main-btn:active {
    box-shadow: inset 1px 1px 0 #9d7e0f;
}

.paint-work-area {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    height: 100%;
    border-top: 1px solid #fbfbfb;
}

.paint-toolbox-pane {
    width: 74px;
    background: #d4d0c8;
    border-right: 1px solid #9b9b9b;
    padding: 6px 5px 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.paint-toolbox {
    display: grid;
    grid-template-columns: repeat(2, 24px);
    grid-auto-rows: 24px;
    gap: 3px;
    align-content: start;
    justify-content: center;
}

.paint-tool-glyph,
.paint-tool-empty {
    position: relative;
    width: 24px;
    height: 24px;
    border: 1px solid #fff;
    border-bottom-color: #808080;
    border-right-color: #808080;
    background: #ece9d8;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.paint-tool-glyph {
    cursor: pointer;
}

.paint-tool-inactive {
    opacity: 0.75;
    background: #dfddd1;
    cursor: default;
}

.paint-tool.active {
    border: 1px inset #7f7f7f;
    background: #d8d4c8;
}

#paint-enhance-tool-btn {
    grid-column: span 2;
    width: 51px;
    height: 22px;
    margin-top: 1px;
    border: 1px solid #8c6f00;
    border-bottom-color: #6f5800;
    border-right-color: #6f5800;
    background: linear-gradient(#ffe799, #f7c948);
    color: #111;
    font-weight: 700;
    font-size: 11px;
}

.paint-tool-icon {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
}

.paint-tool-icon::before,
.paint-tool-icon::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.icon-free-select::before {
    left: 1px;
    top: 2px;
    width: 13px;
    height: 11px;
    border: 1px dashed #1f1f1f;
    border-radius: 55% 40% 65% 45%;
}

.icon-select::before {
    left: 2px;
    top: 3px;
    width: 12px;
    height: 9px;
    border: 1px dashed #1f1f1f;
}

.icon-eraser::before {
    left: 2px;
    top: 7px;
    width: 11px;
    height: 6px;
    border: 1px solid #333;
    background: #f6cbc7;
    transform: skew(-25deg);
}

.icon-fill::before {
    left: 2px;
    top: 4px;
    width: 8px;
    height: 8px;
    border: 1px solid #333;
    background: #d7e4f7;
    transform: rotate(-25deg);
}

.icon-fill::after {
    left: 10px;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #2b66c9;
}

.icon-picker::before {
    left: 2px;
    top: 8px;
    width: 11px;
    height: 2px;
    background: #333;
    transform: rotate(-35deg);
}

.icon-picker::after {
    left: 9px;
    top: 3px;
    width: 4px;
    height: 8px;
    border: 1px solid #333;
    background: #d8ecff;
    transform: rotate(-35deg);
}

.icon-zoom::before {
    left: 2px;
    top: 2px;
    width: 9px;
    height: 9px;
    border: 1px solid #333;
    border-radius: 50%;
}

.icon-zoom::after {
    left: 10px;
    top: 10px;
    width: 5px;
    height: 2px;
    background: #333;
    transform: rotate(45deg);
}

.icon-pencil::before {
    left: 1px;
    top: 9px;
    width: 12px;
    height: 3px;
    border: 1px solid #333;
    background: #f7d68d;
    transform: rotate(-35deg);
}

.icon-brush::before {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: 1px solid #333;
    background: #2f7fdd;
    border-radius: 1px;
}

.icon-brush::after {
    left: 3px;
    top: 11px;
    width: 8px;
    height: 4px;
    border-radius: 0 0 5px 5px;
    background: #333;
}

.icon-airbrush::before {
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: 1px solid #333;
    background: #dce3ea;
}

.icon-airbrush::after {
    left: 3px;
    top: 12px;
    width: 10px;
    height: 3px;
    background: radial-gradient(circle at 1px 1px, #333 1px, transparent 1px) 0 0/3px 3px;
}

.icon-text::before {
    content: "A";
    left: 4px;
    top: 0;
    font-family: Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #111;
}

.icon-text::after {
    display: none;
}

.icon-line::before {
    left: 1px;
    top: 11px;
    width: 13px;
    height: 1px;
    background: #333;
    transform: rotate(-26deg);
}

.icon-curve::before {
    left: 2px;
    top: 3px;
    width: 11px;
    height: 9px;
    border: 1px solid transparent;
    border-top-color: #333;
    border-right-color: #333;
    border-radius: 0 9px 0 0;
    transform: rotate(15deg);
}

.icon-rect::before {
    left: 2px;
    top: 3px;
    width: 12px;
    height: 9px;
    border: 1px solid #333;
}

.icon-poly::before {
    left: 2px;
    top: 3px;
    width: 12px;
    height: 10px;
    border: 1px solid #333;
    clip-path: polygon(0 62%, 26% 6%, 70% 22%, 100% 73%, 35% 100%);
}

.icon-ellipse::before {
    left: 2px;
    top: 3px;
    width: 12px;
    height: 9px;
    border: 1px solid #333;
    border-radius: 50%;
}

.icon-roundrect::before {
    left: 2px;
    top: 3px;
    width: 12px;
    height: 9px;
    border: 1px solid #333;
    border-radius: 3px;
}

.paint-tool-options {
    border: 1px solid #fff;
    border-bottom-color: #808080;
    border-right-color: #808080;
    background: #ece9d8;
    width: 56px;
    margin: 0 auto;
    padding: 3px 3px 4px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    box-sizing: border-box;
    overflow: hidden;
}

.paint-tool-options-label {
    grid-column: 1;
    font-size: 10px;
    color: #333;
    text-align: left;
    padding-left: 1px;
    margin-bottom: 1px;
}

.paint-size-option {
    width: 100%;
    height: 14px;
    border: 1px solid #fff;
    border-bottom-color: #808080;
    border-right-color: #808080;
    background: #ece9d8;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    overflow: hidden;
}

.paint-size-option span {
    position: relative;
    display: block;
    width: 36px;
    height: 10px;
    flex: 0 0 36px;
    overflow: hidden;
}

.paint-size-option span::before {
    content: "";
    position: absolute;
    left: 0;
    width: 36px;
    top: 50%;
    height: clamp(1px, var(--preview-size, 3px), 10px);
    transform: translateY(-50%);
    background: #111;
    border-radius: 0;
}

.paint-size-option.active {
    border: 1px inset #7f7f7f;
    background: #d8d4c8;
}

.paint-main-pane {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.paint-center-pane {
    flex: 1;
    min-height: 0;
    background: #808080;
    padding: 4px 4px 0;
    display: flex;
    flex-direction: column;
}

.paint-canvas-frame {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: stretch;
}

.paint-canvas-wrap {
    flex: 1;
    overflow: hidden;
    background: #ffffff;
    padding: 2px;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    box-sizing: border-box;
    border: 1px solid #404040;
    border-right-color: #fff;
    border-bottom-color: #fff;
}

.paint-enhance-marquee {
    width: 72px;
    height: 14px;
    border: 1px solid #7f9db9;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.paint-enhance-marquee span {
    position: absolute;
    top: 0;
    left: -36px;
    width: 36px;
    height: 100%;
    background: linear-gradient(90deg, #316ac5, #7aa9ff);
    animation: xp-marquee 1.15s linear infinite;
}

.paint-enhance-btn-busy {
    opacity: 0.7;
    pointer-events: none;
}

.paint-color-strip {
    min-height: 52px;
    background: #d4d0c8;
    border-top: 1px solid #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
}

.paint-color-current {
    position: relative;
    width: 32px;
    height: 24px;
    flex: 0 0 auto;
}

.paint-color-primary {
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #000;
    background: #000;
    z-index: 2;
}

.paint-color-secondary {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #555;
    background: #fff;
}

.paint-palette-grid {
    display: grid;
    grid-template-columns: repeat(14, 16px);
    gap: 1px;
}

.paint-color-cell {
    width: 16px;
    height: 16px;
    border: 1px inset #888;
    cursor: pointer;
}

.paint-status-bar {
    height: 18px;
    border-top: 1px solid #9b9b9b;
    background: #ece9d8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 0 4px;
    font-size: 11px;
}

.paint-status-bar::after {
    content: "";
    width: 12px;
    height: 12px;
    background:
        linear-gradient(135deg, transparent 5px, #9d9d9d 5px, #9d9d9d 6px, transparent 6px) 0 0/6px 6px,
        linear-gradient(135deg, transparent 5px, #f6f6f6 5px, #f6f6f6 6px, transparent 6px) 2px 2px/6px 6px;
}

.paint-scrollbar-y {
    width: 16px;
    border-left: 1px solid #9f9f9f;
    background: #d4d0c8;
    display: flex;
    flex-direction: column;
}

.paint-scrollbar-x {
    height: 17px;
    background: #d4d0c8;
    border-top: 1px solid #9f9f9f;
    display: flex;
    align-items: stretch;
}

.paint-scroll-arrow,
.paint-scroll-corner {
    width: 16px;
    min-width: 16px;
    border: 1px solid #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    background: #ece9d8;
    padding: 0;
    line-height: 1;
    font-size: 10px;
    font-family: Tahoma, sans-serif;
    color: #333;
}

.paint-scroll-track {
    flex: 1;
    background: #d4d0c8;
    border-left: 1px solid #fff;
    border-top: 1px solid #fff;
    border-right: 1px solid #9b9b9b;
    border-bottom: 1px solid #9b9b9b;
    position: relative;
}

.paint-scrollbar-y .paint-scroll-track {
    min-height: 0;
}

.paint-scroll-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 18px;
    background: #ece9d8;
    border: 1px solid #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
}

.paint-scrollbar-x .paint-scroll-thumb {
    width: 46px;
    height: auto;
    right: auto;
    bottom: 2px;
}

@keyframes xp-marquee {
    from {
        left: -36px;
    }
    to {
        left: 72px;
    }
}
