/* Curved glass, phosphor grain and a slow scan band. No layout transforms or flashing. */
.screen {
  border-radius: 10px / 8px;
  isolation: isolate;
}
.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    125deg,
    #e0fffa0b,
    transparent 27%,
    transparent 76%,
    #00000017
  );
  box-shadow:
    inset 0 0 2px 1px #000b,
    inset 0 0 28px #0005,
    inset 0 0 90px #0002;
}
.screen::after {
  inset: -8px 0;
  z-index: 10000;
  background:
    repeating-linear-gradient(0deg, #00000012 0 1px, transparent 1px 3px),
    repeating-linear-gradient(
      90deg,
      #ff000003 0 1px,
      #00ff0003 1px 2px,
      #0000ff03 2px 3px
    );
}
body.screen-texture:not(.reduce-motion) .screen::after {
  animation: phosphor-scan 12s linear infinite;
}
@keyframes phosphor-scan {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(6px);
  }
}
.desktop-shortcut .pixel-icon {
  transition: filter 120ms ease;
}
.desktop-shortcut:hover .pixel-icon,
.desktop-shortcut:focus-visible .pixel-icon {
  filter: brightness(1.12);
  transform: none;
}
.desktop-shortcut:hover > span {
  background: #00008055;
  text-shadow: 1px 1px #000;
}
.desktop-shortcut[aria-pressed="true"] > span,
.desktop-shortcut:focus-visible > span {
  background: #000080;
  color: #fff;
  text-shadow: none;
  outline: 1px dotted #fff;
  outline-offset: -1px;
}
.matrix-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  background: #000b;
}

.file-toolbar .folder-tree-toggle {
  display: none;
}

/* The account entry is a real launcher; all user data remains ordinary text. */
.start-menu-content header {
  padding: 0;
}
.start-account {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  color: #111;
  background: transparent;
  border: 0;
  text-align: left;
}
.start-menu-content header .start-account span {
  margin: 0;
  color: inherit;
}
.start-account strong {
  display: block;
  font-size: 13px;
}
.start-account small {
  display: block;
  margin-top: 3px;
  font: 10px var(--mono);
}
.start-account .account-arrow {
  margin-left: auto !important;
  font-size: 20px;
}
.start-account:hover,
.start-account:focus-visible {
  background: #000080;
  color: #fff;
}
.account-panel {
  padding: 18px;
  color: #111;
  overflow: auto;
  height: 100%;
}
.account-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.account-heading .pixel-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.account-heading h3 {
  margin: 0 0 5px;
  font: bold 18px var(--font);
}
.account-heading p {
  margin: 0;
  color: #444;
}
.account-details {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 18px;
}
.account-details dt {
  color: #444;
}
.account-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.account-details small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #444;
}
.terminal-output a {
  color: #9ad9bf;
  overflow-wrap: anywhere;
}

