/* MAIN BACKGROUND WITH SPARKLES */
body {
  margin: 0;
  padding: 20px;
  font-family: 'VT323', monospace;
  background: 
    url('images/bgg.jpg') center/cover fixed,
    url('images/sparkles.gif') center/cover fixed;
  color: #2b2b2b;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('images/sparkles.gif');
  background-size: cover;
  opacity: 0.6;
  z-index: -1;
  pointer-events: none;
  animation: sparkle 3s infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* SQUARE CONTAINER */
.square-container {
  width: 600px;
  height: 600px;
  background: #f5f5dc;
  border: 3px double #6f5d3e;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  padding: 15px;
  overflow-y: auto;
}

/* BANNER WITH LACE BEHIND NAV */
.banner-container {
  height: 120px;
 margin-bottom: 24px; /* Space for lace */
  overflow: visible; /* Lets lace extend beyond */
}

.top-banner {
  width: 100%;
  height: 100%;
  background: url('images/amel.jpg') center/cover;
  border-radius: 4px 4px 0 0;
}

.cat-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 120px;
  height: auto;
  z-index: 2;
  filter: drop-shadow(2px 2px 1px rgba(0,0,0,0.3));
}

.lace-border {
  position: absolute;
  top: 100%; /* Positions directly below banner */
  left: 0;
  width: 100%;
  height: 24px; /* Adjust to match your lace image height */
  background: url('images/border.png') repeat-x center top;
  z-index: 1;
}

/* NAV BUTTONS (STAY IN ORIGINAL POSITION) */
.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 15px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.nav-button {
  font-size: 16px;
  padding: 6px 12px;
  background: #e8e3d1;
  border: 2px solid #6f5d3e;
  border-radius: 4px;
  color: #2b2b2b;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 0 #b8a988;
  margin-top: -12px;
}

.nav-button:hover {
  background: #d4c8b0;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 #9a8b68;
  animation: wiggle 0.5s ease;
}

@keyframes wiggle {
  0%, 100% { transform: translateY(-2px) rotate(0deg); }
  25% { transform: translateY(-2px) rotate(2deg); }
  75% { transform: translateY(-2px) rotate(-2deg); }
}

/* EVERYTHING BELOW THIS POINT REMAINS UNCHANGED FROM YOUR ORIGINAL */
.compact-grid {
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  gap: 12px;
}

.box {
  background: #e8e3d1;
  border: 2px dashed #6f5d3e;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 4px;
  box-shadow: 2px 2px 0 #b8a988;
}

.welcome.box {
  position: relative;
  padding: 15px;
  text-align: center;
  margin-bottom: 12px;
}

.welcome-overlay {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  z-index: 1;
}

.welcome-overlay.left { left: 10px; }
.welcome-overlay.right { right: 10px; }

.welcome-content {
  position: relative;
  z-index: 2;
}

.location {
  font-size: 0.9rem;
  color: #3f3e3a;
}

.sidebar-img {
  width: 100%;
  max-width: 120px;
  height: auto;
  border: 1px solid #6f5d3e;
  border-radius: 4px;
  margin: 0 auto 8px;
  display: block;
}

.blog-container {
  height: 180px;
  overflow-y: auto;
  padding-right: 5px;
}

.blog-entry {
  background: #f5f0e1;
  border: 1px dotted #800020;
  padding: 8px;
  margin-bottom: 10px;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f5dc;
}

::-webkit-scrollbar-thumb {
  background: #a19170;
  border-radius: 4px;
}

@media (max-width: 650px) {
  .square-container {
    width: 95%;
    height: auto;
    max-height: 90vh;
  }
  .compact-grid {
    grid-template-columns: 1fr;
  }
}