/* ═══════════════════════════════════════════════════
   desktop.css — TC UNDERGROUND OS INTERFACE v1.0
   Windows XP-inspired desktop mockup styles
   ═══════════════════════════════════════════════════ */

/* ── TOKENS ──────────────────────────────────────── */
:root {
    --xp-blue: #245edb;
    --xp-blue-mid: #1a46b8;
    --xp-blue-dark: #0d2d8a;
    --xp-green-start: #2d9a2d;
    --xp-taskbar-h: 40px;
    --xp-title-h: 28px;
    --xp-shadow: 2px 2px 8px rgba(0, 0, 0, 0.55);
    --xp-font: 'Tahoma', 'Segoe UI', sans-serif;
}

/* ── DESKTOP ROOT ─────────────────────────────────── */
#xpDesktop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    font-family: var(--xp-font);
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#xpDesktop.xp-desk--open {
    opacity: 1;
    pointer-events: all;
}

/* ── BOOT SCREEN ─────────────────────────────────── */
#xpBoot {
    position: absolute;
    inset: 0;
    z-index: 10003;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

.xp-boot-wordmark {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 60px;
}

.xp-boot-os {
    color: #fff;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 38px;
    font-style: italic;
    font-weight: bold;
    letter-spacing: -1px;
    display: flex;
    align-items: flex-start;
}

.xp-boot-os span.xp-colored {
    color: #fca11a;
    font-weight: normal;
    margin-left: 6px;
}

.xp-boot-version {
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-top: 4px;
}

