/* ============================================
   macOS Web Edition - Stylesheet
   ============================================ */

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

:root {
  --accent: #0a84ff;
  --accent-light: rgba(10, 132, 255, 0.15);
  --menubar-bg: rgba(245, 245, 247, 0.55);
  --menubar-text: #1d1d1f;
  --dock-bg: rgba(245, 245, 247, 0.45);
  --window-bg: #ffffff;
  --window-header: rgba(238, 238, 240, 0.85);
  --window-text: #1d1d1f;
  --window-border: rgba(0, 0, 0, 0.1);
  --sidebar-bg: rgba(238, 238, 240, 0.6);
  --hover: rgba(0, 0, 0, 0.06);
  --divider: rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.28);
  --transition-fast: 120ms cubic-bezier(.2,.7,.3,1);
  --transition-spring: 380ms cubic-bezier(.34,1.56,.64,1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --menubar-bg: rgba(28, 28, 30, 0.55);
  --menubar-text: #f5f5f7;
  --dock-bg: rgba(40, 40, 42, 0.45);
  --window-bg: #2c2c2e;
  --window-header: rgba(44, 44, 46, 0.85);
  --window-text: #f5f5f7;
  --window-border: rgba(255, 255, 255, 0.08);
  --sidebar-bg: rgba(36, 36, 38, 0.6);
  --hover: rgba(255, 255, 255, 0.08);
  --divider: rgba(255, 255, 255, 0.08);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  cursor: default;
  color: var(--window-text);
}

body {
  background: #000;
}

.hidden { display: none !important; }

/* ============================================
   Boot screen
   ============================================ */
.boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.boot-logo {
  width: 100px;
  height: 100px;
  background: #fff;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.7 17.4c-.5.7-1 1.3-1.7 1.7-.7.4-1.4.6-2.1.6-.9 0-1.6-.2-2.1-.6-.5-.4-1-.6-1.7-.6s-1.2.2-1.7.6c-.5.4-1.2.6-2 .6-.7 0-1.4-.2-2.1-.7-.7-.5-1.3-1.1-1.7-1.9-1-1.7-1.4-3.3-1.4-4.9 0-1.5.4-2.8 1.2-3.8.6-.8 1.4-1.3 2.3-1.7.7-.3 1.5-.5 2.3-.5.8 0 1.5.2 2.1.6.6.4 1.1.6 1.6.6.5 0 1.1-.2 1.7-.6.8-.5 1.5-.7 2.3-.7h.1c1.5 0 2.7.6 3.6 1.7-1.4.8-2.1 2.1-2.1 3.7 0 1.3.5 2.4 1.4 3.3.4.4.9.7 1.4.9-.1.2-.2.4-.3.6zM15 4.8c.5-.6.8-1.4.7-2.3-.7.1-1.5.4-2.1 1-.5.6-.9 1.4-.8 2.2.8.1 1.6-.3 2.2-.9z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.7 17.4c-.5.7-1 1.3-1.7 1.7-.7.4-1.4.6-2.1.6-.9 0-1.6-.2-2.1-.6-.5-.4-1-.6-1.7-.6s-1.2.2-1.7.6c-.5.4-1.2.6-2 .6-.7 0-1.4-.2-2.1-.7-.7-.5-1.3-1.1-1.7-1.9-1-1.7-1.4-3.3-1.4-4.9 0-1.5.4-2.8 1.2-3.8.6-.8 1.4-1.3 2.3-1.7.7-.3 1.5-.5 2.3-.5.8 0 1.5.2 2.1.6.6.4 1.1.6 1.6.6.5 0 1.1-.2 1.7-.6.8-.5 1.5-.7 2.3-.7h.1c1.5 0 2.7.6 3.6 1.7-1.4.8-2.1 2.1-2.1 3.7 0 1.3.5 2.4 1.4 3.3.4.4.9.7 1.4.9-.1.2-.2.4-.3.6zM15 4.8c.5-.6.8-1.4.7-2.3-.7.1-1.5.4-2.1 1-.5.6-.9 1.4-.8 2.2.8.1 1.6-.3 2.2-.9z'/></svg>") center/contain no-repeat;
  opacity: 0;
  animation: bootLogoFade 800ms 200ms forwards;
  margin-bottom: 50px;
}

