/* ============================================================
   ЧЕТЫРЕ ИГРЫ, КОТОРЫХ ПОЧТИ НЕТ
   Стилистика: GeoCities / Web 1.0, 1996-2001
   Никаких внешних зависимостей. Всё локально.
   ============================================================ */

/* ---------- КУРСОРЫ ---------- */
html, body {
  cursor: url("../assets/cursors/arrow.png") 0 0, auto;
}
a, button, .btn, .portal, summary, .tab {
  cursor: url("../assets/cursors/hand.png") 10 0, pointer;
}
body.loading, .waiting {
  cursor: url("../assets/cursors/wait.png") 16 16, wait;
}

/* ---------- БАЗА ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background-color: #000018;
  background-image: url("../assets/img/bg_starfield_stars_background_1.gif");
  background-repeat: repeat;
  color: #d8d8ff;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

body.page-game {
  background-image: url("../assets/img/bg_black_background_pattern_3.gif");
}

img { border: 0; image-rendering: pixelated; max-width: 100%; }

a { color: #00ffff; text-decoration: underline; }
a:visited { color: #ff80ff; }
a:hover { color: #ffff00; background: #202060; }
a:active { color: #ff0000; }

hr {
  border: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    #ff00ff 0 8px, #00ffff 8px 16px, #ffff00 16px 24px, #00ff00 24px 32px);
  margin: 18px 0;
}

/* ---------- ТИПОГРАФИКА ---------- */
h1, h2, h3, h4 {
  font-family: "Comic Sans MS", "Segoe UI", cursive, sans-serif;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

h1 {
  font-size: 40px;
  color: #ffff00;
  text-shadow: 3px 3px 0 #ff00ff, 6px 6px 0 #000;
  letter-spacing: 1px;
}

h2 {
  font-size: 26px;
  color: #00ff66;
  text-shadow: 2px 2px 0 #000, 0 0 10px #00ff66;
}

h3 {
  font-size: 20px;
  color: #ffcc00;
  text-shadow: 2px 2px 0 #000;
}

.mono { font-family: "Courier New", Courier, monospace; }

/* ---------- МИГАНИЕ И БЕГУЩАЯ СТРОКА ---------- */
@keyframes blinker { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.blink { animation: blinker 1s steps(1) infinite; }

@keyframes rainbow {
  0%   { color: #ff0000; } 16% { color: #ffff00; } 33% { color: #00ff00; }
  50%  { color: #00ffff; } 66% { color: #0066ff; } 83% { color: #ff00ff; }
  100% { color: #ff0000; }
}
.rainbow { animation: rainbow 3s linear infinite; font-weight: bold; }

.marquee-box {
  overflow: hidden;
  white-space: nowrap;
  border-top: 2px solid #00ff00;
  border-bottom: 2px solid #00ff00;
  background: #000;
  padding: 5px 0;
}
.marquee-box > span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 26s linear infinite;
  font-family: "Courier New", monospace;
  color: #00ff00;
  font-size: 15px;
}
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.marquee-box:hover > span { animation-play-state: paused; }

/* ---------- ОКНО В СТИЛЕ WIN95 ---------- */
.win {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  color: #000;
  margin: 0 0 20px 0;
  box-shadow: 4px 4px 0 rgba(0,0,0,.6);
}
.win > .title {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-family: "Tahoma", "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: bold;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.win > .title .ctrls { display: flex; gap: 3px; }
.win > .title .ctrls b {
  display: inline-block;
  width: 17px; height: 15px;
  background: #c0c0c0;
  border: 1px outset #dfdfdf;
  color: #000;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  line-height: 13px;
}
.win > .body {
  padding: 12px;
  background: #fffff0;
  font-family: "Times New Roman", serif;
  color: #101010;
}
.win > .body a { color: #0000ee; background: none; }
.win > .body a:visited { color: #551a8b; }
.win > .body a:hover { color: #000; background: #ffff00; }

/* ---------- ЛЕЙАУТ ---------- */
.wrap { max-width: 1000px; margin: 0 auto; padding: 10px; }

.shell {
  border: 6px ridge #808000;
  background: rgba(0,0,20,.82);
  padding: 14px;
}

table.layout { width: 100%; border-collapse: separate; border-spacing: 10px; }
table.layout > tbody > tr > td { vertical-align: top; }

/* ---------- ПОРТАЛЫ НА ГЛАВНОЙ ---------- */
.portal {
  display: block;
  border: 4px outset #666;
  background: #101028;
  padding: 10px;
  text-decoration: none;
  position: relative;
  transition: transform .12s;
}
.portal:hover {
  border-style: inset;
  background: #1c1c48;
  transform: scale(1.02);
}
.portal .pt {
  font-family: "Comic Sans MS", cursive;
  font-size: 19px;
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}
.portal .py { font-family: "Courier New", monospace; font-size: 12px; color: #9090c0; }
.portal .pd { color: #ddddff; font-size: 14px; display: block; margin-top: 6px; }
.portal .badge {
  position: absolute; top: -10px; right: -8px;
  font-family: "Courier New", monospace; font-size: 10px;
  padding: 2px 5px; border: 1px solid #000; font-weight: bold;
}
.badge.buy  { background: #00ff00; color: #000; }
.badge.play { background: #ffff00; color: #000; }
.badge.arch { background: #ff9900; color: #000; }
.badge.dead { background: #ff0033; color: #fff; }

.p-dg  .pt { color: #ff5555; } .p-dg:hover  { box-shadow: 0 0 18px #ff0000; }
.p-mo  .pt { color: #55ff88; } .p-mo:hover  { box-shadow: 0 0 18px #00ff66; }
.p-km  .pt { color: #ffcc44; } .p-km:hover  { box-shadow: 0 0 18px #ffaa00; }
.p-im  .pt { color: #66ccff; } .p-im:hover  { box-shadow: 0 0 18px #0099ff; }

/* ---------- КНОПКИ 88x31 И ССЫЛКИ-КНОПКИ ---------- */
.btn88 {
  display: inline-block;
  width: 88px; height: 31px;
  border: 1px solid #888;
  font-family: "Small Fonts", "Courier New", monospace;
  font-size: 10px;
  line-height: 10px;
  text-align: center;
  text-decoration: none;
  padding: 4px 2px;
  margin: 3px;
  overflow: hidden;
  vertical-align: middle;
}
.btn88:hover { border-color: #ffff00; background: #222; }

.btn {
  display: inline-block;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  color: #000 !important;
  font-family: "Tahoma", sans-serif;
  font-size: 13px;
  font-weight: bold;
  padding: 5px 14px;
  margin: 4px 4px 4px 0;
  text-decoration: none;
}
.btn:hover { background: #d8d8d8; color: #000 !important; }
.btn:active { border-style: inset; }
.btn.go { background: #00cc44; border-color: #66ff99 #006622 #006622 #66ff99; color: #000 !important; }
.btn.warn { background: #ffcc00; border-color: #ffee88 #886600 #886600 #ffee88; }
.btn.dead { background: #999; color: #444 !important; }

/* ---------- СЧЁТЧИК ПОСЕЩЕНИЙ ---------- */
.counter {
  display: inline-block;
  background: #000;
  border: 2px inset #666;
  padding: 3px 5px;
  font-family: "Courier New", monospace;
  font-size: 20px;
  font-weight: bold;
  color: #00ff00;
  letter-spacing: 4px;
  text-shadow: 0 0 6px #00ff00;
}

/* ---------- ТАБЛИЦЫ ДАННЫХ ---------- */
table.data { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
table.data th, table.data td { border: 1px solid #808080; padding: 6px 8px; text-align: left; vertical-align: top; }
table.data th { background: #000080; color: #fff; font-family: "Tahoma", sans-serif; }
table.data tr:nth-child(even) td { background: #eeeee0; }

/* ---------- ПРЕДУПРЕЖДЕНИЯ ---------- */
.alert {
  border: 3px double #ff0000;
  background: #fff0f0;
  color: #800000;
  padding: 10px 12px;
  margin: 12px 0;
}
.alert b { color: #cc0000; }
.note {
  border-left: 5px solid #0000aa;
  background: #f0f0ff;
  color: #000040;
  padding: 8px 12px;
  margin: 12px 0;
}

/* ---------- ВЕБРИНГ ---------- */
.webring {
  border: 3px ridge #00ffff;
  background: #001030;
  padding: 10px;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

/* ---------- ВСТРАИВАНИЕ ---------- */
.embed-box { background: #000; border: 3px inset #888; padding: 6px; margin: 12px 0; }
.embed-box iframe { display: block; width: 100%; border: 0; background: #111; }
.embed-hint { font-family: "Courier New", monospace; font-size: 12px; color: #9999cc; margin-top: 6px; }

/* ---------- ФАКТ-БЛОКИ И МИКРОИНТЕРАКТИВЫ ---------- */
.fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.fact-card { border: 2px outset #dfdfdf; background: #e8e8d8; padding: 9px; font-family: "Tahoma", sans-serif; font-size: 13px; }
.fact-card b { display: block; color: #000080; margin-bottom: 3px; }
.fact-card .mono { color: #660000; font-weight: bold; }
.details-box { margin: 12px 0; border: 2px groove #888; background: #f4f4e8; }
.details-box summary { padding: 7px 9px; font-family: "Tahoma", sans-serif; font-weight: bold; color: #000080; }
.details-box > div { padding: 0 10px 10px; }
.flow-box { border: 2px inset #666; background: #101018; color: #d8ffd8; padding: 12px; margin: 12px 0; font-family: "Courier New", monospace; }
.flow-step { display: none; }
.flow-step.active { display: block; }
.flow-step b { color: #88ff88; }

@media (max-width: 760px) { .fact-grid { grid-template-columns: 1fr; } }

/* ---------- ПОДВАЛ ---------- */
.footer {
  margin-top: 24px;
  border-top: 3px double #666;
  padding-top: 12px;
  font-size: 13px;
  color: #9999bb;
  text-align: center;
}
.footer a { color: #88ccff; }

/* ---------- СЛУЖЕБНОЕ ---------- */
.center { text-align: center; }
.small { font-size: 12px; }
.dim { color: #8888aa; }
.tag {
  display: inline-block; font-family: "Courier New", monospace; font-size: 11px;
  padding: 1px 5px; border: 1px solid currentColor; margin: 0 3px 3px 0;
}
.tag.ok { color: #00cc44; } .tag.no { color: #ff3355; } .tag.mid { color: #ffaa00; }

.gif-row { text-align: center; line-height: 0; margin: 8px 0; }
.gif-row img { margin: 0 3px; vertical-align: middle; }

.sound-toggle {
  position: fixed; right: 8px; bottom: 8px; z-index: 999;
  background: #c0c0c0; border: 2px outset #dfdfdf; color: #000;
  font-family: "Tahoma", sans-serif; font-size: 12px; padding: 5px 9px;
}
.sound-toggle:active { border-style: inset; }

/* ---------- МОБИЛЬНАЯ АДАПТАЦИЯ ---------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  h1 { font-size: 26px; text-shadow: 2px 2px 0 #ff00ff, 4px 4px 0 #000; }
  h2 { font-size: 21px; }
  .wrap { padding: 6px; }
  .shell { padding: 8px; border-width: 4px; }
  table.layout, table.layout > tbody, table.layout > tbody > tr, table.layout > tbody > tr > td {
    display: block; width: 100% !important;
  }
  table.layout { border-spacing: 0; }
  table.layout > tbody > tr > td { margin-bottom: 12px; }
  table.data { font-size: 13px; }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td, table.data.stack th {
    display: block; width: 100%;
  }
  table.data.stack thead { display: none; }
  table.data.stack td { border-top: 0; }
  table.data.stack tr { border: 1px solid #808080; margin-bottom: 8px; display: block; }
  .scroll-x { overflow-x: auto; }
  html, body, a, button, .btn, .portal { cursor: auto; }
}
