html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* All debug CSS removed - shell provides explicit layout via projection metadata */

/* Debug CSS removed - agent provides explicit colors, sizes, and layout */

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* UI Controls - Dynamic Window Components */
.ui-control-button {
    padding: 8px 16px;
    margin: 4px;
    background-color: #1b6ec2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
}

.ui-control-button:hover {
    background-color: #1861ac;
}

.ui-control-button:active {
    transform: scale(0.97);
    opacity: 0.8;
}

.ui-control-input {
    width: 100%;
    padding: 10px 12px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.05);
    color: #f5f5f5;
    line-height: 1.4;
    height: 40px; /* Match button height */
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.ui-control-textarea {
    width: 100%;
    padding: 10px 12px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.05);
    color: #f5f5f5;
    line-height: 1.4;
    min-height: 40px; /* Match button height for single line */
    max-height: 120px; /* Max 6 lines */
    overflow-y: auto;
    resize: none;
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.ui-control-input:focus,
.ui-control-textarea:focus {
    outline: none;
    border-color: rgba(66, 135, 245, 0.8);
    box-shadow: 0 0 0 2px rgba(66, 135, 245, 0.3);
    background-color: rgba(255, 255, 255, 0.08);
}

.ui-control-markdown {
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    overflow-y: auto;
    height: 100%;
    scroll-behavior: smooth;
}

.ui-control-text {
    margin: 8px 0;
}

html, body {
    height: 100%;
    /* No default background - shell projection provides styling */
    color: #f5f5f5;
}

:root {
    --taskbar-height: 64px;
}

.desktop-layout-root {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.desktop-shell {
    position: relative;
    height: 100%;
    width: 100%;
    /* No default background - shell projection provides styling */
    color: #f5f5f5;
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* No padding - shell grid layout handles taskbar positioning */
}

.desktop-surface {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* No overflow hidden - shell grid layout handles content bounds */
}

.desktop-layer {
    position: absolute;
    inset: 0;
    /* REMOVED pointer-events: none - was blocking all pointer events including drag/drop */
}

.desktop-background {
    padding: 32px;
    z-index: 1;
}

.desktop-background-empty {
    padding: 24px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 420px;
}

.desktop-pin-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    pointer-events: auto;
}

.desktop-pin {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.desktop-pin:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

.desktop-pin-icon {
    font-size: 28px;
}

.desktop-pin-title {
    font-size: 14px;
    text-align: center;
}

.desktop-windows {
    padding: 0;
    z-index: 2;
    pointer-events: auto;
}

.desktop-window-viewport {
    position: relative;
    width: 100%;
    height: 100%;
}

.desktop-window-card {
    position: absolute;
    pointer-events: auto;
    background: rgba(27, 33, 46, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.desktop-window-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(42, 48, 66, 0.95), rgba(24, 29, 45, 0.9));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: move;
    user-select: none;
}

.desktop-window-titlebar .desktop-window-title {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.desktop-window-content {
    padding: 12px;
    height: calc(100% - 44px);
    overflow: auto;
    min-height: 160px;
}

.desktop-empty-state {
    max-width: 480px;
    padding: 32px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.desktop-taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--taskbar-height);
    background: rgba(8, 10, 15, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    z-index: 3;
}

.start-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, rgba(37, 98, 255, 0.18), rgba(37, 98, 255, 0.05));
}

.taskbar-main {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr) 100px;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

.start-button {
    width: 96px;
    height: 42px;
    background: #2562ff;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.start-button:hover {
    background: #3c75ff;
}

.taskbar-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.taskbar-placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.taskbar-pin,
.taskbar-window {
    background: transparent;
    border: 1px solid transparent;
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease;
}

.taskbar-pin:hover,
.taskbar-window:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.taskbar-window {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.taskbar-window-active {
    background: rgba(37, 98, 255, 0.2);
    border-color: rgba(37, 98, 255, 0.5);
}

.taskbar-window-icon {
    font-size: 16px;
}

.taskbar-window-title {
    font-size: 14px;
}

.taskbar-clock {
    display: flex;
    justify-content: flex-end;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    min-width: 64px;
    text-align: right;
}

.start-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 10, 0.65);
    z-index: 4;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 24px calc(var(--taskbar-height) + 16px) 24px;
}

