/* --- Title Header Variables --- */
:root {
  --title-nav: "Navigation.ref";
  --title-about: "About.mem";
  --title-updates: "Updates.log";
}

/* --- Typography & Fonts --- */
a {
  color: #c6ad75;
  text-decoration: none;
  transition: text-shadow 0.3s ease, color 0.3s ease;
}

a:hover {
  color: #680822;
  text-shadow:
    0 0 6px #680822,
    0 0 12px #680822,
    0 0 18px #680822;
}

@font-face {
  font-family: 'witch';
  src: url('https://caelivane.neocities.org/fonts/witch.woff2') format('woff2'),
       url('https://caelivane.neocities.org/fonts/witch.woff') format('woff'),
       url('https://caelivane.neocities.org/fonts/witch.ttf') format('truetype');
}

@font-face {
  font-family: 'arcade';
  src: url('https://caelivane.neocities.org/fonts/arcade.woff2') format('woff2'),
       url('https://caelivane.neocities.org/fonts/arcade.woff') format('woff'),
       url('https://caelivane.neocities.org/fonts/arcade.ttf') format('truetype');
}

/* --- Box Headers from Variables --- */
html body #sidebar::before {
  content: var(--title-nav);
}
html body #about-box::before {
  content: var(--title-about);
}
html body #updates-box::before {
  content: var(--title-updates);
}

#sidebar,
#about-box,
#updates-box {
  padding-top: 60px;
  box-sizing: border-box;
}

/* --- Page Background & Font Defaults --- */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: #f8f1e7;
  background-image: url('https://caelivane.neocities.org/images/tiles/misc341.jpg');
  background-repeat: repeat;
  font-family: 'witch', serif;
  color: #000000;
}

body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --- Layout --- */
#page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#main-layout {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1245px;
  margin-top: 20px;
}

#content-column {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  align-items: flex-start;
}

#about-box,
#updates-box {
  flex: 1;
  max-width: 300px;
  min-width: 150px;
  width: 100%;
}

@media (max-width: 768px) {
  #content-column {
    flex-direction: column;
  }
}

#main-content-wrapper {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#main-content {
  background-color: #371d10;
  color: #451b1b;
  flex: 1 1 500px;
  min-width: 300px;
  padding: 20px;
  box-sizing: border-box;
}

/* --- Title Header --- */
#site-title {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3em;
  color: #bbb0ae;
  text-align: center;
  font-family: 'arcade', monospace;
  margin: 10px auto;
  padding-right: 0.5em;
  text-shadow:
    0 0 12px rgba(192, 192, 192, 0.4),
    0 0 24px rgba(192, 192, 192, 0.3);
  animation: glowPulse 3s ease-in-out infinite;
}

#site-title h1 {
  margin: 0;
}

#site-title::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0px,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );
}

#site-title::after {
  content: '█';
  display: inline-block;
  width: 0.545em;
  height: 1em;
  background-color: #bbb0ae;
  animation: blink 3s infinite;
  margin-left: 10px;
  position: relative;
  top: 0.1em;
  text-shadow:
    0 0 10px rgba(192, 192, 192, 0.6),
    0 0 18px rgba(192, 192, 192, 0.4);
  flex-shrink: 0;
}

@keyframes glowPulse {
  0%, 100% {
    text-shadow:
      0 0 12px rgba(192, 192, 192, 0.4),
      0 0 24px rgba(192, 192, 192, 0.3);
  }
  50% {
    text-shadow:
      0 0 16px rgba(121, 92, 52, 0.6),
      0 0 32px rgba(121, 92, 52, 0.5);
  }
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* --- Sidebar / Boxes --- */
#sidebar,
#about-box,
#updates-box {
  background-color: #c6ad75;
  color: #451b1b;
  position: relative;
  padding-top: 30px;
  padding-left: 10px;
  padding-right: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Size Rules */
#sidebar {
  width: 225px;
  flex: 0 0 225px;
}

#about-box,
#updates-box {
  width: 300px;
}

#updates-box {
  max-height: 207px;
  overflow-y: auto;
}

/* --- Sidebar Title Headers (from CSS variables) --- */
#sidebar::before {
  content: var(--title-nav);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  background-color: #680822;
  color: #c6ad75;
  font-family: 'witch', monospace;
  font-size: 1.2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 28px;
  border-bottom: 2px solid #000;
  padding: 0 10px;
  box-sizing: border-box;
  padding-top: 8px;
}

#about-box::before {
  content: var(--title-about);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background-color: #680822;
  color: #c6ad75;
  font-family: 'witch', monospace;
  font-size: 1.2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 30px;
  border-bottom: 2px solid #000;
  padding: 0 10px;
  box-sizing: border-box;
  padding-top: 5px;
}

#updates-box::before {
  content: var(--title-updates);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background-color: #680822;
  color: #c6ad75;
  font-family: 'witch', monospace;
  font-size: 1.2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 30px;
  border-bottom: 2px solid #000;
  padding: 0 10px;
  box-sizing: border-box;
  padding-top: 5px;
}