@keyframes bootLogoFade {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.boot-progress {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}

.boot-progress-bar {
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 2px;
  animation: bootProgress 2200ms ease-out forwards;
}

@keyframes bootProgress {
  0% { width: 0; }
  100% { width: 100%; }
}

/* ============================================
   Login screen
   ============================================ */
.login-screen {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(180deg, #0a3060 0%, #1d4ed8 35%, #4a8af4 75%, #c0d8ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 60px 0 80px;
  z-index: 9000;
  animation: fadeIn 400ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.login-time {
  font-size: 90px;
  font-weight: 200;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  letter-spacing: -3px;
  font-feature-settings: "tnum";
}

.login-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
}

.login-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8e8e93, #636366);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 130'><circle cx='65' cy='52' r='22' fill='%23ffd1b3'/><circle cx='65' cy='78' r='38' fill='%23ff8a5b'/></svg>");
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.login-name {
  font-size: 22px;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.login-password-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-password {
  width: 240px;
  height: 36px;
  border-radius: 18px;
  border: none;
  outline: none;
  padding: 0 18px;
  font-size: 14px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 200ms;
}

.login-password::placeholder { color: rgba(255,255,255,0.7); }
.login-password:focus { background: rgba(255,255,255,0.25); }

.login-submit {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 150ms;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-submit:hover { background: rgba(255,255,255,0.3); }

.login-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

/* ============================================
   Desktop
   ============================================ */
.desktop {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.wallpaper {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0a3060 0%, #1d4ed8 35%, #4a8af4 75%, #c0d8ff 100%);
  background-size: cover;
  background-position: center;
  transition: opacity 600ms;
}

.wallpaper.warm {
  background: linear-gradient(180deg, #2d1b69 0%, #5b2d8f 30%, #c44569 65%, #f8b500 100%);
}

.wallpaper.sunset {
  background: linear-gradient(180deg, #fceabb 0%, #f8b500 30%, #ee7752 70%, #e73c7e 100%);
}

.wallpaper.forest {
  background: linear-gradient(180deg, #134e5e 0%, #71b280 100%);
}

.wallpaper.dark {
  background: linear-gradient(180deg, #000000 0%, #1c1c1e 50%, #2c2c2e 100%);
}

.wallpaper.dynamic {
  background: linear-gradient(180deg, #0a84ff 0%, #5e5ce6 50%, #ff2d55 100%);
  background-size: 200% 200%;
  animation: dynamicShift 20s ease-in-out infinite;
}

@keyframes dynamicShift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* ============================================
   Menu bar
   ============================================ */
.menubar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 26px;
  background: var(--menubar-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 13px;
  color: var(--menubar-text);
  z-index: 5000;
  border-bottom: 0.5px solid var(--window-border);
}

.menubar-left, .menubar-right {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.menubar-apple {
  width: 14px;
  height: 14px;
  margin-right: 12px;
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.7 17.4c-.5.7-1 1.3-1.7 1.7-.7.4-1.4.6-2.1.6-.9 0-1.6-.2-2.1-.6-.5-.4-1-.6-1.7-.6s-1.2.2-1.7.6c-.5.4-1.2.6-2 .6-.7 0-1.4-.2-2.1-.7-.7-.5-1.3-1.1-1.7-1.9-1-1.7-1.4-3.3-1.4-4.9 0-1.5.4-2.8 1.2-3.8.6-.8 1.4-1.3 2.3-1.7.7-.3 1.5-.5 2.3-.5.8 0 1.5.2 2.1.6.6.4 1.1.6 1.6.6.5 0 1.1-.2 1.7-.6.8-.5 1.5-.7 2.3-.7h.1c1.5 0 2.7.6 3.6 1.7-1.4.8-2.1 2.1-2.1 3.7 0 1.3.5 2.4 1.4 3.3.4.4.9.7 1.4.9-.1.2-.2.4-.3.6zM15 4.8c.5-.6.8-1.4.7-2.3-.7.1-1.5.4-2.1 1-.5.6-.9 1.4-.8 2.2.8.1 1.6-.3 2.2-.9z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.7 17.4c-.5.7-1 1.3-1.7 1.7-.7.4-1.4.6-2.1.6-.9 0-1.6-.2-2.1-.6-.5-.4-1-.6-1.7-.6s-1.2.2-1.7.6c-.5.4-1.2.6-2 .6-.7 0-1.4-.2-2.1-.7-.7-.5-1.3-1.1-1.7-1.9-1-1.7-1.4-3.3-1.4-4.9 0-1.5.4-2.8 1.2-3.8.6-.8 1.4-1.3 2.3-1.7.7-.3 1.5-.5 2.3-.5.8 0 1.5.2 2.1.6.6.4 1.1.6 1.6.6.5 0 1.1-.2 1.7-.6.8-.5 1.5-.7 2.3-.7h.1c1.5 0 2.7.6 3.6 1.7-1.4.8-2.1 2.1-2.1 3.7 0 1.3.5 2.4 1.4 3.3.4.4.9.7 1.4.9-.1.2-.2.4-.3.6zM15 4.8c.5-.6.8-1.4.7-2.3-.7.1-1.5.4-2.1 1-.5.6-.9 1.4-.8 2.2.8.1 1.6-.3 2.2-.9z'/></svg>") center/contain no-repeat;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 150ms;
}
.menubar-apple:hover { opacity: 1; }

.menubar-appmenu {
  font-weight: 600;
  margin-right: 14px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.menubar-appmenu:hover { background: var(--hover); }

.menubar-menu {
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 400;
}
.menubar-menu:hover { background: var(--hover); }

.menubar-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  margin: 0 1px;
  transition: background 150ms;
  color: inherit;
}
.menubar-icon svg { width: 16px; height: 16px; }
.menubar-icon:hover { background: var(--hover); }

.menubar-time {
  font-size: 13px;
  font-feature-settings: "tnum";
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.menubar-time:hover { background: var(--hover); }

/* ============================================
   Desktop icons
   ============================================ */
.desktop-icons {
  position: absolute;
  top: 40px;
  right: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  z-index: 1;
}

.desktop-icon {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 150ms;
}

.desktop-icon:hover { background: rgba(255,255,255,0.18); }
.desktop-icon.selected { background: rgba(10,132,255,0.32); }

.desktop-icon-img {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.desktop-icon-label {
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
}

/* ============================================
   Windows
   ============================================ */
.windows-container {
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.window {
  position: absolute;
  background: var(--window-bg);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 320px;
  min-height: 200px;
  pointer-events: auto;
  border: 0.5px solid var(--window-border);
  animation: windowOpen 280ms cubic-bezier(.2,.8,.3,1);
  will-change: transform, opacity;
}

@keyframes windowOpen {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.window.minimizing {
  animation: windowMinimize 400ms cubic-bezier(.4,.0,1,1) forwards;
}

@keyframes windowMinimize {
  to { transform: scale(0.05); opacity: 0; }
}

.window.restoring {
  animation: windowRestore 350ms cubic-bezier(.2,.8,.3,1) forwards;
}

@keyframes windowRestore {
  from { transform: scale(0.05); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.window.maximized {
  border-radius: 0;
  border: none;
}

.window-header {
  height: 38px;
  background: var(--window-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 0.5px solid var(--window-border);
  flex-shrink: 0;
  gap: 12px;
  cursor: default;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: rgba(0,0,0,0.5);
  font-weight: 700;
  transition: filter 150ms;
  position: relative;
}
.traffic-light:hover .traffic-icon { opacity: 1; }

.traffic-light.close { background: #ff5f57; }
.traffic-light.minimize { background: #febc2e; }
.traffic-light.maximize { background: #28c840; }

.traffic-icon {
  opacity: 0;
  transition: opacity 100ms;
  pointer-events: none;
}

.window-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--window-text);
  user-select: none;
  pointer-events: none;
}

.window-title-icons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  width: 56px;
  justify-content: flex-end;
  align-items: center;
  color: var(--window-text);
  opacity: 0.7;
}

.window-title-icons svg { width: 16px; height: 16px; cursor: pointer; }

.window-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: var(--window-bg);
  position: relative;
}

.window-sidebar {
  width: 200px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 0.5px solid var(--divider);
  flex-shrink: 0;
  overflow-y: auto;
  padding: 14px 0;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--window-text);
  opacity: 0.6;
  padding: 0 14px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--window-text);
  border-radius: 0;
  transition: background 100ms;
}

.sidebar-item:hover { background: var(--hover); }
.sidebar-item.active { background: var(--accent-light); color: var(--accent); }

.sidebar-item-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.window-content {
  flex: 1;
  overflow: auto;
  position: relative;
}

.window-resize {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  z-index: 10;
}

/* ============================================
   Dock
   ============================================ */
.dock-wrapper {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 4000;
  pointer-events: none;
}

.dock {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 6px 8px;
  background: var(--dock-bg);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 22px;
  border: 0.5px solid rgba(255,255,255,0.18);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  pointer-events: auto;
}

.dock-item {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(.2,.8,.3,1), margin 200ms;
  font-size: 40px;
  transform-origin: bottom center;
}

.dock-item .tooltip {
  position: absolute;
  bottom: 64px;
  background: rgba(40,40,40,0.85);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.dock-item:hover .tooltip { opacity: 1; }

.dock-item.running::after {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--window-text);
  opacity: 0.6;
}

.dock-separator {
  width: 1px;
  height: 38px;
  background: var(--window-border);
  margin: 0 4px;
  align-self: center;
}

.dock-trash .tooltip { color: #fff; }

/* ============================================
   Launchpad
   ============================================ */
.launchpad {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 6000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80px;
  animation: launchpadFadeIn 300ms ease-out;
}

@keyframes launchpadFadeIn {
  from { opacity: 0; transform: scale(1.1); }
  to { opacity: 1; transform: scale(1); }
}

.launchpad-search {
  width: 280px;
  height: 32px;
  background: rgba(255,255,255,0.18);
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  color: #fff;
  outline: none;
  margin-bottom: 40px;
}

.launchpad-search::placeholder { color: rgba(255,255,255,0.6); }

.launchpad-grid {
  display: grid;
  grid-template-columns: repeat(7, 110px);
  gap: 20px 24px;
  max-width: 900px;
}

.launchpad-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 200ms, background 200ms;
}

.launchpad-app:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.05);
}

.launchpad-app-icon {
  width: 70px;
  height: 70px;
  font-size: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.launchpad-app-name {
  font-size: 12px;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.launchpad-page-dots {
  display: flex;
  gap: 8px;
  margin-top: 30px;
}

.launchpad-page-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}

.launchpad-page-dots span.active { background: #fff; }

/* ============================================
   Spotlight
   ============================================ */
.spotlight {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 22vh;
  background: transparent;
}

.spotlight-box {
  width: 680px;
  background: rgba(40,40,40,0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: spotlightIn 200ms cubic-bezier(.2,.8,.3,1);
}

@keyframes spotlightIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.spotlight-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 0.5px solid rgba(255,255,255,0.1);
}

.spotlight-icon { width: 22px; height: 22px; color: #fff; opacity: 0.7; }

#spotlight-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 22px;
  font-weight: 300;
}

#spotlight-input::placeholder { color: rgba(255,255,255,0.5); }

.spotlight-results {
  max-height: 400px;
  overflow-y: auto;
}

.spotlight-section {
  padding: 10px 18px 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  transition: background 100ms;
}

.spotlight-item:hover, .spotlight-item.active { background: rgba(255,255,255,0.1); }
.spotlight-item.selected, .spotlight-item.active { background: var(--accent); }

.spotlight-item-icon {
  font-size: 24px;
  width: 28px;
  text-align: center;
}

.spotlight-item-name { flex: 1; }
.spotlight-item-kind { font-size: 11px; color: rgba(255,255,255,0.5); }

.spotlight-empty {
  padding: 40px 20px;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

/* ============================================
   Control Center
   ============================================ */
.control-center {
  position: fixed;
  top: 32px;
  right: 8px;
  width: 320px;
  z-index: 6500;
  animation: ccIn 250ms cubic-bezier(.2,.8,.3,1);
}

@keyframes ccIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); transform-origin: top right; }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cc-card {
  background: rgba(60,60,67,0.55);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  color: #fff;
  border: 0.5px solid rgba(255,255,255,0.08);
}

.cc-toggle {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 150ms;
  position: relative;
  font-size: 12px;
  flex: 1;
}

.cc-toggle:hover { background: rgba(255,255,255,0.14); }

.cc-toggle.active {
  background: var(--accent);
}

.cc-toggle svg { width: 18px; height: 18px; flex-shrink: 0; }
.cc-toggle span { font-weight: 500; }
.cc-toggle em { font-style: normal; font-size: 10px; opacity: 0.7; margin-left: auto; }

.cc-connect, .cc-focus {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-display {
  grid-column: span 2;
}

.cc-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.cc-row-label {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 500;
}

.cc-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-slider-row svg { width: 18px; height: 18px; opacity: 0.8; }

input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.cc-appearance { grid-column: span 2; }

.cc-accent-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.cc-accent-swatches span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 150ms;
}
.cc-accent-swatches span:hover { transform: scale(1.15); }
.cc-accent-swatches span.active { border-color: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.4); }

/* ============================================
   Notification Center
   ============================================ */
.notification-center {
  position: fixed;
  top: 32px;
  right: 8px;
  width: 340px;
  max-height: 75vh;
  z-index: 6500;
  background: rgba(40,40,40,0.55);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.4);
  padding: 16px;
  color: #fff;
  border: 0.5px solid rgba(255,255,255,0.1);
  animation: ncIn 300ms cubic-bezier(.2,.8,.3,1);
  overflow-y: auto;
}

@keyframes ncIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.nc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.nc-header h2 { font-size: 16px; font-weight: 600; }
.nc-clear { font-size: 12px; color: rgba(255,255,255,0.6); cursor: pointer; }
.nc-clear:hover { color: #fff; }

.nc-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.5);
}

.nc-empty-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.nc-notification {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  animation: ncItemIn 300ms ease-out;
}

@keyframes ncItemIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.nc-notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--accent);
  flex-shrink: 0;
}

.nc-notification-body { flex: 1; }
.nc-notification-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.nc-notification-msg { font-size: 12px; opacity: 0.8; line-height: 1.4; }
.nc-notification-time { font-size: 10px; opacity: 0.5; margin-top: 4px; }

/* ============================================
   Context menu
   ============================================ */
.context-menu {
  position: fixed;
  min-width: 200px;
  background: rgba(40,40,40,0.85);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 4px;
  z-index: 8000;
  color: #fff;
  font-size: 13px;
  border: 0.5px solid rgba(255,255,255,0.1);
  animation: contextIn 100ms ease-out;
}

@keyframes contextIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.context-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 100ms;
}
.context-item:hover { background: var(--accent); }
.context-item.separator { height: 1px; background: rgba(255,255,255,0.12); margin: 4px 8px; padding: 0; cursor: default; }
.context-item.separator:hover { background: rgba(255,255,255,0.12); }
.context-item.disabled { opacity: 0.4; pointer-events: none; }
.context-item .shortcut { margin-left: auto; opacity: 0.5; font-size: 12px; }

/* ============================================
   Specific app styles
   ============================================ */

/* Finder */
.finder-content { padding: 16px; }
.finder-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--sidebar-bg);
  border-bottom: 0.5px solid var(--divider);
}
.finder-toolbar button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--window-text);
  font-size: 14px;
}
.finder-toolbar button:hover { background: var(--hover); }

.finder-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  padding: 12px;
}
.finder-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 100ms;
}
.finder-file:hover { background: var(--hover); }
.finder-file.selected { background: var(--accent-light); }
.finder-file-icon { font-size: 48px; }
.finder-file-name {
  font-size: 12px;
  text-align: center;
  color: var(--window-text);
  word-break: break-word;
}

/* Calculator */
.calculator {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #000;
  color: #fff;
}
.calculator-display {
  flex: 0 0 auto;
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px 20px;
  font-size: 56px;
  font-weight: 200;
  font-feature-settings: "tnum";
  overflow: hidden;
  letter-spacing: -1px;
}
.calculator-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 12px 12px;
  flex: 1;
  align-content: end;
}
.calc-btn {
  height: 56px;
  border-radius: 50%;
  border: none;
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
  transition: filter 100ms, transform 100ms;
  background: #333;
  color: #fff;
  font-family: var(--font);
}
.calc-btn:hover { filter: brightness(1.2); }
.calc-btn:active { transform: scale(0.95); }
.calc-btn.gray { background: #a5a5a5; color: #000; }
.calc-btn.orange { background: #ff9f0a; }
.calc-btn.orange.active { background: #fff; color: #ff9f0a; }
.calc-btn.wide { grid-column: span 2; border-radius: 30px; text-align: left; padding-left: 26px; }

/* Terminal */
.terminal {
  background: rgba(20,20,20,0.95);
  color: #fff;
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  padding: 12px;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  line-height: 1.5;
  box-sizing: border-box;
}
.terminal-line { white-space: pre-wrap; word-break: break-all; }
.terminal-prompt { color: #30d158; }
.terminal-input-line { display: flex; }
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font: inherit;
  caret-color: #fff;
}

/* Notes */
.notes-container {
  display: flex;
  height: 100%;
  width: 100%;
}
.notes-sidebar {
  width: 240px;
  background: #f5e9c9;
  border-right: 0.5px solid var(--divider);
  overflow-y: auto;
  padding: 8px;
}
[data-theme="dark"] .notes-sidebar { background: #2a2a2a; }

.notes-list-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--window-text);
  margin-bottom: 4px;
  transition: background 100ms;
  border-bottom: 0.5px solid var(--divider);
}
.notes-list-item:hover { background: rgba(0,0,0,0.05); }
.notes-list-item.active { background: #f5b942; color: #000; }
.notes-list-item-title { font-weight: 600; margin-bottom: 4px; }
.notes-list-item-preview { font-size: 11px; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notes-list-item-date { font-size: 10px; opacity: 0.5; margin-top: 4px; }

.notes-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fffacd;
}
[data-theme="dark"] .notes-content { background: #1c1c1e; }

.notes-date {
  text-align: center;
  padding: 24px 16px 8px;
  color: var(--window-text);
  opacity: 0.6;
  font-size: 12px;
}
.notes-title-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
  padding: 0 32px 12px;
  color: var(--window-text);
  font-family: var(--font);
}
.notes-body-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 0 32px 32px;
  color: var(--window-text);
  resize: none;
  line-height: 1.6;
  font-family: var(--font);
}

/* Safari */
.safari {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}
.safari-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--sidebar-bg);
  border-bottom: 0.5px solid var(--divider);
}
.safari-nav { display: flex; gap: 4px; }
.safari-nav button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--window-text);
  font-size: 16px;
}
.safari-nav button:hover { background: var(--hover); }
.safari-url {
  flex: 1;
  height: 28px;
  background: rgba(0,0,0,0.05);
  border: none;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--window-text);
  outline: none;
  text-align: center;
}
.safari-content {
  flex: 1;
  overflow: auto;
  padding: 20px 30px;
  background: var(--window-bg);
  color: var(--window-text);
}
.safari-content h1 { font-size: 28px; margin-bottom: 16px; }
.safari-content p { line-height: 1.7; margin-bottom: 12px; }
.safari-content a { color: var(--accent); text-decoration: none; }
.safari-content a:hover { text-decoration: underline; }

