/* ==========================
   Universal Selector
========================== */
* {
  cursor: url("/images/cursor.png"), auto;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
}

/* ==========================
   Body Layout
========================== */
body {
  position: relative;
  font-family: "Geo", sans-serif;
  font-weight: 400;
  font-size: 18px;
  background-image: url("images/usagi-info-box.png");
  background-repeat: repeat;
  color: rgba(20,36,51,1);
}

/* ==========================
   Main Layout
========================== */
main {
  max-width: 1200px;
  margin: 100px auto 0 auto;
  padding: 20px;
  text-align: center;
  font-weight: bold;
  border: solid rgba(20,36,51,1);
  border-top: 40px solid rgba(20,36,51,1);
  border-radius: 20px;
  background-color: rgba(208,236,198,0.8);
}

/* ==========================
   Window Stack Layout
========================== */
.window-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (min-width: 768px) {
  .window-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================
   Individual Window Containers
========================== */
.left-container,
.middle-container,
.right-container,
.linkback-box,
.guestbook-container {
  border: 3px solid rgba(20,36,51,1);
  border-radius: 25px;
  background-color: rgba(208,236,198,0.9);
  overflow: hidden; /* keeps header radius clean */
}

.middle-container {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

/* ==========================
   Grid Container Top Row
========================== */
.grid-container-top {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,2fr) minmax(0,1fr);
  gap: 1.5rem;
  padding: 1rem;
}

/* Grid Container Middle Row */
.grid-container-middle {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr; /* Left | Middle | Right */
  gap: 1.5rem;
  padding: 1rem;
}

/* Ensure columns stack vertically */
.left-column,
.middle-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* ==========================
   Window Headers
========================== */
.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: solid rgba(20,36,51,1);
  border-radius: 15px 15px 0 0;
  background-color: rgba(20,36,51,1);
  margin-bottom: 20px;
}

.window-title {
  font-size: 1.5em;
  padding-left: 20px;
  color: white;
}

.window-controls {
  display: flex;
  gap: 10px;
  padding-right: 20px;
}

.window-controls button {
  width: 15px;
  height: 15px;
  cursor: pointer;
  background-color: rgba(211,248,192,1);
  outline: 1px solid white;
  font-weight: bold;
}

.window-controls button:hover {
  color: rgba(20,36,51,1);
  background-color: white;
}

/* ==========================
   Images / Media
========================== */
.responsive-img {
  border-radius: 20px;
  max-width: 100%;
  height: auto;
  padding: 5px;
}

.container-text-spacing {
  margin: 20px;
}

.about-label {
  width: 78%;
  height: auto;
}

.header-container {
  position: relative;
  overflow: visible;
}

/* ==========================
   Responsive Noiz Header
========================== */

.header-container::after {
  content: "";
  position: absolute;

  top: 0;
  right: 0;

  width: 40%;
  max-width: 500px;
  aspect-ratio: 1 / 1;

  background-image: url("images/noiz-header.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;

  pointer-events: none;
  transform: translate(30%, -22%);
  z-index: 10;
}

.header-banner {
  width: 100%;
  display: block;
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ==========================
   88x31 Site Buttons
========================== */
.site-button {
  width: 88px;
  height: 31px;
  max-width: none;
  display: inline-block;
  image-rendering: pixelated;
  flex-shrink: 0;
}

/* Linkback preview button */
.linkback-preview img {
  width: 88px;
  height: 31px;
  max-width: none;
  image-rendering: pixelated;
  margin-bottom: 10px;
  display: inline-block;
}

.linkback-box textarea {
  display: block;
  width: 90%;
  padding: 10px;
  margin: 10px 10px;
}

#linkbackBtn {
  display: inline-block;
  color: white;
  padding: 10px;
  background-color: rgba(20,36,51,1);
  border-radius: 5px;
  margin-bottom: 5px;
}

/* Optional button grid */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

/* ANIMATION FOR KOFI BORDER  */
/* 1. Register animatable property */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* 2. Container */
.border-animation {
  position: relative;
  display: inline-block;
  border-radius: 16px;
  padding: 3px; /* border thickness */
  overflow: hidden;
}

/* 3. Animated border */
.border-animation::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;

  background: conic-gradient(
    from var(--angle),
    #ff00cc,
    #3333ff,
    #00ffcc,
    #ffcc00,
    #ff00cc
  );

  animation: spin 4s linear infinite;
  z-index: 0;
}

/* 4. Image */
.border-animation img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 15px;

  position: relative;
  z-index: 1;

  background: #0b0b0f; /* 👈 IMPORTANT */
}

/* 5. Animation */
@keyframes spin {
  to {
    --angle: 360deg;
  }
}

/* ==========================
   Marquee
========================== */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;

  flex-shrink: 0;
  min-width: 0;
  width: 80%;

  margin: 0 auto;
}

.marquee-content {
  display: flex;
  gap: 1rem;
  width: max-content;
  list-style: none;
  padding: 10px;
  margin: 10px;
  animation: marquee-scroll 15s linear infinite;
}


.marquee-content li {
  flex-shrink: 0;
}

.marquee-content li img {
  height: 31px;
  width: auto;
  object-fit: contain;
}

/* Pause on hover */
.marquee:hover .marquee-content {
  animation-play-state: paused;
}

/* ==========================
   Keyframes for scrolling
========================== */
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Optional: smaller marquee on mobile */
@media (max-width: 600px) {
  .marquee {
    height: 40px;
  }

  .marquee-content li img {
    height: 25px;
  }
}

/* ==========================
   Guestbook
========================== */

