:root {
  --win11-bg: #1a1a1a;
  --win11-surface: #242424;
  --win11-surface-hover: #2e2e2e;
  --win11-surface-active: #333333;
  --win11-accent: #60cdff;
  --win11-accent-hover: #80d8ff;
  --win11-accent-dim: rgba(96, 205, 255, 0.1);
  --win11-text: #e8e8e8;
  --win11-text-secondary: #999999;
  --win11-text-dim: #666666;
  --win11-border: #383838;
  --win11-titlebar: #1e1e1e;
  --win11-taskbar-bg: rgba(26, 26, 26, 0.85);
  --win11-taskbar-border: rgba(255, 255, 255, 0.04);
  --win11-radius: 8px;
  --win11-radius-sm: 4px;
  --win11-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --win11-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --taskbar-height: 48px;
  --font-win: 'Segoe UI Variable', 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: var(--font-win);
  color: var(--win11-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
}

/* ========== DESKTOP ========== */
.win11-desktop {
  width: 95vw;
  height: 95vh;
  max-width: 1400px;
  max-height: 900px;
  position: relative;
  overflow: hidden;
  background: var(--win11-bg);
  border: 1px solid var(--win11-border);
  border-radius: 4px;
}

.desktop-wallpaper {
  position: absolute;
  inset: 0;
  background: url('../Assets/Wallpaper dark green.avif') center/cover no-repeat;
  z-index: 0;
}

.desktop-wallpaper-overlay {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  z-index: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.desktop-area {
  position: absolute;
  inset: 0;
  bottom: var(--taskbar-height);
  z-index: 1;
}

/* ========== DESKTOP ICONS ========== */
.desktop-icons {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  padding: 16px 8px;
  gap: 4px;
  max-height: 100%;
  width: max-content;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--win11-radius-sm);
  cursor: pointer;
  width: 92px;
  min-height: 80px;
  transition: background 0.1s;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.06);
}

.desktop-icon.selected {
  background: rgba(96, 205, 255, 0.15);
  outline: 1px solid rgba(96, 205, 255, 0.3);
  outline-offset: -1px;
}

.desktop-icon svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.desktop-icon-label {
  font-size: 11px;
  color: var(--win11-text);
  text-align: center;
  line-height: 1.3;
  word-wrap: break-word;
  max-width: 100%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* ========== WINDOWS LAYER ========== */
.windows-layer {
  position: absolute;
  inset: 0;
  bottom: var(--taskbar-height);
  z-index: 10;
  pointer-events: none;
}

/* ========== WINDOW ========== */
.win11-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--win11-surface);
  border: 1px solid var(--win11-border);
  border-radius: var(--win11-radius);
  overflow: hidden;
  box-shadow: var(--win11-shadow);
  pointer-events: all;
  transition: box-shadow 0.15s;
  min-width: 320px;
  min-height: 200px;
}

.win11-window.focused {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  border-color: rgba(96, 205, 255, 0.15);
}

.window-resize-handle {
  position: absolute;
  z-index: 10;
}

.win11-window.maximized .window-resize-handle {
  display: none;
}

.win11-window.maximized {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
}

.win11-window.minimized {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
}

.window-titlebar {
  display: flex;
  align-items: center;
  height: 32px;
  background: var(--win11-titlebar);
  padding: 0 4px 0 12px;
  flex-shrink: 0;
  cursor: default;
}

.window-title-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  flex-shrink: 0;
}

.window-title-icon img {
  width: 16px !important;
  height: 16px !important;
}

.window-title-text {
  font-size: 12px;
  color: var(--win11-text-secondary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-controls {
  display: flex;
  gap: 0;
  margin-left: auto;
}

.window-btn {
  width: 46px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--win11-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: background 0.1s;
}

.window-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--win11-text);
}

.window-btn-close:hover {
  background: #c42b1c;
  color: #fff;
}

.window-btn svg {
  width: 10px;
  height: 10px;
}

.window-content {
  flex: 1;
  overflow: hidden;
  display: flex;
}

/* ========== TASKBAR ========== */
.win11-taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  background: var(--win11-taskbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--win11-taskbar-border);
  display: flex;
  align-items: center;
  z-index: 200;
  padding: 0 8px;
  padding-bottom: var(--safe-bottom);
}

.taskbar-left {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.taskbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
}

.taskbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.taskbar-start-btn {
  width: 40px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--win11-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.taskbar-start-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.taskbar-start-btn.active {
  background: rgba(255, 255, 255, 0.1);
}

.taskbar-github-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--win11-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.taskbar-github-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.taskbar-github-btn img {
  opacity: 0.7;
  transition: opacity 0.15s;
}

.taskbar-github-btn:hover img {
  opacity: 1;
}

.taskbar-app-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--win11-text);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.taskbar-app-btn::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--win11-accent);
  transition: width 0.2s, opacity 0.2s;
  opacity: 0;
}

.taskbar-app-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.taskbar-app-btn.active {
  background: rgba(96, 205, 255, 0.18);
}

.taskbar-app-btn.active::after {
  width: 18px;
  opacity: 1;
}

.taskbar-app-btn.running::after {
  width: 6px;
  opacity: 0.8;
}

.taskbar-app-btn.minimized::after {
  width: 0;
  opacity: 0;
}

.taskbar-app-btn.minimized {
  background: rgba(255, 255, 255, 0.02);
}

.taskbar-app-btn.minimized img,
.taskbar-app-btn.minimized svg {
  opacity: 0.35;
}

.taskbar-app-btn svg,
.taskbar-app-btn img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.taskbar-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0 6px;
  cursor: default;
}

.taskbar-time {
  font-size: 12px;
  line-height: 1;
  color: var(--win11-text);
}

.taskbar-date {
  font-size: 11px;
  line-height: 1;
  color: var(--win11-text-secondary);
}

/* ========== START MENU ========== */
.start-menu {
  position: absolute;
  bottom: calc(var(--taskbar-height) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  max-width: calc(100vw - 16px);
  background: rgba(36, 36, 36, 0.95);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--win11-border);
  border-radius: var(--win11-radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  z-index: 250;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.start-menu.show {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.start-menu-header {
  padding: 16px 20px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--win11-text);
  border-bottom: 1px solid var(--win11-border);
}

.start-menu-apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 12px;
}

.start-menu-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--win11-radius-sm);
  cursor: pointer;
  transition: background 0.1s;
  background: transparent;
  border: none;
  color: var(--win11-text);
  font-family: var(--font-win);
  font-size: 11px;
}

.start-menu-app:hover {
  background: rgba(255, 255, 255, 0.06);
}

.start-menu-app svg {
  opacity: 0.85;
}

.start-menu-footer {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-top: 1px solid var(--win11-border);
}

.start-menu-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--win11-text);
}

/* ========== APP: TERMINAL ========== */
.terminal-app {
  height: 100%;
  background: #0c0c0c;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow: hidden;
}

.terminal-output {
  height: 100%;
  overflow-y: auto;
  padding: 8px 12px;
}

.terminal-output::-webkit-scrollbar {
  width: 6px;
}

.terminal-output::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-output::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.output-line {
  color: var(--win11-text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  padding: 4px 0 0;
  gap: 4px;
}

.terminal-prompt {
  color: var(--win11-accent);
  white-space: nowrap;
  font-size: 13px;
}

.terminal-input-text {
  color: var(--win11-text);
  font-family: var(--font-mono);
  font-size: 13px;
  flex: 1;
  min-width: 4px;
  outline: none;
  caret-color: var(--win11-text);
}

.terminal-cursor {
  display: inline;
  color: var(--win11-text);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ========== APP: VS CODE ========== */
.vscode-app {
  display: flex;
  height: 100%;
  background: #1e1e1e;
}

.vscode-activitybar {
  width: 48px;
  background: #333333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
  gap: 2px;
  flex-shrink: 0;
}

.vscode-activity-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.1s;
}

.vscode-activity-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

.vscode-activity-btn.active {
  color: #fff;
}

.vscode-activity-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #fff;
}

.vscode-sidebar {
  width: 220px;
  background: #252526;
  border-right: 1px solid #383838;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.vscode-sidebar-header {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
}

.vscode-file-list {
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
}

.vscode-file-list::-webkit-scrollbar {
  width: 6px;
}
.vscode-file-list::-webkit-scrollbar-track {
  background: transparent;
}
.vscode-file-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.vscode-file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.1s;
  font-family: var(--font-win);
  font-size: 12px;
  white-space: nowrap;
}

.vscode-file-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.vscode-file-item.selected {
  background: rgba(96, 205, 255, 0.12);
  color: #fff;
}