/* Photos */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  padding: 16px;
}
.photo-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform 200ms;
}
.photo-thumb:hover { transform: scale(1.02); }

/* Music */
.music {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: linear-gradient(180deg, #1a1a2e, #0f0f1a);
  color: #fff;
}
.music-artwork {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.music-art {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff2d55, #ff9f0a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.music-info {
  text-align: center;
  padding: 16px;
}
.music-title { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.music-artist { font-size: 13px; opacity: 0.7; }
.music-progress {
  margin: 12px 24px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.music-progress-bar {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 35%;
  transition: width 100ms;
}
.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 20px;
  font-size: 24px;
}
.music-controls .play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  transition: background 150ms;
}
.music-controls .play:hover { background: rgba(255,255,255,0.2); }
.music-controls span { cursor: pointer; opacity: 0.8; }
.music-controls span:hover { opacity: 1; }

/* Clock */
.clock-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  gap: 20px;
  height: 100%;
  width: 100%;
  background: var(--window-bg);
  box-sizing: border-box;
}
.clock-time-big {
  font-size: 64px;
  font-weight: 100;
  color: var(--window-text);
  font-feature-settings: "tnum";
}
.clock-date-big {
  font-size: 16px;
  color: var(--window-text);
  opacity: 0.7;
}
.clock-tabs { display: flex; gap: 4px; padding: 4px; background: var(--hover); border-radius: 8px; }
.clock-tab {
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--window-text);
}
.clock-tab.active { background: var(--window-bg); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.world-clock-list { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; }
.world-clock-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--hover); border-radius: 8px; }
.world-clock-city { font-size: 14px; font-weight: 500; color: var(--window-text); }
.world-clock-time { font-size: 14px; color: var(--window-text); font-feature-settings: "tnum"; }

