/* ========================================================
   macOS Sonoma Theme - Global Styles
   ======================================================== */

:root {
  --macos-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --menu-bg: rgba(255, 255, 255, 0.45);
  --menu-bg-dark: rgba(30, 30, 35, 0.75);
  --menu-border: rgba(255, 255, 255, 0.2);
  --menu-text: #1d1d1f;
  --window-bg: rgba(246, 246, 246, 0.88);
  --window-sidebar: rgba(235, 235, 240, 0.85);
  --window-border: rgba(255, 255, 255, 0.45);
  --window-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
  --window-title-color: #2c2c2e;
  --accent-blue: #007aff;
  --accent-hover: #0062cc;
  --traffic-red: #ff5f57;
  --traffic-yellow: #febc2e;
  --traffic-green: #28c840;
  --dock-bg: rgba(255, 255, 255, 0.28);
  --dock-border: rgba(255, 255, 255, 0.35);
  --dock-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--macos-font);
  font-size: 13px;
  color: #1d1d1f;
  background-color: #121217;
  background: radial-gradient(circle at 20% 20%, #ff6b45 0%, transparent 40%),
              radial-gradient(circle at 80% 30%, #af52de 0%, transparent 45%),
              radial-gradient(circle at 50% 80%, #ff2d55 0%, transparent 50%),
              radial-gradient(circle at 10% 70%, #ffb400 0%, transparent 40%),
              #121217;
  user-select: none;
  -webkit-user-select: none;
}

/* 桌面背景画布 */
#desktop-canvas {
  position: fixed;
  top: -6%;
  left: -6%;
  width: 112vw;
  height: 112vh;
  z-index: 1;
  display: block;
  filter: blur(70px);
  -webkit-filter: blur(70px);
  transform: translateZ(0);
  pointer-events: none;
}

/* 桌面工作区 */
#desktop-stage {
  position: fixed;
  top: 30px;
  left: 0;
  right: 0;
  bottom: 80px;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
}

/* 允许桌面窗口捕获鼠标交互 */
.macos-window {
  pointer-events: auto;
}

/* ========================================================
   顶部菜单栏 (Menu Bar)
   ======================================================== */
#menubar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: var(--menu-bg);
  backdrop-filter: blur(25px) saturate(190%);
  -webkit-backdrop-filter: blur(25px) saturate(190%);
  border-bottom: 0.5px solid var(--menu-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  color: #1a1a1c;
}

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

.menubar-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 10px;
  cursor: default;
  transition: background-color 0.15s ease;
  border-radius: 4px;
}

.menubar-item:hover, .menubar-item.active {
  background: rgba(0, 0, 0, 0.08);
}

.menubar-apple-logo {
  display: flex;
  align-items: center;
  padding: 0 10px;
  cursor: pointer;
}

.menubar-apple-logo svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.menubar-app-name {
  font-weight: 700;
  letter-spacing: -0.2px;
}

/* 下拉菜单 */
.menu-dropdown {
  position: absolute;
  top: 30px;
  left: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  padding: 5px 0;
  min-width: 180px;
  display: none;
  flex-direction: column;
  z-index: 10000;
  animation: menuFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.menubar-item.active .menu-dropdown {
  display: flex;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.menu-item {
  padding: 5px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  cursor: pointer;
  margin: 1px 5px;
  border-radius: 5px;
  color: #222;
}

.menu-item:hover {
  background: var(--accent-blue);
  color: #fff;
}

.menu-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 4px 6px;
}

/* 菜单栏右侧图标区 */
.menubar-status-icon {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  cursor: pointer;
  height: 100%;
}

.menubar-status-icon:hover {
  background: rgba(0, 0, 0, 0.08);
}

.menubar-status-icon svg {
  display: block;
}

/* 电池进度条 */
.battery-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

#battery-bar {
  transition: width 0.3s ease;
}

/* 天气部件 */
.weather-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

/* WiFi 延迟提示浮窗 */
.status-popover {
  position: absolute;
  top: 34px;
  right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  min-width: 200px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 10001;
  font-size: 12px;
}

.status-popover.active {
  display: flex;
}

/* ========================================================
   macOS 窗口系统 (Window Frame)
   ======================================================== */
