/* Windows XP Desktop Icons and Layout */

/* Desktop Icons Container */
.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    display: grid;
    grid-template-columns: repeat(2, 76px);
    grid-auto-rows: 90px;
    gap: 24px 20px; /* Vertical gap, horizontal gap */
    z-index: 1;
    height: calc(100vh - 120px); /* Fill available height */
    width: auto;
    max-width: 180px;
}

/* Desktop Icon Styling */
.desktop-icon {
    width: 76px;
    height: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    padding: 4px;
    border-radius: 2px;
    transition: background-color 0.1s ease;
    user-select: none;
    position: relative;
}

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

.desktop-icon.selected {
    background-color: rgba(0, 84, 227, 0.3);
    border: 1px dotted rgba(255, 255, 255, 0.8);
}

.desktop-icon:active {
    background-color: rgba(0, 84, 227, 0.5);
}

/* Icon Image Container */
.icon-image {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    position: relative;
}

.icon-image img {
    width: 48px;
    height: 48px;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.icon-fallback {
    font-size: 32px;
    display: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 48px;
}

.icon-fallback.social-icon {
    display: flex !important;
    width: 48px !important;
    height: 48px !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    flex-shrink: 0 !important;
}

/* Social Media Icon Fallbacks */
.social-icon {
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    flex-shrink: 0 !important;
}

.icon-fallback.linkedin-icon {
    background: linear-gradient(135deg, #0077b5, #005885) !important;
    color: white !important;
    border-radius: 6px !important;
    font-size: 20px !important;
    font-family: Arial, sans-serif !important;
}

.icon-fallback.x-icon {
    background: linear-gradient(135deg, #000000, #1a1a1a) !important;
    color: white !important;
    border-radius: 6px !important;
    font-size: 24px !important;
    font-family: Arial, sans-serif !important;
}

.icon-fallback.github-icon {
    background: linear-gradient(135deg, #24292e, #1a1d21) !important;
    color: white !important;
    border-radius: 50% !important;
    font-size: 16px !important;
}

.github-icon svg {
    width: 100% !important;
    height: 100% !important;
}

/* Icon Label */
.icon-label {
    color: white;
    font-size: 11px;
    font-weight: normal;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 70px;
    font-family: 'Tahoma', 'MS Sans Serif', Arial, sans-serif;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Taller icons for longer labels */
.desktop-icon[data-app="music-player"],
.desktop-icon[data-app="internet-explorer"] {
    height: 95px;
}

/* Context Menu */
.context-menu {
    position: absolute;
    background: var(--xp-gray);
    border: 1px solid var(--xp-border-dark);
    box-shadow: 2px 2px 4px var(--xp-shadow);
    z-index: 10000;
    min-width: 150px;
    font-family: 'Tahoma', 'MS Sans Serif', Arial, sans-serif;
    font-size: 11px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    position: relative;
}

.menu-item:hover {
    background: var(--xp-blue);
    color: white;
}

.menu-item.disabled {
    color: var(--xp-gray-dark);
    cursor: default;
}

.menu-item.disabled:hover {
    background: transparent;
    color: var(--xp-gray-dark);
}

.menu-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.menu-text {
    flex: 1;
}

.menu-shortcut {
    margin-left: 16px;
    color: var(--xp-gray-dark);
    font-size: 10px;
}

.menu-arrow {
    margin-left: auto;
    color: var(--xp-text);
    font-size: 10px;
}

.menu-separator {
    height: 1px;
    background: var(--xp-border-dark);
    margin: 2px 4px;
}

/* Start Menu */
.start-menu {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 280px;
    background: var(--xp-gray);
    border: 2px solid;
    border-color: var(--xp-border-light) var(--xp-border-dark) var(--xp-border-dark) var(--xp-border-light);
    box-shadow: 2px 2px 4px var(--xp-shadow);
    z-index: 10001;
    font-family: 'Tahoma', 'MS Sans Serif', Arial, sans-serif;
}

.start-menu-header {
    background: linear-gradient(90deg, var(--xp-blue) 0%, var(--xp-blue-dark) 100%);
    color: white;
    padding: 8px 12px;
    border-bottom: 1px solid var(--xp-border-dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    font-size: 24px;
}

.user-name {
    font-size: 12px;
    font-weight: bold;
}

.start-menu-items {
    padding: 4px 0;
}

.start-menu .menu-item {
    padding: 6px 12px;
    font-size: 11px;
}

.start-menu .menu-item:hover {
    background: var(--xp-blue-light);
    color: white;
}

/* Windows Container */
.windows-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
    pointer-events: none;
} 

/* Responsive Desktop Icons */
@media (max-width: 768px) {
    .desktop-icons {
        top: 15px;
        left: 15px;
        gap: 20px 16px;
        grid-template-columns: repeat(2, 64px); /* 2 columns on tablets */
        grid-auto-rows: 80px;
        height: calc(100vh - 100px);
        max-width: 150px;
    }
    
    .desktop-icon {
        width: 64px;
        height: 64px;
    }
    
    .icon-image {
        width: 40px;
        height: 40px;
    }
    
    .icon-image img {
        width: 40px;
        height: 40px;
    }
    
    .icon-fallback {
        font-size: 28px;
    }
    
    .social-icon {
        width: 40px !important;
        height: 40px !important;
    }
    
    .github-icon svg {
        width:100% !important;
        height: 100% !important;
    }
    
    .icon-label {
        font-size: 10px;
        max-width: 60px;
    }
}

@media (max-width: 480px) {
    .desktop-icons {
        top: 10px;
        left: 10px;
        gap: 18px 14px;
        grid-template-columns: repeat(2, 56px); /* 2 columns on mobile for better space usage */
        grid-auto-rows: 70px;
        height: calc(100vh - 80px);
        max-width: 130px;
    }
    
    .desktop-icon {
        width: 56px;
        height: 56px;
    }
    
    .icon-image {
        width: 36px;
        height: 36px;
    }
    
    .icon-image img {
        width: 36px;
        height: 36px;
    }
    
    .icon-fallback {
        font-size: 24px;
    }
    
    .social-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    
    .linkedin-icon {
        font-size: 16px !important;
    }
    
    .x-icon {
        font-size: 18px !important;
    }
    
    .github-icon svg {
        width: 100% !important;
        height: 100% !important;
    }
    
    .icon-label {
        font-size: 9px;
        max-width: 52px;
    }
    
    .start-menu {
        width: 240px;
    }
    
    .context-menu {
        min-width: 120px;
        font-size: 10px;
    }
} 