.xp-window {
    position: absolute;
    background: #ECE9D8;
    border: 2px solid #0054E3;
    border-radius: 8px 8px 0 0;
    box-shadow:
        0 0 0 1px #0054E3,
        2px 2px 10px rgba(0,0,0,0.3),
        inset 0 0 0 1px rgba(255,255,255,0.1);
    min-width: 300px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.xp-window.hidden {
    display: none;
}

.xp-window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 36px) !important;
    border-radius: 0;
}

.xp-window.focused {
    z-index: 200;
}

.window-titlebar {
    background: linear-gradient(
        180deg,
        #0997FF 0%,
        #0663E8 3%,
        #0058EE 8%,
        #0054E3 10%,
        #0055E5 20%,
        #0060F0 40%,
        #0066FF 50%,
        #0060F0 60%,
        #0055E5 80%,
        #0054E3 90%,
        #004BD6 95%,
        #003FCC 98%,
        #0033BB 100%
    );
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    cursor: default;
    border-radius: 6px 6px 0 0;
    flex-shrink: 0;
}

.xp-window:not(.focused) .window-titlebar {
    background: linear-gradient(
        180deg,
        #B0B7C7 0%,
        #9BA5B8 3%,
        #8C96AB 10%,
        #7F8A9E 20%,
        #8C96AB 50%,
        #7F8A9E 80%,
        #6B7689 100%
    );
}

.titlebar-left {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    min-width: 0;
}

.titlebar-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.my-computer-icon-sm::before { content: '💻'; font-size: 14px; }
.my-documents-icon-sm::before { content: '📁'; font-size: 14px; }
.recycle-bin-icon-sm::before { content: '🗑️'; font-size: 14px; }
.ie-icon-sm::before { content: '🌐'; font-size: 14px; }
.notepad-icon-sm::before { content: '📝'; font-size: 14px; }
.folder-icon-sm::before { content: '📁'; font-size: 14px; }
.skull-icon-sm::before { content: '☠️'; font-size: 14px; }

.titlebar-text {
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.titlebar-buttons {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.titlebar-btn {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

.titlebar-btn.minimize {
    background: linear-gradient(180deg, #3C8CF5 0%, #1E5BB8 50%, #3C8CF5 100%);
}

.titlebar-btn.maximize {
    background: linear-gradient(180deg, #3C8CF5 0%, #1E5BB8 50%, #3C8CF5 100%);
}

.titlebar-btn.close {
    background: linear-gradient(180deg, #E08356 0%, #C5462B 50%, #E08356 100%);
}

.titlebar-btn:hover {
    filter: brightness(1.2);
}

.titlebar-btn:active {
    filter: brightness(0.8);
}

.window-menubar {
    background: #ECE9D8;
    border-bottom: 1px solid #ACA899;
    padding: 2px 4px;
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.window-menubar span {
    padding: 2px 8px;
    cursor: pointer;
    font-size: 11px;
    color: #000;
}

.window-menubar span:hover {
    background: #316AC5;
    color: white;
}

.window-toolbar {
    background: linear-gradient(180deg, #FAFAFA 0%, #ECE9D8 100%);
    border-bottom: 1px solid #ACA899;
    padding: 2px 4px;
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.toolbar-btn {
    padding: 2px 8px;
    background: linear-gradient(180deg, #FAFAFA 0%, #E0E0E0 100%);
    border: 1px solid #999;
    border-radius: 2px;
    font-size: 11px;
    cursor: pointer;
    color: #333;
}

.toolbar-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #E8E8E8 100%);
}

.toolbar-btn:active {
    background: linear-gradient(180deg, #ddd 0%, #ccc 100%);
}

.window-addressbar {
    background: linear-gradient(180deg, #FAFAFA 0%, #ECE9D8 100%);
    border-bottom: 1px solid #ACA899;
    padding: 3px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    flex-shrink: 0;
}

.window-addressbar span {
    color: #000;
    white-space: nowrap;
}

.window-addressbar input {
    flex: 1;
    padding: 2px 4px;
    border: 1px solid #7F9DB9;
    font-size: 11px;
    font-family: 'Tahoma', sans-serif;
    background: white;
}

.window-content {
    flex: 1;
    overflow: auto;
    background: white;
    position: relative;
}

.window-statusbar {
    background: #ECE9D8;
    border-top: 1px solid #ACA899;
    padding: 2px 6px;
    font-size: 11px;
    color: #444;
    flex-shrink: 0;
}

.xp-window.resizing {
    pointer-events: none;
}

.xp-window.dragging {
    opacity: 0.95;
}
