/* =====================================================
   glitterbox.css — shared styles for the whole site
   Palette, type, and layout tokens live at the top.
   ===================================================== */

:root {
  --hot-pink: #e63e63;      /* bright cochineal red */
  --purple: #a86bc9;        /* bright chicha morada orchid */
  --electric-blue: #2bc4ba; /* bright Andes turquoise */
  --acid-green: #f4a300;    /* inti gold */
  --sun-yellow: #f6d374;    /* warm maize gold */
  --deep-navy: #150b1f;     /* near-black night violet */
  --ink: #f3e6cf;           /* warm cream text, for dark boxes */
  --paper: #241a38;         /* deep violet-brown box background */
  --paper-dim: #1c1330;     /* darker card background */
  --moonlight: #f8ecd2;     /* bright cream, for high-contrast elements */

  --font-display: 'Bungee', 'Arial Black', sans-serif;
  --font-hand: 'Permanent Marker', cursive;
  --font-body: Verdana, 'Trebuchet MS', sans-serif;
  --font-pixel: 'VT323', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--deep-navy);
  cursor: url('../images/cursors/bunny-normal.cur'), auto;
}

a, button, .btn, nav.mainnav a {
  cursor: url('../images/cursors/bunny-link.cur'), pointer;
}

/* ---------- Night sky backdrop: fixed layer behind all content ---------- */
.night-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0618 0%, #140e28 30%, #241a3d 55%, #3d2140 78%, #6b2f3a 100%);
}

.night-sky .stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(255,255,255,0.9) 0px, rgba(255,255,255,0.9) 1px, transparent 2px),
    radial-gradient(circle at 80% 8%, rgba(255,255,255,0.7) 0px, rgba(255,255,255,0.7) 1px, transparent 2px),
    radial-gradient(circle at 40% 25%, rgba(255,255,255,0.8) 0px, rgba(255,255,255,0.8) 1px, transparent 2px),
    radial-gradient(circle at 65% 12%, rgba(255,255,255,0.6) 0px, rgba(255,255,255,0.6) 1px, transparent 2px),
    radial-gradient(circle at 90% 35%, rgba(255,255,255,0.9) 0px, rgba(255,255,255,0.9) 1px, transparent 2px),
    radial-gradient(circle at 25% 45%, rgba(244,163,0,0.55) 0px, rgba(244,163,0,0.55) 1px, transparent 2px),
    radial-gradient(circle at 55% 55%, rgba(255,255,255,0.5) 0px, rgba(255,255,255,0.5) 1px, transparent 2px);
  background-size: 220px 220px, 260px 260px, 190px 190px, 240px 240px, 170px 170px, 300px 300px, 200px 200px;
  animation: twinkle 6s linear infinite;
}

.night-sky .moon {
  position: absolute;
  top: 5%;
  right: 12%;
  width: 100px;
  height: auto;
  filter:
    drop-shadow(0 0 12px rgba(244,163,0,0.5))
    drop-shadow(0 0 30px rgba(244,163,0,0.3));
}

.night-sky .landscape {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 26vh;
  display: block;
}

