/* Desktop Environment Styles */

/* Taskbar Styles */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(32, 32, 32, 0.85);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    padding: 0 12px;
}

.taskbar-left {
    display: flex;
    align-items: center;
}

.taskbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.taskbar-right {
    display: flex;
    align-items: center;
}

.start-button {
    width: 40px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.start-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.start-button:active {
    background: rgba(255, 255, 255, 0.3);
}

.start-icon {
    font-size: 18px;
    font-weight: bold;
}

.taskbar-icon {
    width: 40px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    margin: 0 4px;
    position: relative;
}

.taskbar-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.taskbar-icon.active {
    background: rgba(255, 255, 255, 0.3);
}

.taskbar-icon.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
}

.taskbar-icon-image {
    width: 24px;
    height: 24px;
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 14px;
}

.tray-icon {
    padding: 4px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.system-time {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    white-space: nowrap;
}

/* Desktop Icon Styles */
.desktop-icon {
    position: fixed;
    width: 64px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    background: none;
    border-radius: 4px;
    padding: 8px;
    transition: background 0.2s ease;
    user-select: none;
}

.desktop-icon:hover {
    background: none;
}

.desktop-icon.selected {
    background: rgba(0, 120, 215, 0.4);
    border: 1px solid rgba(0, 120, 215, 0.8);
}

.icon-image {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
}

.icon-label {
    color: #ffffff;
    font-size: 11px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    word-wrap: break-word;
    max-width: 60px;
    line-height: 1.2;
}

/* Desktop Icon Grid */
.desktop-icons-container {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 68px; /* Above taskbar */
    display: grid;
    grid-template-columns: repeat(auto-fit, 80px);
    grid-auto-rows: 100px;
    gap: 10px;
    padding: 20px;
    z-index: 999;
    pointer-events: none;
}

.desktop-icons-container .desktop-icon {
    position: relative;
    pointer-events: all;
}

/* Start Menu Styles */
.start-menu {
    position: fixed;
    bottom: 60px;
    left: 12px;
    width: 320px;
    max-height: 400px;
    background: rgba(32, 32, 32, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: none;
    overflow: hidden;
}

.start-menu.show {
    display: block;
    animation: startMenuSlideUp 0.2s ease-out;
}

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

.start-menu-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.start-menu-apps {
    padding: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.start-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #ffffff;
    text-decoration: none;
}

.start-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.start-menu-item-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.start-menu-item-text {
    font-size: 13px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Desktop Context Menu */
.desktop-context-menu {
    position: fixed;
    background: rgba(32, 32, 32, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    display: none;
    min-width: 180px;
    overflow: hidden;
}

.desktop-context-menu.show {
    display: block;
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 13px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-item.disabled {
    color: rgba(255, 255, 255, 0.5);
    cursor: default;
}

.context-menu-item.disabled:hover {
    background: transparent;
}

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

/* Window Animations */
@keyframes windowOpen {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes windowMinimize {
    to {
        opacity: 0;
        transform: translate(-50%, calc(50vh + 200px)) scale(0.05);
    }
}

.window-opening {
    animation: windowOpen 0.3s ease-out;
}

.window-minimizing {
    animation: windowMinimize 0.4s ease-in-out;
}