.vscode-file-item .vscode-file-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.vscode-editor-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vscode-tabs {
  display: flex;
  background: #2d2d2d;
  overflow-x: auto;
  flex-shrink: 0;
  height: 36px;
}

.vscode-tabs::-webkit-scrollbar {
  height: 2px;
}
.vscode-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

.vscode-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 36px;
  background: #2d2d2d;
  border-right: 1px solid #252526;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.1s, color 0.1s;
}

.vscode-tab:hover {
  background: #37373d;
}

.vscode-tab.active {
  background: #1e1e1e;
  color: #fff;
  border-top: 1px solid var(--win11-accent);
}

.vscode-tab-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  margin-left: 4px;
  opacity: 0.5;
}

.vscode-tab-close:hover {
  opacity: 1;
}

.vscode-editor {
  flex: 1;
  overflow: auto;
  background: #1e1e1e;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  counter-reset: line;
}

.vscode-editor::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.vscode-editor::-webkit-scrollbar-track {
  background: transparent;
}
.vscode-editor::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.vscode-editor-textarea::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.vscode-editor-textarea::-webkit-scrollbar-track {
  background: transparent;
}
.vscode-editor-textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.vscode-line {
  display: flex;
  min-height: 21px;
}

.vscode-line-num {
  width: 48px;
  text-align: right;
  padding-right: 12px;
  color: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  user-select: none;
  font-size: 12px;
}

.vscode-line-content {
  flex: 1;
  white-space: pre;
  padding-right: 16px;
}