/* Calendar */
.calendar-app { padding: 16px; height: 100%; overflow: auto; background: var(--window-bg); }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.calendar-month { font-size: 22px; font-weight: 600; color: var(--window-text); }
.calendar-nav { display: flex; gap: 8px; }
.calendar-nav button {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--hover);
  cursor: pointer; font-size: 14px; color: var(--window-text);
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--divider); border-radius: 6px; overflow: hidden; }
.calendar-day-name { padding: 8px; text-align: center; font-size: 11px; font-weight: 600; color: var(--window-text); opacity: 0.6; text-transform: uppercase; background: var(--window-bg); }
.calendar-day { padding: 8px; min-height: 70px; background: var(--window-bg); color: var(--window-text); font-size: 12px; cursor: pointer; }
.calendar-day:hover { background: var(--hover); }
.calendar-day.other-month { opacity: 0.3; }
.calendar-day.today { background: var(--accent); color: #fff; border-radius: 6px; }
.calendar-day-num { font-weight: 600; margin-bottom: 4px; }

/* Maps */
.maps-app {
  height: 100%;
  width: 100%;
  background: linear-gradient(135deg, #a8d8ea 0%, #c5e3f6 50%, #d6e9c6 100%);
  position: relative;
  overflow: hidden;
}
.maps-canvas {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}
.maps-roads {
  position: absolute;
  inset: 0;
}
.maps-road {
  position: absolute;
  background: rgba(255,255,255,0.7);
  box-shadow: 0 0 2px rgba(0,0,0,0.2);
}
.maps-road.horizontal { height: 8px; width: 100%; }
.maps-road.vertical { width: 8px; height: 100%; }
.maps-pin {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

/* Settings */
.settings-app { display: flex; height: 100%; width: 100%; background: var(--window-bg); }
.settings-sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  border-right: 0.5px solid var(--divider);
  padding: 14px 8px;
  overflow-y: auto;
}
.settings-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--window-text);
  margin-bottom: 2px;
}
.settings-sidebar-item:hover { background: var(--hover); }
.settings-sidebar-item.active { background: var(--accent); color: #fff; }
.settings-sidebar-icon { font-size: 18px; }
.settings-content {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  color: var(--window-text);
}
.settings-content h2 { font-size: 22px; font-weight: 600; margin-bottom: 16px; }
.settings-group { background: var(--hover); border-radius: 10px; padding: 12px; margin-bottom: 16px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 0.5px solid var(--divider); }
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 13px; }
.settings-row-control { display: flex; align-items: center; gap: 8px; }
.switch {
  width: 38px;
  height: 22px;
  background: rgba(120,120,128,0.32);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: background 200ms;
}
.switch.on { background: var(--accent); }
.switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: left 200ms cubic-bezier(.4,.0,.2,1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.switch.on::after { left: 18px; }

/* Messages */
.messages-app { display: flex; flex-direction: column; height: 100%; width: 100%; background: var(--window-bg); }
.messages-list { width: 280px; border-right: 0.5px solid var(--divider); overflow-y: auto; flex-shrink: 0; }
.message-item { padding: 12px; border-bottom: 0.5px solid var(--divider); cursor: pointer; display: flex; gap: 10px; }
.message-item:hover { background: var(--hover); }
.message-item.active { background: var(--accent-light); }
.message-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #0a84ff, #5e5ce6); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; flex-shrink: 0; }
.message-info { flex: 1; overflow: hidden; }
.message-name { font-size: 13px; font-weight: 600; color: var(--window-text); margin-bottom: 2px; }
.message-preview { font-size: 12px; color: var(--window-text); opacity: 0.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.message-conversation { flex: 1; display: flex; flex-direction: column; }
.message-header { padding: 12px 16px; border-bottom: 0.5px solid var(--divider); font-weight: 600; color: var(--window-text); }
.message-stream { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.bubble { max-width: 70%; padding: 8px 12px; border-radius: 16px; font-size: 13px; line-height: 1.4; }
.bubble.them { background: var(--hover); color: var(--window-text); align-self: flex-start; }
.bubble.me { background: var(--accent); color: #fff; align-self: flex-end; }
.bubble-time { font-size: 10px; opacity: 0.6; text-align: center; margin: 8px 0; }
.message-input-row { padding: 12px; border-top: 0.5px solid var(--divider); display: flex; gap: 8px; }
.message-input {
  flex: 1;
  height: 32px;
  border: 0.5px solid var(--divider);
  border-radius: 16px;
  padding: 0 14px;
  font-size: 13px;
  background: var(--window-bg);
  color: var(--window-text);
  outline: none;
}
.message-send { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; font-size: 16px; }

/* Trash */
.trash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  padding: 16px;
}
.trash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--window-text);
  opacity: 0.5;
  gap: 12px;
}
.trash-empty-icon { font-size: 80px; opacity: 0.3; }

/* TextEdit */
.textedit {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #fff;
}
.textedit-toolbar {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: #f5f5f7;
  border-bottom: 0.5px solid var(--divider);
}
.textedit-toolbar button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
}
.textedit-toolbar button:hover { background: rgba(0,0,0,0.05); }
.textedit-area {
  flex: 1;
  border: none;
  outline: none;
  padding: 32px 48px;
  font-size: 15px;
  line-height: 1.6;
  font-family: "Georgia", "Times New Roman", serif;
  color: #1d1d1f;
  resize: none;
}

