.desktop {
    width: 100vw;
    height: 100vh;
    background: url('../assets/desktop-wallpaper.jpg') center/cover no-repeat;
    position: relative;
    animation: fadeIn 1s ease-in-out 4s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Desktop Icons */
.desktop-icons {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px);
    gap: 20px;
    height: calc(100vh - 40px);
    align-content: start;
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s;
    user-select: none;
    width: 90px;
}

.icon:hover {
    background: rgba(255, 255, 255, 0.15);
}

.icon.selected {
    background: rgba(51, 153, 255, 0.3);
    border: 1px solid rgba(51, 153, 255, 0.6);
}

.icon img {
    width: 48px;
    height: 48px;
    margin-bottom: 5px;
    pointer-events: none;
}

.icon span {
    color: #fff;
    font-size: 12px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 100%;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, 
        rgba(235, 238, 250, 0.95) 0%,
        rgba(207, 221, 238, 0.95) 50%,
        rgba(181, 203, 225, 0.95) 51%,
        rgba(163, 191, 220, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2);
}

.start-button {
    height: 100%;
    padding: 0 20px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.3), 
        rgba(200, 220, 240, 0.3));
    border: none;
    border-right: 1px solid rgba(150, 180, 210, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.start-button:hover {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.5), 
        rgba(220, 235, 250, 0.5));
}

.start-button:active,
.start-button.active {
    background: linear-gradient(to bottom, 
        rgba(150, 180, 210, 0.5), 
        rgba(180, 210, 240, 0.5));
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.start-button img {
    width: 24px;
    height: 24px;
}

.start-button span {
    color: #2e2e2e;
    font-weight: 600;
    font-size: 13px;
}

.taskbar-items {
    flex: 1;
    display: flex;
    gap: 5px;
    padding: 0 5px;
    overflow-x: auto;
    overflow-y: hidden;
}

.taskbar-items::-webkit-scrollbar {
    height: 0;
}

.taskbar-item {
    height: 32px;
    padding: 0 15px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.4), 
        rgba(200, 220, 240, 0.4));
    border: 1px solid rgba(150, 180, 210, 0.6);
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 150px;
    max-width: 200px;
}

.taskbar-item:hover {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.6), 
        rgba(220, 235, 250, 0.6));
}

.taskbar-item.active {
    background: linear-gradient(to bottom, 
        rgba(180, 210, 240, 0.7), 
        rgba(200, 225, 250, 0.7));
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.taskbar-item img {
    width: 20px;
    height: 20px;
}

.taskbar-item span {
    color: #2e2e2e;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* System Tray */
.system-tray {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    gap: 10px;
    border-left: 1px solid rgba(150, 180, 210, 0.5);
}

.tray-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tray-icon {
    position: relative;
    background: none;
    border: none;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.8;
    border-radius: 2px;
    transition: opacity 0.15s, background 0.15s, filter 0.2s;
}

.tray-icon img {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.tray-icon:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.tray-icon:active {
    background: rgba(51, 153, 255, 0.15);
}

.tray-icon.active {
    background: rgba(51, 153, 255, 0.15);
}

#network-icon {
    position: relative;
}

#network-icon img {
    opacity: 0.9;
}

#network-icon:hover img {
    opacity: 1;
}

.volume-icon .mute-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: url('../assets/icons/red cross_icon.png') center/cover no-repeat;
    opacity: 0;
    transition: opacity 0.15s;
}

.volume-icon.muted {
    filter: grayscale(60%) brightness(0.7);
}

.volume-icon.muted .mute-indicator {
    opacity: 1;
}

.volume-icon.level-low {
    filter: brightness(0.9);
}

.volume-icon.level-medium {
    filter: brightness(1);
}

.volume-icon.level-high {
    filter: brightness(1.1);
}

.clock {
    color: #2e2e2e;
    font-size: 12px;
    font-weight: 500;
    padding: 0 5px;
}

.show-desktop {
    width: 10px;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(150, 180, 210, 0.3), 
        rgba(200, 220, 240, 0.3));
    border: none;
    border-left: 1px solid rgba(150, 180, 210, 0.5);
    cursor: pointer;
    transition: all 0.15s;
}

.show-desktop:hover {
    background: linear-gradient(to right, 
        rgba(180, 210, 240, 0.5), 
        rgba(220, 235, 250, 0.5));
}

.show-desktop:active {
    background: rgba(51, 153, 255, 0.3);
}

/* Balloon Notification (Network Popup) */
.balloon-notification {
    position: fixed;
    bottom: 50px;
    right: 20px;
    width: 320px;
    background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
    border: 1px solid #a0a0a0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: balloonSlideIn 0.3s ease-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.balloon-notification.hidden {
    display: none;
}

@keyframes balloonSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes balloonSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.balloon-notification.hiding {
    animation: balloonSlideOut 0.3s ease-out;
}

.balloon-arrow {
    position: absolute;
    bottom: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #f5f5f5;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.balloon-arrow::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #a0a0a0;
}

.balloon-content {
    padding: 12px;
}

.balloon-header {
    display: flex;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.balloon-body {
    padding-top: 10px;
    font-size: 13px;
    color: #333;
}

.balloon-body p {
    margin: 0;
}

/* Context Menu Styles */
.context-menu {
    background: linear-gradient(to bottom, #f0f0f0 0%, #e8e8e8 100%);
    border: 1px solid #a0a0a0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 4px 0;
    min-width: 180px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    z-index: 10001;
    animation: contextMenuFadeIn 0.15s ease-out;
}

@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.1s;
    white-space: nowrap;
    color: #2e2e2e;
    position: relative;
}

.context-menu-item:hover {
    background: linear-gradient(to bottom, #3399ff 0%, #2e8bff 100%);
    color: white;
}

.context-menu-item-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.context-menu-item-disabled:hover {
    background: #f0f0f0 !important;
    color: #999 !important;
}

.context-menu-item img {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    pointer-events: none;
}

.context-menu-item span {
    pointer-events: none;
    flex: 1;
}

.context-menu-separator {
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #c0c0c0 50%, transparent 100%);
    margin: 4px 0;
}

/* Drag and Drop Styles */
.icon.dragging {
    opacity: 0.8;
    transform: scale(1.05);
    z-index: 10000;
    pointer-events: none;
    transition: none !important;
}

.icon.drag-over-trash {
    animation: trashPulse 0.5s ease-in-out infinite alternate;
    background: rgba(255, 0, 0, 0.2) !important;
    border: 2px solid #ff0000 !important;
}

@keyframes trashPulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* Prevent layout shifts during drag */
.desktop-icons {
    position: relative;
    min-height: calc(100vh - 40px);
}

/* Ensure trash icon stays visible */
.icon[data-window="recycle-bin"] {
    position: relative;
    z-index: 1;
}