.vscode-token-keyword { color: #569cd6; }
.vscode-token-string { color: #ce9178; }
.vscode-token-comment { color: #6a9955; font-style: italic; }
.vscode-token-number { color: #b5cea8; }
.vscode-token-builtin { color: #dcdcaa; }
.vscode-token-operator { color: #d4d4d4; }
.vscode-token-punctuation { color: #d4d4d4; }
.vscode-token-decorator { color: #dcdcaa; }
.vscode-token-variable { color: #9cdcfe; }
.vscode-token-heading { color: #569cd6; font-weight: bold; }
.vscode-token-bold { color: #fff; font-weight: bold; }
.vscode-token-italic { color: #ccc; font-style: italic; }
.vscode-token-code { color: #ce9178; }
.vscode-token-link { color: #3794ff; }
.vscode-token-list { color: #569cd6; }
.vscode-token-constant { color: #4fc1ff; }
.vscode-token-key { color: #9cdcfe; }
.vscode-token-text { color: #d4d4d4; }

.vscode-statusbar {
  height: 22px;
  background: #007acc;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
  justify-content: space-between;
}

/* ========== APP: NOTEPAD ========== */
.notepad-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #1e1e1e;
  font-family: var(--font-mono);
}

.notepad-menu {
  display: flex;
  background: var(--win11-titlebar);
  border-bottom: 1px solid var(--win11-border);
  padding: 2px 0;
  flex-shrink: 0;
}

.notepad-menu-item {
  padding: 4px 10px;
  font-size: 12px;
  color: var(--win11-text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-win);
}

.notepad-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--win11-text);
}

.notepad-editor {
  flex: 1;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Consolas', var(--font-mono);
  font-size: 14px;
  padding: 8px;
  border: none;
  outline: none;
  resize: none;
}

.notepad-status {
  height: 22px;
  background: var(--win11-titlebar);
  border-top: 1px solid var(--win11-border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 11px;
  color: var(--win11-text-secondary);
  flex-shrink: 0;
  justify-content: space-between;
}

/* ========== APP: BROWSER ========== */
.browser-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #1e1e1e;
}

.browser-toolbar {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  gap: 4px;
  background: #2d2d2d;
  border-bottom: 1px solid var(--win11-border);
  flex-shrink: 0;
}

.browser-nav-btn {
  width: 32px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--win11-text-secondary);
  border-radius: var(--win11-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.browser-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--win11-text);
}

.browser-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.browser-addressbar {
  flex: 1;
  display: flex;
  align-items: center;
  background: #1e1e1e;
  border: 1px solid var(--win11-border);
  border-radius: 18px;
  padding: 0 12px;
  height: 28px;
}

.browser-url {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--win11-text);
  font-size: 12px;
  outline: none;
  font-family: var(--font-win);
}

.browser-go-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--win11-accent);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.browser-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* ========== APP: EXPLORER ========== */
.explorer-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #202020;
}

.explorer-toolbar {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 4px;
  background: #2d2d2d;
  border-bottom: 1px solid var(--win11-border);
  flex-shrink: 0;
}

.explorer-nav-btn {
  width: 32px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--win11-text-secondary);
  border-radius: var(--win11-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.explorer-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--win11-text);
}

.explorer-addressbar {
  flex: 1;
  display: flex;
  align-items: center;
  background: #1e1e1e;
  border: 1px solid var(--win11-border);
  border-radius: var(--win11-radius-sm);
  padding: 0 10px;
  height: 28px;
  font-size: 12px;
  color: var(--win11-text-secondary);
  font-family: var(--font-win);
  gap: 6px;
}

.explorer-body {
  flex: 1;
  display: flex;
}

.explorer-sidebar {
  width: 200px;
  background: #252526;
  border-right: 1px solid var(--win11-border);
  overflow-y: auto;
  padding: 8px 0;
  flex-shrink: 0;
}

.explorer-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 12px;
  color: var(--win11-text-secondary);
  cursor: pointer;
  transition: background 0.1s;
}

.explorer-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--win11-text);
}

.explorer-sidebar-item.active {
  background: rgba(96, 205, 255, 0.1);
  color: var(--win11-text);
}

.explorer-sidebar-item svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.explorer-main {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.explorer-main::-webkit-scrollbar {
  width: 6px;
}
.explorer-main::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.explorer-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 12px;
  color: var(--win11-text);
  cursor: pointer;
  transition: background 0.1s;
}

.explorer-file.selected {
  background: rgba(96, 205, 255, 0.12);
  outline: 1px solid rgba(96, 205, 255, 0.25);
  outline-offset: -1px;
}

.explorer-file:hover {
  background: rgba(255, 255, 255, 0.04);
}

.explorer-file svg {
  flex-shrink: 0;
}

/* ========== APP: SETTINGS ========== */
.settings-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--win11-surface);
  overflow-y: auto;
  padding: 24px;
  gap: 24px;
  font-family: var(--font-win);
}

.settings-app::-webkit-scrollbar {
  width: 6px;
}
.settings-app::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-avatar {
  width: 64px;
  height: 64px;
  background: #3d6b4f;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.settings-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--win11-text);
}

.settings-meta {
  font-size: 13px;
  color: var(--win11-text-secondary);
}

.settings-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--win11-border);
  border-radius: var(--win11-radius-sm);
  padding: 16px;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--win11-text);
  margin-bottom: 10px;
}

.settings-skill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.settings-skill-label {
  width: 90px;
  font-size: 12px;
  color: var(--win11-text-secondary);
  flex-shrink: 0;
}

.settings-skill-track {
  flex: 1;
  height: 6px;
  background: var(--win11-border);
  border-radius: 3px;
  overflow: hidden;
}

.settings-skill-fill {
  height: 100%;
  background: var(--win11-accent);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.settings-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-tag {
  padding: 4px 10px;
  background: rgba(96, 205, 255, 0.1);
  color: var(--win11-accent);
  border-radius: 12px;
  font-size: 11px;
}

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

.wallpaper-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.15s;
  background: var(--win11-surface);
}

.wallpaper-card:hover {
  transform: scale(1.02);
}

.wallpaper-card.active {
  border-color: var(--win11-accent);
}

.wallpaper-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
}

.wallpaper-label {
  padding: 6px 8px 8px;
  font-size: 12px;
  color: var(--win11-text-secondary);
  text-align: center;
}

.wallpaper-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: var(--win11-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.settings-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--win11-border);
  border-radius: var(--win11-radius-sm);
  color: var(--win11-accent);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.1s;
}

.settings-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ========== APP: BENJAMIN QUIZ ========== */
.quiz-game-app {
  display: flex;
  height: 100%;
  overflow: hidden;
  background: #101018;
  color: #f6f0d8;
  font-family: var(--font-mono);
}

.quiz-game-app * {
  image-rendering: pixelated;
}

.quiz-shell {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    #101018;
  background-size: 16px 16px;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 3px solid #f6f0d8;
  background: #1f2f46;
  box-shadow: 4px 4px 0 #050508;
}

.quiz-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #ffd166;
}

.quiz-meta {
  font-size: 12px;
  color: #cbe7ff;
  white-space: nowrap;
}

