/* ==========================================================
   ape.meme — GeoCities jungle edition
   ========================================================== */

:root {
  --banana: #ffe135;
  --banana-dark: #e0b800;
  --jungle: #1f6b2e;
  --jungle-dark: #0d3d18;
  --leaf: #4caf50;
  --dirt: #6b3f1d;
  --win-grey: #c0c0c0;
  --hot-pink: #ff3fa4;
  --cyan: #00ffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 13px;
  color: #000;
  background-color: var(--jungle-dark);
  /* jungle tile: leaves + bananas drawn as a repeating svg */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><rect width='120' height='120' fill='%230d3d18'/><text x='8' y='40' font-size='28'>🌴</text><text x='70' y='30' font-size='18'>🍌</text><text x='60' y='95' font-size='26'>🌿</text><text x='14' y='100' font-size='16'>🍌</text><circle cx='100' cy='70' r='2' fill='%2374ff8a' opacity='.7'/><circle cx='40' cy='60' r='1.5' fill='%23ffe135' opacity='.8'/><circle cx='95' cy='105' r='1.5' fill='%23ffffff' opacity='.6'/></svg>");
  background-size: 120px 120px;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><text y='26' font-size='26'>🍌</text></svg>") 4 4, auto;
}

a { color: #0000ee; }
a:hover { color: var(--hot-pink); }

/* ---------- top marquee ---------- */
.marquee-bar {
  background: var(--banana);
  border-bottom: 3px ridge var(--banana-dark);
  font-family: "VT323", monospace;
  font-size: 22px;
  color: #000;
  padding: 2px 0;
  letter-spacing: 1px;
  overflow: hidden;
  white-space: nowrap;
}
/* two copies of the text slide left by exactly one copy's width: seamless loop */
.ticker { display: inline-block; animation: ticker 28s linear infinite; }
.ticker-text { display: inline-block; }
.ticker-gap { display: inline-block; width: 3em; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- language toggle ---------- */
.lang-bar {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px 16px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.lang-btn {
  background: var(--win-grey);
  border: 2px outset #fff;
  padding: 3px 5px;
  cursor: pointer;
  line-height: 0;
  min-width: 44px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lang-btn:hover { filter: brightness(1.08); }
.lang-btn.active {
  border-style: inset;
  background: var(--banana);
  box-shadow: 0 0 6px var(--banana);
}
.lang-btn .flag { width: 32px; height: 20px; display: block; border: 1px solid #000; }
.lang-btn .flag-emoji { font-size: 20px; line-height: 20px; border: none; text-align: center; }

/* ---------- layout ---------- */
.page {
  display: grid;
  grid-template-columns: 290px minmax(420px, 640px) 200px;
  gap: 16px;
  justify-content: center;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.col { min-width: 0; }
.col-left  { display: flex; flex-direction: column; gap: 14px; }
.col-center{ display: flex; flex-direction: column; gap: 14px; }
.col-right { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 1000px) {
  .page { grid-template-columns: 1fr; }
  .col-left { order: 2; }
  .col-center { order: 1; }
  .col-right { order: 3; }
}

/* ---------- 98.css tweaks ---------- */
.window { width: 100%; }
.window-body { padding: 10px 12px; }
.window-body p { margin: 0 0 10px; line-height: 1.35; }
.window-body h2 {
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 15px;
  font-weight: bold;
  margin: 0 0 8px;
}
.center { text-align: center; }

/* ---------- hero ---------- */
.hero { display: flex; gap: 14px; align-items: flex-start; }
.hero-ape { font-size: 84px; line-height: 1; flex: 0 0 auto; filter: drop-shadow(2px 2px 0 var(--banana)); }
.hero-text { flex: 1; min-width: 0; }
.hero-title {
  font-family: "Jacquard 12", "VT323", monospace;
  font-size: 40px;
  font-weight: normal;
  margin: 0 0 8px;
  color: var(--jungle-dark);
  text-shadow: 2px 2px 0 var(--banana);
  letter-spacing: 1px;
}
.ca-line { font-family: "VT323", monospace; font-size: 18px; }
.ca { background: #000; color: var(--cyan); padding: 2px 6px; }
.shout { font-weight: bold; font-size: 14px; letter-spacing: .5px; }
.dont-click {
  font-weight: bold;
  color: #ff0000;
  text-decoration: underline wavy;
  animation: blink 1s steps(2, start) infinite;
}

/* ---------- lore ---------- */
.lore { position: relative; }
.lore-ape {
  float: left;
  font-size: 60px;
  line-height: 1;
  margin: 0 12px 6px 0;
  transform-origin: top center;
}
.rant { font-weight: bold; text-transform: uppercase; }
.warn-box {
  background: var(--banana);
  border: 2px dashed #000;
  padding: 6px;
  text-align: center;
  font-weight: bold;
  margin-top: 10px;
}
.ape-row { font-size: 30px; text-align: center; letter-spacing: 6px; margin-top: 8px; }

/* ---------- dividers ---------- */
.star-divider {
  text-align: center;
  color: var(--banana);
  font-size: 14px;
  letter-spacing: 3px;
  overflow: hidden;
  white-space: nowrap;
  animation: twinkle 1.6s ease-in-out infinite alternate;
  text-shadow: 0 0 6px var(--banana);
}

/* ---------- 88x31 buttons ---------- */
.buttons-88 {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  padding: 6px;
  background: rgba(0,0,0,.25);
  border: 2px inset var(--win-grey);
}
.b88 {
  width: 88px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "VT323", monospace;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #555;
  padding: 0 3px;
  user-select: none;
  cursor: pointer;
  overflow: hidden;
}
.b1  { background: var(--banana); color: #000; }
.b2  { background: #000; color: #0f0; }
.b3  { background: linear-gradient(90deg,#ff0,#f80); color: #000; }
.b4  { background: var(--jungle); color: #fff; }
.b5  { background: #003; color: #0ff; }
.b6  { background: #c0c0c0; color: #000; }
.b7  { background: #900; color: #fff; }
.b8  { background: linear-gradient(90deg,#f0f,#0ff,#ff0); color: #000; animation: hue 3s linear infinite; }
.b9  { background: #222; color: var(--banana); }
.b10 { background: #fff; color: #000; animation: blink 1.4s steps(2,start) infinite; }
.b11 { background: #008080; color: #fff; }
.b12 { background: #ff3fa4; color: #fff; }

.footer-note {
  text-align: center;
  color: var(--banana);
  font-family: "VT323", monospace;
  font-size: 16px;
  text-shadow: 1px 1px 0 #000;
}

/* ---------- chat ---------- */
.chat-window .window-body { padding: 6px; }
.chat-header {
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  margin-bottom: 4px;
}
.online-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #0f0; margin-right: 4px; box-shadow: 0 0 4px #0f0;
}
.chat-channels { color: #0000aa; }
.chat-log {
  background: #fff;
  border: 2px inset #999;
  height: 200px;
  overflow-y: auto;
  padding: 4px 6px;
  font-size: 12px;
}
.chat-msg { margin: 0 0 3px; }
.chat-msg .who { font-weight: bold; }
.chat-msg .when { color: #888; font-size: 10px; margin-left: 4px; }
.chat-input { display: flex; gap: 4px; margin-top: 4px; }
.chat-input input { flex: 1; min-width: 0; }
.chat-note { margin: 4px 0 0; font-size: 10px; color: #666; font-style: italic; }

/* ---------- counter ---------- */
.counter-box {
  background: #000;
  border: 3px ridge var(--win-grey);
  padding: 6px;
  text-align: center;
}
.counter-label { color: var(--banana); font-family: "VT323", monospace; font-size: 14px; }
.counter {
  display: inline-block;
  font-family: "VT323", monospace;
  font-size: 30px;
  color: #0f0;
  background: #111;
  border: 1px solid #0f0;
  padding: 0 8px;
  letter-spacing: 4px;
  text-shadow: 0 0 6px #0f0;
}

.badge.under-construction {
  background: repeating-linear-gradient(45deg, #000 0 10px, var(--banana) 10px 20px);
  color: #000;
  font-weight: bold;
  text-align: center;
  padding: 6px;
  border: 2px solid #000;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}

/* ---------- right sidebar: news icons ---------- */
.sidebar-title {
  font-family: "Jacquard 12", "VT323", monospace;
  font-size: 22px;
  color: var(--banana);
  text-align: center;
  text-shadow: 2px 2px 0 #000;
  background: rgba(0,0,0,.35);
  padding: 4px;
  border: 2px ridge var(--banana-dark);
}
.sidebar-title.small { font-size: 18px; margin-top: 6px; }

.news-icons { display: flex; flex-direction: column; gap: 10px; }

.news-icon {
  display: block;
  text-decoration: none;
  color: #000;
  background: var(--win-grey);
  border: 2px outset #fff;
  padding: 6px 4px;
  text-align: center;
  position: relative;
  transition: transform .1s;
}
.news-icon:hover { border-style: inset; transform: scale(1.03); color: #000; }
.news-icon .icon {
  font-size: 46px;
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}
.news-icon .label {
  font-family: "VT323", monospace;
  font-size: 15px;
  line-height: 1.05;
  display: block;
  color: #000080;
}
.news-icon .src {
  display: block;
  font-size: 9px;
  color: #555;
  margin-top: 2px;
  text-transform: uppercase;
}
.news-icon .new-tag {
  position: absolute;
  top: -6px; right: -6px;
  background: #ff0000;
  color: #ff0;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 4px;
  transform: rotate(12deg);
  border: 1px solid #ff0;
  animation: blink .8s steps(2,start) infinite;
}
.news-icon.rip { background: #222; color: #ddd; border-color: #555; }
.news-icon.rip .label { color: #fff; }
.news-icon.rip .src { color: #aaa; }

/* animation variants for the icons */
.fx-blink  .icon { animation: blink 1s steps(2,start) infinite; }
.fx-spin   .icon { animation: spin 3s linear infinite; }
.fx-shake  .icon { animation: shake .5s ease-in-out infinite; }
.fx-bob    .icon { animation: bob 1s ease-in-out infinite; }
.fx-glow   .icon { animation: glow 1.2s ease-in-out infinite alternate; }
.fx-rainbow .icon { animation: hue 2s linear infinite; }
.fx-pulse  .icon { animation: pulse 1s ease-in-out infinite; }
.fx-flip   .icon { animation: flip 2s ease-in-out infinite; }

.deco-stack { display: flex; justify-content: space-around; font-size: 34px; }
.deco.spin   { animation: spin 4s linear infinite; }
.deco.blink  { animation: blink 1.2s steps(2,start) infinite; }
.deco.shake  { animation: shake .6s ease-in-out infinite; }
.deco.rainbow{ animation: hue 2s linear infinite; }

/* hero / misc anims */
.bounce { animation: bob 1.4s ease-in-out infinite; }
.swing  { animation: swing 2.2s ease-in-out infinite; }
.blink-text { animation: blink 1s steps(2,start) infinite; color: #f00; font-weight: bold; }

/* ---------- keyframes ---------- */
@keyframes blink   { to { visibility: hidden; } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes shake   { 0%,100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-3px) rotate(-6deg); } 75% { transform: translateX(3px) rotate(6deg); } }
@keyframes bob     { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes glow    { from { filter: drop-shadow(0 0 0 var(--banana)); } to { filter: drop-shadow(0 0 10px var(--banana)) drop-shadow(0 0 16px #ff0); } }
@keyframes hue     { to { filter: hue-rotate(360deg); } }
@keyframes pulse   { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes flip    { 0%,40%,100% { transform: rotateY(0); } 70% { transform: rotateY(180deg); } }
@keyframes swing   { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
