/* ============================================================
   MyPorto — Febrianto Kristian
   ============================================================ */

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

:root {
  --mp-aubergine: #2c001e;
  --mp-aubergine-light: #4a0e3a;
  --mp-orange: #e95420;
  --mp-orange-light: #f47750;
  --mp-orange-dark: #cc3300;
  --mp-warm-grey: #aea79f;
  --mp-cool-grey: #333333;
  --mp-light-bg: #faf9f8;
  --mp-text: #ffffff;
  --mp-text-dim: #cdcdcd;
  --mp-title-grad1: #300a24;
  --mp-title-grad2: #4a0e3a;
  --mp-title-grad3: #300a24;
  --mp-window-bg: #ffffff;
  --mp-border: #2c001e;
  --mp-text-dark: #2c001e;
  --mp-dim: #888;
  --mp-accent: #e95420;
  --mp-link: #e95420;
  --mp-headerbar: #3b0a2c;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Ubuntu', sans-serif;
  font-size: 14px;
  user-select: none;
}

/* ===== Desktop (aubergine gradient) ===== */
#desktop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 36px;
  background:
    radial-gradient(ellipse at 30% 20%, #5a1130 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, #4a0e3a 0%, transparent 60%),
    linear-gradient(135deg, #2c001e 0%, #3b0a2c 50%, #2c001e 100%);
  overflow: hidden;
}

/* Subtle texture */
#desktop::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(233, 84, 32, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(233, 84, 32, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

/* ===== Desktop Icons ===== */
#desktop-icons {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.desktop-icon {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: 2px;
  cursor: pointer;
  gap: 4px;
  pointer-events: auto;
}

.desktop-icon:hover {
  background: rgba(233, 84, 32, 0.15);
  border: 1px solid rgba(233, 84, 32, 0.4);
  padding: 5px 3px;
}

.desktop-icon.selected {
  background: rgba(233, 84, 32, 0.25);
  border: 1px solid rgba(233, 84, 32, 0.6);
  padding: 5px 3px;
}

.icon-img {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}
.icon-img svg { width: 32px; height: 32px; }

.icon-label {
  font-size: 12px;
  color: white;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  line-height: 1.2;
  word-break: break-word;
}















/* ===== Windows container ===== */
#windows {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  overflow: visible;
  pointer-events: none;
}
#windows .xp-window { pointer-events: auto; }

