:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --menu-height: 28px;
  --dock-height: 70px;
  --control-red: #ff5f57;
  --control-yellow: #febc2e;
  --control-green: #28c840;
  --glass-bg: rgba(255, 255, 255, 0.2);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --accent: #007aff;
  --radius: 12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: var(--font-main); }

.hidden { display: none !important; }

/* Lock Screen */
.lock-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex; align-items: center; justify-content: center;
  color: white; cursor: pointer; transition: opacity 0.5s ease;
}
#lock-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; display: none;
}
#lock-video.ready { display: block; }
.lock-video-shade {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0; transition: opacity 0.6s ease; pointer-events: none;
}
.lock-video-shade.ready { opacity: 1; }
.lock-screen.fade-out { opacity: 0; pointer-events: none; }
.lock-content { text-align: center; position: relative; z-index: 2; }
.lock-clock { font-size: 96px; font-weight: 300; letter-spacing: -2px; }
.lock-date { font-size: 24px; font-weight: 400; margin-top: 8px; opacity: 0.9; }
.lock-hint { font-size: 22px; margin-top: 48px; opacity: 0.7; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* Desktop */
.desktop { position: fixed; inset: 0; overflow: hidden; }
.wallpaper {
  position: absolute; inset: 0; z-index: 0;
  background: url('https://images.unsplash.com/photo-1579546929518-9e396f3cc809?q=80&w=2564&auto=format&fit=crop') center/cover no-repeat;
  transition: background 0.5s ease;
}
.wallpaper.dark {
  background: url('../assets/wallpapers/macos-big-sur.jpg') center/cover no-repeat;
}

/* Menu Bar */
.menu-bar {
  position: absolute; top: 0; left: 0; right: 0; height: var(--menu-height); z-index: 1000;
  background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; font-size: 13px; color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.menu-left, .menu-right { display: flex; align-items: center; gap: 16px; }
.apple-menu { font-size: 16px; cursor: pointer; }
.app-name { font-weight: 600; }
.menu-items { display: flex; gap: 14px; }
.menu-items span { cursor: pointer; opacity: 0.9; }
.menu-items span:hover { opacity: 1; }
.status-icon { cursor: pointer; font-size: 14px; }
/* The Schedule-a-Call menu-bar item is a real <a> — strip default link styling */
a.status-icon { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
a.status-icon:hover { opacity: 0.75; }
.menu-clock { font-weight: 500; min-width: 130px; text-align: right; }

/* Desktop Icons */
.desktop-icons {
  position: absolute; top: 50px; left: 16px; z-index: 100;
  display: flex; flex-direction: column; gap: 18px;
}
.desktop-icon {
  width: 72px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; padding: 6px; border-radius: 8px; transition: background 0.15s;
}
.desktop-icon:hover { background: rgba(255,255,255,0.15); }
.desktop-icon.selected { background: rgba(255,255,255,0.25); }
.desktop-icon .icon-img { font-size: 36px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.desktop-icon .icon-label {
  font-size: 11px; color: white; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Dock */
.dock {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 1000;
  padding: 10px 14px; border-radius: 22px;
  background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
}
.dock-items { display: flex; align-items: flex-end; gap: 10px; }
.dock-item {
  position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.dock-item:hover { transform: scale(1.25) translateY(-8px); }
.dock-icon { font-size: 42px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25)); }
.dock-dot {
  width: 4px; height: 4px; border-radius: 50%; background: rgba(0,0,0,0.5); margin-top: 4px;
}
.dock-dot.active { background: #333; }
.dock-item::after {
  content: attr(title); position: absolute; top: -32px; left: 50%; transform: translateX(-50%) scale(0.9);
  background: rgba(0,0,0,0.7); color: white; padding: 4px 10px; border-radius: 6px; font-size: 11px;
  opacity: 0; pointer-events: none; transition: all 0.15s; white-space: nowrap;
}
.dock-item:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }
.dock-divider { width: 1px; height: 42px; background: rgba(0,0,0,0.15); margin: 0 4px; }

/* Context Menu */
.context-menu {
  position: fixed; z-index: 9998; min-width: 180px;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08); border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  padding: 6px 0; overflow: hidden;
}
.context-item { padding: 6px 16px; font-size: 13px; cursor: pointer; color: var(--text-primary); }
.context-item:hover { background: var(--accent); color: white; }
.context-separator { height: 1px; background: rgba(0,0,0,0.1); margin: 5px 0; }
