/* ==============================================
   Game Computer — Retro Desktop Theme (Win98)
   ============================================== */

/* --- Zoom toggle --- */
.gc-zoom-btn {
  position: absolute;
  top: -55px;
  left: -245px;
  z-index: 999;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.2s;
  padding: 0;
  line-height: 1;
}
.gc-zoom-btn:hover { opacity: 1; }
.gc-zoom-btn.active {
  opacity: 0.9;
  background: rgba(0,80,128,0.7);
  border-color: rgba(255,255,255,0.5);
}

/* Smooth zoom transition on the whole application element */
.game-computer {
  transition: transform 0.4s ease, left 0.4s ease, top 0.4s ease;
}

/* Exempt solitaire cards from the color nuke */
.gc-solitaire-card { color: inherit !important; }

/* --- Foundry overrides: nuke system font/color bleed --- */
.game-computer .window-content {
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}


/* Win98 had zero rounded corners on anything */
.gc-shell button,
.gc-shell input,
.gc-shell select,
.gc-shell textarea,
.gc-shell div {
  border-radius: 0 !important;
}

/* Reset input/textarea sizing - Foundry/VTM adds excessive padding and height */
.gc-shell input[type="text"],
.gc-shell input[type="search"],
.gc-shell input[type="number"],
.gc-shell textarea {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 2px 4px !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  font-size: inherit !important;
  background: #fff !important;
  border: none !important;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff !important;
  box-sizing: border-box !important;
}

.gc-shell button:not(.gc-btn) {
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
}

/* VTM uses body/button/window-app * with Trajan Pro !important.
   Repeat class selectors to reach absurd specificity. */
.game-computer.game-computer.game-computer.game-computer .gc-shell,
.game-computer.game-computer.game-computer.game-computer .gc-shell div,
.game-computer.game-computer.game-computer.game-computer .gc-shell span,
.game-computer.game-computer.game-computer.game-computer .gc-shell p,
.game-computer.game-computer.game-computer.game-computer .gc-shell button,
.game-computer.game-computer.game-computer.game-computer .gc-shell input,
.game-computer.game-computer.game-computer.game-computer .gc-shell textarea,
.game-computer.game-computer.game-computer.game-computer .gc-shell select,
.game-computer.game-computer.game-computer.game-computer .gc-shell option,
.game-computer.game-computer.game-computer.game-computer .gc-shell label,
.game-computer.game-computer.game-computer.game-computer .gc-shell a,
.game-computer.game-computer.game-computer.game-computer .gc-shell *::placeholder {
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: #000;
}

/* Text fields keep white backgrounds on every scheme, so their text must
   stay black no matter what the system or scheme CSS forces. */
.game-computer.game-computer.game-computer.game-computer .gc-shell input[type="text"],
.game-computer.game-computer.game-computer.game-computer .gc-shell input[type="search"],
.game-computer.game-computer.game-computer.game-computer .gc-shell input[type="number"],
.game-computer.game-computer.game-computer.game-computer .gc-shell input[type="password"],
.game-computer.game-computer.game-computer.game-computer .gc-shell textarea,
.game-computer.game-computer.game-computer.game-computer .gc-shell select,
.game-computer.game-computer.game-computer.game-computer .gc-shell .gc-addr-input {
  color: #000 !important;
}

/* Websites shown in Internet Explorer keep their own look. Media Maker
   stamps the font and text color inline on the page root; everything
   inside inherits both instead of the enforced shell font and the forced
   black text. One more class repeat outranks the rules above. */
.game-computer.game-computer.game-computer.game-computer.game-computer .gc-shell .gc-ie-doc *,
.game-computer.game-computer.game-computer.game-computer.game-computer .gc-shell .gc-ie-doc *::placeholder {
  font-family: inherit !important;
  color: inherit;
}


