/* ============================================================
   KITTY EMPIRE — Geocities throwback stylesheet
   Deliberately loud. Bryce can recolor anything here.
   ============================================================ */

:root {
  --neon-pink: #ff00cc;
  --neon-cyan: #00e5ff;
  --neon-yellow: #fff200;
  --neon-green: #39ff14;
  --deep: #1a0033;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive, sans-serif;
  color: #fff;
  /* tiled cat-paw background, self-contained SVG (no external fetch) */
  background-color: #2b0a4a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Ctext x='8' y='34' font-size='28'%3E%F0%9F%90%BE%3C/text%3E%3Ctext x='44' y='70' font-size='28'%3E%F0%9F%98%BA%3C/text%3E%3C/svg%3E");
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- Birthday banner ---------- */
#birthday-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px;
  font-size: clamp(18px, 3.5vw, 34px);
  font-weight: bold;
  text-align: center;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  border-bottom: 4px ridge var(--neon-yellow);
  animation: bannerFlash 0.6s steps(1) infinite;
}
@keyframes bannerFlash {
  0%   { background: var(--neon-pink); }
  25%  { background: var(--neon-cyan); }
  50%  { background: var(--neon-green); }
  75%  { background: var(--neon-yellow); color:#000; text-shadow:2px 2px 0 #fff; }
  100% { background: var(--neon-pink); }
}
.bday-text { animation: wobble 1s ease-in-out infinite; }
@keyframes wobble { 0%,100%{transform:rotate(-2deg);} 50%{transform:rotate(2deg);} }
#banner-close {
  background: #000; color: #fff; border: 2px outset #fff;
  font-weight: bold; cursor: pointer; border-radius: 4px; padding: 2px 8px;
}

/* ---------- Rave button ---------- */
#rave-btn {
  position: fixed;
  top: 10px; right: 12px;
  z-index: 1500;
  padding: 10px 16px;
  font-family: inherit; font-weight: bold; font-size: 16px;
  color: #fff; cursor: pointer;
  border: 3px outset #fff; border-radius: 8px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan), var(--neon-green), var(--neon-yellow));
  background-size: 300% 100%;
  animation: ravePulse 3s linear infinite;
  text-shadow: 1px 1px 0 #000;
}
@keyframes ravePulse { 0%{background-position:0% 50%;} 100%{background-position:300% 50%;} }
body.rave-on #rave-btn { animation: ravePulse 0.4s linear infinite; }

/* ---------- Header ---------- */
#hero { text-align: center; padding: 18px 10px 8px; }
.star-row { font-size: 22px; letter-spacing: 4px; }
.wordmark {
  margin: 6px 0;
  font-size: clamp(40px, 11vw, 120px);
  font-weight: bold;
  letter-spacing: 3px;
  background: linear-gradient(90deg, #ff0000, #ff9900, #ffee00, #33ff00, #00ccff, #cc00ff, #ff0000);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(3px 3px 0 #000);
  animation: rainbowSlide 4s linear infinite;
}
@keyframes rainbowSlide { to { background-position: 200% center; } }
.tagline {
  display: block; max-width: 900px; margin: 6px auto;
  font-size: 18px; color: var(--neon-yellow); text-shadow: 1px 1px 0 #000;
}

/* ---------- Chat box (bottom-left sliding popup) ---------- */
#chat-box {
  position: fixed;
  left: 14px; bottom: 0; top: auto;
  z-index: 800;                 /* ABOVE the bouncing cards (which are ~100) */
  width: min(320px, 90vw);
  max-height: 80vh;
  display: flex; flex-direction: column;
  background: #000080;          /* classic Windows-95 navy */
  border: 4px ridge #c0c0c0;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.55);
  /* Collapsed: slide down so only the ~46px title tab peeks above the edge. */
  transform: translateY(calc(100% - 46px));
  transition: transform 0.35s ease;
}
#chat-box.open { transform: translateY(0); }
#chat-box [hidden] { display: none !important; }   /* beat the #id specificity */

.chat-titlebar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 12px 14px;
  font-family: inherit; font-weight: bold; font-size: 15px; color: #fff;
  background: linear-gradient(90deg, #000080, #1084d0);
  border: none; border-radius: 6px 6px 0 0;
  cursor: pointer; text-align: left;
}
#chat-box:not(.open) .chat-titlebar { animation: tabPulse 1.4s ease-in-out infinite; }
@keyframes tabPulse { 0%,100%{filter:brightness(1);} 50%{filter:brightness(1.5);} }
.chat-caret { transition: transform 0.35s ease; }
#chat-box.open .chat-caret { transform: rotate(180deg); }

.chat-body {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}

.chat-active-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 10px; background: #000060; color: #fff; font-size: 13px;
}
.chat-active-head button {
  background: #c0c0c0; color: #000; border: 2px outset #fff;
  cursor: pointer; font-weight: bold; border-radius: 3px; font-size: 11px;
}
#chat-login { padding: 18px 14px; text-align: center; }
#chat-login .lock { font-size: 18px; color: var(--neon-yellow); }
#login-form { display: flex; flex-direction: column; gap: 8px; }
#login-form input {
  padding: 8px; border: 2px inset #fff; border-radius: 3px;
  font-family: inherit; font-size: 14px;
}
#login-form button, #chat-form button {
  padding: 8px; cursor: pointer; font-family: inherit; font-weight: bold;
  background: var(--neon-green); color: #000;
  border: 3px outset #fff; border-radius: 4px;
}
.login-error { color: #ff5555; font-weight: bold; margin: 4px 0 0; }

#chat-active { display: flex; flex-direction: column; min-height: 0; flex: 1; }
#chat-log {
  flex: 1; overflow-y: auto; padding: 10px;
  background: #d8e8ff; color: #000; min-height: 180px;
}
.msg { margin: 6px 0; padding: 6px 10px; border-radius: 10px; max-width: 90%; word-wrap: break-word; }
.msg.user   { background: #b6ff9c; margin-left: auto; text-align: right; }
.msg.mentor { background: #fff; border: 1px solid #aaa; }
.msg.typing { font-style: italic; color: #555; }
#chat-form { display: flex; gap: 6px; padding: 8px; background: #000080; }
#chat-input { flex: 1; padding: 8px; border: 2px inset #fff; border-radius: 3px; font-family: inherit; }

/* ---------- Bouncing game cards ---------- */
#game-field { position: relative; width: 100%; }
.game-card {
  position: fixed;             /* positioned/animated by JS */
  z-index: 100;                /* BELOW the chat box → passes behind it */
  width: 190px;
  padding: 14px;
  text-align: center;
  text-decoration: none;
  color: #000;
  background: #fff;
  border: 5px outset #fff;
  border-radius: 12px;
  box-shadow: 0 0 18px var(--card-color, var(--neon-pink));
  cursor: pointer;
  will-change: transform;
}
.game-card .emoji { font-size: 48px; display: block; }
.game-card .title { font-weight: bold; font-size: 18px; color: var(--card-color, #c0008a); }
.game-card .desc  { font-size: 12px; color: #333; }
.game-card:hover  { transform: scale(1.05); }

/* ---------- Footer ---------- */
#footer { text-align: center; padding: 40px 10px 80px; margin-top: 40vh; }
.construction { font-size: 20px; color: var(--neon-yellow); text-shadow: 1px 1px 0 #000; }
.counter { margin: 14px 0; }
.odometer {
  display: inline-block; background: #000; color: var(--neon-green);
  font-family: "Courier New", monospace; padding: 2px 8px; letter-spacing: 4px;
  border: 2px inset #888;
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.badge {
  background: #000; color: var(--neon-cyan); font-size: 11px;
  padding: 4px 8px; border: 2px ridge var(--neon-cyan); border-radius: 3px;
}
.webring { margin-top: 10px; color: #fff; }

/* ============================================================
   RAVE MODE — flashing lights everywhere.
   (Strobing visuals; the rave button toggles body.rave-on.)
   ============================================================ */
body.rave-on { animation: raveBg 0.25s steps(1) infinite; }
@keyframes raveBg {
  0%   { background-color: #ff00cc; }
  20%  { background-color: #00e5ff; }
  40%  { background-color: #39ff14; }
  60%  { background-color: #fff200; }
  80%  { background-color: #ff5500; }
  100% { background-color: #cc00ff; }
}
body.rave-on .wordmark { animation: rainbowSlide 0.5s linear infinite, wobble 0.3s ease-in-out infinite; }
body.rave-on .game-card { animation: raveSpin 0.6s linear infinite; }
@keyframes raveSpin { 0%{filter:hue-rotate(0deg);} 100%{filter:hue-rotate(360deg);} }