.quiz-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(160px, 230px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.quiz-sprite-wrap {
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 3px solid #f6f0d8;
  background:
    linear-gradient(#3a5b7d 0 55%, #263345 55% 100%);
  box-shadow: 4px 4px 0 #050508;
  overflow: hidden;
}

.quiz-sprite {
  width: min(92%, 210px);
  max-height: 96%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(5px 5px 0 rgba(0, 0, 0, 0.55));
}

.quiz-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  border: 3px solid #f6f0d8;
  background: #202033;
  box-shadow: 4px 4px 0 #050508;
}

.quiz-kicker {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  background: #ef476f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 3px 3px 0 #050508;
}

.quiz-question {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff6df;
  overflow-wrap: anywhere;
}

.quiz-copy {
  font-size: 14px;
  line-height: 1.55;
  color: #cbe7ff;
  overflow-wrap: anywhere;
}

.quiz-answers {
  display: grid;
  gap: 10px;
}

.quiz-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 3px solid #f6f0d8;
  border-radius: 0;
  background: #30445f;
  color: #fff6df;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  box-shadow: 4px 4px 0 #050508;
  transition: transform 0.08s, box-shadow 0.08s, background 0.08s;
  overflow-wrap: anywhere;
}

.quiz-btn:hover {
  background: #3f5d84;
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 #050508;
}

.quiz-btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.quiz-btn-primary {
  max-width: 230px;
  background: #06d6a0;
  color: #08110f;
  text-align: center;
}

.quiz-btn-primary:hover {
  background: #41f0bf;
}

/* ========== APP: CODEX ========== */
.codex-app {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  height: 100%;
  overflow: hidden;
  background: #2e2e2e;
  color: #e4e7ed;
  font-family: var(--font-win);
  font-size: 13px;
}

/* ---------- Left Sidebar ---------- */
.codex-left-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: #252525;
  border-right: 1px solid #4a4a4a;
  overflow-y: auto;
}

.codex-left-sidebar::-webkit-scrollbar {
  width: 6px;
}

.codex-left-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.codex-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: #282828;
}

.codex-brand img {
  width: 28px !important;
  height: 28px !important;
  flex-shrink: 0;
}

.codex-brand-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.codex-brand-title {
  font-size: 14px;
  font-weight: 650;
  color: #f0f2f5;
}

.codex-brand-meta {
  font-size: 11px;
  color: #8890a0;
}

.codex-section-label {
  margin: 4px 8px 8px;
  font-size: 11px;
  font-weight: 650;
  color: #8890a0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.codex-sessions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.codex-session {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #c4c9d4;
  font-family: var(--font-win);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.codex-session:hover {
  background: #282828;
}

.codex-session.active {
  background: #282828;
  border-color: rgba(96, 205, 255, 0.2);
}

.codex-session span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #e4e7ed;
}

.codex-session small {
  color: #8890a0;
  font-size: 11px;
}

/* ---------- Main Area ---------- */
.codex-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #2e2e2e;
  overflow: hidden;
}

/* ---------- Topbar ---------- */
.codex-topbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid #4a4a4a;
  background: #252525;
  flex-shrink: 0;
}

.codex-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.codex-nav-arrows {
  display: flex;
  gap: 4px;
}

.codex-nav-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #8890a0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}

.codex-nav-btn:hover {
  background: #282828;
  color: #e4e7ed;
}

.codex-nav-btn svg {
  width: 14px;
  height: 14px;
}

.codex-topbar-title {
  font-size: 14px;
  font-weight: 650;
  color: #f0f2f5;
}

.codex-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.codex-topbar-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #8890a0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}

.codex-topbar-btn:hover {
  background: #282828;
  color: #e4e7ed;
}

/* ---------- Transcript ---------- */
.codex-transcript {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
}

.codex-transcript::-webkit-scrollbar {
  width: 6px;
}

.codex-transcript::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

/* ---------- Accordion ---------- */
.codex-accordion {
  margin-bottom: 16px;
  border: 1px solid #4a4a4a;
  border-radius: 14px;
  background: #252525;
  overflow: hidden;
}

.codex-accordion-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}

.codex-accordion-header:hover {
  background: #282828;
}

.codex-accordion-chevron {
  width: 16px;
  height: 16px;
  color: #8890a0;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.codex-accordion-header.open .codex-accordion-chevron {
  transform: rotate(180deg);
}