#guestbook-box {
  background-color: #c6ad75;
  color: #451b1b;
  position: relative;
  padding-top: 30px;
  padding-left: 10px;
  padding-right: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  width: 280px;
  max-width: 280px;
  font-family: 'witch', monospace;
}

/* Optional header like the others */
#guestbook-box::before {
  content: "Guestbook.txt";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background-color: #680822;
  color: #c6ad75;
  font-family: 'witch', monospace;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  line-height: 30px;
  border-bottom: 2px solid #000;
  padding: 0 10px;
  box-sizing: border-box;
  padding-top: 5px;
}

/* --- Sidebar List --- */
#sidebar {
  background-color: #371d10;
  font-family: 'witch', monospace;
  padding: 5px;
  color: #c6ad75;
}

.sitemap-header {
  background-color: #680822;
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
  margin: 10px 0 5px;
  padding: 5px;
  border-color: #c6ad75;
  border: 2px solid #231709;
  font-family: 'witch', monospace;
  letter-spacing: 1px;
}

.sitemap-list {
  list-style: none;
  padding-top: 5px;
  padding-left: 5px;
  margin: 0 0 5px;
}

.sitemap-list li::before {
  content: "├";
  margin-right: 5px;
  color: #c6ad75;
}

/* Optional pixel art */
#nav-top {
  text-align: center;
  margin: 10px 0;
}

/* --- Footer --- */
footer {
  background-color: #680822;
  color: #c6ad75;
  text-align: center;
  width: 100%;
  font-size: 0.9em;
  padding: 10px 0;
  position: relative;
}

/* --- Custom Scrollbar --- */
/* --- Updates Box Scrollbar --- */
#updates-box::-webkit-scrollbar {
  width: 18px;
  background-color: #2a1a1a;
}

#updates-box::-webkit-scrollbar-track {
  background-color: #2a1a1a;
  border: 2px solid #c6ad75;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
}

#updates-box::-webkit-scrollbar-thumb {
  background-color: #680822;
  border: 2px solid #c6ad75;
  border-radius: 0;
  box-shadow: inset 0 0 6px #00000066;
}

/* Top arrow */
#updates-box::-webkit-scrollbar-button:single-button:vertical:decrement {
  height: 18px;
  background: url('data:image/svg+xml;utf8,<svg fill="%23c6ad75" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 4l4 6H4z"/></svg>') no-repeat center;
  background-color: #231709;
  display: block;
}

/* Bottom arrow */
#updates-box::-webkit-scrollbar-button:single-button:vertical:increment {
  height: 18px;
  background: url('data:image/svg+xml;utf8,<svg fill="%23c6ad75" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 6l4 6 4-6z"/></svg>') no-repeat center;
  background-color: #231709;
  display: block;
}

/* Hide ghost arrows */
#updates-box::-webkit-scrollbar-button:vertical:increment:single-button:decrement,
#updates-box::-webkit-scrollbar-button:vertical:decrement:single-button:increment {
  display: none;
}

#spotify-box {
  background-color: #c6ad75;
  color: #fceaff;
  position: relative;
  padding-top: 40px;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 10px;
  width: 300px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.spotify-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background-color: #680822;
  color: #c6ad75;
  font-family: 'witch', monospace;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  padding-left: 10px;
  border-bottom: 2px solid #000;
  box-sizing: border-box;
  overflow: hidden;
}




  50% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}


  98%, 99% { opacity: 0; }
}

/* Embed frame wrapper */
.spotify-embed-wrapper {
  margin: 0 auto;
  max-width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.spotify-embed-wrapper iframe {
  border-radius: 12px;
  width: 100%;
  height: 152px;
  border: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  #main-layout {
    flex-direction: column;
    align-items: stretch;
  }

  #about-box,
  #updates-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    box-sizing: border-box;
  }

  #sidebar {
    order: -1;
  }

  #content-column {
    width: 100%;
  }
  
  :root {
  --title-nav: "Navigation.ref";
  --title-about: "About.mem";
  --title-updates: "Updates.log";
}

html body #sidebar::before {
  content: var(--title-nav);
}
html body #about-box::before {
  content: var(--title-about);
}
html body #updates-box::before {
  content: var(--title-updates);
}

#sidebar,
#about-box,
#updates-box {
  padding-top: 60px;
  box-sizing: border-box;
}
  
  50% { transform: translateX(100px); }
  100% { transform: translateX(0); }
}


  98%, 99% { opacity: 0; }
}

.spotify-header {
  position: relative;
  width: 100%;
  background-color: #680822;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 2px solid #000;
  font-family: 'witch', monospace;
  color: #fceaff;
  padding: 0 10px;
  box-sizing: border-box;
}

.scrolling-text {
  position: absolute;
  white-space: nowrap;
  animation: scrollText 3s linear infinite;
  will-change: transform;
}