.night-sky .ridge { fill: #150b1f; }

.night-sky .critters {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 26vh;
  pointer-events: none;
}

.night-sky .llama-img {
  position: absolute;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.night-sky .llama-a { left: 7.5%; top: 27%; width: 32px; }
.night-sky .llama-b { left: 38.5%; top: 14%; width: 30px; }
.night-sky .llama-c { left: 65.5%; top: 26%; width: 28px; }
.night-sky .llama-d { left: 88.5%; top: 22%; width: 32px; }

@keyframes twinkle {
  0%, 100% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  50% { background-position: 15px 20px, -20px 10px, 10px -15px, -10px -10px, 20px 15px, -12px 8px, 8px -10px; }
}

a { color: var(--electric-blue); }
a:hover { color: var(--sun-yellow); }

img { max-width: 100%; display: block; }

/* ---------- Shimmer banner (signature element) ---------- */
.shimmer-banner {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  letter-spacing: 0.5px;
  line-height: 1.5;
  max-width: 640px;
  margin: 10px auto 16px;
  padding: 12px 22px;
  border-radius: 40px;
  background: var(--moonlight);
  border: 3px solid var(--hot-pink);
  box-shadow: 4px 4px 0 var(--purple);
  color: var(--hot-pink);
  animation: color-cycle 7s ease-in-out infinite;
}
@keyframes color-cycle {
  0%, 100% { color: #c8102e; }
  33% { color: #5b2a6e; }
  66% { color: #1f9e96; }
}

/* ---------- Page shell ---------- */
.page-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 14px 90px;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 200px;
  gap: 16px;
  align-items: start;
}

.layout > aside,
.layout > main {
  min-width: 0;
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
}

/* ---------- Generic "table cell" box, dashed border look ---------- */
.box {
  background: var(--paper);
  border: 3px dashed var(--purple);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--acid-green);
  padding: 12px;
  margin-bottom: 16px;
}

.box h2, .box h3 {
  font-family: var(--font-display);
  color: var(--hot-pink);
  text-shadow: 1px 1px 0 var(--deep-navy);
  margin-top: 0;
  font-size: 1rem;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.box-title-bar {
  background: linear-gradient(90deg, var(--hot-pink), var(--purple));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 3px;
  margin: -12px -12px 10px -12px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}

/* ---------- Left sidebar / profile card ---------- */
.profile-card { text-align: center; }

.profile-pic {
  width: 140px;
  height: 140px;
  margin: 0 auto 10px;
  border-radius: 6px;
  border: 4px solid var(--electric-blue);
  object-fit: cover;
  background: repeating-linear-gradient(45deg, var(--hot-pink), var(--hot-pink) 10px, var(--sun-yellow) 10px, var(--sun-yellow) 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--deep-navy);
  text-shadow: 1px 1px 0 rgba(255,255,255,0.6);
}

.status-line {
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  color: var(--sun-yellow);
  margin-bottom: 2px;
}

.status-date {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--ink);
  opacity: 0.7;
  margin: 0;
}

nav.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.mainnav li { margin-bottom: 6px; }

nav.mainnav a {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--deep-navy);
  background: var(--acid-green);
  border: 2px solid var(--deep-navy);
  border-radius: 4px;
  padding: 8px 6px;
  box-shadow: 2px 2px 0 var(--purple);
  transition: transform 0.1s ease;
}

nav.mainnav a:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--purple);
  background: var(--sun-yellow);
  color: var(--deep-navy);
}

nav.mainnav a.active {
  background: var(--hot-pink);
  color: #fff;
}

/* ---------- Marquee (currently listening) ---------- */
.marquee-box {
  overflow: hidden;
  white-space: nowrap;
  background: var(--deep-navy);
  border: 2px solid var(--acid-green);
  border-radius: 4px;
  padding: 4px 0;
}
.marquee-track {
  display: inline-block;
  padding-left: 100%;
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--acid-green);
  animation: marquee 12s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ---------- Right sidebar widgets ---------- */
.counter {
  font-family: var(--font-pixel);
  font-size: 1.6rem;
  text-align: center;
  background: #000;
  color: var(--acid-green);
  border: 2px solid var(--acid-green);
  border-radius: 4px;
  padding: 6px;
  letter-spacing: 3px;
}

.blinkie-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.blinkie {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  background: var(--deep-navy);
  color: var(--sun-yellow);
  border: 1px solid var(--sun-yellow);
  padding: 3px 6px;
  border-radius: 3px;
  animation: blink-fade 1.6s ease-in-out infinite;
}
.blinkie:nth-child(2) { animation-delay: 0.3s; }
.blinkie:nth-child(3) { animation-delay: 0.6s; }
.blinkie:nth-child(4) { animation-delay: 0.9s; }
@keyframes blink-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- Guestbook ---------- */
.guestbook-entry {
  border-bottom: 1px dotted var(--purple);
  padding: 6px 0;
  font-size: 0.85rem;
}
.guestbook-entry b { color: var(--hot-pink); }

.guestbook-form textarea,
.guestbook-form input[type="text"] {
  width: 100%;
  font-family: var(--font-body);
  background: var(--paper-dim);
  color: var(--ink);
  border: 2px solid var(--purple);
  border-radius: 4px;
  padding: 6px;
  margin-bottom: 6px;
}

.btn {
  font-family: var(--font-display);
  font-size: 0.7rem;
  background: var(--hot-pink);
  color: #fff;
  border: 2px solid var(--deep-navy);
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--acid-green);
}
.btn:hover { background: var(--purple); }

.pager-btn {
  font-family: var(--font-display);
  font-size: 0.55rem;
  background: var(--hot-pink);
  color: #fff;
  border: 1px solid var(--deep-navy);
  border-radius: 3px;
  padding: 3px 8px;
  cursor: pointer;
  box-shadow: 1px 1px 0 var(--acid-green);
  white-space: nowrap;
}
.pager-btn:hover { background: var(--purple); }
.pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.pager-btn:disabled:hover { background: var(--hot-pink); }

