*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --win-titlebar: #202020;
  --win-body: #1e1e1e;
  --win-border: #474747;
  --win-accent: #0078d4;
  --win-text: #e0e0e0;
  --win-text-dim: #888;
  --win-close-hover: #e81123;
  --win-btn-hover: #333;
}

body {
  background: #0a0a0a;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--win-text);
  overflow: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

.window {
  position: absolute;
  width: 770px;
  max-width: 95vw;
  border: 1px solid var(--win-border);
  background: var(--win-body);
  box-shadow:
    0 8px 32px rgba(0,0,0,.6),
    0 2px 8px rgba(0,0,0,.4),
    inset 0 0 0 1px rgba(255,255,255,.03);
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.window.opening {
  animation: windowOpen .4s cubic-bezier(.22,.61,.36,1) forwards;
}

@keyframes windowOpen {
  0% { opacity: 0; transform: scale(.96) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.window.maximized {
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: calc(100vh - 40px) !important;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.window.maximized .content-body {
  flex: 1;
  overflow: visible; 
}

.window.maximized .banner {
  height: 260px; 
}

.window.animating {
  transition: left .25s cubic-bezier(.22,.61,.36,1),
              top .25s cubic-bezier(.22,.61,.36,1),
              width .25s cubic-bezier(.22,.61,.36,1),
              max-width .25s cubic-bezier(.22,.61,.36,1),
              height .25s cubic-bezier(.22,.61,.36,1),
              opacity .2s cubic-bezier(.22,.61,.36,1),
              transform .2s cubic-bezier(.22,.61,.36,1);
}

/* title for apps */
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  background: var(--win-titlebar);
  padding-left: 12px;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}

.titlebar-title {
  font-size: 12px;
  color: var(--win-text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.titlebar-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.titlebar-buttons {
  display: flex;
  height: 100%;
}

.titlebar-btn {
  width: 46px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--win-text-dim);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s;
}

.titlebar-btn:hover { background: var(--win-btn-hover); color: #fff; }
.titlebar-btn.close:hover { background: var(--win-close-hover); color: #fff; }

.titlebar-btn svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.2;
}

.banner {
  width: 100%;
  height: 120px;
  background:
    linear-gradient(135deg, #0078d4 0%, #005a9e 40%, #003a65 100%);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.content-body {
  display: flex;
  gap: 0;
}

.profile-section {
  position: relative;
  padding: 0 24px 22px;
  width: 220px;
  min-width: 0;
  flex-shrink: 0;
  border-right: 1px solid var(--win-border);
}

.pfp-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin-top: -48px;
  border-radius: 50%;
  border: 4px solid var(--win-body);
  overflow: hidden;
  background: #2a2a2a;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.pfp-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pfp-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--win-accent), #005a9e);
  color: #fff;
  font-size: 36px;
  font-weight: 600;
}

.profile-info { margin-top: 14px; }

.display-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--win-text);
  letter-spacing: -.02em;
}

.username {
  font-size: 13px;
  color: var(--win-text-dim);
  margin-top: 2px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding: 4px 10px;
  background: rgba(0,120,212,.12);
  border: 1px solid rgba(0,120,212,.2);
  border-radius: 3px;
  font-size: 12px;
  color: var(--win-accent);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #2ecc71;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.wrapper {
  margin-top: auto;
}

.divider {
  height: 1px;
  background: var(--win-border);
  margin-top: 24px;
}

.right-column {
  flex: 1;
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; 
}

.bio-section { padding: 0; }

.bio-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--win-text-dim);
  margin-bottom: 4px;
}

.bio-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--win-text);
}

.links-row {
  display: flex;
  gap: 8px;
  padding: 0;
  margin-top: 16px;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--win-border);
  color: var(--win-text);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}

.link-btn:hover {
  background: rgba(0,120,212,.15);
  border-color: var(--win-accent);
  color: #fff;
}

.link-btn svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(24,24,24,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 4px;
  z-index: 100;
}

.taskbar-start {
  width: 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .1s;
}

.taskbar-start:hover { background: rgba(255,255,255,.06); }

