/* =========================================================
   GLOBAL BASE (CLEAN)
   ========================================================= */

html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100svh;
  overflow: hidden; /* IMPORTANT */
  background-color: black;
  color: rgb(200, 0, 0);
  text-align: center;
  font-size: clamp(14px, 3.5vw, 16px);
  font-family: Tahoma;
}

/* clickable elements */
a {
  display: inline-block;
  padding: 6px 0;
}

input,
textarea {
  font-size: 16px;
}

.comments {
  font-family: Verdana, Tahoma;
  font-size: 12px;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}

.thoughts {
  font-style: italic;
  text-align: left;
}  

.thoughts-headers{
  text-align: left;
}

/* =========================================================
   LANDING PAGE
   ========================================================= */

body.landing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* glitch text */
.font-glitch {
  font-family: serif;
  line-height: 1.1;
  height: 1.2em;
  display: inline-block;
}

/* landing links */
.landing a {
  color: rgb(200, 0, 0);
  font-size: 500%;
  margin-bottom: 20px;
  text-decoration: none;
}

/* =========================================================
   MAIN + TESTIMONY
   ========================================================= */

body.main,
body.testimony {
  font-family: Tahoma;
}

/* page content wrapper */
main {
  max-width: 700px;
  margin: 20px auto;
  line-height: 1.5;
}

/* headings */
h2 {
  margin-top: 40px;
}

/* text links */
.text-link {
  font-family: monospace;
  font-size: 16px;
  color: rgb(200, 0, 0);
  text-decoration: underline;
}

.text-link:hover {
  opacity: 0.7;
}

/* =========================================================
   VOLUME CONTROL
   ========================================================= */

#volumeControl {
  position: fixed;
  bottom: 12px;
  left: 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  font-size: 12px;
  color: rgb(200, 0, 0);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 9999;
  touch-action: manipulation;
  box-sizing: border-box;
  contain: layout paint;
}

#volumeSlider {
  -webkit-appearance: none;
  appearance: none;

  width: 100px;
  height: 6px;

  background: black;
  border: 1px solid rgb(200, 0, 0);
  outline: none;
  cursor: pointer;
}

/* WebKit (Chrome, Safari, iOS) */
#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;

  width: 10px;
  height: 10px;
  background: black;
  border: 1px solid rgb(200, 0, 0);
  border-radius: 0; /* IMPORTANT: prevents grey circle */
}

/* Firefox */
#volumeSlider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: black;
  border: 1px solid rgb(200, 0, 0);
  border-radius: 0;
}

/* =========================================================
   UPDATE LOG -- 18/01/26
   ========================================================= */
#updateLog {
  position: fixed;
  bottom: 12px;
  right: 12px;

  width: 260px;
  height: 180px; /* FIXED SIZE */

  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgb(200, 0, 0);
  border-radius: 8px;

  font-family: monospace;
  font-size: 12px;
  color: rgb(200, 0, 0);

  overflow-y: auto; /* INTERNAL SCROLL */
  box-sizing: border-box;

  z-index: 9998;
  contain: layout paint;
}

#updateLog .title {
  font-weight: bold;
  margin-bottom: 8px;
  text-transform: lowercase;
}

/* list reset */
#updateLog ul {
  margin: 0;
  padding: 0;
}

/* log row layout */
#updateLog li {
  display: grid;
  grid-template-columns: 1fr auto; /* text | date */
  gap: 8px;

  list-style: none;
  padding: 2px 0;
}

/* left side */
#updateLog .log-text {
  text-align: left;
  word-break: break-word;
}

/* right side (fixed date column) */
#updateLog .log-date {
  text-align: right;
  white-space: nowrap;
  opacity: 0.8;
}

/* =========================
   UPDATE LOG SCROLLBAR
   ========================= */

/* Firefox */
#updateLog {
  scrollbar-width: thin;
  scrollbar-color: rgb(200, 0, 0) black;
}

/* Chromium / Safari */
#updateLog::-webkit-scrollbar {
  width: 8px;
}

#updateLog::-webkit-scrollbar-track {
  background: black;
}

#updateLog::-webkit-scrollbar-thumb {
  background-color: rgb(200, 0, 0);
  border: 1px solid black;
}

#updateLog::-webkit-scrollbar-thumb:hover {
  background-color: rgb(230, 0, 0);
}

@media (max-width: 600px) {
  #updateLog {
    /*
    font-size: 11px;
    padding: 8px 10px;
    */
    
    display: none; /* couldn't get the update log to look good on mobile :P */
  }
}

/* =========================================================
   GUESTBOOK
   ========================================================= */
   
