:root {
  --font-ui: 'Segoe UI Variable', 'Segoe UI', 'Microsoft JhengHei UI', 'PingFang TC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  --accent: #0067c0;
  --accent-hover: #005a9e;
  --accent-light: rgba(0, 103, 192, 0.12);
  --accent-glow: rgba(0, 120, 212, 0.35);

  --bg-acrylic: rgba(243, 243, 243, 0.78);
  --bg-acrylic-strong: rgba(243, 243, 243, 0.88);
  --bg-mica: rgba(243, 246, 252, 0.94);
  --bg-surface: #ffffff;
  --bg-surface-2: #f9f9f9;
  --bg-surface-3: #f3f3f3;
  --bg-hover: rgba(0, 0, 0, 0.045);
  --bg-active: rgba(0, 0, 0, 0.08);
  --bg-card: rgba(255, 255, 255, 0.72);

  --text-primary: #1a1a1a;
  --text-secondary: #5c5c5c;
  --text-muted: #767676;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --border-flyout: rgba(255, 255, 255, 0.55);

  --shadow-win: 0 24px 60px rgba(0, 0, 0, 0.24), 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-win-inactive: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-flyout: 0 16px 48px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.08);

  --ease-win: cubic-bezier(0.1, 0.9, 0.2, 1);
  --ease-bounce: cubic-bezier(0.16, 1, 0.3, 1);
  --taskbar-h: 48px;
}

[data-theme="dark"] {
  --accent: #60cdff;
  --accent-hover: #4cc2ff;
  --accent-light: rgba(96, 205, 255, 0.16);
  --accent-glow: rgba(96, 205, 255, 0.35);

  --bg-acrylic: rgba(32, 32, 32, 0.78);
  --bg-acrylic-strong: rgba(32, 32, 32, 0.88);
  --bg-mica: rgba(28, 30, 34, 0.95);
  --bg-surface: #202020;
  --bg-surface-2: #272727;
  --bg-surface-3: #2d2d2d;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(255, 255, 255, 0.1);
  --bg-card: rgba(45, 45, 45, 0.7);

  --text-primary: #f5f5f5;
  --text-secondary: #c5c5c5;
  --text-muted: #9a9a9a;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-flyout: rgba(255, 255, 255, 0.1);

  --shadow-win: 0 28px 68px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.09);
  --shadow-win-inactive: 0 14px 36px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-flyout: 0 20px 56px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-primary);
  background: #000;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

.fullscreen-layer {
  position: fixed;
  inset: 0;
  z-index: 9000;
}

/* Screen Filters (Brightness & Night Light) */
.screen-filter {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  transition: opacity 0.3s ease;
}

#brightness-overlay {
  background: #000;
  opacity: 0;
}

#nightlight-overlay {
  background: rgba(255, 147, 41, 0.24);
  mix-blend-mode: multiply;
  opacity: 0;
}

/* Windows 11 Authentic ProgressRing Spinner */
.win11-spinner {
  width: 44px;
  height: 44px;
}

.win11-spinner svg {
  width: 100%;
  height: 100%;
  animation: win11-spin-rotate 1.8s linear infinite;
}

.win11-spinner circle {
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-dasharray: 1, 150;
  stroke-dashoffset: 0;
  animation: win11-spin-dash 1.4s ease-in-out infinite;
}

@keyframes win11-spin-rotate {
  100% { transform: rotate(360deg); }
}

@keyframes win11-spin-dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 85, 150; stroke-dashoffset: -30; }
  100% { stroke-dasharray: 85, 150; stroke-dashoffset: -124; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.35);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 128, 128, 0.55);
}
