#desktop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    padding: 48px 16px 72px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    align-content: start;
    background-size: cover;
    background-position: center;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.desktop-icon img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.desktop-icon span {
    font-size: 12px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    word-break: break-word;
    max-width: 100%;
}

/* Selection Rectangle */
.selection-rectangle {
    position: absolute;
    border: 1px solid rgba(0, 122, 255, 0.5);
    background-color: rgba(0, 122, 255, 0.1);
    pointer-events: none;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: rgba(30, 30, 30, 0.65);
    backdrop-filter: blur(64px);
    border-radius: 6px;
    min-width: 80px;
    max-width: 400px;
    width: fit-content;
    padding: 4px;
    box-shadow: 0 0 0 0.5px #808080, 0 0 0 1px #00000080, 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
}

.context-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.context-menu-item {
    padding: 4px 8px;
    color: white;
    font-size: 12px;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 4px;
    height: 20px;
    position: relative;
    white-space: nowrap;
}

.context-menu-item:hover,
.context-menu-item.has-open-submenu {
    background-color: var(--accent-color);
}

.context-menu-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.context-menu-separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 4px 0;
}

.menu-item-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.menu-item-indicator {
    width: 14px;
    height: 14px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-item-indicator.radio {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}

.menu-item-indicator.radio.checked::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.menu-item-indicator.checkbox {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 2px;
}

.menu-item-indicator.checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 11px;
    line-height: 1;
}

.menu-shortcut {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-left: auto;
}

.context-menu-item:hover .menu-shortcut {
    color: white;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.context-menu-item:hover .submenu-arrow {
    color: white;
}

.context-menu.submenu {
    position: fixed;
    opacity: 0;
    pointer-events: none;
}

.context-menu.submenu.active {
    opacity: 1;
    pointer-events: auto;
}

/* Desktop Wallpaper */
.wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
}

/* Desktop Drop Zones */
.drop-zone {
    position: absolute;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.drop-zone.active {
    opacity: 1;
}

/* Desktop Notifications */
.desktop-notification {
    position: fixed;
    top: 40px;
    right: 20px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-size: 13px;
    max-width: 300px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
    z-index: 1200;
}

.desktop-notification.show {
    transform: translateX(0);
}

.desktop-notification .notification-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.desktop-notification .notification-body {
    opacity: 0.8;
}

/* Desktop Grid Snap */
.desktop-icons {
    position: relative;
}

.desktop-icons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 100px 120px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.desktop-icons.show-grid::before {
    opacity: 1;
} 