:root {
  --bg-wallpaper: url('https://images.unsplash.com/photo-1477346611705-65d1883cee1e?q=80&w=2070&auto=format&fit=crop');
  /* Dark mountain wallpaper */
  --dock-bg: rgba(255, 255, 255, 0.2);
  --window-bg: rgba(255, 255, 255, 0.85);
  --menu-bar-bg: rgba(0, 0, 0, 0.3);
  --text-color: #333;
  --accent-color: #007AFF;
  --blur-amt: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  background-image: var(--bg-wallpaper);
  background-size: cover;
  background-position: center;
  color: white;
}

/* Boot Screen */
#boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease;
}

#boot-screen i {
  font-size: 5rem;
  color: white;
  margin-bottom: 3rem;
}

.loading-bar {
  width: 200px;
  height: 4px;
  background: #333;
  border-radius: 2px;
  overflow: hidden;
}

.progress {
  width: 0%;
  height: 100%;
  background: white;
  transition: width 2s ease;
}

/* Menu Bar */
#menubar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  background: var(--menu-bar-bg);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  font-size: 0.85rem;
  z-index: 1000;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.left-menu,
.right-menu {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.apple-logo {
  font-size: 1.1rem;
}

.current-app {
  font-weight: 700;
}

.font-bold {
  font-weight: 600;
}

/* Desktop */
#desktop {
  width: 100%;
  height: 100%;
  position: relative;
  padding-top: 30px;
  padding-bottom: 80px;
}

/* Dock */
#dock-container {
  position: fixed;
  bottom: 15px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 2000;
}

.dock {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 0.5rem 0.8rem;
  display: flex;
  gap: 0.8rem;
  align-items: flex-end;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: width 0.3s;
}

.dock-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 5px;
  align-self: center;
}

.dock-item {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: bottom center;
}

.dock-item:hover {
  transform: scale(1.2) translateY(-10px);
  margin: 0 5px;
}

.dock-item:active {
  filter: brightness(0.8);
}

/* Tooltip for Dock Icons */
.dock-item::after {
  content: attr(data-title);
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.dock-item:hover::after {
  opacity: 1;
}

.app-icon {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.finder-icon {
  background: linear-gradient(#00d2ff, #3a7bd5);
}

.safari-icon {
  background: white;
  color: #007AFF;
}

.terminal-icon {
  background: #333;
  color: #0f0;
}

.mail-icon {
  background: linear-gradient(#38ef7d, #11998e);
}

.github-icon {
  background: #24292e;
  color: white;
}

.dot {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.9);
  /* Lighter dot */
  border-radius: 50%;
  position: absolute;
  bottom: -6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.dock-item.active .dot {
  opacity: 1;
}

/* Windows */
.window {
  position: absolute;
  background: var(--window-bg);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #333;
  animation: openWindow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 300px;
  min-height: 200px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

@keyframes openWindow {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.window.minimized {
  transform: scale(0) translate(0, 500px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.title-bar {
  height: 38px;
  background: transparent;
  /* Seamless title bar */
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  cursor: default;
  /* Should be draggable */
}

/* Fake Draggable Handle */
.title-bar:active {
  cursor: grabbing;
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}

.light.red {
  background: #ff5f56;
}

.light.yellow {
  background: #ffbd2e;
}

.light.green {
  background: #27c93f;
}

/* Traffic light symbols on hover */
.light:hover::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0, 0, 0, 0.5);
  font-size: 8px;
  font-weight: 900;
  font-family: sans-serif;
}

.light.red:hover::after {
  content: 'x';
}

.light.yellow:hover::after {
  content: '-';
}

.light.green:hover::after {
  content: '+';
}

.title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

.window-content {
  flex: 1;
  overflow: auto;
  position: relative;
  background: rgba(255, 255, 255, 0.5);
  /* Inner content background */
}

/* Finder Styles */
.finder-layout {
  display: flex;
  height: 100%;
}

.sidebar {
  width: 180px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  padding: 1rem;
  font-size: 0.9rem;
}

.group-title {
  font-size: 0.75rem;
  color: #888;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.sidebar-item {
  padding: 6px 10px;
  margin-bottom: 2px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-item.active {
  background: rgba(0, 0, 0, 0.1);
}

.main-view {
  flex: 1;
  padding: 2rem;
  background: white;
}

.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.2rem;
}

.bio-text {
  margin-top: 2rem;
  line-height: 1.6;
  color: #555;
}

/* Safari Styles */
.safari-content {
  background: white;
  padding: 1rem;
}

.url-bar {
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #555;
  flex: 1;
  margin-left: 20px;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.project-card {
  background: #f5f5f7;
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.8rem;
  color: #666;
}

.tag {
  display: inline-block;
  background: #e1e1e8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-right: 4px;
  margin-top: 6px;
}

/* Terminal Styles */
.glass-dark {
  background: rgba(10, 10, 10, 0.85);
  color: #0f0;
}

.glass-dark .title {
  color: #aaa;
}

.glass-dark .traffic-lights {
  opacity: 0.8;
}

.terminal-content {
  font-family: 'Courier New', monospace;
  padding: 1rem;
  font-size: 0.9rem;
  background: transparent;
}

/* Mail Styles */
.mail-content {
  padding: 1.5rem;
}

.mail-header {
  border-bottom: 1px solid #ddd;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.mail-header div {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.btn-send {
  background: #007AFF;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-send:hover {
  background: #0056b3;
}

.social-links-mail {
  margin-top: 2rem;
  font-size: 1.5rem;
  display: flex;
  gap: 1rem;
}

.social-links-mail a {
  color: #333;
}

/* Notes Styles */
.notes-icon {
  background: #F5C544;
  color: white;
}

.notes-content {
  display: flex;
  background: white;
}

.notes-sidebar {
  width: 100px;
  background: #f5f5f7;
  border-right: 1px solid #ddd;
  overflow-y: auto;
}

.note-item {
  padding: 10px;
  border-bottom: 1px solid #e5e5e5;
  cursor: pointer;
}

.note-item.active {
  background: #eedc9c;
}

.note-title {
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.note-date {
  font-size: 0.7rem;
  color: #888;
}

.notes-editor {
  flex: 1;
  padding: 1.5rem;
  font-family: 'Inter', sans-serif;
  /* Cleaner font for notes */
  overflow-y: auto;
  color: #444;
}

.note-date-header {
  text-align: center;
  color: #aaa;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.timeline-entry h3 {
  font-size: 0.9rem;
  color: #F5C544;
  /* Notes Yellow accent */
}

/* Settings Styles */
.settings-icon {
  background: #999;
  color: white;
}

.settings-content {
  padding: 1.5rem;
  background: #f5f5f7;
}

.settings-content h3 {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
}

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.wallpaper-item {
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s;
}

.wallpaper-item:hover {
  transform: scale(1.05);
  border-color: #007AFF;
}

.wallpaper-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
  #dock-container {
    padding-bottom: 5px;
  }

  .dock {
    padding: 5px;
    gap: 5px;
  }

  .dock-item {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .window {
    width: 90% !important;
    height: 80% !important;
    left: 5% !important;
    top: 40px !important;
  }
}