/* H2D Cloud Desktop - Windows 11 Style Desktop CSS */

/* CSS Variables */
:root {
    --window-icon-color: #000;
    --blue-color: rgb(0, 122, 255);
}

/* Desktop Container */
.cloud-desktop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('/wallpaper.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    font-family: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* Desktop Icons Area - Vertical Layout */
.desktop-icons-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 45px; /* Leave space for taskbar */
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px);
    grid-template-rows: repeat(auto-fill, 100px);
    grid-auto-flow: column;
    gap: 10px 20px;
    align-content: start;
}

.desktop-icon {
    width: 80px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    border-radius: 8px;
    padding: 8px;
    transition: all 0.2s;
    text-align: center;
    user-select: none;
}

    .desktop-icon:hover {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
    }

    .desktop-icon.selected {
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(10px);
    }

.desktop-icon-image {
    width: 48px;
    height: 48px;
    font-size: 48px;
    color: #fff;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
}

    .desktop-icon-image img {
        display: block;
        width: 48px;
        height: 48px;
        object-fit: contain;
    }

.desktop-icon-label {
    font-size: 12px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    max-width: 100%;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Window Container */
.desktop-windows {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 45px;
    pointer-events: none;
    z-index: 1;
}

/* Window - Windows 11 Style */
.desktop-window {
    position: absolute;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14), 0 0 1px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    min-width: 400px;
    min-height: 300px;
}

    .desktop-window.maximized {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 45px) !important;
        border-radius: 0;
        border: none;
    }

    .desktop-window.minimized {
        display: none;
    }

/* Window Title Bar - Windows 11 Style */
.window-titlebar {
    background: #f3f3f3;
    border-bottom: 1px solid #e5e5e5;
    padding: 0;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

    .window-titlebar.active {
        background: #f3f3f3;
        color: #000;
    }

.window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 400;
    padding-left: 12px;
    color: rgba(0, 0, 0, 0.9);
}

    .window-title i {
        font-size: 14px;
    }

.window-controls {
    display: flex;
    gap: 0;
}

.window-control-btn {
    width: 46px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.9);
}

    .window-control-btn svg.svg-fill {
        fill: rgba(0, 0, 0, 0.9);
        transition: fill 0.1s ease;
    }

    .window-control-btn:hover {
        background: rgba(0, 0, 0, 0.06);
    }

    .window-control-btn:active {
        background: rgba(0, 0, 0, 0.04);
    }

    .window-control-btn.close:hover {
        background: #c42b1c;
        color: #fff;
    }

        .window-control-btn.close:hover svg.svg-fill {
            fill: #fff;
        }

    .window-control-btn.close:active {
        background: #a52313;
        color: #fff;
    }

        .window-control-btn.close:active svg.svg-fill {
            fill: #fff;
        }

/* Window Content */
.window-content {
    flex: 1;
    overflow: auto;
    background: #fff;
}

/* Window Resize Handles */
.window-resize-handle {
    position: absolute;
    z-index: 10;
}

    .window-resize-handle.n {
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        cursor: ns-resize;
    }

    .window-resize-handle.s {
        bottom: 0;
        left: 0;
        right: 0;
        height: 5px;
        cursor: ns-resize;
    }

    .window-resize-handle.e {
        top: 0;
        right: 0;
        bottom: 0;
        width: 5px;
        cursor: ew-resize;
    }

    .window-resize-handle.w {
        top: 0;
        left: 0;
        bottom: 0;
        width: 5px;
        cursor: ew-resize;
    }

    .window-resize-handle.ne {
        top: 0;
        right: 0;
        width: 10px;
        height: 10px;
        cursor: nesw-resize;
    }

    .window-resize-handle.nw {
        top: 0;
        left: 0;
        width: 10px;
        height: 10px;
        cursor: nwse-resize;
    }

    .window-resize-handle.se {
        bottom: 0;
        right: 0;
        width: 10px;
        height: 10px;
        cursor: nwse-resize;
    }

    .window-resize-handle.sw {
        bottom: 0;
        left: 0;
        width: 10px;
        height: 10px;
        cursor: nesw-resize;
    }

/* Taskbar - Windows 11 Centered Style */
.desktop-taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45px;
    background: rgba(243, 243, 243, 0.7);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    gap: 4px;
    z-index: 10000;
}

/* Start Button - Windows 11 Style */
.taskbar-start-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    color: #000;
    font-size: 18px;
}

    .taskbar-start-btn:hover {
        background: rgba(0, 0, 0, 0.06);
    }

    .taskbar-start-btn:active {
        background: rgba(0, 0, 0, 0.08);
    }

/* Taskbar Separator */
.taskbar-separator {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 4px;
}

/* Taskbar Windows - Centered */
.taskbar-windows {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
}

    .taskbar-windows::-webkit-scrollbar {
        display: none;
    }

