@font-face {
  font-family: "lavoniaclassy";
  src: url("lavoniaclassy.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

/* General */
body {
  margin: 0;
  font-family: 'Merriweather', serif;
  background: url("images/background.png") no-repeat center center fixed;
  background-size: cover;
  color: #222;
  padding-bottom: 120px; /* keep posts clear of footer */
}

main {
  display: grid;
  /* Fixed logo col | flexible posts col | fixed sidebar col */
  grid-template-columns: 450px 1.5fr 1fr;
  grid-template-rows: auto 1fr; /* navbar row + content row */
  column-gap: 20px;   /* gap between cols */
  row-gap: 20px;      /* gap between nav + content */
  padding: 15px 20px;
  margin: 15px auto;
  align-items: start;
  max-width: 95%;  /* keeps site from being too wide */
  width: 100%;
}

/* Logo column (left) */
#logo {
  grid-column: 1;       /* left col */
  grid-row: 1 / span 2; /* spans nav + content rows */
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#logo img {
  max-width: 100%;
  height: auto;
}

#navbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5%;
}

.nav-btn {
  display: inline-block;
  height: 100px;
}

.nav-btn img {
  height: 100%;
  width: auto;
  transition: transform 0.2s ease;
}

.nav-btn:hover img {
  transform: scale(1.05);
  content: url("images/homehover.png"); /* JS or class toggling is better for hover image switching */
}

.nav-btn.home     { background-image: url("images/home.png"); }
.nav-btn.contact  { background-image: url("images/contact.png"); }
.nav-btn.gallery  { background-image: url("images/gallery.png"); }

.nav-btn.home:hover     { background-image: url("images/homehover.png"); }
.nav-btn.contact:hover  { background-image: url("images/contacthover.png"); }
.nav-btn.gallery:hover  { background-image: url("images/galleryhover.png"); }

/* Posts (middle column) */
#posts {
  grid-column: 2;
  grid-row: 2;
  padding: 15px;
  background: rgba(0,0,0,0.2);
  border: 2px solid #686505;
  border-radius: 10px;
  max-height: 67vh;
  overflow-y: auto;
}

.post {
  margin-bottom: 20px;
  padding: 15px;
  background: url("images/divbg.png");
  border: 3px solid #686505;
  border-radius: 8px;
  color: #404011;
}

.post-title {
  font-family: 'lavoniaclassy', serif;
  font-size: 40px;
  color: #404011;
  margin: 0 0 5px;
}

.timestamp {
  display: block;
  font-size: 0.8em;
  color: #666;
  margin-top: 10px;
}

/* Sidebar (right column) */
aside {
  grid-column: 3;
  grid-row: 2;
  padding: 15px;
  background: url("images/divbg.png");
  border: 3px solid #686505;
  border-radius: 10px;
}

/* Music Player (sticky at bottom) */
footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  padding: 10px 20px;
  border-radius: 8px 8px 0 0;
  z-index: 1000;
}

/* Music player container */
#music-player {
  position: relative;
  width: 100%;
  border-radius: 20px;
  border: 3px solid #686505;
  max-width: 900px;   /* Adjust to match your piano image width */
  margin: 0 auto;
  text-align: center;
  font-family: "Georgia", serif;
  color: #2b2b2b;
}

/* Piano strip background */
.player-bg {
  display: block;
  width: 100%;
  height: auto;
}

/* Gramophone overlay */
.gramophone {
  position: absolute;
  right: -60px;   /* adjust to tuck into the corner */
  bottom: -20px;
  width: 200px;   /* resize as needed */
  pointer-events: none; /* let clicks pass through */
  z-index: 1;
}

/* Controls */
.controls {
  position: absolute;
  top: 5px;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  background: rgba(242, 230, 204,0.8);
  border: 2px solid #686505;
  color: #000;
  gap: 15px;
}

.controls button {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #000;
}

#track-name {
  font-weight: bold;
  font-size: 1.1em;
}

/* Progress bar */
#progress {
  -webkit-appearance: none;
  width: 90%;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  height: 8px;
  background: #d4c79e;
  border-radius: 4px;
  cursor: pointer;
}

/* Progress bar thumb */
#progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2b2b2b;
  cursor: pointer;
}
#progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2b2b2b;
  cursor: pointer;
}

/* Volume control */
#volume {
  position: absolute;
  right: 20px;
  top: 10px;
  width: 100px;
  z-index: 2;
}