.taskbar-start svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  opacity: .8;
}

.taskbar-apps {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 2px;
}

.taskbar-active {
  width: 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  border-bottom: 2px solid var(--win-accent);
  cursor: pointer;
  transition: background .1s;
}

.taskbar-active:hover { background: rgba(255,255,255,.1); }

.taskbar-active-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

.taskbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--win-text);
  padding-right: 6px;
}

.taskbar-time {
  padding: 4px 8px;
  text-align: right;
  line-height: 1.3;
  cursor: pointer;
  transition: background .1s;
  border-radius: 3px;
}

.taskbar-time:hover { background: rgba(255,255,255,.06); }

/* start menu */
.start-menu {
  position: fixed;
  bottom: 48px;
  left: 8px;
  width: 320px;
  background: rgba(32,32,32,.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
  z-index: 200;
  overflow: hidden;

  opacity: 0;
  transform: translateY(12px) scale(.98);
  pointer-events: none;
  transition: opacity .2s cubic-bezier(.22,.61,.36,1),
              transform .2s cubic-bezier(.22,.61,.36,1);
}

.start-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.start-menu-header {
  padding: 18px 20px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.start-menu-search {
  margin: 12px 16px;
  padding: 8px 12px;
  width: calc(100% - 32px);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  color: var(--win-text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}

.start-menu-search::placeholder { color: var(--win-text-dim); }
.start-menu-search:focus { border-color: var(--win-accent); }

.start-menu-label {
  padding: 4px 20px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--win-text-dim);
}

.start-menu-apps {
  padding: 4px 8px 12px;
}

.start-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .1s;
}

.start-menu-item:hover {
  background: rgba(255,255,255,.06);
}

.start-menu-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.start-menu-item-label {
  font-size: 13px;
  color: var(--win-text);
}

.start-menu-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.start-menu-user {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--win-accent), #005a9e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.start-menu-username {
  font-size: 12px;
  color: var(--win-text-dim);
}

.window.dragging {
  /* cursor: grabbing; */
  user-select: none;
}

.roles-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* notes app */
.notes-app {
  display: flex;
  height: 400px;
  overflow: hidden;
}

.window.maximized .notes-app {
  flex: 1;
  height: auto;
}

.notes-sidebar {
  width: 220px;
  min-width: 220px;
  background: rgba(22,22,22,.95);
  border-right: 1px solid var(--win-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notes-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  flex-shrink: 0;
}

.notes-sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--win-text);
}

.notes-new-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  color: var(--win-text);
  cursor: pointer;
  transition: all .15s;
}

.notes-new-btn:hover {
  background: rgba(0,120,212,.2);
  border-color: var(--win-accent);
  color: #fff;
}

.notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
}

.notes-list::-webkit-scrollbar { width: 4px; }
.notes-list::-webkit-scrollbar-track { background: transparent; }
.notes-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.notes-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .1s;
  position: relative;
}

.notes-item:hover {
  background: rgba(255,255,255,.05);
}

.notes-item.active {
  background: rgba(0,120,212,.15);
  border-left: 2px solid var(--win-accent);
}

.notes-item-content {
  flex: 1;
  min-width: 0;
}

.notes-item-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--win-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notes-item-preview {
  font-size: 11px;
  color: var(--win-text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notes-item-delete {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--win-text-dim);
  cursor: pointer;
  border-radius: 3px;
  opacity: 0;
  transition: all .1s;
  flex-shrink: 0;
}

.notes-item:hover .notes-item-delete { opacity: 1; }
.notes-item-delete:hover { background: rgba(232,17,35,.2); color: var(--win-close-hover); }

.notes-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  min-width: 0;
}

.notes-title-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  font-family: inherit;
  padding: 0;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}

.notes-title-input::placeholder { color: rgba(255,255,255,.2); }

.notes-date {
  font-size: 11px;
  color: var(--win-text-dim);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.notes-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--win-text);
  font-family: inherit;
  resize: none;
  padding: 0;
}

.notes-textarea::placeholder { color: rgba(255,255,255,.15); }

