/* ============================================================
   STYLE.CSS — Layout chính, typography, màu sắc
   ============================================================ */

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Màu sắc chính — có thể đổi thoải mái */
  --bg-desktop:       #1e1e2e;   /* Màu nền desktop */
  --bg-window:        #ffffff;   /* Nền cửa sổ */
  --bg-sidebar:       #f5f5f5;   /* Nền sidebar */
  --bg-sidebar-hover: #e8e8e8;   /* Hover trên sidebar */
  --bg-active:        #d4e4ff;   /* Note đang được chọn */
  --color-active:     #1a56db;   /* Màu chữ active */
  --color-text:       #1a1a1a;   /* Màu chữ chính */
  --color-muted:      #6b7280;   /* Màu chữ phụ */
  --color-link:       #c8922a;   /* Màu link — vàng Notes macOS */
  --color-border:     #e5e7eb;   /* Màu viền */
  --window-radius:    12px;      /* Bo góc cửa sổ */
  --shadow-window:    0 20px 60px rgba(0,0,0,0.35), 0 4px 16px rgba(0,0,0,0.2);

  /* Font */
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", monospace;
}

html, body {
  height: 100%;
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--color-text);
  overflow: hidden; /* Desktop không cuộn */
}

/* ── Desktop Background ──────────────────────────────────── */
.desktop {
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Menu Bar (thanh trên cùng) ──────────────────────────── */
.menu-bar {
  width: 100%;
  height: 28px;
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  z-index: 100;
}

.menu-bar-left { display: flex; gap: 20px; align-items: center; }
.menu-bar-right { display: flex; gap: 16px; align-items: center; }
.menu-bar-name { font-weight: 600; }
.menu-bar-item { opacity: 0.7; cursor: default; }
.menu-clock { font-size: 12px; opacity: 0.85; }

/* ── Desktop Content Area ────────────────────────────────── */
.desktop-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── Window (không còn border, shadow, padding) ─────────── */
.window {
  width: 100%;
  height: 100%;
  background: var(--bg-window);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Title Bar (nút đỏ/vàng/xanh) ───────────────────────── */
.title-bar {
  height: 40px;
  background: #f0f0f0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  flex-shrink: 0;
  gap: 8px;
}

.traffic-lights { display: flex; gap: 7px; align-items: center; }

.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: filter 0.15s;
}
.traffic-light:hover { filter: brightness(0.85); }
.traffic-light.red    { background: #ff5f57; }
.traffic-light.yellow { background: #febc2e; }
.traffic-light.green  { background: #28c840; }

.title-bar-text {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--color-muted);
  font-weight: 500;
}

/* ── Window Body (sidebar + content) ─────────────────────── */
.window-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── Dock (thanh icon dưới cùng) ─────────────────────────── */
.dock {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  padding: 6px 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  z-index: 200;
}

.dock-item {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.dock-item:hover {
  transform: translateY(-8px) scale(1.15);
}

.dock-item-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 4px;
}

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

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .desktop-content { padding: 8px 8px 68px; }
  .window { border-radius: 10px; }
  .title-bar-text { display: none; }
}