/* ===== Windows ===== */
.xp-window {
  position: absolute;
  min-width: 260px;
  min-height: 180px;
  background: var(--mp-window-bg);
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 10px 10px 8px 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: windowOpen 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Resize handles */
.xp-resize {
  position: absolute;
  z-index: 10;
}
.xp-resize-n  { top: -2px; left: 8px; right: 8px; height: 6px; cursor: n-resize; }
.xp-resize-s  { bottom: -2px; left: 8px; right: 8px; height: 6px; cursor: s-resize; }
.xp-resize-e  { right: -2px; top: 8px; bottom: 8px; width: 6px; cursor: e-resize; }
.xp-resize-w  { left: -2px; top: 8px; bottom: 8px; width: 6px; cursor: w-resize; }
.xp-resize-ne { top: -3px; right: -3px; width: 12px; height: 12px; cursor: ne-resize; }
.xp-resize-nw { top: -3px; left: -3px; width: 12px; height: 12px; cursor: nw-resize; }
.xp-resize-se { bottom: -3px; right: -3px; width: 12px; height: 12px; cursor: se-resize; }
.xp-resize-sw { bottom: -3px; left: -3px; width: 12px; height: 12px; cursor: sw-resize; }

@keyframes windowOpen {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.xp-window.closing {
  animation: windowClose 0.12s ease-in forwards;
}

@keyframes windowClose {
  to { transform: scale(0.92); opacity: 0; }
}

.xp-titlebar {
  height: 36px;
  background: linear-gradient(to bottom, #3b0a2c 0%, #2c001e 100%);
  border-radius: 9px 9px 0 0;
  display: flex;
  align-items: center;
  padding: 0 6px 0 12px;
  cursor: move;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0,0,0,0.4);
}

.xp-titlebar-text {
  color: white;
  font-weight: 500;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.xp-titlebar-buttons {
  display: flex;
  gap: 2px;
}

.xp-tb-btn {
  width: 20px; height: 20px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.xp-tb-btn svg {
  width: 10px;
  height: 10px;
  opacity: 0;
  transition: opacity 0.15s;
}

.xp-titlebar:hover .xp-tb-btn svg {
  opacity: 1;
}

.xp-tb-minimize {
  background: #f5b53a;
}
.xp-tb-maximize {
  background: #4caf50;
}
.xp-tb-close {
  background: #e95420;
}
.xp-tb-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.1);
}
.xp-tb-btn:active {
  filter: brightness(0.85);
  transform: scale(0.95);
}

.xp-window-content {
  flex: 1;
  overflow: auto;
  padding: 18px;
  color: #2c2c2c;
  font-size: 14px;
  line-height: 1.6;
  background: #ffffff;
}

/* ===== Window content styles ===== */
.win-section { margin-bottom: 14px; }
.win-heading {
  font-size: 16px;
  font-weight: 500;
  color: var(--mp-orange-dark);
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.win-job {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #faf9f8;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  border-left: 3px solid var(--mp-orange);
}
.win-job-title { font-weight: 500; color: #2c001e; font-size: 14px; }
.win-job-meta { color: #888; font-size: 12px; margin-bottom: 4px; }
.win-job ul { margin-left: 18px; margin-top: 4px; }
.win-job li { margin-bottom: 3px; font-size: 13px; }

.win-skill-cat {
  font-weight: 500;
  color: var(--mp-orange-dark);
  margin-top: 8px;
  margin-bottom: 2px;
}
.win-skill-items { margin-left: 12px; }

.win-link {
  color: var(--mp-link);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dotted var(--mp-link);
}
.win-link:hover { color: var(--mp-orange-dark); border-bottom-style: solid; }

.win-contact-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  align-items: center;
}
.win-contact-label {
  font-weight: 700;
  width: 80px;
  flex-shrink: 0;
}

/* Terminal inside window */
.xp-terminal {
  background: #300a24;
  color: #eeeeec;
  font-family: 'Ubuntu Mono', 'JetBrains Mono', monospace;
  font-size: 13px;
  padding: 14px;
  height: 100%;
  overflow-y: auto;
  line-height: 1.55;
}
.xp-terminal .t-green { color: #8ae234; }
.xp-terminal .t-cyan { color: #34e2e2; }
.xp-terminal .t-yellow { color: #fce94f; }
.xp-terminal .t-dim { color: #888a85; }
.xp-terminal .t-red { color: #ef2929; }
.xp-terminal .t-blue { color: #729fcf; }
.xp-terminal .t-link { color: #729fcf; text-decoration: underline; cursor: pointer; }
.xp-terminal-input-line {
  display: flex;
  gap: 6px;
  align-items: center;
}
.xp-terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: #c5c8c6;
  font-family: inherit;
  font-size: inherit;
  flex: 1;
  caret-color: #b5cea8;
}

/* ===== Taskbar (dock-style bottom bar) ===== */
#taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 36px;
  background: rgba(44, 0, 30, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(233, 84, 32, 0.3);
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 4px;
  z-index: 9999;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
}

#start-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px 4px 10px;
  background: var(--mp-orange);
  border: none;
  border-radius: 18px;
  color: white;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  height: 28px;
  transition: background 0.15s, transform 0.1s;
}

#start-button:hover { background: var(--mp-orange-light); }
#start-button:active { transform: scale(0.97); }
#start-button.active {
  background: var(--mp-orange-dark);
}

.start-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
}

.start-flag svg { width: 20px; height: 20px; }

#taskbar-items {
  flex: 1;
  display: flex;
  gap: 3px;
  overflow: hidden;
}

.taskbar-item {
  display: flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: white;
  font-size: 12px;
  cursor: pointer;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  height: 26px;
  transition: background 0.15s;
}

.taskbar-item:hover { background: rgba(255, 255, 255, 0.15); }

.taskbar-item.active {
  background: rgba(233, 84, 32, 0.4);
  border-color: rgba(233, 84, 32, 0.6);
}

#system-tray {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: white;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}

/* ===== Start Menu (Activities-style) ===== */
#start-menu {
  position: fixed;
  bottom: 36px; left: 0;
  width: 380px;
  background: rgba(44, 0, 30, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(233, 84, 32, 0.3);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  overflow: hidden;
  animation: startMenuOpen 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes startMenuOpen {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#start-menu.hidden { display: none; }

.start-menu-header {
  width: 70px;
  background: linear-gradient(to bottom, #3b0a2c 0%, #2c001e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 4px;
  gap: 10px;
  flex-shrink: 0;
  border-right: 1px solid rgba(233, 84, 32, 0.2);
}

.start-user-icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(233, 84, 32, 0.15);
  border-radius: 50%;
  border: 2px solid var(--mp-orange);
}

.start-user-icon svg { width: 32px; height: 32px; }

.start-username {
  color: white;
  font-weight: 500;
  font-size: 11px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  word-break: break-word;
}

.start-menu-items {
  flex: 1;
  padding: 8px 6px;
  background: transparent;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  color: white;
  transition: background 0.12s;
}

.start-item:hover {
  background: rgba(233, 84, 32, 0.25);
  color: white;
}

.start-icon {
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.start-icon svg { width: 22px; height: 22px; }


.start-separator {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 6px 14px;
}

/* ===== Boot screen (Plymouth-style) ===== */
#boot-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #2c001e;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

#boot-screen.hidden { display: none; }

.boot-logo {
  font-size: 32px;
  font-weight: 300;
  color: white;
  text-align: center;
  letter-spacing: 1px;
}

.boot-logo-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  font-weight: 300;
}

.boot-bar {
  width: 220px;
  height: 4px;
  border: none;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,0.1);
}

.boot-bar-progress {
  height: 100%;
  width: 0%;
  background: var(--mp-orange);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.boot-text {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 300;
}

/* ===== Misc ===== */
.hidden { display: none !important; }

/* Scrollbar style */
.xp-window-content::-webkit-scrollbar,
.xp-terminal::-webkit-scrollbar { width: 12px; }
.xp-window-content::-webkit-scrollbar-track { background: #faf9f8; }
.xp-window-content::-webkit-scrollbar-thumb {
  background: #c8c4c0;
  border-radius: 6px;
  border: 2px solid #faf9f8;
}
.xp-window-content::-webkit-scrollbar-thumb:hover { background: #aea79f; }
.xp-terminal::-webkit-scrollbar-track { background: #300a24; }
.xp-terminal::-webkit-scrollbar-thumb { background: #5a1130; border-radius: 6px; }

/* ===== Minesweeper ===== */
.minesweeper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #e0ddd9;
  height: 100%;
}

.ms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 6px 10px;
  background: #e0ddd9;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

.ms-counter {
  background: #000;
  color: #f00;
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  padding: 2px 6px;
  min-width: 50px;
  text-align: center;
  letter-spacing: 2px;
}

.ms-smiley {
  font-size: 22px;
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  background: #e0ddd9;
}
.ms-smiley:hover { filter: brightness(1.1); }
.ms-smiley:active { border-color: #808080 #ffffff #ffffff #808080; }

.ms-grid {
  display: grid;
  border: 3px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  background: #e0ddd9;
}

.ms-cell {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  background: #e0ddd9;
  user-select: none;
}

.ms-cell.revealed {
  border: 1px solid #808080;
  background: #e0ddd9;
  cursor: default;
}

.ms-cell.mine {
  background: #f00;
}

.ms-cell.flagged::after {
  content: "🚩";
  font-size: 14px;
}

.ms-num-1 { color: #0000ff; }
.ms-num-2 { color: #008000; }
.ms-num-3 { color: #ff0000; }
.ms-num-4 { color: #000080; }
.ms-num-5 { color: #800000; }
.ms-num-6 { color: #008080; }
.ms-num-7 { color: #000000; }
.ms-num-8 { color: #808080; }

.ms-difficulty {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.ms-diff-btn {
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  background: #e0ddd9;
  font-family: 'Tahoma', sans-serif;
}
.ms-diff-btn:hover { filter: brightness(1.1); }
.ms-diff-btn.active {
  border-color: #808080 #ffffff #ffffff #808080;
  font-weight: 700;
}

/* ===== MS Paint ===== */
.paint-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #faf9f8;
}

.paint-toolbar {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  background: #faf9f8;
  border-bottom: 1px solid #e8e8e8;
  flex-wrap: wrap;
  align-items: center;
}

.paint-tool {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  background: #faf9f8;
  cursor: pointer;
  font-size: 14px;
}
.paint-tool:hover { background: #e0dcd0; }
.paint-tool.active {
  border-color: #808080 #fff #fff #808080;
  background: #e8e8e8;
}

.paint-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.paint-sidebar {
  width: 52px;
  padding: 4px;
  background: #faf9f8;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.paint-colors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 4px;
}

.paint-color {
  width: 18px; height: 18px;
  border: 1px solid #888;
  cursor: pointer;
}
.paint-color:hover { border-color: #000; }
.paint-color.active { border: 2px solid #000; }

.paint-current-colors {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
  align-items: center;
}

.paint-current-fg, .paint-current-bg {
  width: 20px; height: 20px;
  border: 1px solid #888;
}

.paint-canvas-area {
  flex: 1;
  overflow: auto;
  background: #808080;
  padding: 8px;
}

.paint-canvas {
  background: #fff;
  border: 1px solid #000;
  cursor: crosshair;
  display: block;
}

.paint-statusbar {
  padding: 2px 8px;
  background: #faf9f8;
  border-top: 1px solid #e8e8e8;
  font-size: 11px;
  color: #444;
  display: flex;
  justify-content: space-between;
}

.paint-size-select {
  font-size: 11px;
  padding: 1px 4px;
  border: 1px solid #888;
  background: #fff;
}

/* ===== AI Assistant ===== */
.ai-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f5f5f5;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
}

.ai-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}

.ai-msg-user {
  align-self: flex-end;
  background: #e95420;
  color: white;
}

.ai-msg-bot {
  align-self: flex-start;
  background: #f0f0f0;
  color: #333;
}

.ai-msg-bot pre {
  background: #222;
  color: #ddd;
  padding: 8px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 12px;
  margin: 4px 0;
}

.ai-typing {
  align-self: flex-start;
  padding: 8px 16px;
  background: #f0f0f0;
  border-radius: 8px;
  font-size: 13px;
  color: #888;
}
.ai-typing span {
  display: inline-block;
  animation: aiDot 1.4s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiDot { 0%,60%,100% { opacity: 0.3; } 30% { opacity: 1; } }

.ai-input-area {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: #faf9f8;
  border-top: 1px solid #e8e8e8;
}

.ai-input {
  flex: 1;
  border: 1px solid #888;
  padding: 6px 10px;
  font-size: 13px;
  font-family: 'Tahoma', sans-serif;
  outline: none;
}
.ai-input:focus { border-color: #e95420; }

.ai-send {
  padding: 6px 16px;
  background: linear-gradient(to bottom, #f47750, #e95420);
  border: 1px solid #cc3300;
  color: white;
  font-size: 13px;
  cursor: pointer;
  border-radius: 3px;
}
.ai-send:hover { filter: brightness(1.1); }
.ai-send:disabled { opacity: 0.5; cursor: default; }

.ai-header {
  padding: 6px 12px;
  background: linear-gradient(to bottom, #e95420, #cc3300);
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-status {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #5eac56;
}

/* ===== File Explorer ===== */
.explorer-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}

.explorer-toolbar {
  padding: 4px 8px;
  background: #faf9f8;
  border-bottom: 1px solid #e8e8e8;
  font-size: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.explorer-address {
  flex: 1;
  padding: 2px 8px;
  background: #fff;
  border: 1px solid #888;
  font-size: 12px;
}

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

.explorer-sidebar {
  width: 160px;
  background: #f5f5f5;
  border-right: 1px solid #e8e8e8;
  padding: 6px;
  overflow-y: auto;
  font-size: 12px;
}

.explorer-tree-item {
  padding: 3px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 2px;
}
.explorer-tree-item:hover { background: #e0e8f0; }
.explorer-tree-item.active { background: #e95420; color: white; }
.explorer-tree-children {
  margin-left: 16px;
}

.explorer-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: #fff;
}

.explorer-file-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.explorer-file {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
}
.explorer-file:hover { background: #e0e8f0; }
.explorer-file svg { width: 32px; height: 32px; }
.explorer-file-name { font-size: 11px; word-break: break-word; line-height: 1.2; }

.explorer-file-content {
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}
.explorer-file-content pre {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 12px;
  border: 1px solid #ddd;
}

/* ===== Task Manager ===== */
.taskmgr-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  font-size: 12px;
}

.taskmgr-tabs {
  display: flex;
  gap: 2px;
  padding: 4px 6px 0;
  background: #faf9f8;
  border-bottom: 2px solid #e95420;
}

.taskmgr-tab {
  padding: 5px 16px;
  cursor: pointer;
  border: 1px solid #c8c4c0;
  border-bottom: none;
  background: #e0ddd9;
  border-radius: 6px 6px 0 0;
  font-size: 12px;
  color: #555;
}
.taskmgr-tab.active {
  background: #fff;
  border-bottom: 1px solid #fff;
  font-weight: 500;
  color: #e95420;
  position: relative;
  top: 1px;
}

.taskmgr-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.taskmgr-processes {
  width: 100%;
  border-collapse: collapse;
}
.taskmgr-processes th {
  text-align: left;
  padding: 4px 8px;
  background: #faf9f8;
  border-bottom: 2px solid #e8e8e8;
  font-size: 11px;
}
.taskmgr-processes td {
  padding: 4px 8px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}
.taskmgr-processes tr:hover { background: #e0e8f0; }

.taskmgr-cpu-bar {
  height: 8px;
  background: #ddd;
  border-radius: 2px;
  overflow: hidden;
}
.taskmgr-cpu-fill {
  height: 100%;
  background: linear-gradient(to right, #5eac56, #ff9800, #ff4444);
}

.taskmgr-footer {
  padding: 6px 12px;
  background: #faf9f8;
  border-top: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.taskmgr-graph {
  height: 60px;
  background: #0a0e14;
  border: 1px solid #555;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.taskmgr-graph canvas {
  width: 100%;
  height: 100%;
}

/* ===== Notepad ===== */
.notepad-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}

.notepad-menubar {
  padding: 2px 6px;
  background: #faf9f8;
  border-bottom: 1px solid #e8e8e8;
  font-size: 12px;
  display: flex;
  gap: 12px;
}
.notepad-menubar span { cursor: pointer; padding: 2px 6px; }
.notepad-menubar span:hover { background: #e95420; color: white; }

.notepad-textarea {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  background: #fff;
  color: #333;
}

.notepad-status {
  padding: 2px 8px;
  background: #faf9f8;
  border-top: 1px solid #e8e8e8;
  font-size: 11px;
  color: #666;
  display: flex;
  justify-content: space-between;
}

.notepad-entries {
  padding: 8px;
  border-bottom: 1px solid #ddd;
  font-size: 12px;
}
.notepad-entry {
  padding: 8px;
  margin-bottom: 6px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 3px;
}
.notepad-entry-author { font-weight: 700; color: #e95420; }
.notepad-entry-date { font-size: 10px; color: #999; }
.notepad-entry-msg { margin-top: 4px; white-space: pre-wrap; }

/* Mobile */
@media (max-width: 768px) {
  #desktop-icons { flex-direction: row; flex-wrap: wrap; }
  .xp-window { min-width: 280px; max-width: 95vw; }
  #start-menu { width: 100vw; }
  .ms-cell { width: 20px; height: 20px; font-size: 13px; }
  #taskbar { height: 32px; }
  #desktop { bottom: 32px; }
}
