/* ===== Fun Mode — Windows XP Theme ===== */

/* ===== XP Color Tokens ===== */
[data-mode="fun"] {
  --xp-blue: #0054e3;
  --xp-blue-light: #0a6efd;
  --xp-blue-dark: #003cc5;
  --xp-title-active: linear-gradient(180deg, #0058ee 0%, #3a8afd 8%, #0058ee 20%, #003cc5 90%, #003cc5 100%);
  --xp-title-inactive: linear-gradient(180deg, #7b98bf 0%, #9db5d4 8%, #7b98bf 20%, #6882a2 90%, #6882a2 100%);
  --xp-taskbar: linear-gradient(180deg, #2457c6 0%, #1d49af 3%, #1941a5 6%, #1941a5 90%, #122e82 100%);
  --xp-start-green: #3c8b33;
  --xp-start-green-hover: #4ca342;
  --xp-window-bg: #ece9d8;
  --xp-window-body: #ffffff;
  --xp-window-border: #0054e3;
  --xp-menu-bg: #ece9d8;
  --xp-text: #000000;
  --xp-text-secondary: #444444;
  --xp-text-link: #0066cc;
  --xp-selection: #316ac5;
  --xp-btn-face: #ece9d8;
  --xp-btn-shadow: #aca899;
  --xp-btn-highlight: #ffffff;
  --xp-sky-top: #1e7fcb;
  --xp-sky-bottom: #74b9e7;
  --xp-grass: #39a845;
  --xp-grass-dark: #2d8f38;

  --xp-font: 'Tahoma', 'Segoe UI', 'Inter', sans-serif;
  --xp-font-size: 11px;
  --xp-font-size-menu: 12px;
  --xp-font-size-title: 13px;
}

/* ===== Bliss Wallpaper (CSS Gradient) ===== */
[data-mode="fun"] body {
  background: linear-gradient(
    180deg,
    var(--xp-sky-top) 0%,
    var(--xp-sky-bottom) 55%,
    var(--xp-grass) 55%,
    var(--xp-grass) 70%,
    var(--xp-grass-dark) 100%
  );
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--xp-text);
  font-family: var(--xp-font);
  font-size: var(--xp-font-size);
}

/* Hide boring-mode site-main wrapper styling in fun mode */
[data-mode="fun"] .site-main {
  flex: 1;
  padding-bottom: 40px;
}

/* ===== XP Desktop (Homepage) ===== */
[data-mode="fun"] .xp-desktop {
  display: grid;
  grid-template-columns: repeat(auto-fill, 90px);
  gap: 8px;
  padding: 16px;
  max-width: 500px;
}

[data-mode="fun"] .xp-desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  border-radius: 2px;
  text-decoration: none;
  color: #fff;
  text-align: center;
  cursor: pointer;
  transition: background 0.1s;
}

[data-mode="fun"] .xp-desktop-icon:hover {
  background: rgba(49, 106, 197, 0.4);
}

[data-mode="fun"] .xp-desktop-icon svg {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
}

[data-mode="fun"] .xp-desktop-icon span {
  font-size: 11px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
  max-width: 80px;
  word-wrap: break-word;
}

/* ===== Minimized Window State ===== */
[data-mode="fun"] .xp-window.xp-window--minimized {
  display: none;
}

/* ===== XP Window Chrome ===== */
[data-mode="fun"] .xp-window {
  background: var(--xp-window-bg);
  border: 2px solid var(--xp-window-border);
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  margin: 16px auto;
  overflow: hidden;
}

/* Title Bar */
[data-mode="fun"] .xp-title-bar {
  background: var(--xp-title-active);
  display: flex;
  align-items: center;
  padding: 3px 4px 3px 6px;
  min-height: 28px;
  gap: 4px;
  user-select: none;
  border-radius: 6px 6px 0 0;
}

[data-mode="fun"] .xp-title-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

[data-mode="fun"] .xp-title-icon svg {
  width: 16px;
  height: 16px;
}

[data-mode="fun"] .xp-title-text {
  color: #fff;
  font-size: var(--xp-font-size-title);
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-mode="fun"] .xp-title-buttons {
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

[data-mode="fun"] .xp-btn {
  width: 21px;
  height: 21px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: #fff;
  font-size: 10px;
  padding: 0;
}

[data-mode="fun"] .xp-btn-minimize {
  background: linear-gradient(180deg, #3c8cff 0%, #2460d4 100%);
}

[data-mode="fun"] .xp-btn-maximize {
  background: linear-gradient(180deg, #3c8cff 0%, #2460d4 100%);
}

[data-mode="fun"] .xp-btn-close {
  background: linear-gradient(180deg, #e08356 0%, #c7452a 100%);
}

[data-mode="fun"] .xp-btn:hover {
  filter: brightness(1.15);
}

/* Menu Bar */
[data-mode="fun"] .xp-menu-bar {
  background: var(--xp-menu-bg);
  border-bottom: 1px solid #aca899;
  padding: 2px 4px;
  display: flex;
  gap: 0;
}

[data-mode="fun"] .xp-menu-item {
  padding: 2px 8px;
  font-size: var(--xp-font-size-menu);
  color: var(--xp-text);
  cursor: default;
}

[data-mode="fun"] .xp-menu-item:hover {
  background: var(--xp-selection);
  color: #fff;
}

/* Address Bar */
[data-mode="fun"] .xp-address-bar {
  background: var(--xp-menu-bg);
  border-bottom: 1px solid #aca899;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--xp-font-size);
}

[data-mode="fun"] .xp-address-label {
  color: var(--xp-text);
  font-size: var(--xp-font-size);
}

[data-mode="fun"] .xp-address-path {
  flex: 1;
  background: #fff;
  border: 1px solid #7f9db9;
  padding: 2px 4px;
  font-size: var(--xp-font-size);
  color: var(--xp-text);
}

/* Window Body */
[data-mode="fun"] .xp-window-body {
  background: var(--xp-window-body);
  padding: 12px;
  min-height: 200px;
  color: var(--xp-text);
  font-family: var(--xp-font);
  font-size: 13px;
  line-height: 1.6;
}

/* Status Bar */
[data-mode="fun"] .xp-status-bar {
  background: var(--xp-menu-bg);
  border-top: 1px solid #aca899;
  padding: 2px 8px;
  font-size: var(--xp-font-size);
  color: var(--xp-text-secondary);
  display: flex;
  align-items: center;
}

/* ===== Window Body Content Styling ===== */
[data-mode="fun"] .xp-window-body h1 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--xp-text);
}

[data-mode="fun"] .xp-window-body h2 {
  font-size: 16px;
  margin-top: 20px;
  margin-bottom: 8px;
  color: #003399;
}

[data-mode="fun"] .xp-window-body h3 {
  font-size: 14px;
  margin-top: 16px;
  margin-bottom: 6px;
  color: #003399;
}

[data-mode="fun"] .xp-window-body p {
  margin-bottom: 8px;
}

[data-mode="fun"] .xp-window-body a {
  color: var(--xp-text-link);
  text-decoration: underline;
}

[data-mode="fun"] .xp-window-body a:hover {
  color: #0044aa;
}

[data-mode="fun"] .xp-window-body ul,
[data-mode="fun"] .xp-window-body ol {
  margin-bottom: 8px;
  padding-left: 24px;
}

[data-mode="fun"] .xp-window-body ul { list-style: disc; }
[data-mode="fun"] .xp-window-body ol { list-style: decimal; }

[data-mode="fun"] .xp-window-body li {
  margin-bottom: 4px;
}

[data-mode="fun"] .xp-window-body code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
}

[data-mode="fun"] .xp-window-body p code,
[data-mode="fun"] .xp-window-body li code {
  background: #f0f0f0;
  padding: 1px 4px;
  border: 1px solid #ccc;
}

[data-mode="fun"] .xp-window-body .highlight {
  margin-bottom: 8px;
  border: 1px solid #ccc;
  border-radius: 0;
  overflow: hidden;
}

[data-mode="fun"] .xp-window-body .highlight pre {
  padding: 10px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.5;
}

/* ===== Explorer File Items ===== */
[data-mode="fun"] .xp-file-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

[data-mode="fun"] .xp-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  text-decoration: none;
  color: var(--xp-text);
  border: 1px solid transparent;
}

[data-mode="fun"] .xp-file-item:hover {
  background: rgba(49, 106, 197, 0.1);
  border-color: var(--xp-selection);
}

[data-mode="fun"] .xp-file-item-icon svg {
  width: 24px;
  height: 24px;
}

[data-mode="fun"] .xp-file-item-info {
  flex: 1;
}

[data-mode="fun"] .xp-file-item-name {
  font-size: 13px;
  color: var(--xp-text);
}

[data-mode="fun"] .xp-file-item-meta {
  font-size: 11px;
  color: var(--xp-text-secondary);
}

/* Explorer folder grid */
[data-mode="fun"] .xp-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  padding: 8px;
}

