:root {
  --background-color: #fff9e6;
  --content-background-color: #ffffff;
  --sidebar-background-color: #fff4cc;

  --text-color: #000000;
  --sidebar-text-color: #333333;
  --link-color: #cc9900;
  --link-color-hover: #ff6600;

  --font: "Tahoma", "Verdana", sans-serif;
  --heading-font: "Trebuchet MS", "Arial Black", sans-serif;
  --font-size: 14px;

  --margin: 5px;
  --padding: 15px;
  --border: 2px solid #000000; /* black border for contrast */
  --round-borders: 6px;
  --sidebar-width: 225px;
}

/* BASIC LAYOUT */
body {
  background: #fff9e6 url("https://i.imgur.com/Vz6W6.png") repeat;
  background-attachment: fixed;
  font-family: "Tahoma", "Verdana", sans-serif;
  font-size: 14px;
  margin: 0;
  padding: 5px;
  color: #000000;
}

.layout {
  width: 1000px;
  margin: auto;
  display: grid;
  grid-gap: 5px;
  grid-template:
    "header header" auto
    "main rightSidebar" auto
    "footer footer" auto
    / auto 225px;
}

/* HEADER */
header {
  grid-area: header;
  background: linear-gradient(to bottom, #fff7cc, #ffcc33);
  border: 2px solid #000000;
  border-radius: 6px;
  padding: 18px;
  color: #000;
}

header h1 {
  margin: 0 0 8px 0;
  color: #FFFB05;
  font-size: 48px;
  text-shadow: 0 0 8px #A333FF, 0 0 16px #3348FF, 0 0 24px #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: bold;
}

header .subtitle {
  margin: 0 0 18px 0;
  font-size: 0.95em;
  color: #333333;
}

/* NAV */
header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

header nav ul li a {
  padding: 6px 12px;
  border: 2px solid #000000;
  border-radius: 4px;
  background: linear-gradient(to bottom, #fff, #ffe066);
  text-decoration: none;
  color: #cc9900;
  font-weight: bold;
}

header nav ul li a:hover {
  background: linear-gradient(to bottom, #fff2b3, #ff9933);
  color: #000000;
}

/* MAIN CONTENT */
main {
  grid-area: main;
  background: #ffffff;
  padding: 15px;
  border: 2px solid #000000;
  border-radius: 6px;
}

main h1, main h2, main h3 {
  font-family: "Trebuchet MS", "Arial Black", sans-serif;
  color: #cc6600;
  text-shadow: 1px 1px 0 #000000;
}

main blockquote {
  background: #fff9e6;
  border-left: 5px solid #000000;
  padding: 10px;
  font-style: italic;
}

/* SIDEBAR */
aside {
  grid-area: rightSidebar;
  background: #fff4cc;
  padding: 15px;
  border: 2px solid #000000;
  border-radius: 6px;
  color: #333333;}

.sidebar-title {
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 5px;
  color: #cc6600;
  text-shadow: 1px 1px 0 #000000;
}

/* FOOTER */
footer {
  grid-area: footer;
  text-align: center;
  font-size: 0.8em;
  padding: 10px;
  border: 2px solid #000000;
  border-radius: 6px;
  background: linear-gradient(to bottom, #fff7cc, #ffcc33);
  color: #000000;
}

/* SIDEBAR SCROLL FIX */
aside {
  grid-area: rightSidebar;
  background: var(--sidebar-background-color);
  padding: var(--padding);
  border: var(--border);
  border-radius: var(--round-borders);
  color: var(--sidebar-text-color);

  max-height: calc(100vh - 140px); /* keeps it within screen height */
  overflow-y: auto; /* allows independent scroll */
  overflow-x: hidden; /* no horizontal scroll */
}

.journal-body {
  flex: 1;
  max-height: 70vh; /* adjust to fit under header/footer */
  overflow-y: auto;
  padding-right: 5px; /* avoid scrollbar overlap */
}

.entry-content {
  max-height: 200px; /* adjust per entry */
  overflow-y: auto;
}

/* Windows XP–style scrollbar with Rin Kagamine yellow/orange */

/* Scrollbar width & base */
main .journal-body::-webkit-scrollbar,
aside::-webkit-scrollbar {
  width: 16px;
  background-color: #c0c0c0; /* Track base color */
}

/* Track (background behind thumb) */
main .journal-body::-webkit-scrollbar-track,
aside::-webkit-scrollbar-track {
  background: linear-gradient(to bottom, #d4d0c8 0%, #b0b0b0 100%);
  border-left: 1px solid #fff;   /* highlight left/top */
  border-right: 1px solid #808080; /* shadow right/bottom */
}

/* Thumb (scroll handle) */
main .journal-body::-webkit-scrollbar-thumb,
aside::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ffdd33 0%, #ffbb00 100%); /* Rin yellow/orange */
  border-left: 1px solid #fff;   /* 3D highlight */
  border-right: 1px solid #404040; /* 3D shadow */
}

/* Thumb hover effect */
main .journal-body::-webkit-scrollbar-thumb:hover,
aside::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #ffe066 0%, #ffcc33 100%); /* brighter hover */
}

/* Scrollbar buttons (arrows) */
main .journal-body::-webkit-scrollbar-button,
aside::-webkit-scrollbar-button {
  background: linear-gradient(to bottom, #d4d0c8 0%, #b0b0b0 100%);
  border-left: 1px solid #fff;  
  border-right: 1px solid #808080;
  height: 16px;
}

/* Corner between horizontal + vertical scrollbar */
main .journal-body::-webkit-scrollbar-corner,
aside::-webkit-scrollbar-corner {
  background: #c0c0c0;
}

.stamps-container {
  margin-top: 10px;
  width: 100%;
  overflow: hidden;
  background: #fff4cc;
  position: relative;

 
}

.stamps-track {
  display: flex;
  gap: 2px;
  animation: scrollStamps 20s linear infinite;
}

.stamps-track img {
  width: 88px;
  height: 31px;
  object-fit: cover;
}

@keyframes scrollStamps {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-750%);
  }
}

.stamps-container-grid {
 display: grid;
  grid-template-columns: 1fr 1fr; /* 2 equal columns regardless of sidebar width */
  gap: 0px;
}
.stamps-container-grid img {
   width: 88px;  /* smaller so 2 fit in the sidebar */
  height: auto;
}