.macos-window {
  position: absolute;
  background: var(--window-bg);
  backdrop-filter: blur(35px) saturate(180%);
  -webkit-backdrop-filter: blur(35px) saturate(180%);
  border: 0.5px solid var(--window-border);
  border-radius: 12px;
  box-shadow: var(--window-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.macos-window.focused {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.macos-window.minimized {
  opacity: 0;
  transform: scale(0.6) translateY(200px);
  pointer-events: none;
}

.macos-window.maximized {
  top: 30px !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 110px) !important;
  border-radius: 0 !important;
  border: none !important;
}

/* 窗口标题栏 */
.window-titlebar {
  height: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.45), rgba(240, 240, 242, 0.35));
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  cursor: grab;
  touch-action: none;
  position: relative;
}

.window-titlebar:active {
  cursor: grabbing;
}

/* 红绿灯按钮 */
.traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15);
}

.traffic-light.close { background: var(--traffic-red); }
.traffic-light.minimize { background: var(--traffic-yellow); }
.traffic-light.zoom { background: var(--traffic-green); }

.traffic-light svg {
  display: none;
  width: 8px;
  height: 8px;
  stroke: rgba(0, 0, 0, 0.6);
  stroke-width: 1.5;
}

.traffic-lights:hover .traffic-light svg {
  display: block;
}

.window-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--window-title-color);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

/* 窗口右侧占位 / 工具栏 */
.titlebar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 窗口主体内容 */
.window-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* 窗口 8 方向调整边框与手柄 */
.window-resizer {
  position: absolute;
  z-index: 100;
}
.window-resizer.r-top { top: 0; left: 0; right: 0; height: 6px; cursor: n-resize; }
.window-resizer.r-bottom { bottom: 0; left: 0; right: 0; height: 6px; cursor: s-resize; }
.window-resizer.r-left { top: 0; bottom: 0; left: 0; width: 6px; cursor: w-resize; }
.window-resizer.r-right { top: 0; bottom: 0; right: 0; width: 6px; cursor: e-resize; }
.window-resizer.r-top-left { top: 0; left: 0; width: 12px; height: 12px; cursor: nw-resize; }
.window-resizer.r-top-right { top: 0; right: 0; width: 12px; height: 12px; cursor: ne-resize; }
.window-resizer.r-bottom-left { bottom: 0; left: 0; width: 12px; height: 12px; cursor: sw-resize; }
.window-resizer.r-bottom-right { bottom: 0; right: 0; width: 12px; height: 12px; cursor: se-resize; }

/* ========================================================
   访达窗口 (Finder Window)
   ======================================================== */
.finder-sidebar {
  width: 190px;
  min-width: 150px;
  background: var(--window-sidebar);
  border-right: 0.5px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  overflow-y: auto;
}

.finder-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #86868b;
  padding: 6px 10px 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.finder-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #2c2c2e;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}

.finder-nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.finder-nav-item.active {
  background: var(--accent-blue);
  color: #fff;
}

.finder-nav-item .icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.finder-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
}

/* 访达工具栏 */
.finder-toolbar {
  height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  background: #fbfbfd;
}

.finder-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6e6e73;
}

.finder-breadcrumb-current {
  font-weight: 600;
  color: #1d1d1f;
}

/* 访达列表视图 (List View) */
.finder-table-wrapper {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.finder-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.finder-table thead {
  position: sticky;
  top: 0;
  background: #f5f5f7;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.finder-table th {
  padding: 8px 12px;
  font-weight: 500;
  color: #86868b;
  font-size: 11.5px;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.finder-table td {
  padding: 7px 12px;
  color: #1d1d1f;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
}

.finder-table tbody tr {
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.finder-table tbody tr:nth-child(even) {
  background-color: #fafafc;
}

.finder-table tbody tr:hover {
  background-color: #e8f2ff;
}

.finder-table tbody tr.selected {
  background-color: #cbe3fb;
}

.finder-file-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.finder-file-icon {
  width: 18px;
  height: 18px;
}

/* 访达底部状态与分页栏 */
.finder-footer {
  height: 36px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  background: #fbfbfd;
  font-size: 12px;
  color: #6e6e73;
}

.finder-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.macos-btn {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 5px;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  background: #ffffff;
  color: #1d1d1f;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.macos-btn:hover:not(:disabled) {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.25);
}

.macos-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.macos-btn.primary {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-hover);
}

.macos-btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

/* ========================================================
   Safari 浏览器窗口 (Safari Window)
   ======================================================== */
.safari-tabs-bar {
  display: flex;
  align-items: flex-end;
  background: rgba(230, 230, 235, 0.6);
  padding: 4px 10px 0 80px; /* 留出左侧红绿灯区域 */
  gap: 4px;
  overflow-x: auto;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  cursor: grab;
  touch-action: none;
}

.safari-tabs-bar:active {
  cursor: grabbing;
}

.safari-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  max-width: 200px;
  background: rgba(220, 220, 225, 0.7);
  border-radius: 8px 8px 0 0;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.safari-tab.active {
  background: #ffffff;
  color: #1d1d1f;
  font-weight: 500;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
}

.safari-tab-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.safari-tab-close {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #888;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.safari-tab-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
  color: #111;
}

/* Safari 导航栏与地址栏 */
.safari-nav-bar {
  height: 42px;
  background: #ffffff;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 12px;
}

.safari-nav-controls {
  display: flex;
  gap: 6px;
}

.safari-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6e6e73;
}

.safari-nav-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
}