.notes-textarea::-webkit-scrollbar { width: 4px; }
.notes-textarea::-webkit-scrollbar-track { background: transparent; }
.notes-textarea::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

/* cmd.exe */

.cmd-body {
  display: flex;
  flex-direction: column;
  height: 380px;
  background: #0c0c0c;
  font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-y: auto;
  padding: 10px 14px;
  cursor: text;
}

.window.maximized .cmd-body {
  flex: 1;
  height: auto;
}

.cmd-body::-webkit-scrollbar { width: 6px; }
.cmd-body::-webkit-scrollbar-track { background: #0c0c0c; }
.cmd-body::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.cmd-body::-webkit-scrollbar-thumb:hover { background: #444; }

.cmd-output {
  white-space: pre-wrap;
  word-break: break-all;
}

.cmd-line {
  min-height: 1.45em;
}

.cmd-input-row {
  display: flex;
  align-items: flex-start;
  margin-top: 2px;
  flex-shrink: 0;
}

.cmd-prompt {
  color: #ccc;
  white-space: nowrap;
  margin-right: 6px;
  user-select: none;
}

.cmd-input {
  flex: 1;
  color: #e0e0e0;
  outline: none;
  white-space: pre-wrap;
  word-break: break-all;
  caret-color: #ccc;
  min-height: 1.45em;
}

.cmd-input:empty::before {
  content: '';
}

/* cmd color classes */
.cmd-prompt-echo { color: #ccc; }
.cmd-accent      { color: var(--win-accent); }
.cmd-error       { color: #e81123; }
.cmd-dim         { color: #666; }
.cmd-green       { color: #2ecc71; }
.cmd-yellow      { color: #f1c40f; }

/* ===================== Settings App ===================== */

.settings-body {
  display: flex;
  height: 460px;
  overflow: hidden;
}

.window.maximized .settings-body {
  flex: 1;
  height: auto;
}

.settings-sidebar {
  width: 180px;
  min-width: 180px;
  background: rgba(22,22,22,.95);
  border-right: 1px solid var(--win-border);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--win-text-dim);
  transition: all .15s;
  user-select: none;
}

.settings-nav-item:hover {
  background: rgba(255,255,255,.05);
  color: var(--win-text);
}

.settings-nav-item.active {
  background: rgba(0,120,212,.12);
  background: rgba(var(--accent-r, 0), var(--accent-g, 120), var(--accent-b, 212), .12);
  color: var(--win-accent);
}

.settings-nav-item svg {
  flex-shrink: 0;
  opacity: .7;
}

.settings-nav-item.active svg {
  opacity: 1;
  stroke: var(--win-accent);
}

.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.settings-content::-webkit-scrollbar { width: 4px; }
.settings-content::-webkit-scrollbar-track { background: transparent; }
.settings-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
  animation: settingsFadeIn .2s ease;
}

@keyframes settingsFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}

.settings-group {
  margin-bottom: 22px;
}

.settings-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--win-text-dim);
  margin-bottom: 10px;
}

/* Theme cards */
.settings-theme-cards {
  display: flex;
  gap: 10px;
}

.settings-theme-card {
  flex: 1;
  cursor: pointer;
  border-radius: 6px;
  border: 2px solid transparent;
  padding: 8px;
  transition: all .15s;
  text-align: center;
  font-size: 11px;
  color: var(--win-text-dim);
  background: rgba(255,255,255,.03);
}

.settings-theme-card:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
}

.settings-theme-card.active {
  border-color: var(--win-accent);
  background: rgba(0,120,212,.08);
}

.settings-theme-card span {
  display: block;
  margin-top: 6px;
}

.theme-preview {
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.theme-preview-titlebar {
  height: 10px;
}

.theme-preview-body {
  padding: 8px;
}

.theme-preview-line {
  height: 4px;
  border-radius: 2px;
  margin-bottom: 4px;
}

.theme-preview-line.short {
  width: 60%;
}

.theme-preview-dark {
  background: #1e1e1e;
}
.theme-preview-dark .theme-preview-titlebar { background: #202020; }
.theme-preview-dark .theme-preview-line { background: #333; }

.theme-preview-light {
  background: #f3f3f3;
}
.theme-preview-light .theme-preview-titlebar { background: #e8e8e8; }
.theme-preview-light .theme-preview-line { background: #ccc; }

.theme-preview-midnight {
  background: #161b22;
}
.theme-preview-midnight .theme-preview-titlebar { background: #0d1117; }
.theme-preview-midnight .theme-preview-line { background: #30363d; }

/* Wallpaper grid */
.settings-wallpaper-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-wallpaper-item {
  cursor: pointer;
  text-align: center;
  font-size: 10px;
  color: var(--win-text-dim);
  transition: all .15s;
}

.settings-wallpaper-item.active .wp-preview {
  border-color: var(--win-accent);
  box-shadow: 0 0 0 1px var(--win-accent);
}

.wp-preview {
  width: 64px;
  height: 40px;
  border-radius: 4px;
  border: 2px solid transparent;
  margin-bottom: 4px;
  transition: all .15s;
}

.wp-grid {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 8px);
  background-color: #0a0a0a;
}

.wp-dots {
  background: radial-gradient(circle, rgba(255,255,255,.15) 1px, transparent 1px);
  background-size: 6px 6px;
  background-color: #0a0a0a;
}

.wp-gradient {
  background: linear-gradient(135deg, rgba(0,120,212,.3), rgba(180,70,194,.3), rgba(0,120,212,.1));
  background-color: #0a0a0a;
}

.wp-noise {
  background: #0a0a0a;
  position: relative;
}

.wp-none {
  background: #0a0a0a;
  border: 2px dashed rgba(255,255,255,.1);
}

.settings-wallpaper-item span {
  display: block;
}

/* Color swatches */
.settings-color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  position: relative;
}

.settings-swatch:hover {
  transform: scale(1.15);
}

.settings-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--win-accent);
}

.settings-swatch.active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

.settings-custom-color {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--win-text-dim);
}

.settings-custom-color input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 24px;
  border: 1px solid var(--win-border);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.settings-custom-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.settings-custom-color input[type="color"]::-webkit-color-swatch { border: none; border-radius: 2px; }

/* Sliders */
.settings-slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  outline: none;
}

.settings-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--win-accent);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  transition: transform .1s;
}