.xp-boot-bar {
    width: 150px;
    height: 14px;
    border: 2px solid #b3b3b3;
    border-radius: 4px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.xp-boot-fill {
    height: 100%;
    width: 30px;
    background: linear-gradient(90deg, #245edb 0%, #4a9af5 50%, #245edb 100%);
    position: absolute;
    left: -40px;
    border-radius: 2px;
    animation: xpBootLoad 1.2s linear infinite;
}

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

    100% {
        left: 160px;
    }
}

/* ── NUDGE ANIMATION ─────────────────────────────── */
@keyframes xpNudgeShaking {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-15px, -15px);
    }

    20% {
        transform: translate(15px, -15px);
    }

    30% {
        transform: translate(-15px, 15px);
    }

    40% {
        transform: translate(15px, 15px);
    }

    50% {
        transform: translate(-10px, -10px);
    }

    60% {
        transform: translate(10px, -10px);
    }

    70% {
        transform: translate(-10px, 10px);
    }

    80% {
        transform: translate(10px, 10px);
    }

    90% {
        transform: translate(-5px, -5px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.xp-nudge-shake {
    animation: xpNudgeShaking 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ── WELCOME SCREEN ─────────────────────────────────── */
#xpWelcome {
    position: absolute;
    inset: 0;
    z-index: 10002;
    background: #396eba;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

.xp-welcome-text {
    font-family: Arial, Tahoma, sans-serif;
    font-size: 36px;
    font-style: italic;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

/* ── SHUTDOWN SCREEN ─────────────────────────────────── */
#xpShutdown {
    position: absolute;
    inset: 0;
    z-index: 10002;
    background: #396eba;
    /* Azul clássico de desligamento do XP */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#xpShutdown.xp-sd--active {
    opacity: 1;
    pointer-events: all;
}

.xp-shutdown-logo {
    font-size: 90px;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

.xp-shutdown-text {
    font-family: 'Tahoma', sans-serif;
    font-size: 18px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 1px;
}

/* ── DESKTOP AREA (wallpaper + icons) ─────────────── */
#xpDesktopArea {
    flex: 1;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
    /* Classic XP Bliss blue sky + green hills */
    background:
        radial-gradient(ellipse at 50% 105%, #3aab3a 0%, #1d7020 35%, transparent 55%),
        radial-gradient(ellipse at 25% 110%, #2d952d 0%, transparent 40%),
        radial-gradient(ellipse at 75% 110%, #2d952d 0%, transparent 40%),
        linear-gradient(180deg,
            #3a7ac8 0%,
            #5ba0e8 30%,
            #7bbcf5 55%,
            #a8d6ff 60%,
            #79c26a 61%,
            #3aab3a 70%,
            #1d7020 100%);
}

/* ── DESKTOP ICONS ────────────────────────────────── */
#xpDesktopArea {
    position: relative; /* already set above, but icons need this */
}

.xp-desk-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 72px;
    padding: 4px;
    cursor: pointer;
    border-radius: 3px;
    border: 1px solid transparent;
    pointer-events: all;
    user-select: none;
    box-sizing: border-box;
}

.xp-desk-icon.xp-icon--dragging {
    opacity: 0.75;
    cursor: grabbing;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}


.xp-desk-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
}

.xp-desk-icon.xp-icon--selected {
    background: rgba(30, 90, 200, 0.5);
    border-color: rgba(100, 160, 255, 0.6);
}

.xp-di-img {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.xp-di-label {
    font-family: var(--xp-font);
    font-size: 11px;
    color: #fff;
    text-align: center;
    text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
    line-height: 1.2;
    word-break: break-word;
    max-width: 72px;
}

/* ── WINDOWS ─────────────────────────────────────── */
.xp-win {
    position: absolute;
    width: 440px;
    min-width: 260px;
    min-height: 200px;
    max-width: calc(100vw - 12px);
    max-height: 100%;
    background: #ece9d8;
    border: 2px solid var(--xp-blue-dark);
    border-radius: 8px 8px 4px 4px;
    box-shadow: var(--xp-shadow), 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

/* ── RESIZE HANDLES ──────────────────────────────── */
.xp-resize {
    position: absolute;
    z-index: 10;
}
/* Edges */
.xp-resize-n  { top: -3px;    left: 6px;    right: 6px;  height: 6px; cursor: n-resize; }
.xp-resize-s  { bottom: -3px; left: 6px;    right: 6px;  height: 6px; cursor: s-resize; }
.xp-resize-w  { left: -3px;   top: 6px;     bottom: 6px; width: 6px;  cursor: w-resize; }
.xp-resize-e  { right: -3px;  top: 6px;     bottom: 6px; width: 6px;  cursor: e-resize; }
/* Corners */
.xp-resize-nw { top: -3px;    left: -3px;   width: 12px;  height: 12px; cursor: nw-resize; }
.xp-resize-ne { top: -3px;    right: -3px;  width: 12px;  height: 12px; cursor: ne-resize; }
.xp-resize-sw { bottom: -3px; left: -3px;   width: 12px;  height: 12px; cursor: sw-resize; }
.xp-resize-se { bottom: -3px; right: -3px;  width: 12px;  height: 12px; cursor: se-resize; }


.xp-win.xp-win--open {
    opacity: 1;
    transform: scale(1);
}

.xp-win.xp-win--minimized {
    display: none;
}

.xp-win.xp-win--active .xp-win-titlebar {
    background: linear-gradient(180deg, #4a85d8 0%, var(--xp-blue) 100%);
}

.xp-win:not(.xp-win--active) .xp-win-titlebar {
    background: linear-gradient(180deg, #888 0%, #666 100%);
}

/* Title bar */
.xp-win-titlebar {
    height: var(--xp-title-h);
    display: flex;
    align-items: center;
    padding: 0 4px 0 8px;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.xp-win-titlebar:active {
    cursor: grabbing;
}

.xp-win-title {
    flex: 1;
    font-family: var(--xp-font);
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xp-win-btns {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.xp-btn {
    width: 21px;
    height: 21px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.4);
    font-size: 9px;
    line-height: 21px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(180deg, #e0e0e0 0%, #c0c0c0 100%);
    color: #333;
    padding: 0;
    font-weight: bold;
}

.xp-btn:hover {
    background: linear-gradient(180deg, #f0f0f0 0%, #d0d0d0 100%);
}

.xp-btn:active {
    background: linear-gradient(180deg, #b0b0b0 0%, #909090 100%);
    transform: scale(0.95);
}

.xp-btn--close {
    background: linear-gradient(180deg, #e8706a 0%, #c83030 100%);
    color: #fff;
}

.xp-btn--close:hover {
    background: linear-gradient(180deg, #f08080 0%, #d04040 100%);
}

/* Address bar */
.xp-win-addrbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: #d4d0c8;
    border-bottom: 1px solid #999;
    flex-shrink: 0;
}

.xp-addr-label {
    font-size: 11px;
    color: #555;
    white-space: nowrap;
}

.xp-addr-val {
    flex: 1;
    background: #fff;
    border: 1px solid #7774;
    border-top-color: #999;
    padding: 1px 4px;
    font-size: 11px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Window body */
.xp-win-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: #aaa #eee;
}

/* ── FILE VIEW ────────────────────────────────────── */
.xp-file-view {
    display: flex;
    flex-direction: column;
}

.xp-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px;
    border-bottom: 1px solid #f0ede4;
    cursor: pointer;
}

.xp-file-item:hover {
    background: #dde8fb;
}

.xp-fi-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.xp-fi-name {
    flex: 1;
    font-size: 12px;
    color: #222;
}

.xp-fi-detail {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

.xp-empty {
    justify-content: center;
    padding: 40px;
}

.xp-empty-msg {
    font-size: 13px;
    color: #888;
}

/* ── BROWSER WINDOW ──────────────────────────────── */
.xp-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.xp-browser-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #d4d0c8;
    border-bottom: 1px solid #999;
}

.xp-browser-url {
    flex: 1;
    background: #fff;
    border: 1px inset #999;
    padding: 2px 6px;
    font-size: 11px;
    color: #00f;
    font-family: monospace;
}

/* Browser tabbed layout */
.xp-browser--tabbed {
    min-height: 320px;
}

/* ── TAB BAR ─────────────────────────────────────── */
.xp-tab-bar {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 4px 6px 0;
    background: linear-gradient(180deg, #c8c4bc 0%, #d4d0c8 100%);
    border-bottom: 2px solid #999;
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    /* oculta scrollbar das abas */
}

.xp-tab-bar::-webkit-scrollbar {
    display: none;
}

.xp-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px 5px;
    background: linear-gradient(180deg, #b0acc4 0%, #9c98b0 100%);
    border: 1px solid #888;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    font-family: 'Tahoma', sans-serif;
    font-size: 10px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    min-width: 60px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    bottom: -1px;
    /* alinha base com borda */
    user-select: none;
    transition: background 0.08s;
}

.xp-tab:hover:not(.xp-tab--active) {
    background: linear-gradient(180deg, #c8c4dc 0%, #b0acc4 100%);
}

.xp-tab--active {
    background: #fff !important;
    border-color: #999;
    border-bottom-color: #fff;
    /* "apaga" a borda inferior para fundir com o conteúdo */
    color: #000;
    font-weight: bold;
    z-index: 2;
}

/* Favicon fake na aba */
.xp-tab::before {
    content: '🌐';
    font-size: 9px;
    flex-shrink: 0;
}

/* ── BROWSER BODY scrollável ─────────────────────── */
.xp-browser-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

/* Browser com rolagem (TC Explorer THUG) */
.xp-browser-scroll {
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #aaa #eee;
}

.xp-browser-site-img {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: auto;
}

/* Barra de menu IE mockada */
.xp-ie-toolbar {
    display: flex;
    gap: 0;
    background: #d4d0c8;
    border-bottom: 1px solid #999;
    flex-shrink: 0;
    padding: 2px 6px;
}

.xp-ie-toolbar span {
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    color: #000;
    padding: 2px 8px;
    cursor: default;
}

.xp-ie-toolbar span:hover {
    background: #b8c8e8;
}

/* Status bar */
.xp-ie-status {
    font-family: 'Tahoma', sans-serif;
    font-size: 10px;
    color: #333;
    padding: 2px 8px;
    background: #d4d0c8;
    border-top: 1px solid #999;
    flex-shrink: 0;
}


/* ── WINAMP WINDOW ───────────────────────────────── */
.xp-winamp {
    background: #000;
    height: 100%;
    min-height: 120px;
    padding: 10px;
}

.xp-wa-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xp-wa-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #00e44d;
    text-shadow: 0 0 6px #00e44d;
}

.xp-wa-track {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: #00ff88;
    text-shadow: 0 0 8px #00ff88;
}

.xp-wa-viz {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 40px;
    margin-top: 4px;
}

.xp-wa-bar {
    flex: 1;
    background: linear-gradient(to top, #00e44d, #88ff88);
    border-radius: 1px 1px 0 0;
    animation: xpVizBar 0.5s ease-in-out infinite;
}

.xp-wa-bar:nth-child(odd) {
    animation-delay: calc(var(--i, 0) * 0.05s);
}

.xp-wa-bar:nth-child(even) {
    animation-delay: calc(var(--i, 0) * 0.07s + 0.1s);
}

@keyframes xpVizBar {

    0%,
    100% {
        height: 15%;
    }

    50% {
        height: calc(20% + 60% * var(--rng, 0.5));
    }
}

/* ── TASKBAR ─────────────────────────────────────── */
#xpTaskbar {
    height: var(--xp-taskbar-h);
    background: linear-gradient(180deg, #3a82e8 0%, #1a56c8 40%, #3a82e8 100%);
    border-top: 2px solid #6aacff;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px;
    flex-shrink: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.4);
    z-index: 50;
    position: relative;
}

/* Start button */
#xpStartBtn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 30px;
    background: linear-gradient(180deg, #60c840 0%, #3a9a1a 50%, #2d7a10 100%);
    border: 1px solid #1a5008;
    border-radius: 14px;
    color: #fff;
    font-family: var(--xp-font);
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 1px;
}

#xpStartBtn:hover {
    background: linear-gradient(180deg, #72d850 0%, #4aaa2a 50%, #3a8a20 100%);
}

#xpStartBtn:active {
    transform: scale(0.97);
}

.xp-start-orb {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #60c840 50%, #1a6008 100%);
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

/* Taskbar windows */
#xpTaskbarWindows {
    flex: 1;
    display: flex;
    gap: 3px;
    overflow: hidden;
    min-width: 0;
}

.xp-taskbar-app {
    height: 28px;
    padding: 0 10px;
    background: linear-gradient(180deg, #5a9af0 0%, #2a6ad8 100%);
    border: 1px solid #1a3a8a;
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    font-family: var(--xp-font);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.xp-taskbar-app:hover {
    background: linear-gradient(180deg, #6aaaff 0%, #3a7ae8 100%);
}

.xp-tb--active {
    background: linear-gradient(180deg, #2a5ab8 0%, #1a3a8a 100%);
    border-color: #0a1a6a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* System tray */
#xpSysTray {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    height: 28px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    flex-shrink: 0;
}

#xpClock {
    font-family: var(--xp-font);
    font-size: 11px;
    color: #fff;
    white-space: nowrap;
    font-weight: bold;
}

#xpCloseDesk {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    line-height: 1;
}

#xpCloseDesk:hover {
    color: #fff;
}

/* ── START MENU ───────────────────────────────────── */
#xpStartMenu {
    position: absolute;
    bottom: var(--xp-taskbar-h);
    left: 6px;
    width: 220px;
    background: linear-gradient(180deg, #245edb 0%, #1a46b8 12px, #ece9d8 12px, #ece9d8 100%);
    border: 2px solid var(--xp-blue-dark);
    border-radius: 8px 8px 0 0;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.5);
    z-index: 200;
    overflow: hidden;
    display: none;
}

#xpStartMenu.xp-sm--open {
    display: block;
}

.xp-sm-header {
    padding: 6px 12px;
    background: linear-gradient(90deg, #245edb 0%, #4a8eff 100%);
    color: #fff;
    font-weight: bold;
    font-size: 12px;
}

.xp-sm-user {
    color: #fff;
}

.xp-sm-list {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
    max-height: 320px;
    overflow-y: auto;
}

.xp-sm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--xp-font);
    font-size: 12px;
    color: #222;
    width: 100%;
}

.xp-sm-item:hover {
    background: var(--xp-blue);
    color: #fff;
}

.xp-sm-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
}

/* ── FOOTER START TRIGGER ────────────────────────── */
#footerStartBtn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: linear-gradient(180deg, #50b830 0%, #2a8010 55%, #1a6008 100%);
    border-top: 1px solid #72d850;
    border-left: 1px solid #72d850;
    border-bottom: 1px solid #0a3004;
    border-right: 1px solid #0a3004;
    border-radius: 4px 4px 0 0;
    color: #fff;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    letter-spacing: 1px;
    transition: all 0.1s;
    margin-left: auto;
    /* empurra para a direita no footer */
}

#footerStartBtn:hover {
    background: linear-gradient(180deg, #62ca42 0%, #3a9020 55%, #2a7018 100%);
    box-shadow: 2px 0 12px rgba(80, 200, 60, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.footer-start-orb {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #60c840 50%, #1a6008 100%);
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

/* Botão INICIAR no header */
.header-start-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(180deg, #50b830 0%, #2a8010 55%, #1a6008 100%);
    border-top: 1px solid #72d850;
    border-left: 1px solid #72d850;
    border-bottom: 2px solid #0a3004;
    border-right: 2px solid #0a3004;
    border-radius: 4px;
    color: #fff;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 80, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: all 0.1s;
    white-space: nowrap;
    flex-shrink: 0;
    animation: pulseStartBtn 2.5s infinite;
}

@keyframes pulseStartBtn {
    0% {
        box-shadow: 0 2px 8px rgba(0, 80, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }

    50% {
        box-shadow: 0 0 16px rgba(0, 255, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }

    100% {
        box-shadow: 0 2px 8px rgba(0, 80, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
}

.header-start-btn:hover {
    background: linear-gradient(180deg, #62ca42 0%, #3a9020 55%, #2a7018 100%);
    box-shadow: 0 2px 12px rgba(80, 200, 60, 0.5);
}

.header-start-btn:active {
    transform: scale(0.97);
    border-top-color: #0a3004;
    border-left-color: #0a3004;
    border-bottom-color: #72d850;
    border-right-color: #72d850;
}

.header-start-orb {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #60c840 50%, #1a6008 100%);
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}


/* ── SCROLLBAR CUSTOMIZATION ─────────────────────── */
.xp-win-body::-webkit-scrollbar {
    width: 14px;
}

.xp-win-body::-webkit-scrollbar-track {
    background: #f0ede4;
}

.xp-win-body::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #c8c4b8, #a8a49a);
    border: 2px solid #f0ede4;
    border-radius: 6px;
}

/* ── WINAMP BAR ANIMATION TIMING (set via JS inline or nth-child) */
.xp-wa-bar:nth-child(1) {
    animation-duration: 0.45s;
}

.xp-wa-bar:nth-child(2) {
    animation-duration: 0.62s;
}

.xp-wa-bar:nth-child(3) {
    animation-duration: 0.38s;
}

.xp-wa-bar:nth-child(4) {
    animation-duration: 0.55s;
}

.xp-wa-bar:nth-child(5) {
    animation-duration: 0.70s;
}

.xp-wa-bar:nth-child(6) {
    animation-duration: 0.42s;
}

.xp-wa-bar:nth-child(7) {
    animation-duration: 0.58s;
}

.xp-wa-bar:nth-child(8) {
    animation-duration: 0.33s;
}

.xp-wa-bar:nth-child(9) {
    animation-duration: 0.65s;
}

.xp-wa-bar:nth-child(10) {
    animation-duration: 0.48s;
}

.xp-wa-bar:nth-child(11) {
    animation-duration: 0.73s;
}

.xp-wa-bar:nth-child(12) {
    animation-duration: 0.40s;
}

.xp-wa-bar:nth-child(13) {
    animation-duration: 0.52s;
}

.xp-wa-bar:nth-child(14) {
    animation-duration: 0.67s;
}

.xp-wa-bar:nth-child(15) {
    animation-duration: 0.44s;
}

.xp-wa-bar:nth-child(16) {
    animation-duration: 0.59s;
}

.xp-wa-bar:nth-child(17) {
    animation-duration: 0.36s;
}

.xp-wa-bar:nth-child(18) {
    animation-duration: 0.71s;
}

.xp-wa-bar:nth-child(19) {
    animation-duration: 0.47s;
}

.xp-wa-bar:nth-child(20) {
    animation-duration: 0.63s;
}

/* ── WORDPAD ───────────────────────────────────── */
.xp-wordpad {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 250px;
}

.xp-wp-formatbar {
    display: flex;
    gap: 4px;
    padding: 3px 6px 4px;
    align-items: center;
}

.xp-wp-select {
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    padding: 1px 2px;
    border: 1px inset #fff;
    background: #fff;
}

.xp-wp-select-size {
    width: 45px;
}

.xp-wp-btn {
    width: 22px;
    height: 22px;
    background: #d4d0c8;
    border: 1px solid #fff;
    border-bottom-color: #888;
    border-right-color: #888;
    font-family: "Times New Roman", Times, serif;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.xp-wp-btn:active {
    border: 1px solid #888;
    border-bottom-color: #fff;
    border-right-color: #fff;
    padding-top: 1px;
    padding-left: 1px;
}

.xp-wp-ruler {
    height: 14px;
    background: #fff;
    border-bottom: 1px solid #ccc;
    font-family: monospace;
    font-size: 10px;
    line-height: 14px;
    color: #999;
    padding: 0 10px;
    white-space: pre;
    overflow: hidden;
}

.xp-wp-editor {
    flex: 1;
    background: #aba096;
    /* fundo em volta das margens, estilo word */
    display: flex;
    justify-content: center;
    padding: 10px;
    overflow-y: auto;
}

.xp-wp-textarea {
    width: 100%;
    max-width: 800px;
    /* simula a largura da página sulfite */
    background: #fff;
    border: 1px inset #999;
    padding: 24px;
    font-family: 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.5;
    color: #000;
    resize: none;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.xp-wp-textarea:focus {
    outline: none;
}

/* ── MEDIA PLAYER (WMP) ─────────────────────────── */
.xp-wmp {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    background: #000;
}

.xp-wmp-toolbar {
    background: #0a0a0a !important;
    color: #fff;
    border-bottom: 1px solid #333 !important;
}

.xp-wmp-toolbar span {
    color: #ccc !important;
}

.xp-wmp-toolbar span:hover {
    background: #333 !important;
}

.xp-wmp-screen-wrap {
    flex: 1;
    position: relative;
    background: #000;
}

.xp-wmp-yt-container {
    position: absolute;
    inset: 0;
}

.xp-wmp-blocker {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: default;
    /* Essa div transparente captura os cliques impedindo o acesso ao logo ou controles do YT */
}

.xp-wmp-controls {
    background: linear-gradient(180deg, #181818, #0a0a0a);
    padding: 10px;
    border-top: 2px solid #3a3a3a;
}

.xp-wmp-seek {
    width: 100%;
    margin-bottom: 12px;
    cursor: pointer;
}

.xp-wmp-btns {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.xp-wmp-btn {
    background: linear-gradient(180deg, #444, #222);
    border: 2px outset #555;
    color: #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.xp-wmp-btn:active {
    border: 2px inset #555;
    padding-top: 2px;
}

.xp-wmp-btn.xp-wmp-play {
    width: 48px;
    height: 48px;
    font-size: 18px;
    background: linear-gradient(180deg, #3a7ac8, #1a46b8);
    border-color: #3b76c8;
}

.xp-wmp-btn.xp-wmp-play:active {
    border-color: #1a46b8;
}

.xp-wmp-time {
    color: #00e44d;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    margin-left: 20px;
}

/* ── IMAGE VIEWER ───────────────────────────────── */
.xp-img-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 250px;
    background: #eef3fa;
    /* Fundo clássico do Picture Viewer */
}

.xp-img-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
    position: relative;
    background: #eef3fa;
}

.xp-img-display img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid #ccc;
    background: #fff;
    transition: transform 0.2s ease;
}

.xp-img-toolbar {
    background: #eef3fa;
    border-top: 1px solid #bac7d8;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.xp-img-btn {
    width: 32px;
    height: 32px;
    background: #eef3fa;
    border: 1px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #4471B6;
    transition: all 0.1s;
    outline: none;
}

.xp-img-btn:hover {
    background: #dde5f0;
    border-color: #a8b9d0;
}

.xp-img-btn:active {
    background: #bdcde2;
    border-color: #7995bb;
    transform: scale(0.95);
}

/* ── CLIPPY HELPER ─────────────────────── */
.clippy-helper {
    position: fixed;
    right: 30px;
    bottom: 40px;
    width: 60px;
    height: 60px;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.4s;
    opacity: 0;
    pointer-events: none;
    transform: translateY(50px) scale(0.8);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.clippy-helper.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1.0);
}

.clippy-balloon {
    position: absolute;
    bottom: 110%;
    right: 0;
    width: 210px;
    background: #ffffe1;
    /* Amarelo tooltip windows */
    border: 1px solid #000;
    padding: 18px 14px 12px 14px;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    line-height: 1.4;
    color: #000;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s 0.6s;
    pointer-events: none;
}

.clippy-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #d44937;
    border: 1px solid #fff;
    border-right-color: #883322;
    border-bottom-color: #883322;
    color: white;
    font-family: 'Tahoma', sans-serif;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    outline: none;
}

.clippy-close:active {
    border: 1px solid #883322;
    border-right-color: #fff;
    border-bottom-color: #fff;
    background: #b53828;
}

.clippy-helper.visible .clippy-balloon {
    opacity: 1;
    pointer-events: auto;
}

/* Setinhas do balão */
.clippy-balloon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    border-width: 10px 10px 0 0;
    border-style: solid;
    border-color: #ffffe1 transparent transparent transparent;
}

.clippy-balloon::before {
    content: '';
    position: absolute;
    bottom: -12px;
    right: 19px;
    border-width: 12px 12px 0 0;
    border-style: solid;
    border-color: #000 transparent transparent transparent;
}

/* ── CALCULADORA MOCK ─────────────────────── */
.xp-calc {
    background: #e4e2d5;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
}

.xp-calc-display {
    background: #fff;
    border: 2px inset #fff;
    border-right-color: #ccc;
    border-bottom-color: #ccc;
    font-family: 'Share Tech Mono', Tahoma, sans-serif;
    font-size: 24px;
    text-align: right;
    padding: 4px 8px;
    margin-bottom: 15px;
    color: #000;
}

.xp-calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    flex-grow: 1;
}

.xp-calc-btn {
    background: #f0f0ea;
    border: 1px solid #fff;
    border-right-color: #888;
    border-bottom-color: #888;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-family: Tahoma, sans-serif;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
}

.xp-calc-btn:active {
    border: 1px inset #888;
    border-right-color: #fff;
    border-bottom-color: #fff;
    background: #e0e0d5;
}

.xp-calc-btn.op {
    color: #d00;
}

.xp-calc-btn.clear {
    color: #c00;
    font-size: 12px;
}

.xp-calc-btn.eq {
    color: #008;
}

/* ── MINESWEEPER ─────────────────────────────── */
.xp-minesweeper {
    background: #c0c0c0;
    overflow: auto;
    user-select: none;
    height: 100%;
    box-sizing: border-box;
}

.xp-ms-content {
    display: inline-flex;
    flex-direction: column;
    width: fit-content;
    box-sizing: border-box;
    border-left: 2px solid #fff;
    border-top: 2px solid #fff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    background: #c0c0c0;
}

/* ── Menu bar ── */
.xp-ms-menubar {
    display: flex;
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    flex-shrink: 0;
}

.xp-ms-menu-wrap {
    position: relative;
}

.xp-ms-menu-btn {
    background: none;
    border: none;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    padding: 2px 6px;
    cursor: pointer;
    color: #000;
}

.xp-ms-menu-btn:hover,
.xp-ms-menu-btn:active {
    background: #000080;
    color: #fff;
}

.xp-ms-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #c0c0c0;
    border: 1px solid #808080;
    border-top: none;
    z-index: 9999;
    min-width: 150px;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.xp-ms-dropdown--open {
    display: block;
}

.xp-ms-drop-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    padding: 3px 20px 3px 24px;
    cursor: pointer;
    color: #000;
    white-space: nowrap;
    position: relative;
}

.xp-ms-drop-item:hover {
    background: #000080;
    color: #fff;
}

.xp-ms-drop-checked::before {
    content: '✔';
    position: absolute;
    left: 6px;
    font-size: 10px;
}

.xp-ms-separator {
    height: 1px;
    background: #808080;
    margin: 2px 4px;
}

/* ── Header (counters + face) ── */
.xp-ms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #c0c0c0;
    border: 3px inset #808080;
    border-left-color: #fff;
    border-top-color: #fff;
    padding: 6px 8px;
    margin: 6px;
    flex-shrink: 0;
}

.xp-ms-counter {
    background: #000;
    color: #f00;
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 24px;
    padding: 2px 5px;
    line-height: 1;
    border: 2px inset #808080;
    min-width: 3ch;
    letter-spacing: 2px;
}

.xp-ms-face {
    width: 26px;
    height: 26px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.xp-ms-face:active {
    border: 2px inset #808080;
    border-right-color: #fff;
    border-bottom-color: #fff;
}

/* ── Grid ── */
.xp-ms-grid {
    display: grid;
    margin: 0 6px 6px 6px;
    border: 3px inset #808080;
    border-left-color: #fff;
    border-top-color: #fff;
    background: #808080;
    gap: 0;
    flex-shrink: 0;
}

.xp-ms-cell {
    width: 16px;
    height: 16px;
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Tahoma', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0;
    line-height: 1;
    box-sizing: border-box;
    flex-shrink: 0;
}

.xp-ms-cell:active:not(:disabled) {
    border: 1px solid #808080;
    background: #c0c0c0;
}

.xp-ms-revealed {
    border: 1px solid #808080 !important;
    background: #c0c0c0 !important;
    cursor: default;
}

.xp-ms-hit {
    background: #ff0000 !important;
}

/* ── Records panel ── */
.xp-ms-records {
    border-top: 1px solid #808080;
    padding: 5px 8px;
    background: #c0c0c0;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    flex-shrink: 0;
}

.xp-ms-rec-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: #000080;
}

.xp-ms-rec-row {
    display: flex;
    justify-content: space-between;
    padding: 1px 0;
    color: #000;
}

.xp-ms-rec-val {
    font-family: 'Share Tech Mono', monospace;
    color: #800000;
    font-weight: bold;
}

/* ── PAINT MOCK ─────────────────────── */
.xp-paint {
    background: #c0c0c0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.xp-paint-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #ece9d8;
    border-bottom: 1px solid #888;
}

.xp-paint-btn {
    width: 30px;
    height: 30px;
    background: #f0f0ea;
    border: 1px solid #fff;
    border-right-color: #888;
    border-bottom-color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.xp-paint-btn.xp-pb-active {
    background: #fff;
    border: 1px inset #888;
    border-right-color: #fff;
    border-bottom-color: #fff;
}

.xp-paint-canvas-wrap {
    flex-grow: 1;
    padding: 4px;
    background: #808080;
    overflow: auto;
    position: relative;
}

.xp-paint-canvas {
    background: #fff;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    cursor: crosshair;
    touch-action: none;
}

/* ── CALENDAR POPUP ──────────────────────────────────── */
#xpCalendar {
    position: absolute;
    bottom: 45px;
    right: 10px;
    width: 260px;
    background: #ece9d8;
    border: 1px solid #aca899;
    border-radius: 4px;
    box-shadow: var(--xp-shadow);
    z-index: 10005;
    display: none;
    flex-direction: column;
    font-family: inherit;
}

#xpCalendar.xp-cal--open {
    display: flex;
}

.xp-cal-title {
    background: linear-gradient(180deg, #092f87, #245edb, #092f87);
    color: white;
    padding: 6px 8px;
    font-weight: bold;
    font-size: 13px;
    border-radius: 3px 3px 0 0;
}

.xp-cal-body {
    padding: 10px;
    background: #fff;
    margin: 4px;
    border: 1px solid #7f9db9;
}

.xp-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: bold;
}

.xp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 2px;
}

.xp-cal-day-name {
    font-size: 10px;
    color: #666;
    margin-bottom: 4px;
}

.xp-cal-day {
    padding: 4px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    cursor: default;
}

.xp-cal-day.xp-cal-today {
    background: #316ac5;
    color: white;
    border-color: #316ac5;
    font-weight: bold;
}

.xp-cal-time {
    text-align: center;
    margin-top: 4px;
    padding: 8px;
    background: #ece9d8;
    border-top: 1px solid #aca899;
    font-size: 14px;
    font-weight: bold;
}