.safari-address-bar {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  height: 28px;
  background: #f0f0f4;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  font-size: 12px;
  color: #6e6e73;
}

.safari-url-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

/* Safari 文章内容区 */
.safari-content-view {
  flex: 1;
  background: #ffffff;
  overflow-y: auto;
  padding: 40px 60px;
  user-select: text;
  -webkit-user-select: text;
}

.article-container {
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 15px;
  color: #2c2c2e;
}

.article-header {
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 20px;
}

.article-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1d1d1f;
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #86868b;
}

.article-body {
  font-size: 15.5px;
  line-height: 1.85;
}

.article-body p {
  margin-bottom: 1.4em;
}

.article-body h1, .article-body h2, .article-body h3 {
  color: #1d1d1f;
  margin: 1.8em 0 0.8em;
  font-weight: 600;
}

.article-body img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin: 1.2em 0;
}

.article-body pre {
  background: #1e1e24;
  color: #f1f1f1;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.2em 0;
  font-family: ui-monospace, Menlo, Monaco, "Cascadia Code", monospace;
  font-size: 13.5px;
}

.article-body code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, Menlo, Monaco, monospace;
  font-size: 13.5px;
}

/* ========================================================
   系统设置 / 登录窗口 (System Settings Modal)
   ======================================================== */
.settings-body {
  flex: 1;
  background: #fbfbfd;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.login-card {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007aff, #5856d6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.3);
  color: #fff;
  font-size: 30px;
}

.login-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #1d1d1f;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.macos-input {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #ffffff;
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}

.macos-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
}

.login-hint {
  font-size: 11.5px;
  color: #86868b;
  margin-top: 8px;
}

/* 自定义滚动条 (macOS 风格细滚动条) */
::-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);
}

/* 常用动画关键帧 */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes macShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* ========================================================
   macOS 原生计算器样式 (Calculator Styles)
   ======================================================== */
.calc-window {
  background: rgba(30, 30, 32, 0.92) !important;
  border-radius: 14px !important;
  color: #fff;
  border: 0.5px solid rgba(255, 255, 255, 0.2) !important;
  min-width: 240px;
  min-height: 420px;
  box-sizing: border-box;
}

.calc-display {
  padding: 12px 18px 6px;
  text-align: right;
  min-height: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  box-sizing: border-box;
}

#calc-display-text {
  font-size: 38px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  box-sizing: border-box;
}

.calc-btn {
  height: 48px;
  border-radius: 24px;
  border: none;
  font-size: 19px;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.1s ease, transform 0.08s ease;
  user-select: none;
  -webkit-user-select: none;
}

.calc-btn:active {
  filter: brightness(1.25);
  transform: scale(0.96);
}

.calc-btn.fn {
  background: #a5a5a5;
  color: #000;
}

.calc-btn.num {
  background: #333333;
  color: #fff;
}

.calc-btn.op {
  background: #ff9f0a;
  color: #fff;
  font-size: 22px;
}

.calc-btn.span-2 {
  grid-column: span 2;
  justify-content: flex-start;
  padding-left: 20px;
}

/* ========================================================
   macOS 备忘录样式 (Notes & Memo Styles)
   ======================================================== */
.notes-window {
  background: #fbfbfd !important;
}

.notes-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: #ffffff;
}

.notes-sidebar {
  width: 220px;
  min-width: 180px;
  background: #f5f5f7;
  border-right: 0.5px solid rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-card-item {
  background: #ffffff;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  font-size: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.notes-card-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.notes-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 11px;
}

.notes-card-author {
  font-weight: 600;
  color: #1d1d1f;
}

.notes-card-date {
  color: #8e8e93;
}

.notes-card-body {
  color: #3a3a3c;
  line-height: 1.5;
  word-break: break-all;
}

.notes-editor-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  background: #fffdf5; /* 经典便签纸张米黄底色 */
  overflow-y: auto;
}

.notes-editor-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e6db99;
}

.notes-editor-title {
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 4px;
}

.notes-editor-desc {
  font-size: 12px;
  color: #8e8e93;
}