[data-mode="fun"] .xp-folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  text-decoration: none;
  color: var(--xp-text);
  text-align: center;
  border: 1px solid transparent;
  border-radius: 2px;
}

[data-mode="fun"] .xp-folder-item:hover {
  background: rgba(49, 106, 197, 0.1);
  border-color: var(--xp-selection);
}

[data-mode="fun"] .xp-folder-item svg {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
}

[data-mode="fun"] .xp-folder-item span {
  font-size: 11px;
  line-height: 1.2;
  word-wrap: break-word;
  max-width: 90px;
}

/* ===== Notepad-specific ===== */
[data-mode="fun"] .xp-window--notepad .xp-window-body {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  white-space: normal;
  min-height: 300px;
}

/* ===== Tags in XP ===== */
[data-mode="fun"] .xp-window-body .tag {
  display: inline-block;
  padding: 1px 6px;
  background: #ece9d8;
  border: 1px solid #aca899;
  font-size: 10px;
  color: var(--xp-text-secondary);
  text-decoration: none;
}

[data-mode="fun"] .xp-window-body .post-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}

[data-mode="fun"] .xp-window-body .post-meta,
[data-mode="fun"] .xp-window-body .card-meta {
  font-size: 11px;
  color: var(--xp-text-secondary);
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

/* ===== System Properties (About page) ===== */
[data-mode="fun"] .xp-system-info {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

[data-mode="fun"] .xp-system-logo svg {
  width: 64px;
  height: 64px;
}

/* ===== MSN Messenger (Contact page) ===== */
[data-mode="fun"] .xp-window--messenger .xp-window-body {
  background: #d7e8f8;
}

/* ===== Taskbar ===== */
[data-mode="fun"] .xp-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--xp-taskbar);
  display: flex;
  align-items: center;
  z-index: 1000;
  padding: 0 2px;
  border-top: 1px solid #4580d0;
}

/* Start Button */
[data-mode="fun"] .xp-start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px 0 6px;
  background: linear-gradient(180deg, #45b039 0%, #3c9b33 20%, #328a2b 80%, #257f1e 100%);
  border: none;
  border-radius: 0 8px 8px 0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  font-family: 'Franklin Gothic Medium', 'Tahoma', sans-serif;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-mode="fun"] .xp-start-btn:hover {
  background: linear-gradient(180deg, #52c240 0%, #48ad3d 20%, #3c9833 80%, #2f8b27 100%);
}

[data-mode="fun"] .xp-start-btn:active {
  background: linear-gradient(180deg, #328a2b 0%, #2b7a25 20%, #1f6a1a 80%, #1a5e16 100%);
}

[data-mode="fun"] .xp-start-btn .xp-start-logo {
  width: 20px;
  height: 20px;
}

/* Taskbar Window Buttons */
[data-mode="fun"] .xp-taskbar-windows {
  flex: 1;
  display: flex;
  padding: 0 4px;
  gap: 2px;
  overflow: hidden;
}

[data-mode="fun"] .xp-taskbar-window-btn {
  height: 26px;
  max-width: 180px;
  padding: 0 8px;
  background: linear-gradient(180deg, #3e7dd6 0%, #2f66b8 50%, #295eac 100%);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  font-family: var(--xp-font);
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-mode="fun"] .xp-taskbar-window-btn--active {
  background: linear-gradient(180deg, #1d5ab8 0%, #1a4fa0 50%, #153d7e 100%);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
}

/* System Tray */
[data-mode="fun"] .xp-system-tray {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  background: linear-gradient(180deg, #1a6cc1 0%, #1459a8 100%);
  border-left: 1px solid #1555a0;
  box-shadow: inset 1px 0 1px rgba(255, 255, 255, 0.1);
}

[data-mode="fun"] .xp-tray-clock {
  color: #fff;
  font-size: 11px;
  font-family: var(--xp-font);
  white-space: nowrap;
}

/* ===== Start Menu ===== */
[data-mode="fun"] .xp-start-menu {
  position: fixed;
  bottom: 36px;
  left: 0;
  width: 380px;
  background: #fff;
  border: 2px solid var(--xp-blue);
  border-radius: 8px 8px 0 0;
  box-shadow: 2px -2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

[data-mode="fun"] .xp-start-menu.open {
  display: flex;
}

/* Start Menu Header */
[data-mode="fun"] .xp-start-header {
  background: var(--xp-title-active);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px 6px 0 0;
}

[data-mode="fun"] .xp-start-avatar {
  width: 40px;
  height: 40px;
  background: #ddd;
  border: 2px solid #fff;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-mode="fun"] .xp-start-avatar svg {
  width: 32px;
  height: 32px;
}

[data-mode="fun"] .xp-start-username {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

/* Start Menu Columns */
[data-mode="fun"] .xp-start-columns {
  display: flex;
  min-height: 280px;
}

[data-mode="fun"] .xp-start-left {
  flex: 1;
  background: #fff;
  padding: 8px 0;
  border-right: 1px solid #d6d2c2;
}

[data-mode="fun"] .xp-start-right {
  width: 140px;
  background: #d3e5fa;
  padding: 8px 0;
}

/* Start Menu Items */
[data-mode="fun"] .xp-start-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  color: var(--xp-text);
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--xp-font);
}

[data-mode="fun"] .xp-start-item:hover {
  background: var(--xp-selection);
  color: #fff;
}

[data-mode="fun"] .xp-start-item:hover small {
  color: #cde;
}

[data-mode="fun"] .xp-start-item-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-mode="fun"] .xp-start-item-icon svg {
  width: 32px;
  height: 32px;
}

[data-mode="fun"] .xp-start-item-label {
  line-height: 1.3;
}

[data-mode="fun"] .xp-start-item-label small {
  color: var(--xp-text-secondary);
  font-size: 10px;
}

[data-mode="fun"] .xp-start-item--right {
  font-weight: 700;
  font-size: 11px;
  padding: 6px 10px;
}

[data-mode="fun"] .xp-start-separator {
  height: 1px;
  background: #a4cae8;
  margin: 4px 10px;
}

/* Start Menu Footer */
[data-mode="fun"] .xp-start-footer {
  background: var(--xp-menu-bg);
  border-top: 1px solid #d6d2c2;
  padding: 4px 8px;
  display: flex;
  justify-content: flex-end;
}

[data-mode="fun"] .xp-start-power {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: none;
  border: none;
  color: var(--xp-text);
  font-size: 11px;
  font-family: var(--xp-font);
  cursor: pointer;
  border-radius: 2px;
}

[data-mode="fun"] .xp-start-power:hover {
  background: #ccc;
}

[data-mode="fun"] .xp-start-power svg {
  color: #cc3300;
}

/* ===== GitHub link in XP ===== */
[data-mode="fun"] .xp-window-body .github-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--xp-btn-face);
  border: 1px solid var(--xp-btn-shadow);
  color: var(--xp-text);
  font-size: 11px;
  text-decoration: none;
  margin-top: 8px;
}

[data-mode="fun"] .xp-window-body .github-link:hover {
  background: #ddd;
}

[data-mode="fun"] .xp-window-body .github-link svg {
  width: 14px;
  height: 14px;
  display: inline;
}

/* ===== Responsive — Mobile XP ===== */
@media (max-width: 768px) {
  [data-mode="fun"] .xp-window {
    margin: 8px;
    max-width: 100%;
    border-radius: 6px 6px 0 0;
  }

  [data-mode="fun"] .xp-menu-bar,
  [data-mode="fun"] .xp-address-bar {
    display: none;
  }

  [data-mode="fun"] .xp-desktop {
    grid-template-columns: repeat(auto-fill, 80px);
    gap: 4px;
    padding: 8px;
  }

  [data-mode="fun"] .xp-start-menu {
    width: 100%;
    border-radius: 0;
  }

  [data-mode="fun"] .xp-start-right {
    display: none;
  }

  [data-mode="fun"] .xp-start-columns {
    min-height: auto;
  }

  [data-mode="fun"] .xp-folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  [data-mode="fun"] .xp-window-body {
    padding: 8px;
  }

  [data-mode="fun"] .xp-taskbar-windows {
    display: none;
  }
}

@media (max-width: 480px) {
  [data-mode="fun"] .xp-desktop {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
  }

  [data-mode="fun"] .xp-title-text {
    font-size: 11px;
  }
}

/* ===== Phase 3: Fun Mode Effects ===== */

/* --- Matrix Rain Canvas --- */
.xp-matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

[data-mode="fun"] .xp-matrix-rain.active {
  opacity: 0.12;
}

/* --- CRT Overlay --- */
.xp-crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

[data-mode="fun"] .xp-crt-overlay.active {
  opacity: 1;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.03) 0px,
      rgba(0, 0, 0, 0.03) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(
      ellipse at center,
      transparent 60%,
      rgba(0, 0, 0, 0.15) 100%
    );
  animation: xp-crt-flicker 8s infinite;
}

@keyframes xp-crt-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.97; }
  52% { opacity: 1; }
  80% { opacity: 0.98; }
  82% { opacity: 1; }
}

/* --- Clippy --- */
.xp-clippy {
  position: fixed;
  bottom: 50px;
  right: 20px;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}

[data-mode="fun"] .xp-clippy.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.xp-clippy-body {
  cursor: pointer;
  animation: xp-clippy-bounce 3s ease-in-out infinite;
  width: 60px;
  margin-left: auto;
}

.xp-clippy-svg {
  width: 60px;
  height: 80px;
  filter: drop-shadow(1px 2px 3px rgba(0, 0, 0, 0.3));
}

@keyframes xp-clippy-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.xp-clippy-bubble {
  position: absolute;
  bottom: 90px;
  right: 0;
  background: #fffde0;
  border: 1px solid #d4c940;
  border-radius: 8px;
  padding: 10px 28px 10px 12px;
  min-width: 200px;
  max-width: 260px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  font-family: 'Tahoma', 'Segoe UI', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #333;
}

.xp-clippy-bubble.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Speech bubble tail */
.xp-clippy-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 24px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #fffde0;
}

.xp-clippy-bubble::before {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 23px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #d4c940;
}

.xp-clippy-close {
  position: absolute;
  top: 2px;
  right: 6px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #999;
  padding: 0 4px;
  line-height: 1;
}

.xp-clippy-close:hover {
  color: #333;
}

.xp-clippy-text {
  margin: 0;
}

/* --- Cursor Trail Particles --- */
.xp-cursor-particle {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #f5d442 0%, #e8a020 50%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  margin-left: -5px;
  margin-top: -5px;
}

/* --- Responsive: Clippy on mobile --- */
@media (max-width: 768px) {
  .xp-clippy {
    bottom: 44px;
    right: 10px;
  }

  .xp-clippy-body {
    width: 48px;
  }

  .xp-clippy-svg {
    width: 48px;
    height: 64px;
  }

  .xp-clippy-bubble {
    min-width: 160px;
    max-width: 200px;
    bottom: 72px;
    font-size: 11px;
  }
}

/* ===== Ransomware Easter Egg Overlay ===== */
.xp-ransomware-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.xp-ransomware-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.xp-ransomware-window {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
}

.xp-ransomware-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #888;
  font-size: 36px;
  cursor: pointer;
  z-index: 10001;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s;
}

.xp-ransomware-close:hover {
  color: #ff4444;
}

/* Terminal */
.xp-ransomware-terminal {
  background: #0c0c0c;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: hidden;
  transition: opacity 0.4s;
}

.xp-ransomware-terminal.hidden {
  opacity: 0;
  height: 0;
  overflow: hidden;
  border: none;
  transition: opacity 0.3s, height 0.3s;
}

.xp-ransomware-terminal-header {
  background: #1a1a2e;
  color: #ccc;
  padding: 4px 10px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  border-bottom: 1px solid #333;
}

.xp-ransomware-terminal-body {
  padding: 10px;
  height: 200px;
  overflow-y: auto;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  color: #00ff41;
  line-height: 1.5;
}

.xp-ransomware-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress bar */
.xp-ransomware-progress-wrap {
  padding: 10px;
  border-top: 1px solid #333;
}

.xp-ransomware-progress-label {
  color: #ff4444;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  margin-bottom: 6px;
  animation: xp-ransom-blink 1s steps(1) infinite;
}

@keyframes xp-ransom-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.xp-ransomware-progress-bar {
  height: 18px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 2px;
  overflow: hidden;
}

.xp-ransomware-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #cc0000 0%, #ff3333 50%, #cc0000 100%);
  transition: width 0.15s;
}

.xp-ransomware-progress-pct {
  color: #ff4444;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  text-align: right;
  margin-top: 4px;
}

/* Ransom note */
.xp-ransomware-note {
  text-align: center;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
}

.xp-ransomware-note.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.xp-ransomware-ascii {
  color: #ff3333;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.3;
  margin: 0 0 16px;
}

.xp-ransomware-title {
  color: #ff3333;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 16px;
  animation: xp-ransom-blink 1.5s steps(1) infinite;
}

.xp-ransomware-text {
  color: #ccc;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.xp-ransomware-punchline {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

.xp-ransomware-punchline p {
  color: #aaa;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.xp-ransomware-site {
  color: #00ff41;
  font-size: 18px;
  font-weight: 700;
  margin: 12px 0 20px;
}

.xp-ransomware-site span {
  color: #f39c12;
}

.xp-ransomware-cta {
  display: inline-block;
  padding: 10px 28px;
  background: linear-gradient(180deg, #cc0000 0%, #990000 100%);
  color: #fff;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #ff3333;
  border-radius: 3px;
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}

.xp-ransomware-cta:hover {
  background: linear-gradient(180deg, #e60000 0%, #b30000 100%);
  transform: scale(1.03);
}

/* Ransomware desktop icon button reset */
[data-mode="fun"] button.xp-desktop-icon {
  background: none;
  border: none;
  font-family: inherit;
}

/* Responsive ransomware */
@media (max-width: 768px) {
  .xp-ransomware-window {
    width: 95%;
  }

  .xp-ransomware-terminal-body {
    height: 150px;
    font-size: 10px;
  }

  .xp-ransomware-title {
    font-size: 16px;
  }

  .xp-ransomware-ascii {
    font-size: 9px;
  }

  .xp-ransomware-text,
  .xp-ransomware-punchline p {
    font-size: 12px;
  }
}