.codex-accordion-title {
  font-size: 13px;
  color: #8890a0;
  flex: 1;
}

.codex-accordion-time {
  font-size: 12px;
  color: #41d19a;
  font-weight: 500;
}

.codex-accordion-body {
  padding: 0 16px 14px 42px;
  font-size: 13px;
  color: #8890a0;
  line-height: 1.6;
}

.codex-accordion-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
}

.codex-accordion-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #c4c9d4;
}

.codex-accordion-step-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(65, 209, 154, 0.15);
  color: #41d19a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

/* ---------- Message ---------- */
.codex-message {
  max-width: 720px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  margin: 0 auto 20px;
}

.codex-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #282828;
  color: #e4e7ed;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.codex-message.assistant .codex-avatar {
  background: #f0f2f5;
  color: #2e2e2e;
}

.codex-message-body {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #4a4a4a;
  border-radius: 14px;
  background: #252525;
}

.codex-message.user .codex-message-body {
  background: #252525;
  border-color: rgba(96, 205, 255, 0.15);
}

.codex-message.user {
  direction: rtl;
}

.codex-message.user > * {
  direction: ltr;
}

.codex-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #8890a0;
}

.codex-message-meta strong {
  color: #f0f2f5;
  font-size: 13px;
  font-weight: 650;
}

.codex-message-text {
  color: #dce1ea;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  user-select: text;
}

.codex-message-text p {
  margin-bottom: 10px;
}

.codex-message-text p:last-child {
  margin-bottom: 0;
}

/* ---------- Code Badge ---------- */
.codex-code-badge {
  display: inline;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  background: #282828;
  border: 1px solid #555;
  border-radius: 6px;
  color: #e4e7ed;
  vertical-align: middle;
}

/* ---------- File Link ---------- */
.codex-file-link {
  color: #7fb3ff;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.1s;
}

.codex-file-link:hover {
  color: #a8c8ff;
  text-decoration: underline;
}

/* ---------- Pill Button ---------- */
.codex-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-top: 12px;
  border: 1px solid #555;
  border-radius: 99px;
  background: transparent;
  color: #8890a0;
  font-size: 12px;
  font-family: var(--font-win);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.codex-pill-btn:hover {
  background: #282828;
  border-color: #4a5568;
  color: #e4e7ed;
}

/* ---------- Web Preview Card ---------- */
.codex-web-preview {
  margin: 14px 0;
  border: 1px solid #4a4a4a;
  border-radius: 14px;
  background: #252525;
  overflow: hidden;
}

.codex-web-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.codex-web-preview-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #282828;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.codex-web-preview-info {
  flex: 1;
  min-width: 0;
}

.codex-web-preview-title {
  font-size: 13px;
  font-weight: 650;
  color: #f0f2f5;
}

.codex-web-preview-subtitle {
  font-size: 12px;
  color: #8890a0;
  margin-top: 2px;
}

.codex-web-preview-dropdown {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #8890a0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.codex-web-preview-dropdown:hover {
  background: #282828;
  color: #e4e7ed;
}

.codex-web-preview-body {
  padding: 0 16px 14px;
}

.codex-web-preview-mock {
  border: 1px solid #4a4a4a;
  border-radius: 10px;
  background: #2e2e2e;
  overflow: hidden;
}

.codex-web-preview-mock-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid #4a4a4a;
  font-size: 11px;
  color: #8890a0;
}

.codex-web-preview-mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.codex-web-preview-mock-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
}

.codex-web-preview-mock-card {
  padding: 8px;
  border-radius: 6px;
  background: #252525;
}

.codex-web-preview-mock-label {
  font-size: 10px;
  color: #8890a0;
  margin-bottom: 4px;
}

.codex-web-preview-mock-value {
  font-size: 13px;
  font-weight: 650;
  color: #e4e7ed;
}

/* ---------- Git Diff Component ---------- */
.codex-git-diff {
  margin: 14px 0;
  border: 1px solid #4a4a4a;
  border-radius: 14px;
  background: #252525;
  overflow: hidden;
}

.codex-git-diff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #4a4a4a;
}

.codex-git-diff-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #e4e7ed;
}

.codex-git-diff-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(65, 209, 154, 0.15);
  color: #41d19a;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

.codex-git-diff-actions {
  display: flex;
  gap: 6px;
}

