/* ============================================================
   ПАСХАЛКИ: терминал / MS-DOS / DOOM
   ============================================================ */

/* --- интерактивный терминал --- */
.term { cursor: text; }
.term.term-focus { border-color: var(--accent); box-shadow: 0 24px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(41,227,255,0.35); }
.term-hidden-input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
  border: 0; padding: 0; left: -9999px;
}
.term-body { max-height: 268px; overflow-y: auto; }

/* --- оверлей MS-DOS --- */
body.dos-open { overflow: hidden; }

.dos-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: dos-in 0.15s ease;
}
@keyframes dos-in { from { opacity: 0; } }

.dos-window {
  width: min(720px, 100%);
  background: #000;
  border: 2px solid #aaa;
  box-shadow: 0 0 0 2px #000, 0 20px 80px rgba(0,0,0,0.9);
  font-family: "Courier New", "IBM Plex Mono", monospace;
}
.dos-titlebar {
  display: flex; justify-content: space-between; align-items: center;
  background: #aaa; color: #000;
  padding: 3px 10px;
  font-size: 14px; font-weight: 700;
}
.dos-close {
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 14px; color: #000;
}
.dos-close:hover { background: #d00; color: #fff; }

.dos-screen {
  background: #0000a8;            /* классический синий */
  color: #ffffff;
  padding: 16px 20px;
  min-height: 380px;
  display: flex; flex-direction: column;
  font-size: 15px; line-height: 1.5;
  text-shadow: 0 0 6px rgba(120,160,255,0.35);
}
.dos-header { white-space: pre; color: #55ffff; margin-bottom: 12px; }
.dos-list { flex: 1; overflow-y: auto; white-space: pre; max-height: 300px; }
.dos-row { padding: 0 6px; cursor: pointer; }
.dos-row:hover { background: rgba(255,255,255,0.12); }
.dos-row.sel { background: #00aaaa; color: #000; text-shadow: none; }
.dos-hint { margin-top: 12px; color: #ffff55; font-size: 13px; }

/* CRT-скан-линии */
.dos-screen { position: relative; }
.dos-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 1px, transparent 1px 3px);
}

/* --- диалог "доступ запрещен" --- */
.dos-dialog {
  position: fixed; inset: 0; z-index: 1001;
  display: flex; align-items: center; justify-content: center;
}
.dos-dialog[hidden] { display: none; }
.dos-dialog-box {
  background: #aaaaaa; color: #000;
  border: 2px solid #fff;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.7);
  width: min(420px, 90vw);
  font-family: "Courier New", monospace;
}
.dos-dialog-title {
  background: #a80000; color: #fff;
  text-align: center; font-weight: 700;
  padding: 3px; font-size: 14px; letter-spacing: 0.1em;
}
.dos-dialog-text {
  padding: 16px 20px; white-space: pre-wrap;
  font-size: 14px; line-height: 1.5;
}
.dos-dialog-btn {
  text-align: center; padding: 8px 0 14px;
  font-weight: 700; cursor: pointer; font-size: 14px;
}
.dos-dialog-btn:hover { color: #a80000; }

/* --- DOOM --- */
.doom-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.doom-frame {
  width: min(960px, 100%);
  display: flex; flex-direction: column;
  border: 2px solid #555;
  background: #000;
  box-shadow: 0 30px 100px rgba(255,46,99,0.25);
}
.doom-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: #1a1a1a; color: #ff4444;
  font-family: var(--f-mono, monospace); font-size: 13px; font-weight: 700;
  padding: 8px 14px;
}
.doom-close {
  background: none; border: 1px solid #ff4444; color: #ff4444;
  font-family: inherit; font-size: 12px; font-weight: 700;
  padding: 4px 10px; cursor: pointer;
}
.doom-close:hover { background: #ff4444; color: #000; }
.doom-frame iframe {
  width: 100%; aspect-ratio: 4 / 3; max-height: 75vh;
  border: 0; background: #000;
}

@media (max-width: 560px) {
  .dos-screen { font-size: 12px; padding: 12px; min-height: 300px; }
  .dos-list { max-height: 240px; }
}
