:root {
  --taskbar-height: 48px;
  --accent: #991b1b;
  --btn-bg: #000000;
  --btn-border: #2a3342;
  --panel-bg: #0c0f14;
  --panel-border: #222a36;
  --text-main: #d1d5db;
  --text-muted: #838e9e;
  --gold: #c29b38;
  --font-witcher: 'Cinzel', Georgia, serif;
}

body[data-school="wolf"] { --accent: #881c1c; }
body[data-school="cat"]  { --accent: #254a70; }
body[data-school="bear"] { --accent: #1e5233; }
body[data-school="viper"]{ --accent: #784812; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #000000;
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #080b0f; }
::-webkit-scrollbar-thumb { background: #1b2330; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

#desktop {
  width: 100vw;
  height: calc(100vh - var(--taskbar-height));
  position: relative;
  background: #111111;
}

#desktop.wp-kaer-morhen { background: #161616; }
#desktop.wp-velen       { background: #121512; }
#desktop.wp-toussaint   { background: #181215; }
#desktop.wp-void        { background: #000000; }

.desktop-icons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  width: fit-content;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 78px;
  padding: 8px 4px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}

.icon:hover {
  background: #111722;
  border-color: #2a3342;
}

.icon.selected {
  background: #172030;
  border-color: #3b4452;
}

.icon-img {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
}
.icon:hover .icon-img { color: #fff; }
.icon.selected .icon-img { color: #fff; }

.icon-label {
  font-size: 11px;
  color: #fff;
  text-align: center;
  font-weight: 500;
}

.window {
  position: absolute;
  background: #0d1117;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 320px;
  min-height: 240px;
}

.window.active-window {
  border-color: #3b4452;
}

.window.dragging { opacity: 0.92; }

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - var(--taskbar-height)) !important;
  border-radius: 0;
}

.window-header {
  height: 38px;
  background: #06080c;
  border-bottom: 1px solid #1c2430;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: move;
}

.window-title {
  font-family: var(--font-witcher);
  font-size: 13px;
  font-weight: 700;
  color: #f3f4f6;
  letter-spacing: 0.5px;
}

.window-controls { display: flex; gap: 4px; }

.win-btn {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--text-muted);
  width: 24px;
  height: 22px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win-btn:hover { background: #131720; color: #fff; border-color: #4b5563; }
.close-btn:hover { background: #991b1b; color: #fff; border-color: #dc2626; }

.window-body {
  flex: 1;
  overflow: auto;
  font-size: 13px;
}

.witcher-hr {
  border: none;
  height: 1px;
  background: #1c2430;
  margin: 14px 0;
}

.witcher-btn {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: #fff;
  padding: 7px 14px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}

.witcher-btn:hover {
  border-color: #4b5563;
  background: #11151e;
}

#window-Bestiary { width: 760px; height: 500px; top: 50px; left: calc(50% - 380px); }
#window-Contracts{ width: 780px; height: 520px; top: 70px; left: calc(50% - 390px); }
#window-Settings { width: 560px; height: 510px; top: 90px; left: calc(50% - 280px); }
#window-Music    { width: 480px; height: 490px; top: 100px; left: calc(50% - 240px); }
#window-Journal  { width: 720px; height: 480px; top: 75px; left: calc(50% - 360px); }

#window-Bestiary .window-body { display: flex; height: 100%; overflow: hidden; }

.bestiary-list {
  width: 200px;
  background: #07090d;
  border-right: 1px solid #1c2430;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.monster-tab {
  background: var(--btn-bg);
  border: none;
  border-bottom: 1px solid #121620;
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}

.monster-tab:hover { background: #0f131a; color: #fff; }
.monster-tab.active {
  background: #131722;
  border-left: 3px solid var(--accent);
  color: #fff;
  font-weight: 600;
}

.bestiary-content {
  flex: 1;
  padding: 22px 26px;
  overflow-y: auto;
  background: #0c0f15;
}

.monster-card { display: flex; flex-direction: column; gap: 12px; }

.monster-name {
  font-family: var(--font-witcher);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.monster-meta { font-size: 12px; color: var(--text-muted); }

.vulnerabilities {
  background: #06080b;
  border: 1px solid #1c2430;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.5;
}

.monster-desc { line-height: 1.6; color: #94a3b8; font-size: 13px; }

.witcher-tips {
  background: #180d0d;
  border: 1px solid #3b1111;
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

#window-Contracts .window-body { display: flex; height: 100%; overflow: hidden; }

.contracts-list {
  width: 220px;
  background: #07090d;
  border-right: 1px solid #1c2430;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.contract-tab {
  background: var(--btn-bg);
  border: none;
  border-bottom: 1px solid #121620;
  padding: 11px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.contract-tab:hover { background: #0f131a; }
.contract-tab.active { background: #131722; border-left: 3px solid var(--accent); }
.contract-tab-title { font-size: 12px; font-weight: 600; color: #fff; }
.contract-tab-meta { font-size: 10px; color: var(--gold); }

.contracts-content {
  flex: 1;
  padding: 22px 26px;
  overflow-y: auto;
  background: #0c0f15;
}

.contract-view { display: flex; flex-direction: column; gap: 14px; }
.contract-header-banner { display: flex; justify-content: space-between; align-items: center; }

.contract-title {
  font-family: var(--font-witcher);
  font-size: 20px;
  color: #fff;
  font-weight: 700;
}

.contract-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.contract-badge.open { background: #0c2013; border: 1px solid #22c55e; color: #4ade80; }
.contract-badge.in-progress { background: #24190a; border: 1px solid #eab308; color: #facc15; }
.contract-badge.completed { background: #111827; border: 1px solid #3b82f6; color: #93c5fd; }

.contract-info { font-size: 12px; color: var(--text-muted); }

.contract-letter {
  background: #07090d;
  border: 1px solid #1e2533;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
  font-style: italic;
}

.accept-btn {
  background: var(--btn-bg);
  border: 1px solid var(--accent);
  color: #fff;
}
.accept-btn:hover { background: var(--accent); }

.contract-quiz {
  background: #07090d;
  border: 1px solid #1c2430;
  border-radius: 4px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-question { font-size: 13px; color: #fff; font-weight: 500; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }

.quiz-opt {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: #cbd5e1;
  padding: 9px 12px;
  border-radius: 3px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}

.quiz-opt:hover {
  background: #11151e;
  border-color: #4b5563;
  color: #fff;
}

.contract-result {
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.contract-result.success { background: #0a2314; border: 1px solid #22c55e; color: #86efac; }
.contract-result.failure { background: #260c10; border: 1px solid #ef4444; color: #fca5a5; }

#window-Settings .window-body { padding: 18px 20px; }
.settings-section { margin-bottom: 18px; }

.settings-section-header h3 {
  font-family: var(--font-witcher);
  font-size: 13px;
  color: #fff;
  margin-bottom: 2px;
}

.settings-section-header p { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }

.theme-grid, .wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.theme-card, .wallpaper-opt {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 4px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-card:hover, .wallpaper-opt:hover { background: #0f131a; border-color: #3b4452; }
.theme-card.active, .wallpaper-opt.active { background: #131722; border-color: #4b5563; }

.theme-preview {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #3b4452;
  flex-shrink: 0;
}

.theme-card[data-school="wolf"] .theme-preview  { background: #881c1c; }
.theme-card[data-school="cat"] .theme-preview   { background: #254a70; }
.theme-card[data-school="bear"] .theme-preview  { background: #1e5233; }
.theme-card[data-school="viper"] .theme-preview { background: #784812; }

.theme-info, .wallpaper-opt { display: flex; flex-direction: column; gap: 2px; }
.theme-info strong, .wp-badge { font-size: 12px; color: #fff; }
.theme-info span, .wp-desc { font-size: 10px; color: var(--text-muted); }

.clock-settings-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.witcher-select {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: #fff;
  padding: 6px 10px;
  border-radius: 3px;
  font-size: 12px;
}

.checkbox-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; }

.about-author-box {
  background: #07090d;
  border: 1px solid #1c2430;
  border-radius: 4px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.author-link { color: var(--gold); text-decoration: none; font-weight: 600; }
.author-link:hover { text-decoration: underline; color: #fff; }
.author-note { margin-top: 6px; font-size: 11px; color: var(--text-muted); }

#window-Music .window-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }

.now-playing-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #07090d;
  border: 1px solid #1c2430;
  border-radius: 4px;
  padding: 10px 14px;
}

.disk-spinner-container {
  width: 44px;
  height: 44px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}


 to { transform: rotate(360deg); } }

.track-details { flex: 1; }
.track-details h3 { font-family: var(--font-witcher); font-size: 14px; color: #fff; }
.track-details p { font-size: 11px; color: var(--text-muted); }
.track-badge { font-size: 9px; color: var(--gold); font-weight: 600; letter-spacing: 0.5px; }

.audio-controls-box {
  background: #07090d;
  border: 1px solid #1c2430;
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-muted);
}

.witcher-slider {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
  height: 6px;
}

.audio-buttons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
}

.audio-btn {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.audio-btn:hover { background: #131720; border-color: #4b5563; }
.main-play-btn { width: 38px; height: 38px; font-size: 14px; border-color: #4b5563; }

.volume-control-wrap {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.vol-slider { width: 60px; }

.tracklist-container {
  flex: 1;
  background: #07090d;
  border: 1px solid #1c2430;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 180px;
}

.tracklist-header {
  padding: 6px 10px;
  background: #05070a;
  border-bottom: 1px solid #1c2430;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tracklist-header h4 { font-size: 11px; color: var(--text-muted); }
.legal-badge { font-size: 9px; color: #4ade80; }

.tracklist { overflow-y: auto; padding: 4px; }

.track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-bottom: 1px solid #10141c;
  cursor: pointer;
  border-radius: 3px;
  font-size: 11px;
}

.track-item:hover { background: #0f131a; }
.track-item.active { background: #131722; border-color: #4b5563; color: #fff; }
.track-num { color: #838e9e; font-weight: bold; width: 14px; }
.track-meta { flex: 1; display: flex; flex-direction: column; }
.t-title { color: #fff; }
.t-artist, .track-duration { font-size: 10px; color: var(--text-muted); }

.journal-body { display: flex; height: 100%; overflow: hidden; }

.journal-sidebar {
  width: 220px;
  background: #07090d;
  border-right: 1px solid #1c2430;
  display: flex;
  flex-direction: column;
}

.journal-sidebar-header {
  padding: 8px 10px;
  border-bottom: 1px solid #1c2430;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.journal-heading { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.new-entry-btn { padding: 3px 8px; font-size: 10px; }

.journal-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.journal-entry-item {
  padding: 10px 12px;
  background: var(--btn-bg);
  border-bottom: 1px solid #121620;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.journal-entry-item:hover { background: #0f131a; }
.journal-entry-item.active { background: #131722; border-left: 3px solid var(--accent); }
.item-title { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-date { font-size: 9px; color: var(--gold); }

.journal-editor {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #0c0f15;
}

.journal-title {
  background: #07090d;
  border: 1px solid #1c2430;
  border-radius: 4px;
  padding: 8px 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-witcher);
}

.journal-title:focus, .journal-text:focus { outline: none; border-color: #4b5563; }

.journal-text {
  flex: 1;
  background: #07090d;
  border: 1px solid #1c2430;
  border-radius: 4px;
  padding: 12px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.6;
  resize: none;
  font-family: inherit;
}

.journal-actions { display: flex; gap: 8px; }
.delete-btn { background: #240c0f; border-color: #7f1d1d; color: #fca5a5; }
.delete-btn:hover { background: #991b1b; color: #fff; }

#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  background: #05070a;
  border-top: 1px solid #1c2430;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 9999;
}

#running-apps { display: flex; gap: 6px; }

.taskbar-item {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.taskbar-item:hover { background: #11151e; color: #fff; border-color: #4b5563; }
.taskbar-item.active { background: #131722; border-color: #4b5563; color: #fff; font-weight: 500; }

#system-tray { display: flex; align-items: center; gap: 14px; font-size: 12px; }
#coin-purse { color: var(--gold); font-weight: 600; }

.interactive-clock {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  color: #fff;
}
.interactive-clock:hover { border-color: #4b5563; }