.guestbook-container {
  display: flex;
  flex-direction: column;
  border: 3px solid rgba(20, 36, 51, 1);
  border-radius: 25px;
  background-color: rgba(20, 36, 51, 1);
}
  
.guestbook-styles {
  display: flex;
  flex-direction: column;
  text-align: center;
  border-radius: 15px;
  padding: 0px 10px 20px;
  background-color: rgba(24, 36, 49, 1);
  min-width: 0;
  border: 2px solid rgba(20,36,51,1);

  /* New: Wider form */
  width: 100%;
  max-width: 900px; /* max width on desktop */
  margin: 0 auto;   /* center within its column */
}

/* Text inside guestbook headers */
.guestbook-headers {
  color: white;
  padding: 10px;
  font-size: 0.9rem;
}

/* Inputs and textarea */
input.chum-style,
textarea.chum-style {
  all: unset;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 6px 10px;
  font-family: "Geo", sans-serif;
  font-weight: bold;
  font-size: 16px;
  color: black;
  background-color: rgba(208,236,198,1);
  box-sizing: border-box;
}

/* Textarea specific styling */
textarea.chum-style {
  resize: vertical;
  min-height: 16rem;   /* taller by default */
  max-height: 40rem;
  overflow-wrap: break-word;
  word-break: break-word;

  /* New: allow larger width within form */
  max-width: 850px;    /* slightly smaller than form to leave padding */
}

.chumroll-feed {
  overflow-y: auto;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================
   Responsive adjustments
========================== */
@media (max-width: 1024px) {
  .guestbook-styles {
    max-width: 100%;   /* full width on smaller screens */
  }

  textarea.chum-style {
    max-width: 100%;
    min-height: 12rem;
  }
}

@media (max-width: 600px) {
  textarea.chum-style {
    font-size: 14px;
    padding: 6px 10px;
  }
}

/* ==========================
   Guestbook Submit Button
========================== */
.guestbook-submit {
  all: unset;
  display: block;
  width: 90%;
  max-width: 600px;
  margin: 0 auto;

  text-align: center;
  padding: 10px 16px;
  font-size: 22px;

  color: rgba(20,36,51,1);
  background-color: rgba(208,236,198,1);
  border: 2px solid #6f8f6f;
  border-radius: 4px;
  cursor: pointer;

  white-space: nowrap;
}

@media (max-width: 600px) {
  .guestbook-submit {
    font-size: 18px;
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .guestbook-submit {
    font-size: 16px;
  }
}

/* ==========================
   Mood Buttons
========================== */
#moodButtons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
  background-color: rgba(163,197,148,1);
  padding: 18px;
}

.left-moods,
.right-moods {
  display: contents;
}

.mood-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(208,236,198,1);
  padding: 5px;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.mood-btn {
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.mood-btn:hover {
  transform: scale(1.2);
}

.mood-img[data-code="[chummy]"] {
  background-image: url("images/chummy.png");
}

.mood-img[data-code="[pranky]"] {
  background-image: url("images/pranky.png");
}

.mood-img[data-code="[pleasant]"] {
  background-image: url("images/pleasant.png");
}

.mood-img[data-code="[smooth]"] {
  background-image: url("images/smooth.png");
}

.mood-img[data-code="[distraught]"] {
  background-image: url("images/distraught.png");
}

.mood-img[data-code="[rancorous]"] {
  background-image: url("images/rancorous.png");
}

/* ==========================
   Scroll Areas
========================== */
.memes-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: 850px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================
   Cosplay Carousel
========================== */

.carousel {
  position: relative;
  width: 400px;
  margin: auto;
  overflow: hidden;
}

.carousel-track img {
  width: 100%;
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  cursor: pointer;
}

.prev { left: 10px; }
.next { right: 10px; }

/* ==========================
   Resource List
========================== */
.resource-list {
  list-style: none;
}

.resource-list li {
  margin: 6px 0;
}

.resource-list a {
  text-decoration: none;
  color: rgba(20,36,51,1);
  font-weight: bold;
  font-size: 20px;
}

.resource-list a:hover {
  color: white;
}

/* ==========================
   Footer
========================== */
#footer {
  background-color: rgba(20,36,51,1);
  padding: 20px;
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  gap: 15px;
}

.footer-icons {
  display: flex;
  gap: 15px;
}

.footer-img {
  width: 40px;
}

.footer-img:hover {
  transform: scale(1.1);
}

/* ==========================
   Media Queries
========================== */

/* Mobile */
@media (max-width: 900px) {
  .grid-container-top,
  .grid-container-middle {
   grid-template-columns: 1fr;
  }
  .main-container,
  .left-container,
  .middle-container,
  .right-container {
    width: 100%;
  }
  /* Pseudo-element for decorative Noiz image */
  body::before {
    top: 0%;
    right: -10%;
    max-width: 300px;
  }
}

/* Tablet */
@media (max-width: 768px) {
  /* Pseudo-element for decorative Noiz image */
  body::before {
    top: -1%;
    right: -15%;
    max-width: 400px;
  }
}

/* Small phone */
@media (max-width: 500px) {
  #moodButtons {
    grid-template-columns: 1fr;
  }

  .mood-item {
    white-space: normal;
    justify-content: center;
    text-align: center;
  }
  
  .mood-inline {
  width: 20px;   /* or 24px / 28px depending on your style */
  height: 20px;
  vertical-align: middle;
}

  .pester-white {
    font-size: 0.9rem;
  }

  textarea.chum-style {
    min-height: 8rem;
  }
}

/* Hide decorative image on touch devices */
@media (hover: none) and (pointer: coarse) {
  body::before {
    display: none;
  }
}

.welcome-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 40px;
  margin: 0 auto;
  padding: 20px 20px;
}