.taskbar-window-btn {
    min-width: 40px;
    max-width: 180px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    transition: all 0.1s ease;
    color: #000;
    position: relative;
}

    .taskbar-window-btn:hover {
        background: rgba(0, 0, 0, 0.06);
    }

    .taskbar-window-btn.active {
        background: rgba(0, 0, 0, 0.08);
    }

    .taskbar-window-btn.has-window {
        /* Window is open and not minimized */
    }

/* Taskbar indicator (line under button - Windows 11 style) */
.taskbar-indicator {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Minimized state - short gray line */
.taskbar-window-btn.minimized .taskbar-indicator {
    width: 4px;
    background: #666;
}

/* Open but not active - short blue line */
.taskbar-window-btn.has-window:not(.active):not(.minimized) .taskbar-indicator {
    width: 4px;
    background: #0067c0;
}

/* Active state - long blue line */
.taskbar-window-btn.active .taskbar-indicator {
    width: 24px;
    background: #0067c0;
}

.taskbar-window-icon {
    font-size: 16px;
}

.taskbar-window-title {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Taskbar System Tray - Windows 11 Style */
.taskbar-system-tray {
    position: absolute;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    color: #000;
}

.taskbar-clock {
    font-size: 11px;
    font-weight: 400;
    text-align: center;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.1s ease;
    line-height: 1.3;
}

    .taskbar-clock:hover {
        background: rgba(0, 0, 0, 0.06);
    }

.taskbar-icon-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    color: #000;
    font-size: 14px;
}

    .taskbar-icon-btn:hover {
        background: rgba(0, 0, 0, 0.06);
    }

    .taskbar-icon-btn:active {
        background: rgba(0, 0, 0, 0.08);
    }

/* Animations */
@keyframes windowFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.desktop-window {
    animation: windowFadeIn 0.2s ease-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* Dragging and Resizing States */
.desktop-window.dragging {
    opacity: 0.9;
    transition: none !important;
}

.desktop-window.resizing {
    transition: none !important;
}

    .desktop-window.dragging .window-content,
    .desktop-window.resizing .window-content {
        pointer-events: none;
        user-select: none;
    }

/* Start Menu - Windows 11 Style */
.start-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 15000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 52px;
    pointer-events: auto;
}

    .start-menu-overlay.visible {
        display: flex;
    }

.start-menu {
    width: 600px;
    height: 660px;
    background: rgba(242, 242, 242, 0.9);
    backdrop-filter: blur(80px) saturate(180%);
    -webkit-backdrop-filter: blur(80px) saturate(180%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: startMenuSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

@keyframes startMenuSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Box */
.start-menu-search {
    padding: 32px 32px 20px;
}

.search-box {
    position: relative;
    width: 100%;
    height: 40px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

    .search-box:focus-within {
        border-color: #0067c0;
        box-shadow: 0 0 0 2px rgba(0, 103, 192, 0.1);
    }

    .search-box i {
        color: #666;
        font-size: 14px;
    }

    .search-box input {
        flex: 1;
        border: none;
        outline: none;
        background: transparent;
        font-size: 14px;
        color: #000;
    }

        .search-box input::placeholder {
            color: #666;
        }

/* Start Menu Sections */
.start-menu-section {
    padding: 0 32px 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #000;
}

.section-action-btn {
    background: transparent;
    border: none;
    color: #0067c0;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.1s ease;
}

    .section-action-btn:hover {
        background: rgba(0, 103, 192, 0.08);
    }

/* Pinned Apps Grid */
.pinned-apps-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.start-app-item {
    width: 80px;
    height: 80px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    transition: all 0.1s ease;
}

    .start-app-item:hover {
        background: rgba(255, 255, 255, 0.9);
    }

    .start-app-item:active {
        background: rgba(255, 255, 255, 1);
        transform: scale(0.98);
    }

.app-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #0067c0;
}

    .app-icon img {
        width: 32px;
        height: 32px;
        object-fit: contain;
    }

.app-name {
    font-size: 11px;
    color: #000;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Recommended Section */
.recommended-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.recommended-item {
    width: 100%;
    height: 56px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    transition: all 0.1s ease;
    text-align: left;
}

    .recommended-item:hover {
        background: rgba(255, 255, 255, 0.9);
    }

    .recommended-item:active {
        background: rgba(255, 255, 255, 1);
    }

.recommended-icon {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #0067c0;
    flex-shrink: 0;
}

    .recommended-icon img {
        width: 28px;
        height: 28px;
        object-fit: contain;
    }

.recommended-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.recommended-name {
    font-size: 13px;
    color: #000;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommended-detail {
    font-size: 11px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Start Menu Footer */
.start-menu-footer {
    margin-top: auto;
    padding: 16px 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(242, 242, 242, 0.5);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px 6px 6px;
    border-radius: 6px;
    transition: all 0.1s ease;
    min-width: 0;
    width: auto;
}

    .user-profile:hover {
        background: rgba(255, 255, 255, 0.9);
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.user-name {
    font-size: 13px;
    color: #000;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #000;
    transition: all 0.1s ease;
    flex-shrink: 0;
}

    .footer-btn:hover {
        background: rgba(255, 255, 255, 0.9);
    }

    .footer-btn:active {
        background: rgba(0, 0, 0, 0.08);
    }

/* Logout Confirmation Dialog */
.logout-confirmation {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 100;
    pointer-events: auto;
}

.logout-dialog {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: dialogFadeIn 0.15s ease-out;
}

@keyframes dialogFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.logout-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 12px;
}

.logout-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.logout-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.logout-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s ease;
}

.logout-btn-cancel {
    background: #f3f3f3;
    color: #000;
}

    .logout-btn-cancel:hover {
        background: #e5e5e5;
    }

.logout-btn-confirm {
    background: #0067c0;
    color: #fff;
}

    .logout-btn-confirm:hover {
        background: #005a9e;
    }

.logout-btn:active {
    transform: scale(0.98);
}

/* Taskbar App Group (for grouped windows) */
.taskbar-app-group {
    position: relative;
    display: inline-block;
}

    /* Add padding at bottom to prevent gap between button and dropdown */
    .taskbar-app-group::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        right: 0;
        height: 10px;
        pointer-events: none;
    }

.taskbar-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    /* Stacked icon effect for multiple windows */
    .taskbar-icon-wrapper.stacked {
        filter: drop-shadow(1px 1px 0px rgba(0, 0, 0, 0.15)) drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.1));
    }

/* Taskbar window list dropdown - Preview Cards Style */
.taskbar-window-list {
    position: fixed;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 12px;
    z-index: 10001;
    animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    max-width: 90vw;
}

    /* Hide scrollbar for cleaner look */
    .taskbar-window-list::-webkit-scrollbar {
        height: 0px;
    }

    .taskbar-window-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .taskbar-window-list::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }

        .taskbar-window-list::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.3);
        }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Window list item - Preview Card Style */
