@import url('https://fonts.googleapis.com/css2?family=Lucida+Grande&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  min-height: 100vh;
  background: url('images/ML.jpg') center center / cover no-repeat fixed;
  overflow: hidden;
  user-select: none;
}

/* =============================================
   MENU BAR
   ============================================= */
#menu-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 22px;
  background: linear-gradient(180deg,
    rgba(230,230,230,0.92) 0%,
    rgba(196,196,196,0.88) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.25);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 2px;
  z-index: 100;
}

.menu-apple {
  font-size: 14px;
  padding: 0 8px;
  color: #1a1a1a;
  cursor: default;
  border-radius: 3px;
}

.menu-apple:hover { background: rgba(0,0,0,0.1); }

.menu-item {
  font-size: 13px;
  padding: 1px 8px;
  color: #1a1a1a;
  cursor: default;
  border-radius: 3px;
  white-space: nowrap;
  text-decoration: none;
}

.menu-bold { font-weight: bold; }
.menu-item:hover { background: rgba(0,0,0,0.12); }

.menu-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

#menu-clock {
  font-size: 12px;
  color: #1a1a1a;
  padding: 1px 8px;
}

/* =============================================
   DESKTOP ICONS
   ============================================= */
#desktop {
  position: absolute;
  top: 32px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  width: 80px;
  padding: 8px 4px;
  border-radius: 8px;
  transition: background 0.15s ease;
  cursor: default;
}

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

.icon-img {
  width: 64px;
  height: 64px;
  background: linear-gradient(180deg, #ffffff 0%, #d8d8d8 100%);
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.3),
    0 1px 0 rgba(255,255,255,0.8) inset;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.desktop-icon:hover .icon-img {
  transform: scale(1.06);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.8) inset;
}

.desktop-icon span {
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6);
  text-align: center;
  max-width: 80px;
  word-break: break-word;
  line-height: 1.3;
}

/* =============================================
   DOCK  —  ML trapezoid tray
   ============================================= */
#dock-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

#dock {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 24px 12px;
  position: relative;
  background: transparent;
}

/* Trapezoid tray rendered as SVG background via inline element */
#dock-tray {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* =============================================
   DOCK ITEMS
   ============================================= */
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  position: relative;
  transition: transform 0.15s ease;
}

.dock-item:hover {
  transform: translateY(-14px) scale(1.25);
}

/* Tooltip label */
.dock-item:hover::before {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #f0f0f0 0%, #d8d8d8 100%);
  border: 1px solid #999;
  border-radius: 5px;
  padding: 2px 10px;
  font-size: 12px;
  font-family: 'Lucida Grande', sans-serif;
  color: #1a1a1a;
  white-space: nowrap;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.35),
    0 1px 0 rgba(255,255,255,0.7) inset;
  pointer-events: none;
  z-index: 10;
}

/* Reflection — flipped copy of the icon beneath it */
.dock-item::after {
  content: attr(data-emoji);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) scaleY(-0.4);
  transform-origin: top center;
  font-size: 52px;
  line-height: 1;
  opacity: 0.25;
  filter: blur(1px);
  pointer-events: none;
}

.dock-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(180deg, #f8f8f8 0%, #d0d0d0 100%);
  border-radius: 11px;
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow:
    0 3px 8px rgba(0,0,0,0.35),
    0 1px 0 rgba(255,255,255,0.85) inset,
    0 -1px 0 rgba(0,0,0,0.1) inset;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  position: relative;
  transition: box-shadow 0.15s ease;
}

/* Gloss on individual icons */
.dock-icon::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 48%;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.55) 0%,
    rgba(255,255,255,0.1) 100%
  );
  border-radius: 12px 12px 50% 50%;
  pointer-events: none;
}

.dock-item:hover .dock-icon {
  box-shadow:
    0 8px 20px rgba(0,0,0,0.4),
    0 1px 0 rgba(255,255,255,0.85) inset;
}

/* =============================================
   DOCK DIVIDER
   ============================================= */
.dock-divider {
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255,255,255,0.5) 30%,
    rgba(255,255,255,0.5) 70%,
    transparent 100%
  );
  margin: 0 2px;
  align-self: center;
}