.notes-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.notes-input-row {
  display: flex;
  gap: 12px;
}

.notes-paper-textarea {
  flex: 1;
  min-height: 140px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 28px; /* 便签横行感 */
  color: #2c2c2e;
  background-image: linear-gradient(transparent, transparent 27px, #f0ebd0 28px);
  background-size: 100% 28px;
  padding: 0 4px;
}

.notes-paper-textarea::placeholder {
  color: #b0a880;
}

/* ========================================================
   macOS 桌面右键上下文菜单 (Context Menu)
   ======================================================== */
.macos-context-menu {
  position: fixed;
  z-index: 99999;
  min-width: 176px;
  background: rgba(246, 246, 248, 0.88);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 0.5px solid rgba(0, 0, 0, 0.16);
  border-radius: 9px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  padding: 5px;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
}

.macos-context-menu.menu-animate {
  animation: macMenuIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes macMenuIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 27px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 13px;
  color: #1d1d1f;
  cursor: default;
  transition: background 0.08s ease, color 0.08s ease;
}

.context-menu-item:hover {
  background: #007aff;
  color: #ffffff;
}

.context-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: inherit;
}

.context-menu-label {
  flex: 1;
  font-weight: 400;
  letter-spacing: -0.1px;
}

.context-menu-shortcut {
  font-size: 11px;
  color: #8e8e93;
  font-weight: 400;
  margin-left: 12px;
}

.context-menu-item:hover .context-menu-shortcut {
  color: rgba(255, 255, 255, 0.8);
}

.context-menu-divider {
  height: 0.5px;
  background: rgba(0, 0, 0, 0.1);
  margin: 4px 6px;
}

/* ========================================================
   macOS Spotlight 悬浮搜索框 (Spotlight Floating Search)
   ======================================================== */
.macos-spotlight {
  position: fixed;
  z-index: 99990;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(35px) saturate(190%);
  backdrop-filter: blur(35px) saturate(190%);
  border-radius: 13px;
  border: 0.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: spotlightPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes spotlightPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.spotlight-bar {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 16px;
  gap: 12px;
}

.spotlight-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #007aff;
}

.spotlight-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 17px;
  color: #1d1d1f;
  font-weight: 400;
  font-family: inherit;
}

.spotlight-input::placeholder {
  color: #8e8e93;
}

.spotlight-clear-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  border: none;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.spotlight-clear-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  color: #111;
}

.spotlight-badge {
  font-size: 11px;
  color: #8e8e93;
  background: rgba(0, 0, 0, 0.05);
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 500;
}

.spotlight-results {
  max-height: 320px;
  overflow-y: auto;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  padding: 6px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}

.spotlight-item:hover, .spotlight-item.selected {
  background: #007aff;
  color: #ffffff !important;
}

.spotlight-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.8;
}

.spotlight-item-info {
  flex: 1;
  min-width: 0;
}

.spotlight-item-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

.spotlight-item-title mark {
  background: rgba(255, 214, 10, 0.35);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

.spotlight-item:hover .spotlight-item-title mark,
.spotlight-item.selected .spotlight-item-title mark {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.spotlight-item-meta {
  font-size: 11px;
  opacity: 0.75;
  display: flex;
  gap: 8px;
  margin-top: 2px;
  color: inherit;
}

.spotlight-badge-cat {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
}

.spotlight-item:hover .spotlight-badge-cat,
.spotlight-item.selected .spotlight-badge-cat {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.spotlight-item-action {
  font-size: 11px;
  opacity: 0.65;
  white-space: nowrap;
}

.spotlight-loading, .spotlight-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: #8e8e93;
}

.spotlight-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #007aff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ========================================================
   macOS "关于本站与开发架构" 弹窗 (About This Mac Modal)
   ======================================================== */
.about-window {
  background: rgba(246, 246, 248, 0.94) !important;
  border-radius: 14px !important;
  color: #1d1d1f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35), 0 0 0 0.5px rgba(0, 0, 0, 0.15) !important;
}

.about-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 24px 18px;
  height: calc(100% - 34px);
  justify-content: space-between;
  box-sizing: border-box;
}

.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 8px;
}

.about-icon-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.about-hero-title {
  font-size: 18px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.3px;
}

.about-hero-sub {
  font-size: 12px;
  color: #86868b;
  margin-top: 2px;
}

.about-specs-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.about-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  line-height: 1.4;
}

.about-spec-label {
  color: #86868b;
}

.about-spec-val {
  color: #1d1d1f;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.about-actions-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  gap: 10px;
  margin-top: 6px;
}


