.desktop-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  z-index: 100;
  font-family: var(--font-body);
  font-size: 14px;
}

/* Left Section: Brand & Quick Menu */
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.brand-icon {
  width: 10px;
  height: 10px;
  background: var(--accent-cyan);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.menu-item {
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.menu-item:hover {
  color: var(--text-main);
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.2);
}


.system-clock {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Right Section: System Indicators */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.status-tray {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.status-icon {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}

/* App Launcher Dropdown */
.app-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 5px;
  min-width: 160px;
  background: rgba(10, 13, 29, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 500;
  overflow: hidden;
  padding: 5px 0;
}

.app-dropdown.show {
  display: block;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  color: var(--text-muted);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.dropdown-item:hover {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.06);
  border-left-color: var(--accent-cyan);
}

/* Desktop Shortcuts */
.desktop-shortcuts {
  position: absolute;
  top: 60px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 10;
}

.shortcut-icon {
  width: 76px;
  height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shortcut-icon:hover {
  background: rgba(0, 240, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}

.shortcut-icon.selected {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.4);
}

.shortcut-symbol {
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shortcut-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.5px;
  text-align: center;
}

/* Custom Icons for Desktop Shortcuts */
.launch-icon {
  background: url('../assets/icons/missions.png') no-repeat center/contain;
}

.terminal-icon {
  background: url('../assets/icons/terminal.png') no-repeat center/contain;
}

.starmap-icon {
  background: url('../assets/icons/starmap.png') no-repeat center/contain;
}

/* NASA APOD Background */
#desktop-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 1s ease-in-out;
}

#desktop-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 9, 19, 0.45); /* keep icons legible */
  backdrop-filter: saturate(1.2);
}

/* APOD Info button in Top Bar */
.apod-info-btn {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  height: 24px;
}

.apod-info-btn:hover {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.2);
}

.apod-info-btn .info-icon {
  font-size: 13px;
  margin-top: -1px;
}

/* APOD Info Card */
.apod-info-card {
  position: absolute;
  right: 20px;
  top: 50px;
  width: 340px;
  max-height: 480px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  box-shadow: var(--glass-shadow);
  z-index: 1000;
  display: none;
  flex-direction: column;
  color: var(--text-main);
  font-family: var(--font-body);
  animation: apodFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.apod-info-card.show {
  display: flex;
}

.apod-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.apod-card-header h3 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
}

.apod-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.apod-close-btn:hover {
  color: var(--accent-magenta);
}

.apod-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
  overflow-y: auto;
}

#apod-title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.3;
}

.apod-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -6px;
}

.apod-explanation {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 6px;
  color: #cdd6e4;
  text-align: left;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

/* Custom Scrollbar for Explanation */
.apod-explanation::-webkit-scrollbar {
  width: 4px;
}
.apod-explanation::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}
.apod-explanation::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.apod-copyright {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

@keyframes apodFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shortcut Tooltip */
.shortcut-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(10, 13, 29, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  white-space: nowrap;
  z-index: 99999;
  animation: tooltipFadeIn 0.2s ease-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.shortcut-tooltip.fade-out {
  opacity: 0;
  transform: translate(-50%, -95%);
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -95%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -100%);
  }
}