.settings-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.settings-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--win-accent);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.settings-range-value {
  font-size: 12px;
  color: var(--win-text);
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.settings-range-input {
  font-size: 12px;
  color: var(--win-text);
  min-width: 48px;
  width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  padding: 3px 4px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, background .15s;
  cursor: text;
}

.settings-range-input:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
}

.settings-range-input:focus {
  background: rgba(255,255,255,.1);
  border-color: var(--win-accent);
}

body.theme-light .settings-range-input {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.12);
  color: #1a1a1a;
}

body.theme-light .settings-range-input:hover {
  background: rgba(0,0,0,.06);
}

body.theme-light .settings-range-input:focus {
  background: rgba(0,0,0,.08);
  border-color: var(--win-accent);
}

.settings-color-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--win-text-dim);
  margin: 8px 0 6px;
  opacity: .7;
}

/* toggle */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--win-text);
}

.settings-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.1);
  border-radius: 11px;
  transition: all .2s;
}

.settings-toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #999;
  border-radius: 50%;
  transition: all .2s;
}

.settings-toggle input:checked + .settings-toggle-slider {
  background: var(--win-accent);
}

.settings-toggle input:checked + .settings-toggle-slider::before {
  transform: translateX(18px);
  background: #fff;
}

/* langs */
.settings-lang-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
  border: 1px solid transparent;
}

.settings-lang-item:hover {
  background: rgba(255,255,255,.04);
}

.settings-lang-item.active {
  background: rgba(0,120,212,.1);
  border-color: var(--win-accent);
}

.settings-lang-flag {
  width: 36px;
  height: 26px;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--win-text);
  letter-spacing: .05em;
  flex-shrink: 0;
}

.settings-lang-info {
  display: flex;
  flex-direction: column;
}