.codex-git-diff-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  background: transparent;
  color: #8890a0;
  font-size: 12px;
  font-family: var(--font-win);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.codex-git-diff-btn:hover {
  background: #282828;
  color: #e4e7ed;
}

.codex-git-diff-files {
  padding: 8px 0;
}

.codex-git-diff-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.1s;
}

.codex-git-diff-file:hover {
  background: #282828;
}

.codex-git-diff-file-path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #c4c9d4;
}

.codex-git-diff-file-delta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.codex-git-diff-added {
  color: #41d19a;
  font-size: 12px;
  font-family: var(--font-mono);
}

.codex-git-diff-removed {
  color: #f06272;
  font-size: 12px;
  font-family: var(--font-mono);
}

.codex-git-diff-arrow {
  color: #8890a0;
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.codex-git-diff-snippet {
  border-top: 1px solid #4a4a4a;
  background: #2e2e2e;
}

.codex-git-diff-code {
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}

.codex-git-diff-line-add {
  color: #41d19a;
  display: flex;
  gap: 8px;
}

.codex-git-diff-line-rem {
  color: #f06272;
  display: flex;
  gap: 8px;
}

.codex-git-diff-line-ctx {
  color: #8890a0;
  display: flex;
  gap: 8px;
}

.codex-git-diff-prefix {
  user-select: none;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

/* ---------- Input Box ---------- */
.codex-composer {
  flex-shrink: 0;
  padding: 14px 18px 16px;
  border-top: 1px solid #4a4a4a;
  background: #252525;
}

.codex-composer-inner {
  border: 1px solid #555;
  border-radius: 14px;
  background: #2e2e2e;
  overflow: hidden;
}

.codex-composer-textarea {
  width: 100%;
  min-height: 48px;
  max-height: 160px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #e4e7ed;
  font-size: 14px;
  font-family: var(--font-win);
  outline: none;
  resize: none;
  cursor: text;
}

.codex-composer-textarea::placeholder {
  color: #8890a0;
}

.codex-composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid #4a4a4a;
}

.codex-composer-tools-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.codex-composer-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid #555;
  border-radius: 8px;
  background: transparent;
  color: #8890a0;
  font-size: 12px;
  font-family: var(--font-win);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.codex-composer-tool-btn:hover {
  background: #282828;
  color: #e4e7ed;
}

.codex-composer-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.codex-composer-model {
  font-size: 12px;
  color: #8890a0;
}

.codex-composer-mic {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #8890a0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}

.codex-composer-mic:hover {
  background: #282828;
  color: #e4e7ed;
}

.codex-composer-send {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #282828;
  color: #8890a0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  transition: background 0.15s, color 0.15s;
}

/* ---------- Right Sidebar ---------- */
.codex-right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px;
  background: #252525;
  border-left: 1px solid #4a4a4a;
  overflow-y: auto;
}

.codex-right-sidebar::-webkit-scrollbar {
  width: 6px;
}

.codex-right-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.codex-right-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.codex-right-title {
  font-size: 14px;
  font-weight: 650;
  color: #f0f2f5;
}

.codex-right-settings-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #8890a0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}

.codex-right-settings-btn:hover {
  background: #282828;
  color: #e4e7ed;
}

.codex-right-section {
  padding: 14px 0;
  border-top: 1px solid #4a4a4a;
}

.codex-right-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.codex-right-section-title {
  font-size: 11px;
  font-weight: 650;
  color: #8890a0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.codex-right-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.codex-right-stat-label {
  color: #8890a0;
}

.codex-right-stat-value {
  color: #e4e7ed;
  font-family: var(--font-mono);
  font-size: 12px;
}

.codex-right-stat-value.green {
  color: #41d19a;
}

.codex-right-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #7fb3ff;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.1s;
}

.codex-right-link:hover {
  color: #a8c8ff;
  text-decoration: underline;
}

.codex-right-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 12px;
  color: #c4c9d4;
}

.codex-right-task-icon {
  width: 16px;
  height: 16px;
  color: #8890a0;
  flex-shrink: 0;
}

.codex-right-preview {
  padding: 12px;
  border: 1px solid #4a4a4a;
  border-radius: 12px;
  background: #2e2e2e;
}

.codex-right-preview-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7fb3ff;
  margin-bottom: 8px;
}

.codex-right-preview-frame {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  background: #282828;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8890a0;
  font-size: 11px;
}