/* horrorTheme.js: red lacquer, black metal and an original inverted sigil. */
body.horror-theme {
  --ink: #f0d9d7;
  --muted: #c69c9f;
  --paper: #160b0f;
  --chrome: #261519;
  --title: #970c26;
  --desktop: #100307;
  --line: #6c2732;
  --light: #a64655;
  --shadow: #080204;
  --raised: inset 1px 1px #75404b, inset -1px -1px #060103;
  --sunken: inset 1px 1px #050103, inset -1px -1px #5b2934;
  color-scheme: dark;
  background: #080103;
  color: var(--ink);
}
body.horror-theme .wallpaper-art {
  background:
    url("../images/horror-sigil.6f50902c0cef.svg") center / min(74vh, 74vw) no-repeat,
    radial-gradient(ellipse at 50% 42%, #4510194d, #080205 80%),
    linear-gradient(#21050df0, #060205eb),
    url("../images/sexydemon.25747994d91b.jpg") center / cover;
  filter: none;
  opacity: 1;
}
.horror-theme .desktop-workspace::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 90px;
  z-index: 9998;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='90' viewBox='0 0 700 90'%3E%3Cpath fill='%23760820' fill-opacity='.8' d='M0 0h700v5h-62v21q-4 11-8 0V10h-42v57q-3 14-6 0V9h-88v29q-4 12-8 0V7h-111v11q-5 10-10 0V7h-53v70q-3 15-6 0V10h-29v25q-3 10-6 0V6H117v46q-3 16-6 0V10H74v13q-4 9-8 0V5H0Z'/%3E%3C/svg%3E")
    top center repeat-x;
}
.horror-theme .screen::before {
  box-shadow:
    inset 0 0 4px 1px #1c0008,
    inset 0 0 45px #28000c88;
}
.horror-theme .app-window:not([data-freeform]),
.horror-theme .window-body,
.horror-theme .taskbar,
.horror-theme .start-menu,
.horror-theme .file-menubar,
.horror-theme .file-toolbar,
.horror-theme .file-address,
.horror-theme .file-status,
.horror-theme .file-sidebar-title,
.horror-theme .file-detail-head,
.horror-theme .settings-content,
.horror-theme .setting-row,
.horror-theme .window-menu,
.horror-theme .window-status,
.horror-theme .viewer-toolbar {
  background: #261519;
  color: #f0d9d7;
  border-color: #6c2732;
}
.horror-theme .window-titlebar,
.horror-theme .start-menu-brand {
  background: #3c1520;
  color: #cf939c;
}
.horror-theme .app-window.is-active .window-titlebar {
  background: linear-gradient(90deg, #8c0b25, #38040e);
  color: #fff0ed;
}
.horror-theme .start-menu button,
.horror-theme .taskbar button,
.horror-theme .window-controls button,
.horror-theme .file-manager button,
.horror-theme .viewer-toolbar button,
.horror-theme .settings-content button,
.horror-theme .settings-content select {
  background-color: #29151c;
  color: #f0d9d7;
  border-color: #6c2732;
}
.horror-theme .file-sidebar,
.horror-theme .file-directory,
.horror-theme .file-sidebar .directory-tree-row,
.horror-theme .file-address input,
.horror-theme .file-viewer-text,
.horror-theme .image-viewer-stage,
.horror-theme .system-tray {
  background: #11090d;
  color: #ead4d7;
  border-color: #672432;
}
.horror-theme .file-entry {
  background: transparent;
}
.horror-theme .terminal-content {
  background: #0b0307;
  color: #efb9bc;
}
.horror-theme .terminal-command,
.horror-theme .terminal-form label,
.horror-theme .terminal-output a {
  color: #ff647a;
}
.horror-theme .terminal-form input {
  color: #f5dcdd;
}
.horror-theme .account-panel,
.horror-theme .account-heading p,
.horror-theme .account-details dt,
.horror-theme .account-details small,
.horror-theme .start-menu-content header span,
.horror-theme .file-empty,
.horror-theme .setting-row small {
  color: #dab1b8;
}
.horror-theme .start-menu button:hover,
.horror-theme .start-menu [aria-selected="true"],
.horror-theme .taskbar-app.is-active,
.horror-theme .file-sidebar [aria-current="location"],
.horror-theme .file-entry[aria-pressed="true"] .file-entry-name,
.horror-theme .desktop-shortcut:hover > span,
.horror-theme .desktop-shortcut[aria-pressed="true"] > span,
.horror-theme .desktop-shortcut:focus-visible > span {
  background: #820f2a;
  color: #fff2ee;
}
.horror-theme .pixel-icon,
.horror-theme .desktop-shortcut .pixel-icon {
  filter: sepia(0.75) saturate(1.6) hue-rotate(302deg);
}
.horror-theme .desktop-shortcut:hover .pixel-icon {
  filter: sepia(1) saturate(3) hue-rotate(300deg) drop-shadow(0 0 6px #ff2c5466);
}
.horror-theme .app-window[data-freeform] {
  filter: sepia(0.8) saturate(1.6) hue-rotate(300deg);
}
.horror-theme ::selection {
  background: #990d2c;
  color: #fff;
}
.horror-theme .toast {
  background: #260d16;
  color: #f5d3db;
  border-color: #a53950;
}

.horror-theme .window-body > .file-preview,
.horror-theme .file-image-stage,
.horror-theme .image-toolbar,
.horror-theme .image-status,
.horror-theme .prank-message,
.horror-theme .flight-toolbar,
.horror-theme .flight-controls,
.horror-theme .flight-status {
  background: #1b0d14;
  color: #e6c7cd;
  border-color: #672432;
}
.horror-theme .image-toolbar button,
.horror-theme .retro-button {
  background: #30121e;
  color: #efd4d9;
}
.horror-theme .file-entry-type,
.horror-theme .eyebrow,
.horror-theme .icon-credit,
.horror-theme .settings-note,
.horror-theme .launcher-panels h2 {
  color: #c59da6;
}
.terminal-form {
  flex-wrap: wrap;
}
.terminal-form input {
  min-width: min(160px, 100%);
  min-height: 24px;
}
.terminal-form label {
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .screen {
    border-radius: 5px;
  }
  .screen::before {
    box-shadow:
      inset 0 0 2px #000b,
      inset 0 0 20px #0003;
  }
  .file-toolbar .folder-tree-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .file-manager.show-folders .file-sidebar {
    display: flex;
    width: min(48%, 210px);
  }
  .file-sidebar .directory-tree-row {
    min-height: 32px;
  }
  .tree-disclosure {
    height: 30px;
    width: 25px;
  }
  .account-panel {
    padding: 14px;
  }
  .account-details {
    gap: 12px;
    grid-template-columns: 105px minmax(0, 1fr);
  }
}
body.reduce-motion .screen::after {
  animation: none;
}
body.reduce-motion .desktop-shortcut .pixel-icon {
  transition: none;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  body.screen-texture .screen::after {
    animation: none;
  }
  .desktop-shortcut .pixel-icon,
  .desktop-shortcut:hover .pixel-icon,
  .desktop-shortcut:focus-visible .pixel-icon {
    transition: none;
    transform: none;
  }
}