.settings-lang-name {
  font-size: 13px;
  color: var(--win-text);
  font-weight: 500;
}

.settings-lang-native {
  font-size: 11px;
  color: var(--win-text-dim);
}

/* reset settings button */
.settings-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(232,17,35,.1);
  border: 1px solid rgba(232,17,35,.25);
  border-radius: 5px;
  color: #e81123;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}

.settings-reset-btn:hover {
  background: rgba(232,17,35,.2);
  border-color: rgba(232,17,35,.4);
}

.settings-reset-btn svg {
  flex-shrink: 0;
}

/* light theme */
body.theme-light .settings-sidebar {
  background: rgba(240,240,240,.95);
}

body.theme-light .settings-theme-card {
  background: rgba(0,0,0,.03);
}

body.theme-light .settings-theme-card:hover {
  background: rgba(0,0,0,.06);
}

body.theme-light .settings-section-title {
  color: #1a1a1a;
}

body.theme-light .settings-swatch.active::after {
  color: #000;
  text-shadow: none;
}

body.theme-light .settings-range {
  background: rgba(0,0,0,.1);
}

body.theme-light .settings-toggle-slider {
  background: rgba(0,0,0,.15);
}

body.theme-light .settings-lang-flag {
  background: rgba(0,0,0,.06);
}

body.theme-light .titlebar-btn:hover {
  background: rgba(0,0,0,.06);
}

body.theme-light .notes-sidebar {
  background: rgba(240,240,240,.95);
}

body.theme-light .notes-title-input {
  color: #1a1a1a;
}

body.theme-light .start-menu-item:hover {
  background: rgba(0,0,0,.05);
}

body.theme-light .taskbar-active {
  background: rgba(0,0,0,.04);
}

body.theme-light .taskbar-active:hover {
  background: rgba(0,0,0,.08);
}

body.theme-light .taskbar-start:hover {
  background: rgba(0,0,0,.05);
}

body.theme-light .cmd-body {
  background: #f8f8f8;
}

body.theme-light .cmd-prompt { color: #333; }
body.theme-light .cmd-input { color: #1a1a1a; caret-color: #333; }

/* midnight theme */

body.theme-midnight .settings-sidebar {
  background: rgba(13,17,23,.95);
}

body.theme-midnight .settings-nav-item.active {
  background: rgba(56,139,253,.12);
}

body.theme-midnight .settings-lang-item.active {
  background: rgba(56,139,253,.1);
}

/* Invertible icons — add class="theme-invertible" to any img that needs 
   to swap in light mode. Override the src with a data attribute:
   data-light-src="images/icon-dark.svg" data-dark-src="images/icon-light.svg"
   OR just use the CSS filter invert for simple white->black icons */
.theme-invertible {
  transition: filter .2s;
}

body.theme-light .theme-invertible {
  filter: invert(1);
}

:root {
  --user-font-size: 14px;
}

.bio-text,
.notes-textarea,
.cmd-input,
.cmd-output,
.settings-toggle-row,
.settings-lang-name {
  font-size: var(--user-font-size);
}

body.theme-light .settings-section-title,
body.theme-light .notes-title-input {
  color: #1a1a1a;
}

/* ── BSOD ── */
.bsod-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #0078d7;
  color: #fff;
  font-family: 'Segoe UI', system-ui, sans-serif;
  padding: 10vh 10vw;
  flex-direction: column;
  justify-content: center;
  animation: bsodIn 0.15s ease-out;
}
.bsod-overlay.active { display: flex; }

@keyframes bsodIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bsod-frown {
  font-size: 8rem;
  font-weight: 200;
  line-height: 1;
  margin-bottom: 1.5rem;
}
.bsod-title {
  font-size: 1.6rem;
  font-weight: 300;
  max-width: 680px;
  line-height: 1.4;
  margin-bottom: 1rem;
}
.bsod-pct {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 2.5rem;
}
.bsod-stop {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
}
.bsod-qr {
  width: 90px;
  height: 90px;
  border-radius: 4px;
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
  padding: 4px;
}
.bsod-info {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.92;
}
.bsod-code {
  font-weight: 400;
}