/* ============================
   THEME TOKENS
   Light mode by default
   ============================ */
:root {
  --primary: #0d6efd;
  --muted: #6c757d;
  --surface: #f5f5f5;
  --text: #0b1220;
  --card-bg: #ffffff;
  --muted-bg: #d3d3d3;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* ============================
   DARK THEME OVERRIDES
   ============================ */
html[data-theme="dark"] {
  --primary: #4ea8ff;
  --muted: #9aa4b2;
  --surface: #1e1e1e;
  --text: #e6eef8;
  --card-bg: #27292c;
  --muted-bg: #2d2f31;
}

/* ============================
   GLOBAL STYLES
   ============================ */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--surface);
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================
   SYSTEM BAR (Top)
   ============================ */
.systembar {
  background: var(--muted-bg);
  color: var(--text);
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease;
}

/* ============================
   THEME TOGGLE
   ============================ */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle button {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center; 
  gap: 8px;
  padding: 6px 8px;
  border-radius: 999px;
}

.theme-toggle .switch {
  width: 46px;
  height: 24px;
  background: var(--muted-bg);
  border-radius: 999px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 3px;
  transition: background-color 0.3s ease;
}

.theme-toggle .knob {
  width: 18px;
  height: 18px;
  background: var(--card-bg);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  transition: transform 0.18s cubic-bezier(.2,.9,.2,1), background 0.18s linear;
}

/* Move knob to right in dark mode */
html[data-theme="dark"] .theme-toggle .knob {
  transform: translateX(22px);
  background: var(--surface);
}

/* Icon colors */
.theme-toggle .icon-sun { color: #ffd166; }
.theme-toggle .icon-moon { color: #a3bffa; }

/* ============================
   MAIN (Homescreen Area)
   ============================ */
.homescreen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  transition: background-color 0.3s ease;
}

/* ============================
   TASKBAR (Bottom)
   ============================ */
.taskbar {
  background: var(--muted-bg);
  color: var(--text);
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease;
}
