:root {
  --bg-glass: rgba(255, 255, 255, 0.4);
  --sidebar-width: 220px;
  --accent-color: #007aff;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  height: 100vh;
  display: flex;
  background: transparent;
  color: #333;
  overflow: hidden;
}

/* 顶部拖拽区域（留出 macOS 顶部红绿灯按钮位置） */
.titlebar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 38px;
  -webkit-app-region: drag;
  z-index: 999;
}

/* 左侧侧边导航栏 */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(240, 240, 243, 0.65);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
  padding-right: 12px;
}

.nav-item {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

/* 主内容工作区 */
.main-content {
  flex: 1;
  padding-top: 38px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 应用网格区域（OS 概念核心） */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 24px;
  padding: 32px;
  overflow-y: auto;
  flex: 1;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px;
  border-radius: 12px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.app-card:hover {
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.app-card-add {
  border: 2px dashed #ccc;
  background: transparent;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.icon-log {
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
}

.icon-net {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}

.icon-lab {
  background: linear-gradient(135deg, #fc466b, #3f5efb);
}

.icon-add {
  background: transparent;
  color: #888;
  font-size: 24px;
  box-shadow: none;
}

.app-name {
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

/* 底部状态栏 */
.statusbar {
  height: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  color: #666;
}

/* 登录遮罩弹窗 */
.auth-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(25px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.auth-overlay.show {
  display: flex;
}

.auth-card {
  width: 320px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.auth-inputs input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  outline: none;
  font-size: 14px;
}

.auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.auth-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: var(--accent-color);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.auth-actions button#btn-register {
  background: rgba(0, 0, 0, 0.08);
  color: #333;
}

.auth-msg {
  font-size: 12px;
  color: #e63946;
  min-height: 16px;
}

.nav-logout {
  margin-top: auto;
  margin-bottom: 16px;
  color: #e63946;
}