/* --- Shell & Desktop --- */
.gc-shell {
  width: 100%;
  height: 100%;
  position: relative;
  /* Own stacking context so window z-indexes stay below the CRT
     scanline/vignette overlays HG paints at z 100/101 */
  z-index: 1;
  user-select: none;
  cursor: default;
  font-size: calc(11px * var(--gc-s, 0.75));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gc-desktop {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.gc-icon-grid {
  position: absolute;
  top: 6px;
  left: 6px;
  bottom: 4px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  z-index: 1;
}

.gc-icon {
  width: calc(68px * var(--gc-s, 0.75));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 2px;
  cursor: pointer;
}

.gc-icon-img {
  width: calc(28px * var(--gc-s, 0.75));
  height: calc(28px * var(--gc-s, 0.75));
  display: flex;
  align-items: center;
  justify-content: center;
}
.gc-icon-img svg {
  width: 100%;
  height: 100%;
}

.gc-icon-label,
.gc-icon .gc-icon-label {
  text-align: center;
  color: #fff !important;
  font-size: inherit;
  padding: 1px 3px;
  line-height: 1.3;
  text-shadow: 1px 1px 1px #000;
}

.gc-icon:hover .gc-icon-label,
.gc-icon.gc-hover .gc-icon-label {
  background: #000080;
  text-shadow: none;
}

.gc-win-area {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.gc-win-area > * {
  pointer-events: auto;
}

/* --- Window chrome --- */
.gc-win {
  position: absolute;
  background: #c0c0c0;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  min-height: 80px;
  box-shadow:
    inset 1px 1px 0 0 #fff,
    inset 2px 2px 0 0 #dfdfdf,
    inset -1px -1px 0 0 #404040,
    inset -2px -2px 0 0 #808080;
  padding: 3px;
}

.gc-titlebar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 3px;
  background: linear-gradient(to right, #000080, #1084d0);
  font-weight: bold;
  font-size: inherit;
  cursor: grab;
  flex-shrink: 0;
}

.gc-titlebar,
.gc-titlebar span {
  color: #fff;
}

.gc-titlebar:active { cursor: grabbing; }

.gc-titlebar.inactive {
  background: linear-gradient(to right, #808080, #b5b5b5);
}

.gc-title-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gc-title-btns {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  padding: 1px;
  box-shadow: inset 1px 1px 0 0 #808080, inset -1px -1px 0 0 #fff;
  background: #c0c0c0;
}

.gc-btn {
  width: calc(15px * var(--gc-s, 0.75));
  height: calc(14px * var(--gc-s, 0.75));
  background: #c0c0c0;
  border: none;
  font-size: 0;
  line-height: 0;
  display: block;
  cursor: pointer;
  box-shadow:
    inset 1px 1px 0 0 #fff,
    inset -1px -1px 0 0 #404040;
  padding: 0;
  color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 0;
}

.gc-btn-min {
  background-image: url("data:image/svg+xml,%3Csvg width='6' height='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%23000' width='6' height='2'/%3E%3C/svg%3E");
  background-size: calc(5px * var(--gc-s, 0.75)) calc(2px * var(--gc-s, 0.75));
  background-position: center calc(70%);
}

.gc-btn-max {
  background-image: url("data:image/svg+xml,%3Csvg width='9' height='9' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='0' width='9' height='9' fill='none' stroke='%23000' stroke-width='2'/%3E%3Crect x='0' y='0' width='9' height='2' fill='%23000'/%3E%3C/svg%3E");
  background-size: calc(7px * var(--gc-s, 0.75)) calc(7px * var(--gc-s, 0.75));
}

.gc-btn-close {
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0 L2,0 L4,2 L6,0 L8,0 L8,1 L6,3 L6,4 L8,6 L8,7 L6,7 L4,5 L2,7 L0,7 L0,6 L2,4 L2,3 L0,1Z' fill='%23000'/%3E%3C/svg%3E");
  background-size: calc(6px * var(--gc-s, 0.75)) calc(6px * var(--gc-s, 0.75));
  margin-left: 1px;
}

.gc-btn:active {
  box-shadow: inset 1px 1px 0 0 #404040, inset -1px -1px 0 0 #fff;
}

/* Menu bar */
.gc-menubar {
  display: flex;
  gap: 0;
  padding: 1px 0;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
}

.gc-menu-item {
  padding: 2px 8px;
  cursor: pointer;
}

.gc-menu-item:hover,
.gc-menu-item.gc-hover {
  box-shadow: inset 1px 1px 0 0 #fff, inset -1px -1px 0 0 #808080;
}

/* Toolbar */
.gc-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
}

.gc-toolbar-btn {
  background: #c0c0c0;
  border: none;
  padding: 2px 6px;
  cursor: pointer;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: inherit;
  color: #000;
  box-shadow: inset 1px 1px 0 0 #fff, inset -1px -1px 0 0 #808080;
}

.gc-toolbar-btn:active {
  box-shadow: inset 1px 1px 0 0 #808080, inset -1px -1px 0 0 #fff;
}

.gc-toolbar-btn.disabled {
  color: #808080;
  pointer-events: none;
}

.gc-toolbar-sep {
  width: 2px;
  height: 20px;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  margin: 0 2px;
}

/* Address bar */
.gc-address-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  font-size: inherit;
  flex-shrink: 0;
}

.gc-address-bar label { flex-shrink: 0; }

.gc-addr-input {
  flex: 1;
  background: #fff;
  padding: 1px 4px;
  font-family: inherit;
  font-size: inherit;
  box-shadow: inset 1px 1px 0 0 #808080, inset -1px -1px 0 0 #fff;
}

/* Window body */
.gc-win-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: #fff;
  box-shadow:
    inset 1px 1px 0 0 #808080,
    inset 2px 2px 0 0 #404040,
    inset -1px -1px 0 0 #dfdfdf,
    inset -2px -2px 0 0 #fff;
  min-height: 0;
}

/* Status bar */
.gc-statusbar {
  display: flex;
  align-items: center;
  padding: 2px 0;
  margin-top: 2px;
  flex-shrink: 0;
}

.gc-status-section,
.gc-status-section span {
  flex: 1;
  padding: 1px 6px;
  box-shadow: inset 1px 1px 0 0 #808080, inset -1px -1px 0 0 #fff;
  font-size: inherit;
  color: #000;
}

/* Resize handle */
.gc-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
}

/* --- Scrollbars (webkit) --- */
.gc-win-body ::-webkit-scrollbar { width: calc(14px * var(--gc-s, 0.75)); height: calc(14px * var(--gc-s, 0.75)); }
.gc-win-body ::-webkit-scrollbar-track { background: #c0c0c0; }
.gc-win-body ::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  box-shadow:
    inset 1px 1px 0 0 #fff,
    inset -1px -1px 0 0 #404040,
    inset 2px 2px 0 0 #dfdfdf,
    inset -2px -2px 0 0 #808080;
}

/* --- File Browser --- */
.gc-file-tree {
  width: calc(140px * var(--gc-s, 0.75));
  min-width: calc(100px * var(--gc-s, 0.75));
  background: #fff;
  padding: 2px;
  overflow-y: auto;
  border-right: 2px solid #c0c0c0;
  flex-shrink: 0;
}

.gc-tree-item {
  padding: 1px 4px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: inherit;
}

.gc-tree-item:hover,
.gc-tree-item:hover span,
.gc-tree-item.gc-hover,
.gc-tree-item.gc-hover span,
.gc-tree-item.active,
.gc-tree-item.active span {
  background: #000080;
  color: #fff;
}

.gc-tree-icon { font-size: 12px; flex-shrink: 0; }

.gc-file-list {
  flex: 1;
  overflow: auto;
  background: #fff;
}

.gc-file-list-header {
  display: grid;
  grid-template-columns: 2fr 70px 1fr 110px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.gc-file-list-header span {
  background: #c0c0c0;
  padding: 2px 6px;
  font-size: inherit;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 0 #fff, inset -1px -1px 0 0 #404040;
}

.gc-file-row {
  display: grid;
  grid-template-columns: 2fr 70px 1fr 110px;
  cursor: pointer;
}

.gc-file-row:hover,
.gc-file-row:hover span,
.gc-file-row.gc-hover,
.gc-file-row.gc-hover span {
  background: #000080;
  color: #fff;
}

.gc-file-row span {
  padding: 1px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: inherit;
}

.gc-fname {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gc-ficon { font-size: 12px; flex-shrink: 0; }

/* --- Mail Client --- */
.gc-mail-folders {
  width: calc(110px * var(--gc-s, 0.75));
  min-width: calc(80px * var(--gc-s, 0.75));
  background: #fff;
  padding: 2px;
  overflow-y: auto;
  border-right: 2px solid #c0c0c0;
  flex-shrink: 0;
}

.gc-mail-folder {
  padding: 2px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: inherit;
}

.gc-mail-folder:hover,
.gc-mail-folder:hover span,
.gc-mail-folder.gc-hover,
.gc-mail-folder.gc-hover span,
.gc-mail-folder.active,
.gc-mail-folder.active span {
  background: #000080;
  color: #fff;
}

.gc-badge { font-weight: bold; margin-left: auto; }

.gc-mail-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.gc-mail-list {
  flex: 0 0 auto;
  max-height: 110px;
  overflow-y: auto;
  border-bottom: 3px solid #c0c0c0;
}

.gc-mail-list-header {
  display: grid;
  grid-template-columns: 20px 120px 1fr 90px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.gc-mail-list-header span {
  background: #c0c0c0;
  padding: 2px 4px;
  font-size: inherit;
  box-shadow: inset 1px 1px 0 0 #fff, inset -1px -1px 0 0 #404040;
}

.gc-mail-row {
  display: grid;
  grid-template-columns: 20px 120px 1fr 90px;
  cursor: pointer;
  font-size: inherit;
}

.gc-mail-row:hover,
.gc-mail-row:hover span,
.gc-mail-row.gc-hover,
.gc-mail-row.gc-hover span,
.gc-mail-row.active,
.gc-mail-row.active span {
  background: #000080;
  color: #fff;
}

.gc-mail-row.unread { font-weight: bold; }

.gc-mail-row span {
  padding: 1px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gc-mail-icon { text-align: center; font-size: 10px; }

.gc-mail-preview {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  font-size: inherit;
  line-height: 1.5;
}

.gc-mail-preview-header {
  border-bottom: 1px solid #c0c0c0;
  padding-bottom: 6px;
  margin-bottom: 8px;
  color: #404040;
}

.gc-mail-preview-header div { margin-bottom: 1px; }
.gc-mail-preview-header b { color: #000; }

.gc-mail-preview-body {
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: inherit;
  line-height: 1.6;
  color: #000;
}

/* --- Database --- */
.gc-db-search {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #c0c0c0;
  align-items: center;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
}

.gc-db-search label { font-weight: bold; }

.gc-db-input {
  flex: 1;
  padding: 2px 4px;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: inherit;
  border: none;
  box-shadow: inset 1px 1px 0 0 #808080, inset -1px -1px 0 0 #fff;
  outline: none;
}

.gc-db-btn {
  background: #c0c0c0;
  border: none;
  padding: 3px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  box-shadow:
    inset 1px 1px 0 0 #fff,
    inset -1px -1px 0 0 #404040,
    inset 2px 2px 0 0 #dfdfdf,
    inset -2px -2px 0 0 #808080;
}

.gc-db-btn:active {
  box-shadow: inset 1px 1px 0 0 #808080, inset -1px -1px 0 0 #fff;
}

.gc-db-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  background: #fff;
}

.gc-db-empty {
  color: #808080;
  padding: 12px;
}

.gc-db-record {
  border: 1px solid #c0c0c0;
  margin-bottom: 8px;
}

.gc-db-record-header,
.gc-db-record-header span {
  background: #000080;
  color: #fff !important;
  padding: 3px 6px;
  font-weight: bold;
  font-size: inherit;
}

.gc-db-record-body {
  display: grid;
  grid-template-columns: calc(90px * var(--gc-s, 0.75)) 1fr;
  font-size: inherit;
}

.gc-db-field-label {
  font-weight: bold;
  padding: 2px 6px;
  background: #e8e8e8;
  border-bottom: 1px solid #c0c0c0;
}

.gc-db-field-value {
  padding: 2px 6px;
  border-bottom: 1px solid #c0c0c0;
}

.gc-db-warn { color: #c00; font-weight: bold; }

/* --- Solitaire Cards --- */
.gc-card {
  background: #fff;
  border: 1px solid #888;
  border-radius: 0;
  position: relative;
  box-sizing: border-box;
  font-weight: bold;
  user-select: none;
}
.gc-card-back {
  background: repeating-linear-gradient(
    45deg, #006 0px, #006 3px, #008 3px, #008 6px
  );
  border: 2px solid #fff;
  outline: 1px solid #888;
  cursor: pointer;
}
.gc-card-empty {
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.3);
}
.gc-card-tl {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: 0.75em;
  line-height: 1;
}
.gc-card-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.3em;
}
.gc-card-br {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 0.75em;
  line-height: 1;
  transform: rotate(180deg);
}

/* --- Notepad --- */
.gc-notepad {
  flex: 1;
  border: none;
  resize: none;
  padding: 4px;
  font-family: "Courier New", monospace;
  font-size: 1.1em;
  line-height: 1.4;
  outline: none;
  background: #fff;
  color: #000;
  width: 100%;
}

/* --- Taskbar --- */
.gc-taskbar {
  height: calc(24px * var(--gc-s, 0.75));
  background: #c0c0c0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  box-shadow: inset 0 1px 0 0 #fff;
  flex-shrink: 0;
  z-index: 50;
}

.gc-start-btn {
  background: #c0c0c0;
  border: none;
  padding: 2px 6px;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: inherit;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  height: calc(20px * var(--gc-s, 0.75));
  color: #000;
  box-shadow:
    inset 1px 1px 0 0 #fff,
    inset -1px -1px 0 0 #404040,
    inset 2px 2px 0 0 #dfdfdf,
    inset -2px -2px 0 0 #808080;
}

.gc-start-btn:active,
.gc-start-btn.pressed {
  box-shadow: inset 1px 1px 0 0 #808080, inset -1px -1px 0 0 #fff;
  padding: 3px 5px 1px 7px;
}

.gc-flag {
  flex-shrink: 0;
  width: calc(14px * var(--gc-s, 0.75));
  height: calc(14px * var(--gc-s, 0.75));
}
.gc-flag svg { width: 100%; height: 100%; }

.gc-task-sep {
  width: 2px;
  height: calc(20px * var(--gc-s, 0.75));
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  margin: 0 1px;
}

.gc-task-list {
  flex: 1;
  display: flex;
  gap: 2px;
  overflow: hidden;
  min-width: 0;
}

.gc-task-btn {
  background: #c0c0c0;
  border: none;
  padding: 2px 8px;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: inherit;
  cursor: pointer;
  height: calc(20px * var(--gc-s, 0.75));
  max-width: 160px;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000;
  box-shadow:
    inset 1px 1px 0 0 #fff,
    inset -1px -1px 0 0 #404040,
    inset 2px 2px 0 0 #dfdfdf,
    inset -2px -2px 0 0 #808080;
}

.gc-task-btn.active {
  box-shadow: inset 1px 1px 0 0 #808080, inset -1px -1px 0 0 #fff;
  font-weight: bold;
}

.gc-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  height: 22px;
  box-shadow: inset 1px 1px 0 0 #808080, inset -1px -1px 0 0 #fff;
  flex-shrink: 0;
}

.gc-tray-vol { font-size: 12px; color: #000; }

.gc-clock {
  font-size: inherit;
  font-variant-numeric: tabular-nums;
  color: #000;
}

/* --- Start Menu --- */
.gc-start-menu {
  position: absolute;
  bottom: calc(24px * var(--gc-s, 0.75));
  left: 2px;
  width: 210px;
  background: #c0c0c0;
  display: none;
  z-index: 100;
  box-shadow:
    inset 1px 1px 0 0 #fff,
    inset 2px 2px 0 0 #dfdfdf,
    inset -1px -1px 0 0 #404040,
    inset -2px -2px 0 0 #808080,
    3px 3px 6px rgba(0,0,0,0.3);
  flex-direction: row;
}

.gc-start-menu.open { display: flex; }

.gc-start-banner,
.gc-start-banner span {
  width: 24px;
  background: linear-gradient(to top, #000080, #1084d0);
  color: #fff !important;
  font-weight: bold;
  font-size: 13px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 3px;
  letter-spacing: 2px;
  transform: rotate(180deg);
  flex-shrink: 0;
}

.gc-start-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2px 0;
}

.gc-start-item {
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: inherit;
}

/* Only highlight items that are NOT folders (folders handle their own highlight) */
.gc-start-item:not(.gc-start-folder):hover,
.gc-start-item:not(.gc-start-folder).gc-hover {
  background: #000080;
  color: #fff;
}
.gc-start-item:not(.gc-start-folder):hover > span,
.gc-start-item:not(.gc-start-folder).gc-hover > span {
  color: #fff;
}

/* Folder: highlight the folder row itself but not the submenu */
.gc-start-folder > span {
  pointer-events: none;
}
.gc-start-folder:hover,
.gc-start-folder.gc-hover {
  background: #000080;
}
.gc-start-folder:hover > span,
.gc-start-folder:hover > .gc-start-arrow,
.gc-start-folder.gc-hover > span,
.gc-start-folder.gc-hover > .gc-start-arrow {
  color: #fff;
}

/* Submenu items sit outside the folder's background via their own container */
.gc-start-submenu .gc-start-item {
  background: transparent;
}
.gc-start-submenu .gc-start-item:hover,
.gc-start-submenu .gc-start-item.gc-hover {
  background: #000080;
  color: #fff;
}
.gc-start-submenu .gc-start-item:hover > span,
.gc-start-submenu .gc-start-item.gc-hover > span {
  color: #fff;
}

.gc-start-item-icon {
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gc-start-divider {
  height: 1px;
  margin: 2px 3px;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
}

/* Start menu folder with submenu */
.gc-start-folder {
  position: relative;
}

.gc-start-arrow {
  margin-left: auto;
  font-size: 0.8em;
  flex-shrink: 0;
}

.gc-start-submenu {
  display: none;
  position: absolute;
  left: 100%;
  bottom: 0;
  min-width: 140px;
  background: #c0c0c0;
  padding: 2px 0;
  box-shadow:
    inset 1px 1px 0 0 #fff,
    inset 2px 2px 0 0 #dfdfdf,
    inset -1px -1px 0 0 #404040,
    inset -2px -2px 0 0 #808080,
    3px 3px 6px rgba(0,0,0,0.3);
  z-index: 101;
}

.gc-start-submenu.open {
  display: flex;
  flex-direction: column;
}

/* --- Context menu --- */
.gc-ctx-menu {
  font-size: inherit;
}
.gc-ctx-menu div {
  font-size: inherit;
}

/* --- Computer Item Sheet --- */
.game-computer-sheet .window-content {
  background: #1a1a2a !important;
  color: #ddd !important;
}
.gc-sheet-wrap { padding: 10px; display: flex; flex-direction: column; height: 100%; color: #ddd; }
.gc-sheet-wrap * { color: #ddd; }
.gc-sheet-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #444; }
.gc-sheet-name { flex: 1; min-width: 140px; font-size: 16px; font-weight: bold; padding: 4px 6px; background: #2a2a3e; border: 1px solid #555; color: #fff !important; }
.gc-sheet-launch { white-space: nowrap; }
.gc-sheet-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.gc-sheet-section-head { background: #2a2a3e; border: 1px solid #444; padding: 6px 10px; cursor: pointer; font-weight: bold; font-size: 13px; color: #c8b8f0 !important; }
.gc-sheet-section-head:hover { background: #353550; }
.gc-sheet-section { padding: 8px 10px; border: 1px solid #333; border-top: none; background: #22222e; display: flex; flex-direction: column; gap: 6px; }
.gc-sheet-section label { font-size: 12px; display: flex; align-items: center; gap: 6px; color: #ccc !important; }
.gc-sheet-section input[type="text"],
.gc-sheet-section input[type="number"],
.gc-sheet-section textarea { background: #2a2a3e !important; border: 1px solid #555 !important; color: #eee !important; padding: 3px 6px; font-size: 12px; box-shadow: none !important; }
.gc-sheet-section input[type="checkbox"] { width: 14px; height: 14px; accent-color: #a78bfa; }
.gc-sheet-apps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.gc-sheet-apps-grid label { font-size: 12px; cursor: pointer; padding: 2px 0; }
.gc-sheet-row { display: flex; gap: 6px; }
.gc-sheet-theme-row { display: flex; align-items: center; gap: 14px; }
.gc-sheet-theme-row label { cursor: pointer; }
.gc-sheet-theme-row input[type="radio"] { accent-color: #a78bfa; }
.gc-sheet-theme-label { width: 70px; font-size: 12px; color: #888 !important; }
.gc-sheet-hint { color: #888 !important; font-size: 11px; font-style: italic; }
.gc-sheet-wide { flex-direction: column; align-items: stretch !important; }
.gc-sheet-wide textarea { margin-top: 2px; }
.gc-sheet-footer { display: flex; justify-content: flex-end; gap: 6px; padding-top: 8px; border-top: 1px solid #444; margin-top: 6px; }
.gc-sheet-player { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px; text-align: center; }
.gc-sheet-player h2 { color: #fff !important; }

/* --- Spectating --- */
.gc-hidden { display: none !important; }

/* Sits above the shell (z1) and below the CRT overlays (z100+), so the
   mirror gets scanlines/vignette like a real screen */
.gc-spec-mirror {
  position: absolute;
  inset: 0;
  z-index: 90;
  background: #000;
  overflow: hidden;
}
.gc-spec-screen { position: absolute; inset: 0; }
.gc-spec-screen, .gc-spec-screen * { pointer-events: none !important; }
.gc-spec-cursor {
  position: absolute;
  z-index: 5;
  width: 13px;
  height: 20px;
  pointer-events: none;
  transition: left 0.04s linear, top 0.04s linear;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6));
}
.gc-spec-ripple {
  position: absolute;
  z-index: 4;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  pointer-events: none;
  animation: gcSpecRipple 0.45s ease-out forwards;
}
@keyframes gcSpecRipple {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(4); opacity: 0; }
}
.gc-spec-status {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3f3;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(51,255,51,0.5);
}

/* Notification cards with buttons */
#gc-toasts {
  position: fixed;
  top: 8px;
  right: 320px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gc-toast {
  position: relative;
  background: #1a1a2e;
  border: 1px solid #a78bfa;
  padding: 10px 28px 10px 12px;
  min-width: 240px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: opacity 0.5s;
}
.gc-toast-fade { opacity: 0; }
.gc-toast-text { color: #eee; font-size: 13px; margin-bottom: 8px; }
.gc-toast-btns { display: flex; gap: 6px; }
.gc-toast-btns button {
  background: #2a2a4e;
  border: 1px solid #555;
  color: #ccc;
  font-size: 12px;
  padding: 3px 10px;
  cursor: pointer;
  width: auto;
  line-height: normal;
}
.gc-toast-btns button:hover { border-color: #a78bfa; color: #fff; }
.gc-toast-close {
  position: absolute;
  top: 2px;
  right: 2px;
  background: none;
  border: none;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  width: 20px;
  line-height: 20px;
  padding: 0;
}
.gc-toast-close:hover { color: #fff; }

/* Mode/stop buttons share the zoom button look */
.gc-stop-btn:hover { background: rgba(128,20,20,0.7); }
.gc-stop-btn i, .gc-mode-btn i { font-size: 14px; }

/* Selects were missing from the input resets, so system themes made them huge */
.gc-shell select {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 1px 2px !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  font-size: inherit !important;
  font-family: inherit !important;
  background: #fff !important;
  color: #000 !important;
  border: none !important;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff !important;
}

/* Database app */
.gc-db-select { font-size: inherit; max-width: 130px; }
.gc-db-count { padding: 3px 6px; font-size: inherit; color: var(--gc-text, #000); opacity: 0.7; }
.gc-db-querying { animation: gcDbBlink 0.6s steps(2) infinite; }
@keyframes gcDbBlink { 50% { opacity: 0.3; } }
.gc-db-table { width: 100%; border-collapse: collapse; font-size: inherit; }
.gc-db-table th {
  background: var(--gc-face, #c0c0c0);
  color: var(--gc-text, #000);
  text-align: left;
  font-weight: normal;
  padding: 2px 6px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #404040;
  position: sticky;
  top: 0;
}
.gc-db-table td {
  padding: 2px 6px;
  color: var(--gc-text, #000);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.gc-db-table tbody tr:hover td,
.gc-db-table tbody tr.gc-hover td { background: #000080 !important; color: #fff !important; }
.gc-db-rec-head {
  background: var(--gc-select, #000080);
  color: #fff;
  padding: 3px 8px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}
.gc-db-rec-body { display: flex; gap: 10px; padding: 8px; }
.gc-db-photo {
  width: 96px;
  height: 112px;
  object-fit: cover;
  border: 2px inset #808080;
  background: #333;
  flex-shrink: 0;
}
.gc-db-grid { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-content: start; flex: 1; min-width: 0; }
.gc-db-k { color: var(--gc-text, #000); opacity: 0.65; font-size: inherit; }
.gc-db-v { color: var(--gc-text, #000); font-size: inherit; word-break: break-word; }
.gc-db-redacted { background: #111; color: #111 !important; letter-spacing: 2px; padding: 0 6px; user-select: none; box-shadow: 0 0 0 1px #666; }
.gc-db-redtag { color: #c03030; font-size: 0.8em; margin-left: 4px; }
.gc-db-notes {
  margin: 0 8px 8px;
  padding: 6px;
  background: var(--gc-face, #c0c0c0);
  color: var(--gc-text, #000);
  white-space: pre-wrap;
  font-size: inherit;
}
.gc-db-link { text-decoration: underline; cursor: pointer; font-weight: bold; color: inherit; }
.gc-db-dim { opacity: 0.45; font-style: italic; }
.gc-db-edit { cursor: text; }
.gc-db-v.gc-db-edit:hover, .gc-db-notes.gc-db-edit:hover { outline: 1px dotted #808080; }
.gc-db-chips { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 0 8px 8px; }
.gc-db-chip {
  background: var(--gc-face, #c0c0c0);
  color: var(--gc-text, #000);
  padding: 1px 8px;
  cursor: pointer;
  font-weight: normal;
  text-decoration: none;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #404040;
}
.gc-db-chip:hover, .gc-db-chip.gc-hover { background: #000080; color: #fff; }
.gc-db-recbtns { display: flex; gap: 4px; padding: 0 8px 8px; }
.gc-db-recbtns button {
  padding: 2px 10px;
  border: none;
  background: var(--gc-face, #c0c0c0);
  color: var(--gc-text, #000);
  cursor: pointer;
  font-size: inherit;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #404040;
}

/* NetMeeting; scheme CSS overrides these per color scheme */
.gc-nm-chat { background: #fff; color: #000; }
.gc-nm-chat span { color: #000; }
.gc-nm-typing { background: #c0c0c0; color: #444; }
.gc-nm-inputbar { background: #c0c0c0; }
.gc-nm-input { background: #fff; color: #000; }
.gc-nm-send { background: #c0c0c0; color: #000; }
.gc-nm-name-me { color: #000080; }
.gc-nm-name-them { color: #800000; }
.gc-nm-sys { color: #666; }

/* ---- Fallout terminal theme ---- */

.gc-fallout {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* The tube is never black: a green wash brightest above center, like the
   in-game terminals */
.hg-theme-fallout .hg-shell.gc-fallout {
  background: radial-gradient(ellipse at 50% 30%, #0c3a21 0%, #082e1a 45%, #03130a 85%, #020804 100%) !important;
}

.gc-fallout .gc-fallout-area {
  position: absolute;
  inset: 0;
  padding: 26px 38px 52px;
  /* HG's fallout game-area says overflow hidden; the terminal must scroll */
  overflow-y: auto !important;
  overscroll-behavior: contain;
  color: var(--hg-text);
  font-family: var(--hg-font);
  font-size: 21px;
  line-height: 1.35;
  cursor: default;
  text-transform: none;
  letter-spacing: 1px;
  word-spacing: 0.3em;
  -webkit-text-stroke: 0.35px currentColor;
  text-shadow: 0 0 1px rgba(91, 248, 112, 0.9), 0 0 9px rgba(91, 248, 112, 0.4);
}

/* Soft phosphor bloom behind the header area */
.gc-fallout .gc-fallout-area::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 20%, rgba(91, 248, 112, 0.09) 0%, transparent 55%);
}

/* The native scrollbar runs the whole edge and pokes past the curved
   bezel, so it is hidden and replaced by a blocky phosphor segment that
   stays inside the tube */
.gc-fallout .gc-fallout-area {
  scrollbar-width: none;
}
.gc-fallout .gc-fallout-area::-webkit-scrollbar { display: none; }

.gc-fallout .gc-fo-scroll {
  position: absolute;
  top: 96px;
  bottom: 70px;
  right: 18px;
  width: 12px;
  z-index: 6;
  pointer-events: none;
}
.gc-fallout .gc-fo-scroll-thumb {
  position: absolute;
  left: 0;
  width: 100%;
  height: 34px;
  background-color: var(--hg-text);
  background-image: repeating-linear-gradient(to bottom, transparent 0 6px, rgba(4, 28, 14, 0.55) 6px 9px);
  box-shadow: 0 0 10px rgba(91, 248, 112, 0.5);
}

.gc-fo-head { margin-bottom: 12px; text-transform: uppercase; }
.gc-fo-title { text-align: center; letter-spacing: 2px; }
.gc-fo-sub { text-align: center; }
.gc-fo-welcome { margin-top: 0.7em; text-transform: none; }
.gc-fo-rule {
  border-bottom: 2px solid var(--hg-text);
  box-shadow: 0 0 6px rgba(91, 248, 112, 0.5);
  margin: 2px 0 8px;
}

.gc-fo-row {
  padding: 1px 8px;
  cursor: pointer;
  white-space: pre-wrap;
}
/* Selected entry: solid phosphor bar with the scanlines showing through,
   dark text, light spill around the bar */
.gc-fo-row:hover {
  background-color: var(--hg-text);
  background-image: repeating-linear-gradient(to bottom, rgba(4, 28, 14, 0.35) 0 1px, transparent 1px 3px);
  color: #052c16;
  -webkit-text-stroke: 0.35px #052c16;
  text-shadow: none;
  box-shadow: 0 0 16px rgba(91, 248, 112, 0.5);
}
.gc-fo-row.gc-fo-static { cursor: default; }
.gc-fo-row.gc-fo-static:hover {
  background: none;
  color: var(--hg-text);
  -webkit-text-stroke: 0.35px currentColor;
  box-shadow: none;
}
.gc-fo-dim { color: var(--hg-dim); }

/* Idle prompt blinking at the foot of the screen */
.gc-fallout .gc-fo-prompt {
  position: absolute;
  left: 38px;
  bottom: 16px;
  color: var(--hg-text);
  font-family: var(--hg-font);
  font-size: 21px;
  text-shadow: 0 0 1px rgba(91, 248, 112, 0.9), 0 0 9px rgba(91, 248, 112, 0.4);
  pointer-events: none;
  z-index: 5;
}
.gc-fallout .gc-fo-prompt::after {
  content: '■';
  margin-left: 8px;
  animation: hgFalloutCursor 1s step-end infinite;
}

.gc-fo-note {
  padding: 1px 6px;
  min-height: 1.3em;
  white-space: pre-wrap;
}

.gc-fo-body { margin-top: 4px; }

.gc-fo-text {
  padding: 2px 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-transform: none;
}

.gc-fo-field { padding: 1px 6px; white-space: pre-wrap; }

.gc-fo-promptline {
  display: flex;
  align-items: baseline;
  padding: 1px 6px;
}
.gc-fallout .gc-fo-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--hg-text) !important;
  font-family: var(--hg-font) !important;
  font-size: inherit !important;
  text-transform: uppercase;
  caret-color: var(--hg-text);
  padding: 0;
  height: auto;
}

/* Images read like they're on the phosphor tube */
.gc-fo-img {
  display: block;
  max-width: 92%;
  max-height: 330px;
  margin: 8px auto;
  border: 1px solid var(--hg-dim);
  filter: grayscale(1) sepia(1) hue-rotate(60deg) saturate(2.4) brightness(0.95) contrast(1.05);
}

/* GM text editor on the live terminal */
.gc-fallout .gc-fo-edit {
  width: 100%;
  min-height: 9em;
  margin: 4px 0;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid var(--hg-dim) !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--hg-text) !important;
  font-family: var(--hg-font) !important;
  font-size: inherit !important;
  line-height: 1.3;
  resize: vertical;
}