/* ---------- Content cards (recipes / blog / media) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.card-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card {
  background: var(--paper-dim);
  border: 2px solid var(--purple);
  border-radius: 6px;
  padding: 10px;
  box-shadow: 3px 3px 0 var(--electric-blue);
  overflow-wrap: break-word;
  min-width: 0;
}

.card h3 { margin-top: 0; }

.tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  background: var(--electric-blue);
  color: var(--deep-navy);
  padding: 1px 8px;
  border-radius: 10px;
  margin: 0 4px 4px 0;
}

/* category-coded variants — same shape, different meaning at a glance */
.tag-food    { background: #f3b8c4; color: #7a1020; }
.tag-history { background: #d6bfe6; color: #4a2260; }
.tag-books   { background: #b9e6e0; color: #14615c; }
.tag-fiction { background: #f8dc8e; color: #6b4a06; }

.category-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  align-items: center;
}

.polaroid {
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px 8px 26px;
  box-shadow: 3px 3px 0 var(--acid-green);
  transform: rotate(var(--tilt, -2deg));
}
.polaroid .frame {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 2px;
}
.polaroid figcaption {
  font-family: var(--font-hand);
  color: #4a1f3d;
  text-align: center;
  padding-top: 8px;
  font-size: 0.95rem;
}

/* ---------- Bottom now-playing widget ---------- */
.now-playing-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--deep-navy);
  border-top: 2px solid var(--acid-green);
  padding: 4px 14px;
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  color: var(--sun-yellow);
}

.now-playing-bar .now-playing-title {
  color: var(--moonlight);
}

.now-playing-bar audio {
  height: 32px;
  max-width: 260px;
}

/* ---------- Page intro text (e.g. top of recipes.html) — change font-size here ---------- */
[data-page-intro] {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- Recipe page ---------- */

.recipe-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--deep-navy);
  margin-bottom: 8px;
}

.recipe-hero {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--purple);
  margin-bottom: 10px;
}

/* ---------- Recipe/blog post content text — change font-size here ---------- */
[data-recipe-detail] p,
[data-recipe-detail] li,
[data-post-detail] p,
[data-post-detail] li {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- Recipe/blog card preview text — change font-size here ---------- */
.card p,
.card li {
  font-size: 0.9rem;
  line-height: 1.5;
}

[data-post-gallery] {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
 
.post-gallery-img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 2px solid var(--deep-navy);
}
 
.post-gallery-item {
  margin: 0;
}
 
.post-gallery-item figcaption {
  font-family: var(--font-body);
  color: var(--ink);
  font-size: 0.85rem;
  text-align: center;
  padding-top: 14px;
  line-height: 1.4;
}
 
.tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  background: var(--electric-blue);
  color: var(--deep-navy);
  padding: 1px 8px;
  border-radius: 10px;
  margin: 0 4px 4px 0;
}
 
/* category-coded variants — same shape, different meaning at a glance */
.tag-food    { background: #f3b8c4; color: #7a1020; }
.tag-history { background: #d6bfe6; color: #4a2260; }
.tag-books   { background: #b9e6e0; color: #14615c; }
.tag-fiction { background: #f8dc8e; color: #6b4a06; }
 
.category-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  align-items: center;
}
 
.polaroid {
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px 8px 26px;
  box-shadow: 3px 3px 0 var(--acid-green);
  transform: rotate(var(--tilt, -2deg));
}
.polaroid .frame {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 2px;
}
.polaroid figcaption {
  font-family: var(--font-hand);
  color: #4a1f3d;
  text-align: center;
  padding-top: 8px;
  font-size: 0.95rem;
}

footer.sitefoot {
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--moonlight);
  margin-top: 20px;
}

hr.sparkle {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, var(--hot-pink), var(--sun-yellow), var(--electric-blue), var(--purple));
  margin: 16px 0;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Mobile — everything here only applies at 820px and below,
   desktop styling above that width is untouched ---------- */
@media (max-width: 820px) {
  html, body { overflow-x: hidden; }
 
  .page-wrap { padding: 10px 12px 90px; }
 
  .shimmer-banner {
    font-size: 1rem;
    padding: 8px 14px;
    margin: 8px auto 12px;
  }
 
  .night-sky .moon { width: 48px; top: 5%; right: 6%; }
  .night-sky .landscape { height: 18vh; }
 
  .box { padding: 10px; }
  .box-title-bar { font-size: 0.75rem; }
 
  .profile-pic { width: 110px; height: 110px; font-size: 0.95rem; }
 
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .recipe-hero { max-height: 220px; }
 
  .now-playing-bar { font-size: 0.85rem; padding: 6px 10px; gap: 6px; }
  .now-playing-bar audio { max-width: 200px; height: 28px; }
}
