/* ==========================================================
   REPUBLIC OF UBIKISTAN :: OFFICIAL SERVER
   Stylesheet rev. 2.1 (Product Age palette: teal, red, gold)
   Maintained by the State Archive, Web Section.
   Nothing crosses the ring. It is never filled.
   ========================================================== */

body {
  margin: 0;
  padding: 12px 0 40px;
  background-color: #004d4d;
  /* tiled background: small double rings, like a 1999 wallpaper.gif */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Crect width='48' height='48' fill='%23004d4d'/%3E%3Ccircle cx='24' cy='24' r='9' fill='none' stroke='%23006666' stroke-width='3'/%3E%3Ccircle cx='24' cy='24' r='5' fill='none' stroke='%23005a5a' stroke-width='1.5'/%3E%3Ccircle cx='0' cy='0' r='3' fill='%23005a5a'/%3E%3Ccircle cx='48' cy='48' r='3' fill='%23005a5a'/%3E%3C/svg%3E");
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  color: #000;
}

a:link    { color: #0000cc; }
a:visited { color: #660099; }
a:hover   { color: #cc0000; background: #ffff99; }
a:active  { color: #ff0000; }

table.frame {
  background: #f4efdf;
  border: 3px outset #c9b98a;
  box-shadow: 6px 6px 0 #002626;
}

/* ---------- banner ---------- */
td.banner {
  background: #330033;
  background: linear-gradient(#3d0a3d, #1e001e);
  border-bottom: 4px double #cc9900;
  padding: 10px 14px;
  color: #f4efdf;
}
.banner h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  letter-spacing: 4px;
  white-space: nowrap;
  color: #ffcc33;
  text-shadow: 2px 2px 0 #990000, 4px 4px 0 #000;
}
.banner .sub {
  font-family: Verdana, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #cccc99;
}
.banner .motto {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #ff6666;
}
.banner .est { cursor: help; border-bottom: 1px dotted #996699; }

/* the spinning ring "gif" */
.spinring {
  display: inline-block;
  width: 72px; height: 72px;
  animation: coin 3.2s linear infinite;
}
@keyframes coin {
  0%   { transform: scaleX(1); }
  25%  { transform: scaleX(0.08); }
  50%  { transform: scaleX(-1); }
  75%  { transform: scaleX(-0.08); }
  100% { transform: scaleX(1); }
}

/* ---------- ticker ---------- */
td.ticker {
  background: #000;
  color: #33ff33;
  font-family: "Courier New", monospace;
  font-size: 13px;
  padding: 3px 0;
  border-bottom: 2px solid #cc0000;
}
.ticker b { color: #ffcc33; }

/* ---------- columns ---------- */
td.nav {
  background: #d4d0c8;
  border-right: 2px groove #fff;
  padding: 8px 6px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 11px;
}
td.side {
  background: #e8e0c8;
  border-left: 2px groove #fff;
  padding: 8px 6px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 11px;
}
td.main {
  background: #fffdf5;
  padding: 14px 18px 24px;
  line-height: 1.4;
}

.navhead, .boxhead {
  background: #008080;
  background: linear-gradient(90deg, #006666, #00a0a0);
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  padding: 2px 4px;
  margin: 10px 0 4px;
  letter-spacing: 1px;
}
.navhead:first-child, .boxhead:first-child { margin-top: 0; }
.boxhead.red  { background: linear-gradient(90deg, #880000, #cc3333); }
.boxhead.gold { background: linear-gradient(90deg, #8a6a00, #cc9900); }
.boxhead.purp { background: linear-gradient(90deg, #330033, #663366); }

a.btn {
  display: block;
  margin: 3px 0;
  padding: 3px 6px;
  background: #d4d0c8;
  border: 2px outset #fff;
  color: #000;
  text-decoration: none;
  font-weight: bold;
}
a.btn:hover  { background: #ffffcc; color: #cc0000; }
a.btn:active { border-style: inset; }
a.btn.here   { background: #cc0000; color: #fff; border-style: inset; }
a.btn .bullet { color: #cc0000; }
a.btn.here .bullet { color: #ffcc33; }

/* ---------- content ---------- */
.main h2 {
  font-family: Georgia, "Times New Roman", serif;
  color: #660033;
  font-size: 24px;
  margin: 0 0 6px;
  border-bottom: 2px solid #cc9900;
}
.main h3 {
  font-family: Arial, Helvetica, sans-serif;
  color: #006666;
  font-size: 15px;
  margin: 18px 0 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.code { font-family: "Courier New", monospace; font-size: 12px; color: #555; }
.small { font-size: 11px; }
.tiny  { font-size: 9px; color: #777; }
.center { text-align: center; }
hr.rule {
  border: 0; height: 6px; margin: 16px 0;
  background: repeating-linear-gradient(90deg, #cc0000 0 6px, transparent 6px 10px, #cc9900 10px 16px, transparent 16px 20px);
}

table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
table.grid th {
  background: #330033; color: #ffcc33;
  font-family: Arial, sans-serif; font-size: 11px;
  text-align: left; padding: 3px 5px; letter-spacing: 1px;
}
table.grid td { border: 1px solid #c9b98a; padding: 3px 5px; vertical-align: top; }
table.grid tr:nth-child(even) td { background: #f6f0dc; }

img.photo {
  border: 2px solid #000;
  padding: 3px;
  background: #fff;
  box-shadow: 3px 3px 0 #999;
}
.caption { font-size: 11px; font-family: Arial, sans-serif; color: #444; }

.status { font-family: "Courier New", monospace; font-size: 10px; padding: 0 3px; border: 1px solid; }
.status.auth { color: #006600; border-color: #006600; }
.status.inc  { color: #996600; border-color: #996600; }
.status.dis  { color: #cc0000; border-color: #cc0000; }
.status.apo  { color: #660099; border-color: #660099; }
.status.spec { color: #006666; border-color: #006666; }

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

.new {
  display: inline-block;
  background: #ff0000; color: #ffff00;
  font: bold 9px Verdana, sans-serif;
  padding: 0 3px;
  transform: rotate(-8deg);
  animation: blink 0.8s steps(1) infinite;
}

.construction {
  border: 2px solid #000;
  background: repeating-linear-gradient(45deg, #ffcc00 0 10px, #000 10px 20px);
  padding: 4px;
}
.construction span {
  display: block; background: #ffcc00; color: #000;
  font: bold 11px Verdana, sans-serif; text-align: center; padding: 3px;
}

.notice {
  border: 2px dashed #cc0000;
  background: #fff4f4;
  padding: 6px 8px;
  margin: 10px 0;
  font-size: 13px;
}

.quote {
  font-family: Georgia, serif; font-style: italic;
  font-size: 17px; color: #330033;
  border-left: 4px solid #cc0000;
  margin: 10px 0; padding: 2px 10px;
}

/* ---------- side widgets ---------- */
.counter {
  display: inline-block;
  background: #000;
  border: 2px inset #888;
  padding: 2px;
  cursor: pointer;
  user-select: none;
}
.counter span {
  display: inline-block;
  width: 13px;
  background: linear-gradient(#222, #000 50%, #222);
  color: #ff3300;
  font: bold 16px "Courier New", monospace;
  text-align: center;
  margin: 0 1px;
}

input.txt, select.txt, textarea.txt {
  font: 12px "MS Sans Serif", Tahoma, Arial, sans-serif;
  border: 2px inset #fff;
  background: #fff;
  padding: 2px;
}
button.w95, input.w95 {
  font: 11px "MS Sans Serif", Tahoma, Arial, sans-serif;
  background: #d4d0c8;
  border: 2px outset #fff;
  padding: 2px 8px;
  cursor: pointer;
}
button.w95:active, input.w95:active { border-style: inset; }

.player {
  background: #222; color: #0f0;
  border: 2px outset #888;
  padding: 4px;
  font: 10px "Courier New", monospace;
}
.player .lcd {
  background: #001a00; border: 1px inset #444;
  padding: 2px 3px; margin-bottom: 3px; white-space: nowrap; overflow: hidden;
}
.player button {
  font: bold 10px Verdana, sans-serif;
  background: #555; color: #fff; border: 2px outset #888; cursor: pointer; padding: 0 5px;
}

/* 88x31 buttons */
.badge {
  display: inline-block;
  width: 88px; height: 31px;
  box-sizing: border-box;
  border: 1px solid #000;
  font: bold 9px/1.1 Verdana, Arial, sans-serif;
  text-align: center;
  vertical-align: middle;
  margin: 2px 1px;
  padding-top: 4px;
  overflow: hidden;
  text-decoration: none;
}
.badge.b1 { background: linear-gradient(#ffffff, #d8d2c0); color: #cc0000; }
.badge.b2 { background: #000; color: #33ff33; font-family: "Courier New", monospace; }
.badge.b3 { background: linear-gradient(#004080, #0080c0); color: #fff; }
.badge.b4 { background: #330033; color: #ffcc33; }
.badge.b5 { background: #ffcc00; color: #000; }
.badge.b6 { background: linear-gradient(90deg, #cc0000, #880000); color: #fff; }

/* ---------- footer ---------- */
td.footer {
  background: #330033;
  color: #cccc99;
  font-family: Verdana, Arial, sans-serif;
  font-size: 10px;
  text-align: center;
  padding: 8px;
  border-top: 4px double #cc9900;
}
td.footer a { color: #ffcc33; }
td.footer a.hush { color: #330033; text-decoration: none; cursor: default; }
.webring {
  display: inline-block;
  border: 2px ridge #cc9900;
  background: #1e001e;
  padding: 4px 8px;
  margin: 6px 0;
}

/* ---------- Win98 dialog ---------- */
.dlg {
  position: fixed;
  z-index: 9000;
  min-width: 300px; max-width: 460px;
  background: #d4d0c8;
  border: 2px outset #fff;
  box-shadow: 2px 2px 0 #000;
  font: 12px Tahoma, "MS Sans Serif", Arial, sans-serif;
}
.dlg .bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff; font-weight: bold;
  padding: 3px 4px;
  cursor: move;
  user-select: none;
  display: flex; justify-content: space-between; align-items: center;
}
.dlg .bar .x {
  background: #d4d0c8; color: #000; border: 2px outset #fff;
  font: bold 10px Arial; width: 16px; height: 14px; line-height: 10px;
  text-align: center; cursor: pointer; padding: 0;
}
.dlg .body { padding: 12px; display: flex; gap: 12px; align-items: flex-start; }
.dlg .body .icon { font-size: 28px; line-height: 1; }
.dlg .btns { text-align: center; padding: 0 0 10px; }
.dlg .btns button { min-width: 72px; margin: 0 3px; }
.dlg pre { font-size: 11px; background: #fff; border: 2px inset #fff; padding: 4px; margin: 6px 0 0; white-space: pre-wrap; }

.progress { border: 2px inset #fff; height: 16px; background: #fff; margin-top: 8px; padding: 1px; }
.progress div { height: 100%; width: 0; background: repeating-linear-gradient(90deg, #000080 0 9px, transparent 9px 11px); }

/* ---------- AIXBT assistant ---------- */
.assistant {
  position: fixed; right: 18px; bottom: 18px; z-index: 8000;
  display: flex; align-items: flex-end; gap: 6px;
  font: 12px Tahoma, Arial, sans-serif;
  animation: bob 2.4s ease-in-out infinite;
}
.assistant .bubble {
  background: #ffffcc; border: 1px solid #000; border-radius: 8px;
  padding: 8px 10px; max-width: 230px; box-shadow: 2px 2px 0 #666;
}
.assistant .bubble button { margin-top: 6px; }
.assistant img { border: 2px solid #000; image-rendering: pixelated; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* ---------- cursor trail ---------- */
.trail {
  position: fixed; pointer-events: none; z-index: 9999;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%;
  border: 2px solid #cc0000;
  box-shadow: inset 0 0 0 2px #ffcc33;
  opacity: .8;
}

/* ---------- entropy (idle decay) ---------- */
html.decay-1 body { filter: sepia(.6) saturate(.6); transition: filter 6s; }
html.decay-2 body { filter: grayscale(1) contrast(.7) blur(.6px); transition: filter 6s; }
html.decay-2 img  { opacity: .35; transition: opacity 6s; }
html.decay-3 body { filter: grayscale(1) contrast(.35) blur(1.4px) brightness(1.3); transition: filter 6s; }
html.decay-3 img  { opacity: .05; }
html.decay-3 .main p, html.decay-3 .main li, html.decay-3 .main td { letter-spacing: 2px; color: #bbb; transition: all 8s; }
.restore-ring {
  position: fixed; z-index: 9500;
  left: 50%; top: 50%;
  width: 120px; height: 120px; margin: -60px 0 0 -60px;
  cursor: pointer;
  animation: pulse 1.6s ease-in-out infinite;
  filter: none !important;
}
.restore-ring .tip {
  position: absolute; top: 128px; left: -60px; width: 240px;
  text-align: center; font: bold 11px "Courier New", monospace; color: #cc0000;
  background: #fff; border: 1px solid #cc0000; padding: 2px;
}
@keyframes pulse { 50% { transform: scale(1.08); } }

/* ---------- Day of Absence ---------- */
.absence {
  position: fixed; inset: 0; z-index: 9800;
  background: #fff; color: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font: 14px "Courier New", monospace; text-align: center;
}
.absence h1 { font: bold 22px "Courier New", monospace; letter-spacing: 3px; margin: 20px 0 8px; }

/* ---------- TV static ---------- */
canvas.static { display: block; image-rendering: pixelated; border: 6px solid #333; border-radius: 14px; background: #000; }
.tv {
  display: inline-block; background: #5a4a3a; padding: 14px 14px 10px; border-radius: 18px;
  border: 3px outset #7a6a5a;
}
.tv .knobs { text-align: right; margin-top: 6px; }
.tv .knobs button { font: bold 11px Arial; border-radius: 50%; width: 26px; height: 26px; background: #222; color: #ccc; border: 2px outset #555; cursor: pointer; margin-left: 3px; }
.tv .knobs button.on { color: #ffcc33; border-style: inset; }
.tv .screen { position: relative; width: 320px; height: 240px; overflow: hidden; border-radius: 14px; border: 6px solid #222; background: #000; }
.tv .screen img, .tv .screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tv .screen .osd {
  position: absolute; left: 10px; top: 8px; color: #33ff33;
  font: bold 18px "Courier New", monospace; text-shadow: 2px 2px #000; z-index: 2;
}
.tv .screen .cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  background: rgba(0,0,0,.7); color: #fff; font: 11px "Courier New", monospace; padding: 4px 6px;
}
.tv .screen::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0,0,0,.25) 2px 3px);
}

/* ---------- passport stamp ---------- */
.stamp {
  display: inline-block;
  border: 3px double #5a2d82;
  color: #5a2d82;
  font: bold 12px "Courier New", monospace;
  padding: 8px 12px;
  text-align: center;
  transform: rotate(-6deg);
  border-radius: 10px;
  margin: 10px;
  background: rgba(90,45,130,.05);
  letter-spacing: 1px;
}

/* ---------- guestbook ---------- */
.gb-entry { border: 1px solid #c9b98a; background: #fff; margin: 8px 0; }
.gb-entry .hd { background: #e8e0c8; padding: 2px 6px; font: 11px Verdana, sans-serif; display: flex; justify-content: space-between; }
.gb-entry .bd { padding: 6px 8px; font-size: 14px; }

/* ---------- Station 6 ---------- */
body.s6 { background: #000; color: #000; font-family: "Courier New", monospace; }
body.s6 .wrap { width: 640px; margin: 40px auto; }
body.s6 h1 { color: #fff; font-size: 20px; letter-spacing: 4px; }
body.s6 .hidden { color: #000; }
body.s6 ::selection { background: #cc0000; color: #fff; }
body.s6 a { color: #000; }
body.s6 .fail { animation: fail .12s steps(2) infinite; }
@keyframes fail { 50% { transform: translate(3px, -2px); filter: invert(1); } }
