/* Game pages – layout and cards (colors from theme.css) */

.content-wrapper {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: flex-start;
  margin: 12px auto 32px;
  max-width: 1400px;
  padding: 0 clamp(16px, 5%, 120px);
  box-sizing: border-box;
}

.sidebar {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(38, 75, 1, 0.08);
  padding: 20px 0;
  min-width: 220px;
  max-width: 280px;
  box-sizing: border-box;
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  height: fit-content;
}

.sideMenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-heading {
  font-size: 1.2rem;
  margin: 0 0 20px;
  padding: 0 20px 10px;
  border-bottom: 2px solid #639922;
}

.sidebarStd {
  display: block;
  font-size: 14px;
  text-align: left;
  padding: 12px 20px;
  text-decoration: none;
  border-bottom: 1px solid rgba(59, 109, 17, 0.1);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebarStd:hover {
  transform: translateX(4px);
}

.sideMenu li:last-child .sidebarStd {
  border-bottom: none;
}

.Background.wrapper {
  width: 100%;
  position: relative;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.overlay-content {
  text-align: center;
  padding: 12px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.overlay-title {
  color: #C5FF8C;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.book-grid {
  flex: 1;
  padding: 24px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(59, 109, 17, 0.12);
  box-shadow: 0 8px 32px rgba(38, 75, 1, 0.08);
  box-sizing: border-box;
}

.std {
  margin-bottom: 40px;
}

.stdTitle {
  font-size: 1.75rem;
  color: #173404;
  font-weight: 700;
  text-align: center;
  margin: 0 0 24px;
  padding: 16px;
  background: #F6FAF2;
  border-radius: 12px;
  border: 1px solid rgba(59, 109, 17, 0.15);
}

.stdMedium {
  font-size: 1.1rem;
  color: #264B01;
  margin: 24px 0 16px;
  text-align: center;
  font-weight: 600;
  padding: 10px 24px;
  background: #F0FFE0;
  border-radius: 999px;
  display: inline-block;
  margin-left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(59, 109, 17, 0.2);
}

.books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.bookCard {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid rgba(59, 109, 17, 0.12);
  box-shadow: 0 4px 16px rgba(38, 75, 1, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bookCard:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(38, 75, 1, 0.12);
  border-color: #639922;
}

.bookCard a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.bookCover {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
  border-radius: 8px;
}

.pagefont {
  color: #264B01;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.bookCard:hover .pagefont {
  color: #3B6D11;
}

.stdFooter {
  text-align: center;
  margin-top: 32px;
}

.button {
  background: #C5FF8C;
  border: none;
  border-radius: 12px;
  color: #264B01;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Urbanist', sans-serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(38, 75, 1, 0.1);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(38, 75, 1, 0.15);
}

.buttonlink {
  color: #264B01;
  text-decoration: none;
}

.buttonlink:hover {
  color: #264B01;
  text-decoration: none;
}

.chat-label {
  position: fixed;
  bottom: 35px;
  right: 90px;
  background-color: #173404;
  color: white;
  padding: 8px 16px;
  border-radius: 20px 20px 0 20px;
  font-family: 'Urbanist', sans-serif;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .content-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: static;
    margin-bottom: 8px;
  }

  .sideMenu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    padding: 0 20px;
  }

  .sidebarStd {
    text-align: center;
    border-radius: 8px;
    border: 1px solid rgba(59, 109, 17, 0.1);
  }

  .sidebarStd:hover {
    transform: none;
  }

  .books {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .stdMedium {
    margin-left: 0;
    transform: none;
    display: block;
  }
}

@media (max-width: 480px) {
  .book-grid {
    padding: 16px;
  }

  .books {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .bookCover {
    width: 72px;
    height: 72px;
  }

  .pagefont {
    font-size: 0.8rem;
  }

  .stdTitle {
    font-size: 1.35rem;
  }
}
