/* ═══════════════════════════════════════════════
   DESKTOP — Windows XP Luna Desktop
   Desktop, icons, taskbar, start menu, messenger
═══════════════════════════════════════════════ */

/* ══════════════════════════════════════
   DESKTOP AREA
══════════════════════════════════════ */
#desktop {
    position: fixed;
    inset: 0;
    bottom: 30px;
    background-image: url('../assets/bliss.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* ── Desktop Icons Container ── */
#desktop-icons {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px;
    z-index: 1;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 76px;
    padding: 6px 4px 4px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    user-select: none;
    transition: background 0.1s, border-color 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.desktop-icon:hover {
    background: rgba(49,106,197,0.3);
    border-color: rgba(49,106,197,0.5);
}

.desktop-icon.selected {
    background: rgba(49,106,197,0.45);
    border-color: rgba(49,106,197,0.7);
}

.icon-img {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.icon-img svg {
    width: 48px;
    height: 48px;
}

.icon-label {
    font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif;
    font-size: 11px;
    color: white;
    text-align: center;
    text-shadow:
        1px  1px 2px rgba(0,0,0,0.9),
       -1px -1px 2px rgba(0,0,0,0.9),
        1px -1px 2px rgba(0,0,0,0.9),
       -1px  1px 2px rgba(0,0,0,0.9);
    line-height: 1.3;
    word-break: break-word;
    max-width: 68px;
    pointer-events: none;
}

/* ══════════════════════════════════════
   TASKBAR
══════════════════════════════════════ */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(180deg, #2858CC 0%, #1A4AB8 40%, #1A4AB8 60%, #1A48B4 100%);
    border-top: 1px solid #4A7AE8;
    display: flex;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.35);
    padding-right: 2px;
}

/* ── Start Button ── */
#start-button {
    height: 100%;
    min-width: 92px;
    padding: 0 14px 0 8px;
    background: linear-gradient(180deg, #5EC42C 0%, #3CB018 50%, #3AAE16 51%, #2E9A10 100%);
    border: none;
    border-right: 1px solid #1A7A08;
    border-radius: 0 14px 14px 0;
    color: white;
    font-family: Tahoma, Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    font-style: italic;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 2px 0 6px rgba(0,0,0,0.3);
    flex-shrink: 0;
    letter-spacing: 0.5px;
    transition: filter 0.1s;
}

#start-button:hover   { filter: brightness(1.1); }
#start-button:active  { filter: brightness(0.9); }

.taskbar-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    margin: 0 4px;
    flex-shrink: 0;
}

/* ── Window Buttons Strip ── */
#taskbar-windows {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    overflow: hidden;
    padding: 0 2px;
}

.taskbar-btn {
    height: 22px;
    max-width: 160px;
    min-width: 80px;
    padding: 0 8px;
    background: linear-gradient(180deg, #3A75DC 0%, #1A55BC 100%);
    border: 1px solid #1245A0;
    border-radius: 3px;
    color: white;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    transition: filter 0.1s;
}

.taskbar-btn:hover { filter: brightness(1.15); }

.taskbar-btn.focused {
    background: linear-gradient(180deg, #1A55BC 0%, #3A75DC 100%);
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.3);
    border-color: #0A358A;
}

.taskbar-btn-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.taskbar-btn-icon svg { width: 14px; height: 14px; }

.taskbar-btn-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* ── System Tray ── */
#system-tray {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    background: linear-gradient(180deg, #1848B0 0%, #2258C8 100%);
    border-left: 1px solid #3A68DC;
    flex-shrink: 0;
}

#taskbar-clock {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    white-space: nowrap;
}

/* ══════════════════════════════════════
   START MENU
══════════════════════════════════════ */
#start-menu {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 390px;
    background: white;
    border: 1px solid #0055EA;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    box-shadow: 4px -4px 16px rgba(0,0,0,0.45);
    z-index: 9998;
    overflow: hidden;
    font-family: Tahoma, Arial, sans-serif;
}

