@import url('https://fonts.googleapis.com/css2?family=Boogaloo&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background-color: #000033;
  font-family: "Comic Sans MS", "Comic Sans", Boogaloo, cursive;
  color: #ffffff;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='24' font-size='24'%3E%F0%9F%A7%80%3C/text%3E%3C/svg%3E") 16 16, auto;
  overflow-x: hidden;
}

/* ── Starfield Background ── */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Cursor sparkle trail ── */
.sparkle {
  position: fixed;
  pointer-events: none;
  font-size: 1rem;
  animation: sparkle-fade 0.8s ease forwards;
  z-index: 9999;
  user-select: none;
}
@keyframes sparkle-fade {
  0%   { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.2) translateY(-30px); }
}

/* ── Page wrapper ── */
#page {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 8px;
}

/* ══════════════════════════════
   MARQUEE BAR (top ticker)
══════════════════════════════ */
.ticker-bar {
  background: #ff0000;
  color: #ffff00;
  font-size: 1rem;
  font-weight: bold;
  padding: 4px 0;
  border-top: 3px solid #ffff00;
  border-bottom: 3px solid #ffff00;
  white-space: nowrap;
  overflow: hidden;
}
.ticker-inner {
  display: inline-block;
  animation: ticker 18s linear infinite;
}
@keyframes ticker {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
header {
  text-align: center;
  padding: 18px 0 6px;
}

.site-title {
  font-size: clamp(2rem, 8vw, 4rem);
  background: linear-gradient(0deg,
    #880000 0%, #cc2200 20%, #ff4400 40%,
    #ff8800 60%, #ffcc00 80%, #ffff88 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.03em;
  animation: flame-flicker 0.11s ease-in-out infinite alternate;
}
@keyframes flame-flicker {
  0%   { filter: drop-shadow(0 0 5px #ff2200) drop-shadow(0 0 16px #ff6600) drop-shadow(0 0 32px #ff9900); }
  25%  { filter: drop-shadow(0 0 8px #ff4400) drop-shadow(0 0 22px #ff8800) drop-shadow(0 0 42px #ffbb00); }
  50%  { filter: drop-shadow(0 0 4px #ff1100) drop-shadow(0 0 13px #ff5500) drop-shadow(0 0 28px #ff8800); }
  75%  { filter: drop-shadow(0 0 9px #ff3300) drop-shadow(0 0 26px #ff7700) drop-shadow(0 0 48px #ffcc00); }
  100% { filter: drop-shadow(0 0 6px #ff2200) drop-shadow(0 0 19px #ff6600) drop-shadow(0 0 36px #ffaa00); }
}

.site-subtitle {
  font-size: 1rem;
  background: linear-gradient(90deg,
    #ff0000, #ff8800, #ffff00, #00ff00,
    #00ffff, #0088ff, #ff00ff, #ff0000);
  background-size: 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-shift 3s linear infinite;
}
@keyframes rainbow-shift {
  0%   { background-position: 0%; }
  100% { background-position: 300%; }
}
@keyframes blink {
  0%, 100% { visibility: visible; }
  50%       { visibility: hidden; }
}

/* ══════════════════════════════
   HORIZONTAL RULE
══════════════════════════════ */
.hr-rainbow {
  border: none;
  height: 6px;
  margin: 10px 0;
  background: linear-gradient(90deg,
    red, orange, yellow, lime, cyan, blue, violet);
  animation: hr-pulse 2s ease-in-out infinite alternate;
}
@keyframes hr-pulse {
  from { opacity: 0.7; transform: scaleX(0.98); }
  to   { opacity: 1;   transform: scaleX(1); }
}

/* ══════════════════════════════
   MAIN CONTENT
══════════════════════════════ */
.content-cell {
  padding: 8px;
  background: rgba(0,0,80,0.7);
  border: 3px dashed #ff00ff;
}

/* ══════════════════════════════
   UNDER CONSTRUCTION badge
══════════════════════════════ */
.cone { display: inline-block; animation: cone-spin 2s linear infinite; }
@keyframes cone-spin {
  0%, 100% { transform: rotate(-10deg); }
  50%       { transform: rotate(10deg); }
}

/* ══════════════════════════════
   CONTENT: WELCOME SECTION
══════════════════════════════ */
h2.section-head {
  font-size: 1.4rem;
  color: #ffff00;
  text-shadow: 2px 2px #ff0000;
  margin: 6px 0;
  text-decoration: underline wavy #ff00ff;
}

.welcome-text {
  font-size: 0.95rem;
  color: #ccccff;
  line-height: 1.6;
  margin-bottom: 12px;
}
.welcome-text b { color: #ff00ff; }
.welcome-text a { color: #00ffff; }

/* ── Spinning logo ── */
.spinning-logo {
  display: block;
  margin: 0 auto 10px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: conic-gradient(
    #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000
  );
  animation: spin 1.5s linear infinite;
  box-shadow: 0 0 20px #ff00ff;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── "NEW!" sticker ── */
.new-sticker {
  display: inline-block;
  background: #ff0000;
  color: #ffff00;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  animation: blink 0.6s step-start infinite;
  vertical-align: middle;
}

/* ══════════════════════════════
   YOUTUBE EMBED
══════════════════════════════ */
.yt-wrapper {
  border: 4px ridge #ff00ff;
  background: #000;
  overflow: hidden;
  line-height: 0;
  margin: 8px 0;
}
.yt-wrapper iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
}

/* ══════════════════════════════
   RAT GIF GALLERY
══════════════════════════════ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 8px 0;
}
.photo-cell {
  background: #111155;
  border: 3px ridge #aaaaaa;
  padding: 4px;
  text-align: center;
  font-size: 0.6rem;
  color: #ffff00;
}
.rat-gif {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #330066, #003366, #006600, #663300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  background-size: 200%;
  animation: gradient-shift 4s ease infinite alternate;
  overflow: hidden;
}
.rat-gif img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes gradient-shift {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

/* ══════════════════════════════
   NOW PLAYING PLAYER
══════════════════════════════ */
.midi-player {
  background: #001100;
  border: 3px inset #006600;
  padding: 8px;
  margin: 8px 0;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
}
.midi-title { color: #00ff00; margin-bottom: 4px; }
.midi-controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.midi-progress {
  flex: 1;
  height: 8px;
  background: #002200;
  border: 1px inset #006600;
  position: relative;
  min-width: 60px;
}
.midi-bar {
  height: 100%;
  background: #00ff00;
  width: 35%;
  animation: midi-play 4s linear infinite;
}
@keyframes midi-play {
  0%   { width: 0%; }
  100% { width: 100%; }
}
.midi-eq {
  display: flex; gap: 2px; align-items: flex-end; height: 20px;
}
.eq-bar {
  width: 4px;
  background: #00ff00;
  animation: eq-bounce 0.4s ease-in-out infinite alternate;
}
@keyframes eq-bounce { from { transform: scaleY(0.2); } to { transform: scaleY(1); } }
.no-stop-label {
  color: #ff4400;
  font-size: 0.65rem;
  margin-top: 4px;
  animation: blink 0.8s step-start infinite;
}

/* ══════════════════════════════
   GUESTBOOK FORM
══════════════════════════════ */
.guestbook {
  background: #110011;
  border: 3px double #ff00ff;
  padding: 10px;
  margin: 10px 0;
}
.guestbook h3 { color: #ff00ff; margin: 0 0 8px; font-size: 1rem; }
.guestbook input, .guestbook textarea {
  display: block;
  width: 100%;
  background: #000033;
  border: 2px inset #0000aa;
  color: #00ffff;
  font-family: "Comic Sans MS", cursive;
  font-size: 0.85rem;
  padding: 4px;
  margin-bottom: 6px;
}
.guestbook textarea { height: 60px; resize: none; }
.submit-btn {
  background: linear-gradient(180deg, #ff66ff 0%, #cc00cc 50%, #880088 100%);
  border: 3px outset #ff66ff;
  color: #fff;
  font-family: "Comic Sans MS", cursive;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 5px 16px;
  cursor: pointer;
}
.submit-btn:hover { filter: brightness(1.2); border-style: inset; }

.guestbook-entries { margin-top: 8px; font-size: 0.8rem; color: #aaffaa; }
.guestbook-entries div { border-top: 1px dashed #333; padding: 4px 0; }
.guestbook-entries .gb-name { color: #ffff00; font-weight: bold; }
.guestbook-entries .gb-loc { color: #ff8800; font-size: 0.7rem; }

/* ══════════════════════════════
   MARQUEE (bottom credits)
══════════════════════════════ */
.bottom-marquee {
  background: #000066;
  padding: 4px 0;
  overflow: hidden;
  white-space: nowrap;
  border: 2px solid #0000ff;
  margin: 10px 0;
}
.bottom-marquee-inner {
  display: inline-block;
  animation: ticker 22s linear infinite;
  color: #00ffff;
  font-size: 0.85rem;
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer {
  text-align: center;
  padding: 10px 0 20px;
  font-size: 0.7rem;
  color: #888;
}
footer .mailto { color: #00ffff; }
.last-updated { color: #ff8800; }

/* ══════════════════════════════
   POPUP MODAL
══════════════════════════════ */
#popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#popup {
  background: #c0c0c0;
  border: 3px outset #ffffff;
  width: 320px;
  font-family: "MS Sans Serif", "Comic Sans MS", sans-serif;
  color: #000;
}
#popup-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  padding: 3px 6px;
  font-size: 0.8rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#popup-titlebar button {
  background: #c0c0c0;
  border: 2px outset #fff;
  width: 16px; height: 14px;
  font-size: 0.65rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
#popup-body {
  padding: 14px 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}
#popup-body .popup-icon { font-size: 2rem; }
#popup-footer {
  padding: 6px;
  text-align: center;
  border-top: 1px solid #888;
}
#popup-footer button {
  background: #c0c0c0;
  border: 2px outset #fff;
  padding: 3px 20px;
  font-family: "Comic Sans MS", cursive;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ══════════════════════════════
   FLOATING ELEMENTS
══════════════════════════════ */
.float-star {
  position: fixed;
  font-size: 1.5rem;
  pointer-events: none;
  animation: float-drift linear infinite;
  z-index: 2;
}
@keyframes float-drift {
  from { transform: translateY(100vh) rotate(0deg); opacity: 0.8; }
  to   { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

@media (max-width: 560px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