.atabook-iframe {
  width: 100%;
  height: 500vh;
  border: none;
  display: block;
}

.atabook-iframe {
  scrollbar-width: none;      /* Firefox */
}

.atabook-iframe::-webkit-scrollbar {
  display: none;              /* Chrome / Safari */
}

/* =========================================================
   GUESTBOOK VISIBILITY
   ========================================================= */

#guestbookWrapper.hidden {
  display: none;
}

/* =========================================================
   CATBOX STATUS
   ========================================================= */

.catbox-status {
  margin: 16px 0 24px;
  font-family: monospace;
  font-size: 13px;
  opacity: 0.8;
}

/* =========================================================
   CATBOX STATUS ANIMATION
   ========================================================= */

.catbox-status {
  margin: 16px 0 24px;
  font-family: monospace;
  font-size: 13px;
  opacity: 0.8;
  animation: catboxPulse 3.5s ease-in-out infinite;
}

.catbox-status.down {
  opacity: 0.9;
}

/* subtle, no layout shift */
@keyframes catboxPulse {
  0%   { opacity: 0.65; }
  50%  { opacity: 0.9; }
  100% { opacity: 0.65; }
}

/* respect accessibility */
@media (prefers-reduced-motion: reduce) {
  .catbox-status {
    animation: none;
  }
}

/* =========================
   GLOBAL SCROLLBAR STYLING
   ========================= */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgb(200, 0, 0) black;
}

/* Chromium / Safari / iOS */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: black;
}

*::-webkit-scrollbar-thumb {
  background-color: rgb(200, 0, 0);
  border: 1px solid black;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgb(230, 0, 0);
}

/* =========================================================
   STAR SHAPE (PIXEL CROSS)
   ========================================================= */

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgb(200, 0, 0);
  opacity: 0;

  /* cross shape */
  box-shadow:
    0 0 0 rgb(200, 0, 0),
    -2px 0 0 rgb(200, 0, 0),
     2px 0 0 rgb(200, 0, 0),
     0 -2px 0 rgb(200, 0, 0),
     0  2px 0 rgb(200, 0, 0),
     0 0 6px rgba(200, 0, 0, 0.6);

  animation: starPulse linear infinite;
}

/* fade + glow only */
@keyframes starPulse {
  0%   { opacity: 0; }
  40%  { opacity: 0.9; }
  60%  { opacity: 0.9; }
  100% { opacity: 0; }
}


/* =========================================================
   STARFIELD LAYER FIX (NO FIXED BREAKAGE)
   ========================================================= */

/* starfield stays at the very back */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -9999999;
  pointer-events: none;
}

/* main content layer */
main {
  position: relative;
  z-index: 1;
}

/* fixed UI elements explicitly above */
#volumeControl,
#updateLog {
  z-index: 10;
}

/* respect accessibility */
@media (prefers-reduced-motion: reduce) {
  .star {
    animation: none;
    opacity: 0.5;
  }
}

/* =========================================================
   GUESTBOOK FADE‑IN
   ========================================================= */

#guestbookWrapper {
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* visible state */
#guestbookWrapper.loaded {
  opacity: 1;
}

#guestbookWrapper {
  position: relative;
  z-index: 10;
}

/* =========================================================
   BOTTOM CENTER SLIDING NOTICE (DESKTOP ONLY)
   ========================================================= */

#bottomMarquee {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);

  width: 500px;          /* controls slide range */
  height: 18px;

  overflow: hidden;
  pointer-events: none;
  z-index: 9997; /* below volume + update log, above stars */
}

.marquee-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;

  font-family: monospace;
  font-size: 12px;
  color: rgb(200, 0, 0);
  opacity: 0.85;

  animation:
    subtleSlide 6s ease-in-out infinite,
    marqueeGlow 3.5s ease-in-out infinite;

  text-shadow: 0 0 6px rgba(200, 0, 0, 0.4);
}

/* subtle left-right movement */
@keyframes subtleSlide {
  0%   { transform: translateX(-50%) translateX(-20px); }
  50%  { transform: translateX(-50%) translateX(20px); }
  100% { transform: translateX(-50%) translateX(-20px); }
}

/* soft glow pulse */
@keyframes marqueeGlow {
  0%   { opacity: 0.6; }
  50%  { opacity: 0.9; }
  100% { opacity: 0.6; }
}

/* =========================================================
   DISABLE ON MOBILE
   ========================================================= */

@media (max-width: 600px) {
  #bottomMarquee {
    display: none;
  }
}

/* accessibility */
@media (prefers-reduced-motion: reduce) {
  .marquee-text {
    animation: none;
  }
}
