/* RatLair.com — early 2000s underground aesthetic */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #0a0a0a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect fill='%230a0a0a' width='40' height='40'/%3E%3Ccircle cx='2' cy='2' r='1' fill='%231a1210'/%3E%3C/svg%3E");
  color: #c8c0a8;
  font-family: "Verdana", "Geneva", "Arial", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

/* blink (RIP) */
.blink {
  animation: blink 1.2s step-start infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

a { color: #ffcc33; }
a:visited { color: #cc9933; }
a:hover { color: #ffff66; text-decoration: underline; }

/* ── Shell layout ── */
.page-wrap {
  max-width: 920px;
  margin: 0 auto;
  border-left: 3px double #4a3020;
  border-right: 3px double #4a3020;
  min-height: 100vh;
  background: #120e0c;
}

.top-banner {
  background: linear-gradient(180deg, #2a1810 0%, #1a1008 100%);
  border-bottom: 2px solid #6b4423;
  text-align: center;
  padding: 12px 12px 8px;
  position: relative;
}

.welcome-box h2 {
  margin-top: 0;
}

.top-banner .site-title {
  font-family: "Impact", "Arial Black", sans-serif;
  font-size: 42px;
  letter-spacing: 3px;
  color: #e8a040;
  text-shadow:
    2px 2px 0 #000,
    0 0 12px #ff6600,
    -1px -1px 0 #3a2000;
  margin: 0;
  line-height: 1.1;
}

.top-banner .tagline {
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: #887755;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 4px 0 0;
}

.marquee-bar {
  background: #000;
  color: #00ff66;
  font-family: "Courier New", monospace;
  font-size: 12px;
  border-top: 1px solid #003311;
  border-bottom: 1px solid #003311;
  padding: 3px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-bar .scroll {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 28s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* nav */
.nav-table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1410;
  border-bottom: 2px solid #5a3820;
}
.nav-table td {
  text-align: center;
  padding: 6px 4px;
  border-right: 1px solid #3a2818;
}
.nav-table td:last-child { border-right: none; }
.nav-table a {
  display: block;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  font-weight: bold;
  text-decoration: none;
  color: #ffcc66;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 6px;
}
.nav-table a:hover,
.nav-table a.active {
  background: #3a2010;
  color: #fff;
  box-shadow: inset 0 0 8px #ff6600;
}

/* content */
.content {
  padding: 16px 20px 40px;
}

h1.page-h {
  font-family: "Georgia", serif;
  font-size: 22px;
  color: #e8c070;
  border-bottom: 1px dashed #5a4030;
  padding-bottom: 6px;
  margin-top: 0;
}

h2 {
  font-size: 15px;
  color: #d4a050;
  margin-top: 1.4em;
}

.hr-ugly {
  border: none;
  border-top: 1px solid #4a3020;
  border-bottom: 1px solid #1a1008;
  height: 2px;
  margin: 14px 0;
}

/* landing cards */
.portal-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 12px;
  margin-top: 8px;
}
.portal-grid td {
  width: 50%;
  vertical-align: top;
  background: #1a1210;
  border: 2px outset #5a4030;
  padding: 0;
}
.portal-card {
  padding: 12px 14px 14px;
  min-height: 140px;
}
.portal-card h2 {
  margin: 0 0 8px;
  font-family: "Impact", "Arial Black", sans-serif;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 1px;
}
.portal-card h2 a { text-decoration: none; }
.portal-card p {
  margin: 0;
  font-size: 12px;
  color: #a09070;
}
.portal-card .enter {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: bold;
  color: #00ff88;
  font-family: "Courier New", monospace;
}

/* themed portal accents */
.card-lit {
  border-color: #3a2a1a !important;
  background: linear-gradient(165deg, #1a1410 0%, #0e0c0a 100%) !important;
  box-shadow: inset 0 0 40px #1a0800;
}
.card-lit h2 a { color: #b89060; }
.card-surv {
  border-color: #2a3a20 !important;
  background: linear-gradient(165deg, #10180e 0%, #0a1008 100%) !important;
}
.card-surv h2 a { color: #88aa55; }
.card-anton {
  border-color: #203040 !important;
  background: linear-gradient(165deg, #0e1218 0%, #080a10 100%) !important;
}
.card-anton h2 a { color: #66aacc; }
.card-chat {
  border-color: #3a2040 !important;
  background: linear-gradient(165deg, #140e18 0%, #0a0810 100%) !important;
}
.card-chat h2 a { color: #cc88ff; }
.card-zorb {
  border-color: #1a4030 !important;
  background: linear-gradient(165deg, #0a1812 0%, #06100c 100%) !important;
}
.card-zorb h2 a { color: #44ff99; }
.card-secret {
  border-color: #0a0a0a !important;
  background: #000 !important;
  box-shadow: none !important;
}
.card-secret .portal-card {
  min-height: 0;
  padding: 10px 14px;
}
.card-secret h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 2px;
}
.card-secret h2 a {
  color: #1a1a1a;
  text-decoration: none;
}
.card-secret h2 a:hover {
  color: #333;
}

/* Zorbulon viewer */
.zorb-page .content {
  background: #080c0a;
}
.zorb-blurb {
  color: #889988;
  font-size: 12px;
  margin: 0 0 12px;
}
.zorb-controls {
  display: table;
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 4px;
}
.zorb-controls input[type="text"] {
  display: table-cell;
  width: 100%;
  background: #000;
  border: 2px inset #2a4030;
  color: #44ff99;
  font-family: "Courier New", monospace;
  font-size: 13px;
  padding: 6px 8px;
}
.zorb-controls button {
  display: table-cell;
  background: #102818;
  border: 2px outset #3a6040;
  color: #66ff99;
  font-family: "Verdana", sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: 6px 16px;
  cursor: pointer;
  white-space: nowrap;
  vertical-align: middle;
}
.zorb-controls button:hover {
  background: #183828;
  color: #fff;
}
.zorb-controls button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.zorb-stage-wrap {
  margin: 10px 0 8px;
  border: 3px double #2a4a38;
  background: #000;
  box-shadow: inset 0 0 40px #001a10, 0 0 0 1px #000;
  position: relative;
  line-height: 0;
  overflow: hidden;
  width: 100%;
  min-height: 320px;
}
#zorb-canvas {
  display: block;
  width: 100%;
  height: 400px;
  max-height: 50vh;
  min-height: 280px;
  background: #000;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
#zorb-canvas:active {
  cursor: grabbing;
}
.zorb-page .status-line {
  margin: 6px 0 10px;
}

/* status bar / footer */
.footer {
  border-top: 2px solid #4a3020;
  background: #0a0806;
  padding: 10px 16px;
  font-size: 10px;
  color: #665544;
  font-family: "Courier New", monospace;
  text-align: center;
}
.footer .counter {
  color: #00ff66;
  background: #001100;
  border: 1px inset #003300;
  padding: 1px 6px;
  letter-spacing: 2px;
}
.best-viewed {
  margin-top: 6px;
  color: #554433;
}

/* boxes */
.box {
  background: #16120e;
  border: 2px inset #3a2a1a;
  padding: 12px 14px;
  margin: 12px 0;
}
.box.warn {
  border-color: #5a2000;
  background: #1a0c08;
  color: #cc8866;
}
.box.note {
  border-color: #2a4020;
  background: #0c140a;
  color: #88aa77;
}

/* lists */
ul.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.article-list li {
  border-bottom: 1px dotted #3a2a1a;
  padding: 10px 4px;
}
ul.article-list li:hover {
  background: #1a1410;
}
ul.article-list a.title {
  font-size: 14px;
  font-weight: bold;
  color: #d4a878;
  text-decoration: none;
}
ul.article-list a.title:hover { color: #ffe0a0; }
ul.article-list .meta {
  font-size: 10px;
  color: #665544;
  font-family: "Courier New", monospace;
  margin-top: 2px;
}
ul.article-list .blurb {
  font-size: 12px;
  color: #887766;
  margin-top: 4px;
}

/* article body (literature) */
.article-body {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 14px;
  color: #b8a890;
  line-height: 1.65;
  max-width: 38em;
}
.article-body p { margin: 0 0 1em; }
.article-body .dropcap {
  float: left;
  font-size: 3.2em;
  line-height: 0.85;
  padding: 0 8px 0 0;
  color: #8a6040;
  font-weight: bold;
}
.lit-page {
  background: #0c0a08 !important;
}
.lit-page .content {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(40,20,10,0.5) 0%, transparent 50%),
    #0c0a08;
}
.dust {
  color: #6a5848;
  font-size: 11px;
  font-style: italic;
}

/* survival guide */
.surv-page .content {
  background: #0a1008;
}
.step {
  border: 1px solid #3a4a28;
  background: #10180e;
  margin: 12px 0;
  padding: 10px 14px;
}
.step .num {
  display: inline-block;
  background: #2a3a18;
  color: #aacc66;
  font-family: "Courier New", monospace;
  font-weight: bold;
  padding: 2px 8px;
  margin-right: 8px;
  border: 1px solid #4a6030;
}
.step h3 {
  display: inline;
  color: #aacc77;
  font-size: 14px;
  margin: 0;
}
.step p {
  margin: 8px 0 0;
  color: #889978;
  font-size: 12px;
}
.creepy {
  color: #668855;
  font-style: italic;
  border-left: 3px solid #2a4020;
  padding-left: 10px;
  margin: 14px 0;
}

/* chat UIs */
.chat-frame {
  border: 2px inset #3a2a1a;
  background: #000;
  height: 360px;
  overflow-y: auto;
  padding: 8px 10px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #00ff66;
}
.chat-frame .sys { color: #668866; }
.chat-frame .nick { color: #66ccff; font-weight: bold; }
.chat-frame .nick.self { color: #ffcc66; }
.chat-frame .nick.anton { color: #ff8866; }
.chat-frame .msg { color: #cceecc; }
.chat-frame .ts { color: #445544; font-size: 10px; }
.chat-frame .err { color: #ff4444; }

.chat-input-row {
  display: table;
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
}
.chat-input-row > * {
  display: table-cell;
  vertical-align: middle;
}
.chat-input-row input[type="text"] {
  width: 100%;
  background: #0a0a0a;
  border: 2px inset #3a2a1a;
  color: #00ff88;
  font-family: "Courier New", monospace;
  font-size: 13px;
  padding: 6px 8px;
}
.chat-input-row input.nick-field {
  width: 110px;
  margin-right: 4px;
  color: #ffcc66;
}
.chat-input-row button,
button.btn {
  background: #2a2010;
  border: 2px outset #6a5030;
  color: #ffcc66;
  font-family: "Verdana", sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.chat-input-row button:active,
button.btn:active {
  border-style: inset;
}
.chat-input-row button:hover,
button.btn:hover {
  background: #3a3018;
  color: #fff;
}
.chat-input-row button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.status-line {
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: #556655;
  margin-top: 4px;
}
.status-line .ok { color: #00ff66; }
.status-line .bad { color: #ff4444; }

/* construction / badges */
.badge-row {
  text-align: center;
  margin: 16px 0 8px;
}
.badge {
  display: inline-block;
  border: 1px solid #554433;
  background: #1a1410;
  color: #887766;
  font-size: 9px;
  font-family: "Courier New", monospace;
  padding: 2px 6px;
  margin: 0 3px;
}
.badge.hot { border-color: #aa4400; color: #ff8844; }
.badge.green { border-color: #228822; color: #44cc44; }

/* under construction gif substitute */
.uc {
  display: inline-block;
  border: 2px ridge #ffaa00;
  background: #221100;
  color: #ffcc00;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 11px;
  padding: 2px 8px;
  animation: blink 1.5s step-start infinite;
}

/* welcome table */
.welcome-box {
  border: 3px double #6b4423;
  background: #16100c;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.welcome-box h2 {
  margin-top: 0;
  color: #e8a040;
  font-family: "Impact", sans-serif;
  letter-spacing: 1px;
}

/* ── Portal: 漢語 Vocab Trainer ── */
.card-hanyu {
  border-color: #3a1a1a !important;
  background: linear-gradient(165deg, #180e0e 0%, #0c0808 100%) !important;
  box-shadow: inset 0 0 40px #1a0400;
}
.card-hanyu h2 a { color: #e04b3a; }
.card-hanyu .portal-card {
  min-height: 120px;
  text-align: center;
}