/* Preview */
.preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #1c1c1e;
  color: #fff;
}
.preview-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}

/* Wallpaper picker */
.wallpaper-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
}
.wallpaper-option {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 200ms, transform 200ms;
  overflow: hidden;
}
.wallpaper-option > .wallpaper {
  position: absolute;
  inset: 0;
  border-radius: 4px;
}
.wallpaper-option:hover { transform: scale(1.05); }
.wallpaper-option.active { border-color: var(--accent); }

/* Window shadow variants */
.window.active { box-shadow: 0 0 0 1px rgba(0,0,0,0.1), 0 24px 60px rgba(0,0,0,0.35); }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.32); }

/* Misc */
.flex { display: flex; }
.flex-1 { flex: 1; }
.center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.pad-16 { padding: 16px; }
.muted { opacity: 0.6; font-size: 12px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(40,40,40,0.9);
  color: #fff;
  padding: 10px 20px;
  border-radius: 18px;
  font-size: 13px;
  z-index: 9000;
  animation: toastIn 250ms ease-out, toastOut 250ms 2s forwards;
  backdrop-filter: blur(20px);
  border: 0.5px solid rgba(255,255,255,0.1);
}

@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, 20px); } }

/* Wake animation */
.wake-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  animation: wake 800ms ease-out forwards;
}
@keyframes wake { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }
