:root {
  --xp-teal: #008080;
  --xp-title: #000080;
  --xp-title2: #000060;
  --xp-window: #c0c0c0;
  --xp-window2: #d4d0c8;
  --xp-border: #808080;
  --xp-dark: #3a3a3a;
  --xp-shadow: rgba(0, 0, 0, 0.25);
  --font-ui: "VT323", "Courier New", Courier, monospace;
  --font-pixel: "Press Start 2P", "Courier New", Courier, monospace;
  --login-red: #1a0508;
}

* {
  box-sizing: border-box;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
  font-stretch: normal;
  letter-spacing: 0;
}

html {
  touch-action: manipulation;
}

body {
  margin: 0;
  background: var(--login-red);
  color: #000;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  touch-action: manipulation;
  overscroll-behavior: none;
}

.screen {
  min-height: 100vh;
}

.screen#desktopScreen {
  display: block;
  width: 100%;
  min-height: 100vh;
}

.desktop-frame {
  position: relative;
  width: 100%;
  min-height: 100vh;
  isolation: isolate;
}

.hidden {
  display: none !important;
}

.titlebar {
  min-height: 44px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(var(--xp-title), var(--xp-title2));
  border-bottom: 2px solid #000;
  user-select: none;
  font-size: 22px;
  line-height: 1.2;
}

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

.xp-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.window-body {
  padding: 18px 16px 16px;
  background: var(--xp-window2);
}

.prompt {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 1.25;
  color: #000;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 20px;
  color: #000;
}

input {
  font-size: 22px;
  padding: 8px 10px;
  width: 100%;
  border: 2px inset #fff;
  outline: none;
  background: #fff;
  cursor: text;
}

a,
button,
[role="button"],
.xp-btn,
.start-btn,
.start-menu-item,
.taskbar-discord,
.discord-link,
.xp-explorer-item,
.xp-game-close,
.xp-lightbox-close,
.games-launch-btn,
.xp-gallery-item img,
.catch-dot {
  cursor: pointer;
}

.buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.xp-btn {
  font-size: 22px;
  padding: 6px 16px;
  line-height: 1;
  border: 2px outset #fff;
  background: linear-gradient(#f6f6f6, #dedede);
  color: #000;
}

.xp-btn:active {
  border-style: inset;
}

.primary {
  min-width: 86px;
}

.hint {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.25;
  color: #000;
}

/* Desktop */
.desktop-hero {
  position: absolute;
  top: 28px;
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  text-align: center;
  width: min(100%, 720px);
  padding: 0 16px;
}

.profile-groups {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.profile-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.profile-group + .profile-group {
  margin-top: 44px;
}

.profile-group-label,
.main-two-label {
  margin: 36px 0 18px;
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 400;
  color: #ffb3bd;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-shadow:
    1px 1px 0 #000,
    0 0 10px rgba(255, 40, 60, 0.35);
}

.profile-group .profile-group-label {
  margin-top: 0;
  margin-bottom: 18px;
}

.profile-group:first-child .profile-group-label {
  margin-top: 36px;
}

.profile-group .desktop-icons--row:empty {
  display: none;
}

.desktop-icons {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.desktop-icons--row {
  flex-direction: row;
  gap: 10px;
  margin-top: 0;
}

.icon {
  min-width: 72px;
  width: max-content;
  max-width: 120px;
  text-align: center;
  cursor: default;
  user-select: none;
  color: #f0f0f0;
  outline: none;
  position: relative;
  z-index: 30;
}

.icon:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.icon-glyph {
  width: 54px;
  height: 54px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 3px solid rgba(255, 40, 60, 0.75);
  background: #1a0a0a;
  overflow: hidden;
  box-shadow:
    0 0 12px rgba(255, 30, 50, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.6);
}

.icon-glyph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.icon:hover .icon-glyph,
.icon:focus-visible .icon-glyph {
  border-color: #ff4d6d;
  box-shadow:
    0 0 18px rgba(255, 50, 80, 0.55),
    0 2px 10px rgba(0, 0, 0, 0.65);
}

.icon-name {
  font-family: var(--font-ui);
  font-size: 20px;
  padding: 0 2px;
  line-height: 1.15;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  color: #ffb3bd;
  text-shadow:
    1px 1px 0 #000,
    0 0 8px rgba(255, 40, 60, 0.4);
}

.wallpaper {
  width: 100%;
  min-height: 100vh;
  background: #030202;
  position: relative;
  overflow: hidden;
}

.wallpaper-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    125deg,
    #020101 0%,
    #1a0810 25%,
    #060303 50%,
    #220810 75%,
    #030202 100%
  );
  background-size: 400% 400%;
  pointer-events: none;
}

.wallpaper-wave {
  position: absolute;
  inset: -20%;
  z-index: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 55, 90, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 55, 90, 0.28) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, transparent 5%, rgba(0, 0, 0, 0.5) 45%, #000 85%);
  pointer-events: none;
}

.wallpaper-pattern {
  position: absolute;
  inset: -50%;
  z-index: 0;
  pointer-events: none;
}

.wallpaper-pattern--a {
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 26px,
      rgba(255, 30, 50, 0.07) 26px,
      rgba(255, 30, 50, 0.07) 28px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 26px,
      rgba(255, 20, 40, 0.05) 26px,
      rgba(255, 20, 40, 0.05) 28px
    );
  pointer-events: none;
}

.wallpaper-scanlines {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.05;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255, 80, 100, 0.35) 3px,
    rgba(255, 80, 100, 0.35) 4px
  );
  pointer-events: none;
}

.wallpaper-header {
  position: static;
  transform: none;
  text-align: center;
  user-select: none;
}

.wallpaper-title,
.wallpaper-subtitle {
  margin: 0;
  font-family: var(--font-pixel);
  font-weight: 400;
  letter-spacing: 0;
  font-stretch: normal;
  text-transform: lowercase;
  color: #ff2a2a;
  text-shadow:
    2px 2px 0 #000000,
    4px 4px 0 rgba(0, 0, 0, 0.5),
    0 0 24px rgba(255, 0, 60, 0.35);
}

.wallpaper-title {
  font-size: 24px;
  line-height: 1.5;
  white-space: nowrap;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

.wallpaper-subtitle {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  white-space: normal;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

@keyframes titleGlow {
  0% {
    text-shadow:
      2px 2px 0 #000000,
      4px 4px 0 rgba(0, 0, 0, 0.5),
      0 0 18px rgba(255, 0, 60, 0.25);
  }
  100% {
    text-shadow:
      2px 2px 0 #000000,
      4px 4px 0 rgba(0, 0, 0, 0.5),
      0 0 32px rgba(255, 0, 60, 0.45);
  }
}

@media (min-width: 900px) {
  .wallpaper-title {
    font-size: 28px;
  }

  .wallpaper-subtitle {
    font-size: 14px;
    margin-top: 16px;
  }
}

/* crt */
.crt-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.crt-vignette {
  position: absolute;
  inset: 0;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.5),
    inset 0 0 160px rgba(0, 0, 0, 0.35);
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scanlineDrift 5s linear infinite;
  opacity: 0.35;
}

.crt-flicker {
  position: absolute;
  inset: 0;
  background: rgba(255, 30, 50, 0.03);
  animation: crtFlicker 5s infinite;
}

.crt-static {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.04) 3px,
    rgba(255, 255, 255, 0.04) 4px
  );
  animation: crtStatic 0.12s steps(3) infinite;
}

.crt-phosphor {
  position: absolute;
  inset: 0;
  background: rgba(255, 0, 40, 0.02);
  animation: phosphorPulse 2.5s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes crtFlicker {
  0%,
  100% {
    opacity: 0;
  }
  3% {
    opacity: 0.08;
  }
  6% {
    opacity: 0;
  }
  48% {
    opacity: 0;
  }
  49% {
    opacity: 0.12;
  }
  50% {
    opacity: 0;
  }
  88% {
    opacity: 0;
  }
  89% {
    opacity: 0.06;
  }
  90% {
    opacity: 0;
  }
}

@keyframes crtStatic {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(-2%, 1%);
  }
  66% {
    transform: translate(1%, -1%);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes phosphorPulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crt-flicker,
  .crt-static,
  .crt-phosphor,
  .crt-scanlines,
  .wallpaper-scanlines,
  .wallpaper-title,
  .discord-link {
    animation: none;
  }
}

.status-bar {
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 25;
  font-size: 20px;
  line-height: 1.2;
  color: #e8e8e8;
}

.discord-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff4d6d;
  text-decoration: none;
  filter: drop-shadow(0 0 6px rgba(255, 50, 80, 0.75));
  animation: discordGlow 2s ease-in-out infinite alternate;
}

.discord-link:hover {
  color: #ff7a92;
  filter: drop-shadow(0 0 12px rgba(255, 60, 90, 0.95));
}

.discord-link:active {
  transform: scale(0.95);
}

.taskbar-discord {
  flex-shrink: 0;
  width: 36px;
  height: 34px;
  margin-left: 4px;
  border: 1px solid #732535;
  border-radius: 3px;
  background: linear-gradient(to bottom, #4a1018, #2a090f);
  box-shadow:
    inset 0 1px 0 rgba(255, 160, 170, 0.2),
    0 1px 0 rgba(0, 0, 0, 0.35);
}

.taskbar-discord svg {
  display: block;
}

@keyframes discordGlow {
  0% {
    filter: drop-shadow(0 0 4px rgba(255, 50, 80, 0.5));
  }
  100% {
    filter: drop-shadow(0 0 14px rgba(255, 60, 90, 0.95));
  }
}

.side-panel {
  position: absolute;
  z-index: 26;
  width: min(220px, calc(50vw - 24px));
  padding: 10px;
  border: 2px solid #6c1f2e;
  background: linear-gradient(to bottom, rgba(45, 10, 18, 0.88), rgba(30, 8, 13, 0.88));
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 180, 190, 0.12);
  color: #ffd7de;
  font-family: var(--font-ui);
  font-stretch: normal;
  letter-spacing: 0;
}

.side-panel--left {
  left: 16px;
  top: 38%;
}

.side-panel--right {
  right: 16px;
  top: 22%;
  max-height: calc(100vh - 320px);
  overflow: hidden;
}

.side-panel-title {
  font-family: var(--font-ui);
  font-size: 20px;
  line-height: 1;
  color: #ff9aaa;
  margin: 0 0 14px;
}

.side-panel-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 18px;
  line-height: 1.35;
}

.side-panel-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0;
}

.side-label {
  opacity: 0.9;
}

.side-value {
  text-align: right;
}

.side-panel-log {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-panel-log p {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  opacity: 0.95;
}

.music-widget {
  position: absolute;
  right: 16px;
  bottom: 54px;
  z-index: 26;
  width: min(300px, calc(100vw - 32px));
  padding: 10px;
  border: 2px solid #6c1f2e;
  background: linear-gradient(to bottom, rgba(45, 10, 18, 0.9), rgba(30, 8, 13, 0.9));
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 180, 190, 0.15);
  color: #ffd7de;
}

.music-widget-title {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: #ff9aaa;
  margin-bottom: 6px;
}

.music-widget-track {
  font-size: 18px;
  line-height: 1.1;
  margin-bottom: 4px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-track-index {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 8px;
}

.music-widget-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.music-nav-btn {
  font-size: 16px;
  padding: 4px 10px;
  min-width: 40px;
  line-height: 1;
}

.music-btn {
  font-size: 16px;
  padding: 4px 12px;
  min-width: 72px;
}

.music-state {
  font-size: 16px;
  opacity: 0.9;
  text-align: center;
  margin-bottom: 8px;
}

.music-visualizer {
  height: 34px;
  border: 2px inset #a15866;
  background: #1a070c;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 4px;
}

.music-visualizer .bar {
  flex: 1;
  min-height: 4px;
  background: linear-gradient(to top, #902032, #ff4e6f);
  box-shadow: 0 0 8px rgba(255, 60, 90, 0.35);
  transition: height 120ms linear;
}

@media (max-width: 900px) {
  .wallpaper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 130px;
  }

  .desktop-hero {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    order: 1;
    width: 100%;
    padding: 20px 12px 8px;
  }

  .status-bar {
    order: 2;
    position: relative;
    left: auto;
    top: auto;
    padding: 0 12px 8px;
    font-size: 18px;
  }

  .side-panel--left {
    order: 3;
    position: relative;
    left: auto;
    top: auto;
    width: calc(100% - 24px);
    margin: 0 auto 12px;
  }

  .side-panel--right {
    order: 4;
    position: relative;
    right: auto;
    top: auto;
    width: calc(100% - 24px);
    max-height: none;
    margin: 0 auto 12px;
  }

  .music-widget {
    order: 5;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: calc(100% - 24px);
    margin: 0 auto 12px;
  }

  .wallpaper-subtitle {
    white-space: normal;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .profile-group + .profile-group {
    margin-top: 32px;
  }

  .profile-group-label,
  .main-two-label {
    margin: 24px 0 14px;
  }

  .profile-group:first-child .profile-group-label {
    margin-top: 24px;
  }

  .taskbar {
    position: fixed;
    height: auto;
    min-height: 46px;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 6px 8px;
  }

  .start-btn {
    min-width: 64px;
    height: 30px;
    font-size: 17px;
    padding: 2px 10px 2px 8px;
  }

  .taskbar-discord {
    width: 32px;
    height: 30px;
    margin-left: 0;
  }

  .taskbar-visits {
    position: static;
    transform: none;
    order: 3;
    flex: 1 1 100%;
    justify-content: center;
    padding: 3px 10px 2px;
    font-size: 16px;
  }

  .taskbar-visits-label {
    font-size: 15px;
  }

  .taskbar-spacer {
    display: none;
  }

  .clock {
    margin-left: auto;
    font-size: 17px;
    min-height: 26px;
  }

  .logout-btn {
    font-size: 15px;
    min-height: 26px;
    padding: 2px 8px;
  }

  .start-menu {
    left: 6px;
    bottom: 52px;
    width: min(220px, calc(100vw - 12px));
  }

  .xp-gallery-window {
    width: min(100%, calc(100vw - 16px));
    max-height: calc(100vh - 24px);
  }

  .xp-gallery-body {
    max-height: calc(100vh - 120px);
  }
}

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 22;
  height: 42px;
  background: linear-gradient(
    to bottom,
    #431018 0%,
    #320b12 35%,
    #2a090f 60%,
    #20070c 100%
  );
  border-top: 1px solid rgba(255, 110, 130, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 160, 170, 0.2),
    0 -1px 0 rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.start-btn {
  height: 33px;
  min-width: 78px;
  padding: 2px 16px 2px 14px;
  border: 1px solid #732535;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(
    to bottom,
    #b73a4e 0%,
    #9f263c 40%,
    #7f1930 70%,
    #691226 100%
  );
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 1px 0 rgba(0, 0, 0, 0.35);
  font-size: 20px;
  line-height: 1;
  font-style: italic;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.start-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45));
}

.start-btn:hover {
  filter: brightness(1.05);
}

.start-btn:active {
  filter: brightness(0.92);
  transform: translateY(1px);
}

.taskbar-visits {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 3px;
  border: 1px solid #6c1f2e;
  border-radius: 2px;
  background: linear-gradient(to bottom, #6e2233, #4a121f);
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 190, 0.2),
    0 1px 0 rgba(0, 0, 0, 0.35);
  color: #ffd7de;
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.taskbar-visits-count {
  min-width: 1.2em;
  text-align: center;
  color: #fff;
}

.taskbar-visits-label {
  color: #ffb8c6;
  font-size: 18px;
}

.taskbar-spacer {
  flex: 1;
}

.clock {
  min-height: 28px;
  padding: 3px 10px 1px;
  border: 1px solid #6c1f2e;
  border-radius: 2px;
  background: linear-gradient(to bottom, #8f2a3b, #6c1a2b);
  box-shadow: inset 0 1px 0 rgba(255, 180, 190, 0.25);
  color: #ffd7de;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.logout-btn {
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid #6c1f2e;
  border-radius: 4px;
  background: linear-gradient(to bottom, #9a3042, #6f1b2c);
  color: #ffdce2;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
  font-size: 18px;
  line-height: 1;
}

.start-menu {
  position: absolute;
  left: 10px;
  bottom: 54px;
  z-index: 25;
  width: 220px;
  background: #d4d0c8;
  border: 2px solid #808080;
  box-shadow: 0 10px 30px var(--xp-shadow);
  padding: 10px;
}

.start-menu-header {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 8px;
}

.start-menu-section-label {
  font-size: 14px;
  opacity: 0.8;
  margin: 6px 0 4px;
}

.start-menu-separator {
  height: 1px;
  margin: 8px 0;
  background: linear-gradient(to right, #808080, #d4d0c8);
}

.start-menu-item {
  width: 100%;
  text-align: left;
  font-size: 22px;
  line-height: 1.1;
  padding: 8px 10px;
  margin: 6px 0;
  background: transparent;
  border: 2px solid transparent;
}

.start-menu-item--icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.start-menu-item:hover {
  border-color: #00000020;
  background: #ffffff80;
}

.bg-music {
  position: fixed;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* popups */
.xp-msg-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}

.xp-msg-box {
  width: min(280px, calc(100vw - 24px));
  max-width: 280px;
  background: #d4d0c8;
  border: 2px solid #808080;
  box-shadow: 0 10px 30px var(--xp-shadow);
}

.xp-msg-titlebar {
  height: auto;
  min-height: 28px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  background: linear-gradient(#000080, #000060);
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
}

.xp-msg-body {
  padding: 10px 10px 8px;
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #000;
  white-space: normal;
  word-break: normal;
}

.xp-msg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 10px 10px;
}

.xp-msg-actions .xp-btn {
  font-size: 14px;
  padding: 4px 12px;
}

/* folders popup */
.xp-explorer-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.xp-explorer-window {
  width: min(320px, calc(100vw - 24px));
  background: #d4d0c8;
  border: 2px solid #808080;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.xp-explorer-titlebar {
  min-height: 28px;
  padding: 6px 8px 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(#000080, #000060);
  color: #fff;
  font-size: 16px;
}

.xp-explorer-body {
  padding: 14px 12px 16px;
  background: #fff;
  border: 2px inset #d4d0c8;
  margin: 8px;
}

.xp-explorer-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: flex-start;
}

.xp-explorer-item {
  width: 72px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #000;
  font-family: var(--font-ui);
  text-align: center;
}

.xp-explorer-item:hover,
.xp-explorer-item:focus-visible {
  border-color: #316ac5;
  background: rgba(49, 106, 197, 0.15);
  outline: none;
}

.xp-explorer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.xp-explorer-label {
  display: block;
  font-size: 18px;
  line-height: 1.1;
  word-break: break-word;
}

/* notepad */
.xp-notepad-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.xp-notepad-window {
  width: min(360px, calc(100vw - 24px));
  background: #d4d0c8;
  border: 2px solid #808080;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.xp-notepad-titlebar {
  min-height: 28px;
  padding: 6px 8px 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(#000080, #000060);
  color: #fff;
  font-size: 16px;
}

.xp-notepad-body {
  padding: 8px;
  background: #d4d0c8;
}

.xp-notepad-text {
  margin: 0;
  padding: 10px;
  min-height: 140px;
  background: #fff;
  border: 2px inset #fff;
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.35;
  color: #000;
  white-space: pre-wrap;
  overflow: auto;
}

/* games */
.xp-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.xp-game-window {
  width: min(92vw, 400px);
  background: #d4d0c8;
  border: 2px solid #808080;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.xp-game-titlebar {
  min-height: 28px;
  padding: 6px 8px 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(#000080, #000060);
  color: #fff;
  font-size: 16px;
}

.xp-game-close {
  min-width: 22px;
  height: 22px;
  padding: 0;
  border: 1px outset #fff;
  background: #c0c0c0;
  color: #000;
  font-size: 12px;
  line-height: 1;
}

.xp-game-body {
  padding: 10px;
  background: #d4d0c8;
}

.games-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.games-hint {
  margin: 0 0 4px;
  font-size: 16px;
  color: #000;
}

.games-launch-btn {
  width: 100%;
  text-align: left;
  font-size: 16px;
}

.game-play-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.game-score {
  width: 100%;
  font-size: 16px;
  color: #000;
  text-align: center;
}

.game-controls-hint {
  font-size: 14px;
  color: #333;
  text-align: center;
}

.game-canvas {
  display: block;
  border: 2px inset #fff;
  background: #12080a;
  image-rendering: pixelated;
}

.catch-arena {
  position: relative;
  width: 280px;
  height: 180px;
  border: 2px inset #fff;
  background: #12080a;
  overflow: hidden;
}

.catch-dot {
  position: absolute;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ff3d5c;
  box-shadow: 0 0 10px rgba(255, 60, 80, 0.7);
  transform: translate(-50%, -50%);
}

.catch-end {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffb3bd;
  font-size: 18px;
  text-align: center;
  padding: 12px;
}

.xp-admin-gate {
  width: min(300px, calc(100vw - 24px));
}

.xp-admin-window {
  width: min(420px, calc(100vw - 24px));
  background: #d4d0c8;
  border: 2px solid #808080;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.xp-admin-body {
  padding: 10px 12px;
  background: #d4d0c8;
}

.xp-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.xp-admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 18px;
  color: #000;
}

.xp-admin-field--full {
  margin-top: 4px;
}

.xp-admin-field input,
.xp-admin-field textarea {
  font-size: 18px;
  padding: 6px 8px;
  border: 2px inset #fff;
  background: #fff;
  color: #000;
  width: 100%;
  font-family: var(--font-ui);
}

.xp-admin-field textarea {
  resize: vertical;
  min-height: 120px;
}

.xp-admin-hint {
  margin: 6px 0 0;
  font-size: 16px;
  color: #8b0000;
}

.xp-admin-note {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.2;
  color: #333;
}

.xp-admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 10px 10px;
}

.xp-admin-actions .xp-btn {
  font-size: 16px;
  padding: 4px 12px;
}

@media (max-width: 480px) {
  .xp-admin-grid {
    grid-template-columns: 1fr;
  }

  .desktop-icons--row {
    gap: 6px;
  }

  .icon {
    min-width: 64px;
    max-width: 100px;
  }

  .wallpaper-title {
    font-size: 18px;
  }

  .taskbar-visits-label {
    display: none;
  }
}

/* gallery */
.xp-gallery-window {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  background: #d4d0c8;
  border: 2px solid #808080;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.xp-gallery-body {
  padding: 10px;
  background: #fff;
  border: 2px inset #d4d0c8;
  margin: 8px;
  overflow: auto;
  max-height: min(420px, calc(100vh - 120px));
}

.xp-gallery-loading,
.xp-gallery-empty {
  margin: 0;
  padding: 16px 8px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  text-align: center;
}

.xp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.xp-gallery-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.xp-gallery-item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border: 2px inset #d4d0c8;
  background: #eee;
}

.xp-gallery-item video {
  width: 100%;
  max-height: 160px;
  border: 2px inset #d4d0c8;
  background: #000;
}

.xp-gallery-caption {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xp-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.85);
}

.xp-lightbox-overlay img {
  max-width: min(92vw, 900px);
  max-height: calc(100vh - 100px);
  border: 2px solid #6c1f2e;
  box-shadow: 0 0 30px rgba(255, 50, 80, 0.35);
}

.xp-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.xp-lightbox-caption {
  margin: 0;
  color: #ffb3bd;
  font-size: 16px;
}