.taskbar-window-list-item {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    background: rgba(249, 249, 249, 1);
    border: 2px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    width: 200px;
}

    .taskbar-window-list-item:hover {
        background: rgba(243, 243, 243, 1);
        border-color: rgba(0, 103, 192, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .taskbar-window-list-item.active {
        background: rgba(0, 103, 192, 0.08);
        border-color: rgba(0, 103, 192, 0.6);
    }

/* Preview thumbnail area */
.window-preview-thumbnail {
    width: 100%;
    height: 110px;
    background: linear-gradient(135deg, rgba(0, 103, 192, 0.06) 0%, rgba(0, 103, 192, 0.02) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px 6px 0 0;
    position: relative;
}

    .window-preview-thumbnail img {
        width: 48px;
        height: 48px;
        object-fit: contain;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }

    .window-preview-thumbnail i {
        font-size: 42px;
        color: rgba(0, 103, 192, 0.7);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }

/* Preview info area */
.window-preview-info {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.5);
}

    .window-preview-info span {
        flex: 1;
        font-size: 13px;
        color: rgba(0, 0, 0, 0.9);
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Close button in window list */
.window-list-close {
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    color: rgba(0, 0, 0, 0.7);
    flex-shrink: 0;
    position: absolute;
    top: 6px;
    right: 6px;
}

.taskbar-window-list-item:hover .window-list-close {
    opacity: 1;
}

.window-list-close:hover {
    background: rgba(232, 17, 35, 1);
    color: #fff;
    transform: scale(1.05);
}

.window-list-close i {
    font-size: 12px;
}

/* ========================================
   Tabbed Title Bar (Windows 11 Style)
   ======================================== */

.window-titlebar.tabbed {
    height: 40px;
    padding-left: 12px;
    background-color: #aec5dda8;
}

.titlebar-tabs-area {
    display: flex;
    align-items: center;
    flex: 1;
    height: 100%;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 8px;
}

.titlebar-tabs-area::-webkit-scrollbar {
    height: 0;
}

/* Individual Tab in Title Bar */
.window-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: background 0.1s ease;
    min-width: 0;
    max-width: 200px;
    margin-top: 8px;
}

.window-tab:hover {
    background: rgba(0, 0, 0, 0.04);
}

.window-tab.active {
    background: #fff;
    box-shadow: 0 -1px 0 #e5e5e5, -1px 0 0 #e5e5e5, 1px 0 0 #e5e5e5;
}

/* Tab Icon */
.window-tab .tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.window-tab .tab-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.window-tab .tab-icon i {
    font-size: 12px;
    color: #666;
}

.window-tab.active .tab-icon i {
    color: #0078d4;
}

/* Tab Title */
.window-tab .tab-title {
    font-size: 12px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tab Close Button */
.window-tab .tab-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    font-size: 10px;
    opacity: 0;
    transition: all 0.1s ease;
    flex-shrink: 0;
}

.window-tab:hover .tab-close-btn,
.window-tab.active .tab-close-btn {
    opacity: 1;
}

.window-tab .tab-close-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
}

/* New Tab Button */
.tab-new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    font-size: 12px;
    transition: all 0.1s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.tab-new-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1a1a1a;
}