.start-header {
    background: linear-gradient(180deg, #2574C0 0%, #1458A8 100%);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.start-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.85);
    object-fit: cover;
    object-position: top;
    background: #4A9BE8;
}

.start-username {
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.start-body {
    display: flex;
    min-height: 240px;
}

.start-left {
    flex: 1;
    padding: 8px 0;
    border-right: 1px solid #C8C0B0;
    overflow-y: auto;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 12px;
    color: #111;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
}

.start-menu-item:hover {
    background: #316AC5;
    color: white;
}

.start-menu-item-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-menu-item-icon svg { width: 24px; height: 24px; }

.start-menu-divider {
    height: 1px;
    background: #D0C8B8;
    margin: 6px 0;
}

.start-right {
    width: 150px;
    background: #D4E4F4;
    padding: 10px 8px;
    font-size: 12px;
    color: #3A3A8A;
    flex-shrink: 0;
}

.start-right-title {
    font-size: 11px;
    font-weight: bold;
    color: #3A3A8A;
    padding-bottom: 6px;
    border-bottom: 1px solid #9ABCD4;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.start-right-item {
    padding: 5px 6px;
    cursor: pointer;
    border-radius: 2px;
    font-size: 11px;
    color: #1A1A6A;
    transition: background 0.1s;
}

.start-right-item:hover { background: rgba(49,106,197,0.2); }

.start-right-divider {
    height: 1px;
    background: #9ABCD4;
    margin: 6px 0;
}

.start-footer {
    background: linear-gradient(180deg, #2574C0 0%, #1458A8 100%);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 5px 10px;
}

.start-footer-btn {
    background: linear-gradient(180deg, #4A8ADF 0%, #2568CB 100%);
    border: 1px solid #1A5ABF;
    border-radius: 4px;
    color: white;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    padding: 4px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    transition: filter 0.1s;
}

.start-footer-btn:hover  { filter: brightness(1.12); }
.start-footer-btn:active { filter: brightness(0.9); }

/* ══════════════════════════════════════
   PORTFOLIO LIVE MESSENGER
══════════════════════════════════════ */
#live-messenger {
    position: fixed;
    bottom: 38px;
    right: 16px;
    width: 248px;
    background: white;
    border: 1px solid #0066CC;
    border-radius: 6px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.45);
    z-index: 9990;
    overflow: hidden;
    font-family: Tahoma, Arial, sans-serif;
}

.messenger-header {
    background: linear-gradient(180deg, #1A6ADB 0%, #0A4EC0 100%);
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    user-select: none;
}

.messenger-title-icon { display: flex; align-items: center; }

.messenger-header > span:nth-child(2) {
    font-size: 11px;
    font-weight: bold;
    color: white;
    flex: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.messenger-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.15s;
}

.messenger-close-btn:hover { color: white; }

.messenger-body { padding: 10px; }

.messenger-profile {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.messenger-avatar {
    width: 46px;
    height: 46px;
    border-radius: 4px;
    border: 1px solid #CCC;
    object-fit: cover;
    object-position: top;
    background: #4A9BE8;
    flex-shrink: 0;
}

.messenger-name {
    font-size: 12px;
    font-weight: bold;
    color: #111;
    margin-bottom: 1px;
}

.messenger-role {
    font-size: 10px;
    color: #555;
    margin-bottom: 2px;
}

.messenger-loc {
    font-size: 10px;
    color: #888;
}

.messenger-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: #111;
    padding: 5px 0;
    border-top: 1px solid #EEE;
    border-bottom: 1px solid #EEE;
    margin-bottom: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22AA22;
    border: 1px solid #1A8A1A;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(34,170,34,0.6);
}

.messenger-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.messenger-links a {
    font-size: 11px;
    color: #0055CC;
    text-decoration: none;
    word-break: break-all;
    line-height: 1.4;
}

.messenger-links a:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   WINDOW CONTAINER
══════════════════════════════════════ */
#window-container {
    position: fixed;
    inset: 0;
    bottom: 30px;
    pointer-events: none;
    z-index: 100;
}

#window-container .xp-window {
    pointer-events: all;
}