.start-menu-panel {
    width: 520px;
    max-width: 100%;
    background: rgba(18, 22, 33, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

.start-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.start-menu-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
}

.start-menu-body section {
    margin-bottom: 18px;
}

.start-menu-agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.start-menu-agent {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.start-menu-agent:hover {
    border-color: rgba(37, 98, 255, 0.6);
    background: rgba(37, 98, 255, 0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.start-menu-agent-disabled,
.start-menu-agent-disabled:hover {
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    transform: none;
}

.start-menu-agent-offline {
    border-color: rgba(255, 196, 0, 0.6);
}

.start-menu-agent-loading {
    opacity: 0.75;
}

.agent-icon {
    font-size: 24px;
}

.agent-name {
    font-weight: 600;
}

.agent-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.start-menu-window-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.start-menu-window-list li button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 6px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.start-menu-window-list li button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.start-menu-window-meta {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.start-menu-empty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.desktop-status-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 280px;
    background: rgba(3, 5, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    z-index: 4;
    font-size: 13px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

/* Voice Input Button Styles */
.input-with-voice {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-voice input,
.input-with-voice textarea {
    flex: 1;
    padding-right: 40px; /* Make room for button */
}

.voice-input-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voice-input-button:hover {
    transform: translateY(-50%) scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

.voice-input-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.voice-input-icon {
    width: 16px;
    height: 16px;
    color: #666;
}

.voice-input-idle .voice-input-icon {
    color: #888;
}

.voice-input-recording .voice-input-icon {
    color: #ff4444;
    animation: pulse 1.5s ease-in-out infinite;
}

.voice-input-processing .voice-input-icon {
    color: #4444ff;
    animation: spin 1s linear infinite;
}

.voice-input-error .voice-input-icon {
    color: #ff0000;
}

.voice-input-error-tooltip {
    position: absolute;
    top: -32px;
    right: 0;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Voice input text injection flash */
.voice-input-flash {
    animation: voice-flash 0.5s ease-out;
}

@keyframes voice-flash {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(68, 68, 255, 0);
    }
    50% {
        box-shadow: 0 0 10px 2px rgba(68, 68, 255, 0.7);
    }
}

/* Global Voice Input Trigger (Taskbar) */
.global-voice-trigger {
    display: flex;
    align-items: center;
    padding: 0 8px;
    margin-right: 12px;
}

.voice-trigger-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.voice-trigger-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(68, 68, 255, 0.3);
}

.voice-trigger-button:active {
    transform: scale(0.95);
}

/* Dynamic UI Component Styles */
.ui-window {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(18, 22, 33, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ui-grid {
    /* Grid container - agent provides grid-template-rows and grid-template-columns via inline styles */
    display: grid;
}

.grid-cell {
    /* Grid cells must clip content to prevent overflow into adjacent cells */
    overflow: hidden;
}

.ui-stack {
    /* Stack container - inherits background from parent */
    position: relative; /* Allow absolutely positioned children to be positioned relative to this container */
}

.ui-stack.horizontal {
    display: flex;
    flex-direction: row;
}

.ui-stack.vertical {
    display: flex;
    flex-direction: column;
}

.ui-region {
    /* Individual region/cell - add background for visibility */
}

/* Start Menu specific styles */

/* Start Menu taskbar (Row 1) - dark background */
[data-window-id="__start_menu__"] .ui-region.grid-cell:nth-child(2) {
    background: rgba(8, 10, 15, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Start Menu desktop panel (Row 0) - lighter background */
[data-window-id="__start_menu__"] .ui-region.grid-cell:nth-child(1) {
    background: rgba(18, 22, 33, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Generic button base styling */
.ui-control-button {
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    transition: background 0.2s ease, border 0.2s ease;
}

/* Button variant: contained */
.ui-button-variant-contained {
    border-width: 2px;
}

/* Button color: primary */
.ui-button-color-primary {
    background: #2562FF;
    color: white;
    border-color: #2562FF;
}

.ui-button-color-primary:hover {
    background: #1E4FCC;
    border-color: #1E4FCC;
}

/* Button color: secondary */
.ui-button-color-secondary {
    background: #6C757D;
    color: white;
    border-color: #6C757D;
}

.ui-button-color-secondary:hover {
    background: #5A6268;
    border-color: #5A6268;
}

/* Generic window chrome for floating windows */
[data-window-id][style*="position:absolute"] {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(18, 22, 33, 0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Title bar styling - targets layouts with chrome="titlebar" trait */
.ui-stack[style*="cursor:move"] {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
    min-height: 40px;
    display: flex;
    align-items: center;
}

/* Window content area */
[data-window-id][style*="position:absolute"] .ui-stack:not([style*="cursor:move"]) {
    overflow: auto;
}

/* Window chrome button hover effects - NOW HANDLED VIA HOVER TRAITS */
/* Hover styles are defined in ChatWindowBuilder as unified traits */
/* and rendered by DynamicWindowComponentBase.BuildHoverCss() */
.ui-grid[style*="cursor:move"] button {
    pointer-events: auto;
}
/* Projection well loading indicators - shows while waiting for agent patches */
.ui-projection-empty {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 32px;
    background: linear-gradient(
        90deg,
        rgba(240, 240, 240, 0.8) 25%,
        rgba(250, 250, 250, 0.9) 50%,
        rgba(240, 240, 240, 0.8) 75%
    );
    background-size: 200% 100%;
    animation: projection-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes projection-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Dark mode support for projection loading */
@media (prefers-color-scheme: dark) {
    .ui-projection-empty {
        background: linear-gradient(
            90deg,
            rgba(40, 40, 40, 0.6) 25%,
            rgba(60, 60, 60, 0.8) 50%,
            rgba(40, 40, 40, 0.6) 75%
        );
        background-size: 200% 100%;
    }
}

/* Window Resize Handles */
.window-resize-handle {
    position: absolute;
    z-index: 1000;
    background: transparent;
    transition: background-color 0.15s ease;
}

.window-resize-handle:hover {
    background: rgba(59, 130, 246, 0.3);
}

/* Edge handles */
.resize-n {
    top: 0;
    left: 8px;
    right: 8px;
    height: 8px;
    cursor: ns-resize;
}

.resize-s {
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 8px;
    cursor: ns-resize;
}

.resize-e {
    right: 0;
    top: 8px;
    bottom: 8px;
    width: 8px;
    cursor: ew-resize;
}

.resize-w {
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 8px;
    cursor: ew-resize;
}

/* Corner handles */
.resize-ne {
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nesw-resize;
}

.resize-nw {
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
}

.resize-se {
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
}

.resize-sw {
    bottom: 0;
    left: 0;
    width: 16px;
    height: 16px;
    cursor: nesw-resize;
}