.codex-right-source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  color: #c4c9d4;
}

.codex-right-source-icon {
  width: 14px;
  height: 14px;
  color: #8890a0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .win11-desktop {
    border-radius: 0;
    border: none;
  }

  .desktop-icons {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px 4px;
    gap: 2px;
  }

  .desktop-icon {
    padding: 4px 4px;
    width: 68px;
    min-height: 60px;
    gap: 2px;
  }

  .desktop-icon svg {
    width: 28px;
    height: 28px;
  }

  .desktop-icon-label {
    font-size: 9px;
  }

  .start-menu {
    width: calc(100vw - 16px);
    left: 8px;
    right: 8px;
    transform: none;
  }

  .start-menu-apps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 8px;
  }

  .win11-window {
    width: 90% !important;
    left: 5% !important;
    top: 5% !important;
    height: 85% !important;
  }

  .vscode-sidebar {
    width: 48px;
  }

  .vscode-sidebar-header {
    display: none;
  }

  .vscode-file-item span {
    display: none;
  }

  .explorer-sidebar {
    width: 48px;
  }

  .explorer-sidebar-item span {
    display: none;
  }

  .quiz-shell {
    padding: 12px;
    gap: 10px;
  }

  .quiz-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .quiz-stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(120px, 32%) minmax(0, 1fr);
    gap: 10px;
  }

  .quiz-sprite-wrap {
    align-items: flex-end;
  }

  .quiz-sprite {
    width: auto;
    max-width: 180px;
    max-height: 125px;
  }

  .quiz-panel {
    justify-content: flex-start;
    overflow-y: auto;
    padding: 14px;
  }

  .quiz-question {
    font-size: 20px;
  }

  .codex-app {
    grid-template-columns: 64px 1fr;
  }

  .codex-right-sidebar {
    display: none;
  }

  .codex-left-sidebar {
    width: 64px;
    padding: 12px 8px;
    align-items: center;
  }

  .codex-brand {
    justify-content: center;
    padding: 8px;
  }

  .codex-brand > div,
  .codex-section-label,
  .codex-session span,
  .codex-session small {
    display: none;
  }

  .codex-sessions {
    width: 100%;
  }

  .codex-session {
    min-height: 34px;
    padding: 8px;
    align-items: center;
  }

  .codex-session::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 5px;
    background: #555;
  }

  .codex-session.active::before {
    background: #f0f2f5;
  }

  .codex-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
  }

  .codex-transcript {
    padding: 14px;
  }

  .codex-message {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
  }

  .codex-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .codex-composer {
    padding: 10px 14px 12px;
  }
}

@media (max-width: 480px) {
  .win11-taskbar {
    height: 40px;
    --taskbar-height: 40px;
  }

  .taskbar-start-btn {
    width: 32px;
    height: 28px;
  }

  .taskbar-app-btn {
    width: 36px;
    height: 32px;
  }

  .taskbar-app-btn svg,
  .taskbar-app-btn img {
    width: 18px;
    height: 18px;
  }

  .taskbar-clock {
    font-size: 10px;
  }

  .quiz-title {
    font-size: 16px;
  }

  .quiz-meta,
  .quiz-copy,
  .quiz-btn {
    font-size: 12px;
  }

  .quiz-question {
    font-size: 17px;
  }

  .quiz-sprite {
    max-height: 100px;
  }

  .codex-app {
    grid-template-columns: 1fr;
    font-size: 12px;
  }

  .codex-left-sidebar {
    display: none;
  }

  .codex-topbar-title {
    font-size: 13px;
  }

  .codex-message-text,
  .codex-accordion-title,
  .codex-git-diff-title,
  .codex-web-preview-title {
    font-size: 13px;
  }

  .codex-message-body {
    padding: 12px;
    border-radius: 12px;
  }

  .codex-composer {
    padding: 8px 12px 10px;
  }
}

/* ========== CONTEXT MENU ========== */
.context-menu {
  position: fixed;
  z-index: 3000;
  background: rgba(36, 36, 36, 0.96);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--win11-border);
  border-radius: var(--win11-radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  min-width: 180px;
  padding: 4px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--win11-text);
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.1s;
}

.context-menu-item:hover {
  background: var(--win11-accent-dim);
}

.context-menu-separator {
  height: 1px;
  background: var(--win11-border);
  margin: 4px 8px;
}
