/* Mobile-First Responsive CSS - WITH CSS VARIABLES FOR SEASONAL THEMES */

/* CSS Variables for Theme Colors - Change these for seasonal updates */

:root {
  /* Primary Brand Colors */

  --primary-color: #527ab0;

  --primary-dark: #305384;

  --primary-hover: #3e6087;

  --primary-accent: #6b9bd1;

  /* Background Colors */

  --background-color: white;

  --background-alt: #f8f9fa;

  --background-light: #fafafa;

  --background-overlay: #f0f0f0;

  /* Text Colors */

  --text-color: white;

  --text-dark: #2c3e50;

  --text-medium: #555;

  --text-light: #666;

  --text-muted: #64748b;

  --text-black: #000;

  --text-error: #dc2626;

  /* Border Colors */

  --border-color: #cccccc;

  --border-light: #e0e0e0;

  --border-lighter: #eee;

  --border-lightest: #e2e8f0;

  --border-dark: #ddd;

  /* Overlay Colors (for hover states) */

  --overlay-light: rgba(255, 255, 255, 0.15);

  --overlay-medium: rgba(255, 255, 255, 0.25);

  --overlay-strong: rgba(255, 255, 255, 0.3);

  --overlay-border: rgba(255, 255, 255, 0.25);

  --overlay-border-strong: rgba(255, 255, 255, 0.5);

  /* Shadow Colors */

  --shadow-light: rgba(0, 0, 0, 0.1);

  --shadow-medium: rgba(0, 0, 0, 0.12);

  --shadow-strong: rgba(0, 0, 0, 0.15);

  --shadow-dark: rgba(0, 0, 0, 0.2);

  /* Utility Colors */

  --disabled-gray: #ccc;

  --disabled-text: #999;

  --spinner-border: #e2e8f0;
}

/* Base Styles */

* {
  margin: 0;

  padding: 0;

  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

  background-color: var(--background-color);

  line-height: 1.6;
}

/* Skip link for accessibility */

.skip-link {
  position: absolute;

  top: -40px;

  left: 6px;

  background: var(--text-black);

  color: var(--background-color);

  padding: 8px;

  text-decoration: none;

  border-radius: 4px;

  z-index: 1000;

  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Header Styling */

#s-lib-banner {
  background-color: var(--background-color);

  padding: 10px 0;
}

.container {
  max-width: 1170px;

  margin: 0 auto;

  padding: 0 15px;

  box-sizing: border-box;
}

.banner-img {
  max-width: 100%;

  height: auto;

  display: block;
}

/* Challenge Banner */

.challenge-banner {
  background-color: var(--background-color);

  padding: 0;
}

.banner-image {
  width: 100%;

  height: auto;

  max-height: 225px;

  object-fit: cover;

  display: block;
}

/* Navigation Menu */

.menu-bar {
  background: var(--primary-dark);

  margin: 0 auto;

  padding: 15px;

  text-align: center;

  box-sizing: border-box;

  display: flex;

  flex-direction: row;

  justify-content: center;

  align-items: center;

  gap: 10px;
}

.menu-bar a {
  color: var(--text-color);

  text-decoration: none;

  font-size: 18px;

  font-weight: bold;

  padding: 12px 15px;

  border-radius: 4px;

  transition: all 0.3s ease;

  display: inline-block;

  background-color: transparent;
}

.menu-bar a:hover,
.menu-bar a:focus {
  background-color: var(--overlay-light);

  text-decoration: underline;

  text-underline-offset: 4px;

  text-decoration-thickness: 2px;

  outline: none;

  transform: none;
}

/* MOBILE OVERRIDE - 2x2 Grid Layout */

@media (max-width: 767px) {
  .menu-bar {
    padding: 12px;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;
  }

  .menu-bar a {
    font-size: 14px;

    font-weight: 600;

    padding: 12px 8px;

    border-radius: 6px;

    background-color: rgba(255, 255, 255, 0.15);

    border: 1px solid rgba(255, 255, 255, 0.25);

    text-align: center;

    white-space: nowrap;

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 44px;

    transition: all 0.3s ease;
  }

  .menu-bar a:hover,
  .menu-bar a:focus {
    background-color: rgba(255, 255, 255, 0.25);

    transform: translateY(-2px);

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);

    text-decoration: none;

    outline: none;
  }

  .menu-bar a[aria-current="page"] {
    background-color: rgba(255, 255, 255, 0.3);

    border: 2px solid rgba(255, 255, 255, 0.5);

    font-weight: bold;

    transform: scale(1.02);

    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
}
@media (min-width: 768px) {
  .date-bar-wrapper {
    margin-top: 1px;
  }
}/* Date Bar */

.date-bar {
  background: var(--primary-color);

  margin: 0 auto;

  padding: 10px 15px;

  text-align: center;

  color: var(--text-color);

  font-style: italic;

  font-size: clamp(14px, 2vw, 18px);

  box-sizing: border-box;
}

/* Main Content Area - DEFAULT TWO COLUMN */

.main-content {
  margin-top: 20px;

  background-color: var(--background-color);

  max-width: 1170px;

  margin-left: auto;

  margin-right: auto;

  box-sizing: border-box;
}

.main-content-inner {
  padding: 0 15px;

  display: grid;

  grid-template-columns: 2fr 1fr;

  gap: 20px;

  box-sizing: border-box;
}

.main-column {
  background-color: var(--background-color);

  width: 100%;

  min-width: 0;
}

.sidebar-column {
  width: 100%;

  background-color: var(--background-color);

  min-width: 0;

  display: block;
}

/* MOBILE OVERRIDE - Single column */

@media (max-width: 767px) {
  .main-content-inner {
    grid-template-columns: 1fr;
  }

  .sidebar-column {
    display: none;
  }
}

/* Stats Grid - DEFAULT HORIZONTAL */

.stats-hidden {
  display: none;
}

.stats-visible {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 15px;

  margin-bottom: 20px;

  opacity: 0;

  transform: translateY(20px);

  transition: all 0.5s ease;
}

.stats-visible.stats-loaded {
  opacity: 1;

  transform: translateY(0);
}

/* MOBILE OVERRIDE - 3 columns but smaller */

@media (max-width: 767px) {
  .stats-visible {
    grid-template-columns: repeat(3, 1fr);

    gap: 8px;

    margin-bottom: 10px;
  }

  .stat-title {
    padding: 4px 6px;

    font-size: 0.7rem;
  }

  .stat-content {
    padding: 6px 4px;
  }

  .stat-number {
    font-size: 1.2rem;

    margin-bottom: 1px;

    line-height: 1.1;
  }

  .stat-box {
    min-height: auto; /* Remove any fixed height */
  }
}

/* TABLET OVERRIDE - 2 columns */

@media (min-width: 768px) and (max-width: 1024px) {
  .stats-visible {
    grid-template-columns: repeat(3, 1fr);

    gap: 15px;
  }
}

.stat-box {
  background: var(--background-color);

  border: 1px solid var(--border-color);

  border-radius: 4px;

  overflow: hidden;
}

.stat-title {
  background-color: var(--primary-color);

  color: var(--text-color);

  padding: 8px 12px;

  font-weight: bold;

  font-size: 0.9rem;
}

.stat-content {
  padding: 15px;

  text-align: center;
}

.stat-number {
  font-size: 1.8rem;

  font-weight: 700;

  color: var(--primary-color);

  margin-bottom: 5px;
}

/* Mobile Reviews - DEFAULT HIDDEN */

.mobile-reviews {
  display: none;
}

/* MOBILE OVERRIDE - Show mobile reviews */

@media (max-width: 767px) {
  .mobile-reviews {
    display: block;

    margin-bottom: 20px;
  }

  .mobile-reviews .s-lib-box-content {
    padding: 0;

    overflow-x: auto;

    overflow-y: hidden;
  }

  .mobile-reviews .reviews-header {
    margin: 0;

    font-size: 1rem;

    background: var(--primary-color);

    color: var(--text-color);

    padding: 10px 15px;

    border-radius: 3px 3px 0 0;

    font-weight: bold;
  }

  .mobile-reviews-container {
    display: flex;

    gap: 12px;

    padding: 15px 15px 15px 15px;

    overflow-x: auto;

    scrollbar-width: none;

    -ms-overflow-style: none;

    scroll-snap-type: x mandatory;

    scroll-behavior: smooth;
  }

  .mobile-reviews-container::-webkit-scrollbar {
    display: none;
  }

  .mobile-reviews .book-item {
    flex: 0 0 250px;

    display: flex;

    flex-direction: row;

    align-items: flex-start;

    background: var(--background-light);

    border: 1px solid var(--border-light);

    border-radius: 12px;

    padding: 10px;

    margin-bottom: 0;

    box-shadow: 0 3px 8px var(--shadow-medium);

    scroll-snap-align: start;

    transition: transform 0.2s ease, box-shadow 0.2s ease;

    position: relative;

    min-height: 120px;
  }

  .mobile-reviews .book-item:hover {
    transform: translateY(-2px);

    box-shadow: 0 5px 15px var(--shadow-dark);
  }

  .mobile-reviews .book-cover {
    width: 50px;

    height: 70px;

    margin: 0 10px 0 0;

    border-radius: 4px;

    box-shadow: 0 2px 6px var(--shadow-strong);

    object-fit: cover;

    display: block;

    flex-shrink: 0;
  }

  .mobile-reviews .book-info {
    text-align: left;

    flex: 1;

    display: flex;

    flex-direction: column;

    justify-content: flex-start;

    min-width: 0;
  }

  .mobile-reviews .book-title {
    font-size: 0.8rem;

    font-weight: 700;

    color: var(--primary-color);

    margin-bottom: 3px;

    line-height: 1.1;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;
  }

  .mobile-reviews .book-author {
    font-size: 0.7rem;

    color: var(--text-light);

    margin-bottom: 4px;

    font-style: italic;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
  }

  .mobile-reviews .book-rating {
    font-size: 0.65rem;

    color: var(--primary-color);

    font-weight: 600;

    margin-bottom: 6px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
  }

  .mobile-reviews .book-description {
    font-size: 0.65rem;

    color: var(--text-medium);

    line-height: 1.3;

    display: -webkit-box;

    -webkit-line-clamp: 3;

    -webkit-box-orient: vertical;

    overflow: hidden;

    text-align: left;

    background: transparent;

    padding: 0;

    border: none;

    margin-top: 0;

    font-style: italic;

    opacity: 0.9;
  }
}

/* Box Styling */

.s-lib-box {
  width: 100%;

  max-width: 100%;

  border: 1px solid var(--border-color);

  border-radius: 4px;

  box-sizing: border-box;

  background-color: var(--background-color);

  margin-bottom: 20px;

  box-shadow: none;
}

.s-lib-box-title {
  background-color: var(--primary-color);

  color: var(--text-color);

  padding: 10px 15px;

  margin: 0;

  font-size: 1.1rem;

  font-weight: bold;

  border-radius: 3px 3px 0px 0px;
}

.s-lib-box-content {
  padding: 15px;
}

.loading {
  text-align: center;

  padding: 40px;

  color: var(--text-muted);
}

.spinner {
  display: inline-block;

  width: 40px;

  height: 40px;

  border: 4px solid var(--spinner-border);

  border-radius: 50%;

  border-top-color: var(--primary-color);

  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* DESKTOP/TABLET REVIEWS STYLES - Matching the provided code */

/* Only applied for screens 768px and above */

@media (min-width: 768px) {
  .sidebar-column .s-lib-box-content {
    padding: 15px;
  }

  .sidebar-column .reviews-header {
    background: var(--primary-color);

    padding: 5px 10px;

    text-align: center;

    color: var(--text-color);

    font-weight: bold;

    margin: -15px -15px 15px -15px;

    border-radius: 3px 3px 0 0;
  }

  .sidebar-column .book-item {
    display: flex;

    align-items: flex-start;

    margin-bottom: 15px;

    padding-bottom: 15px;

    border-bottom: 1px solid var(--border-lighter);

    width: 100%;

    box-sizing: border-box;
  }

  .sidebar-column .book-item:last-child {
    border-bottom: none;

    margin-bottom: 0;

    padding-bottom: 0;
  }

  .sidebar-column .book-cover {
    width: 60px;

    height: 80px;

    object-fit: cover;

    margin-right: 12px;

    border-radius: 2px;

    box-shadow: 0 2px 4px var(--shadow-light);

    flex-shrink: 0;

    display: block;

    background-color: var(--background-overlay);

    border: 1px solid var(--border-dark);
  }

  .sidebar-column .book-info {
    flex: 1;

    min-width: 0;
  }

  .sidebar-column .book-title {
    font-size: 0.95rem;

    font-weight: bold;

    color: var(--primary-color);

    margin-bottom: 3px;

    line-height: 1.3;

    word-wrap: break-word;
  }

  .sidebar-column .book-author {
    font-size: 0.85rem;

    color: var(--text-light);

    margin-bottom: 5px;

    word-wrap: break-word;
  }

  .sidebar-column .book-rating {
    font-size: 0.8rem;

    color: var(--primary-color);

    font-weight: 600;

    margin-bottom: 5px;
  }

  .sidebar-column .book-description {
    font-size: 0.8rem;

    color: var(--text-medium);

    line-height: 1.4;

    word-wrap: break-word;
  }

  .sidebar-column .book-item a {
    text-decoration: none;

    display: block;

    transition: transform 0.2s ease;
  }

  .sidebar-column .book-item a:hover,
  .sidebar-column .book-item a:focus {
    transform: scale(1.05);

    outline: 0px solid var(--border-dark);

    border-radius: 1px;
  }
}

/* Leaderboard Styling - DEFAULT HORIZONTAL */

.leaderboard-item {
  display: flex;

  flex-direction: row;

  align-items: center;

  padding: 15px;

  border-bottom: 1px solid var(--border-lightest);

  width: 100%;

  box-sizing: border-box;

  text-align: left;
}

.leaderboard-item:nth-child(odd) {
  background-color: var(--background-alt);
}

.leaderboard-item:nth-child(even) {
  background-color: var(--background-color);
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.participant-info {
  flex: 1;

  width: 100%;

  min-width: 0;

  margin-right: 15px;
}

.participant-name {
  font-size: 1.1rem;

  font-weight: 600;

  color: var(--text-dark);

  margin-bottom: 3px;

  word-wrap: break-word;
}

.score {
  font-size: 1.5rem;

  font-weight: 700;

  color: var(--primary-color);

  text-align: right;

  min-width: 80px;

  flex-shrink: 0;

  margin-top: 0;
}

/* MOBILE OVERRIDE - Vertical leaderboard */

@media (max-width: 767px) {
  .leaderboard-item {
    flex-direction: column;

    align-items: center;

    text-align: center;
  }

  .participant-info {
    margin-right: 0;

    margin-bottom: 15px;
  }

  .participant-name {
    margin-bottom: 15px;
  }

  .score {
    text-align: center;

    margin-top: 10px;
  }
}

/* Book Carousel */

.book-carousel-wrapper {
  width: 100%;

  display: flex;

  align-items: center;

  box-sizing: border-box;

  margin-top: 15px;

  gap: 10px;
}

.carousel-arrow {
  width: 40px;

  height: 40px;

  background: var(--primary-color);

  color: var(--text-color);

  border: none;

  border-radius: 50%;

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  font-size: 16px;

  font-weight: bold;

  transition: all 0.3s ease;

  flex-shrink: 0;

  box-shadow: 0 2px 4px var(--shadow-light);
}

.carousel-arrow:hover:not(:disabled),
.carousel-arrow:focus:not(:disabled) {
  background: var(--primary-hover);

  outline: 2px solid var(--primary-color);

  outline-offset: 2px;

  transform: scale(1.1);
}

.carousel-arrow:disabled {
  background: var(--disabled-gray);

  color: var(--disabled-text);

  cursor: not-allowed;

  transform: none;

  opacity: 0.5;

  outline: none !important;

  box-shadow: none !important;
}

.carousel-arrow.left {
  order: 1;
}

.carousel-arrow.right {
  order: 3;
}

.book-carousel-container {
  display: flex;

  gap: 8px;

  overflow-x: auto;

  overflow-y: hidden;

  scroll-behavior: smooth;

  padding: 10px;

  box-sizing: border-box;

  flex: 1;

  scrollbar-width: none;

  -ms-overflow-style: none;
  order: 2;

  border-radius: 8px;

  background: transparent;
}

.book-carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-book {
  flex: 0 0 auto;

  width: 110px;

  text-align: center;

  display: flex;

  flex-direction: column;

  align-items: center;

  box-sizing: border-box;

  cursor: pointer;

  border-radius: 4px;

  padding: 5px;

  transition: all 0.3s ease;

  position: relative;
}

.carousel-book:hover,
.carousel-book:focus {
  background-color: transparent;

  transform: translateY(-2px);

  box-shadow: 0 2px 6px var(--shadow-light);
}

.carousel-book:not(.fully-visible):hover,
.carousel-book:not(.fully-visible):focus {
  background-color: transparent !important;

  transform: none !important;

  cursor: default;
}

.carousel-book.fully-visible:hover,
.carousel-book.fully-visible:focus {
  background-color: transparent;

  transform: translateY(-2px);

  cursor: pointer;
}

.carousel-book:not(.fully-visible) {
  opacity: 0.7;

  transition: opacity 0.3s ease;
}

.carousel-book.fully-visible {
  opacity: 1;

  transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.carousel-book:focus-visible {
  outline: none;
}

.carousel-book img {
  width: 80px;

  height: 120px;

  object-fit: cover;

  background: var(--background-overlay);

  border: 1px solid var(--border-dark);

  border-radius: 2px;

  margin-bottom: 6px;

  box-sizing: border-box;

  display: block;
}

.carousel-book .book-title,
.carousel-book .book-author,
.carousel-book .carousel-challenge {
  font-size: 11px;

  line-height: 1.3;

  margin: 3px 0;

  word-wrap: break-word;

  max-width: 100%;

  overflow: hidden;

  text-align: center;
}

.carousel-book .book-title {
  font-weight: bold;

  color: var(--primary-color);
}

.carousel-book .book-author {
  color: var(--text-light);
}

.carousel-book .carousel-challenge {
  color: var(--text-black);

  font-weight: bold;
}

/* Desktop Layout Adjustments */

@media (min-width: 1025px) {
  .main-content-inner {
    grid-template-columns: 3fr 1fr;

    gap: 30px;
  }

  .challenge-banner {
    margin-bottom: 30px;
  }

  .menu-bar a {
    font-size: 36px;

    margin: 0 8px;

    padding: 5px 10px;
    line-height: 1;
  }

  .menu-bar a:hover,
  .menu-bar a:focus {
    background-color: transparent;
    text-decoration: none;
    outline: none;
  }

  .carousel-book {
    width: 155px;
  }

  .carousel-book img {
    width: 110px;

    height: 165px;
  }

  .carousel-book .book-title,
  .carousel-book .book-author,
  .carousel-book .carousel-challenge {
    font-size: 14px;
  }

  .carousel-arrow {
    width: 44px;

    height: 44px;

    font-size: 18px;
  }

  .book-carousel-container {
    padding: 15px;

    gap: 10px;
  }
}

/* General responsive adjustments */

@media (min-width: 768px) and (max-width: 1024px) {
  .container,
  .menu-bar,
  .date-bar {
    padding: 0 20px;
  }

  .main-content-inner {
    padding: 0 20px;
  }

  .menu-bar {
    padding: 10px 20px;
  }

  .menu-bar a {
    font-size: 20px;

    margin: 0 5px;

    padding: 8px 12px;
  }

  .carousel-book {
    width: 130px;
  }

  .carousel-book img {
    width: 90px;

    height: 135px;
  }

  .carousel-book .book-title,
  .carousel-book .book-author,
  .carousel-book .carousel-challenge {
    font-size: 12px;
  }

  .book-carousel-container {
    display: flex;

    gap: 10px;

    padding: 10px 40px;

    overflow-x: auto;

    scroll-behavior: smooth;

    justify-content: flex-start;
  }
}

/* Additional utility styles */

.book-item {
  display: flex;

  align-items: flex-start;

  margin-bottom: 15px;

  padding-bottom: 15px;

  border-bottom: 1px solid var(--border-lighter);

  width: 100%;

  box-sizing: border-box;
}

.book-item:last-child {
  border-bottom: none;

  margin-bottom: 0;

  padding-bottom: 0;
}

.book-cover {
  width: 50px;

  height: 70px;

  object-fit: cover;

  margin-right: 8px;

  border-radius: 2px;

  box-shadow: 0 2px 4px var(--shadow-light);

  flex-shrink: 0;

  display: block;

  background-color: var(--background-overlay);

  border: 1px solid var(--border-dark);
}

.book-info {
  flex: 1;

  min-width: 0;
}

.book-title {
  font-size: 0.95rem;

  font-weight: bold;

  color: var(--primary-color);

  margin-bottom: 3px;

  line-height: 1.3;

  word-wrap: break-word;
}

.book-author {
  font-size: 0.85rem;

  color: var(--text-light);

  margin-bottom: 5px;

  word-wrap: break-word;
}

.book-description {
  font-size: 0.8rem;

  color: var(--text-medium);

  line-height: 1.4;

  word-wrap: break-word;
}

.error {
  text-align: center;

  padding: 40px;

  color: var(--text-error);
}

/* NEW: Scrollable Carousel Styles for Mobile Reviews */

@media (max-width: 768px) {
  /* Override styles when carousel-style class is present */

  .mobile-reviews.carousel-style .s-lib-box-content {
    padding: 0;

    overflow: visible;
  }

  .mobile-reviews.carousel-style .reviews-header {
    margin: 0;

    font-size: 1rem;

    background: var(--primary-color);

    color: var(--text-color);

    padding: 10px 15px;

    border-radius: 3px 3px 0 0;

    font-weight: bold;
  }

  .mobile-reviews-carousel-wrapper {
    display: flex;

    align-items: center;

    gap: 6px;

    padding: 15px 8px;

    min-height: 90px;

    position: relative;
  }

  .review-carousel-arrow {
    width: 40px;

    height: 40px;

    background: var(--primary-color);

    color: var(--text-color);

    border: none;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    font-size: 18px;

    font-weight: bold;

    transition: all 0.3s ease;

    flex-shrink: 0;

    box-shadow: 0 2px 4px var(--shadow-light);

    z-index: 10;
  }

  .review-carousel-arrow:hover:not(:disabled),
  .review-carousel-arrow:focus:not(:disabled) {
    background: #3d5a85;

    outline: 2px solid var(--primary-accent);

    outline-offset: 2px;

    transform: scale(1.1);
  }

  .review-carousel-arrow:disabled {
    background: var(--disabled-gray);

    color: var(--disabled-text);

    cursor: not-allowed;

    transform: none;

    opacity: 0.5;

    outline: none !important;

    box-shadow: none !important;
  }

  .review-carousel-arrow.left {
    order: 1;
  }

  .review-carousel-arrow.right {
    order: 3;
  }

  .review-carousel-container {
    flex: 1;

    order: 2;

    overflow-x: auto;

    overflow-y: hidden;

    scroll-behavior: smooth;

    scrollbar-width: none;

    -ms-overflow-style: none;

    display: flex;

    gap: 12px;

    padding: 0 5px;

    /* scroll-snap-type: x mandatory; */
  }

  .review-carousel-container::-webkit-scrollbar {
    display: none;
  }

  .mobile-reviews.carousel-style .book-item {
    flex: 0 0 250px;

    display: flex;

    flex-direction: row;

    align-items: flex-start;

    background: transparent;

    border: none;

    border-radius: 0;

    padding: 10px;

    margin-bottom: 0;

    box-shadow: none;

    scroll-snap-align: start;

    transition: none;

    position: relative;

    min-height: 120px;
  }

  /* Add the subtle pipe/divider between reviews */

  .mobile-reviews.carousel-style .book-item:not(:last-child)::after {
    content: "";

    position: absolute;

    right: -6px;

    top: 50%;

    transform: translateY(-50%);

    width: 1px;

    height: 60px;

    background-color: var(--border-dark);

    opacity: 1;
  }

  .mobile-reviews.carousel-style .book-item:hover {
    transform: none;

    box-shadow: none;
  }

  .mobile-reviews.carousel-style .book-cover {
    width: 50px;

    height: 70px;

    margin: 0 10px 0 0;

    border-radius: 0;

    box-shadow: none;

    object-fit: cover;

    display: block;

    flex-shrink: 0;
  }

  .mobile-reviews.carousel-style .book-info {
    text-align: left;

    flex: 1;

    display: flex;

    flex-direction: column;

    justify-content: flex-start;

    min-width: 0;
  }

  .mobile-reviews.carousel-style .book-title {
    font-size: 0.85rem;

    font-weight: 700;

    color: var(--primary-color);

    margin-bottom: 3px;

    line-height: 1.1;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;
  }

  .mobile-reviews.carousel-style .book-author {
    font-size: 0.75rem;

    color: var(--text-light);

    margin-bottom: 4px;

    font-style: italic;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
  }

  .mobile-reviews.carousel-style .book-rating {
    font-size: 0.7rem;

    color: var(--primary-color);

    font-weight: 600;

    margin-bottom: 6px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
  }

  .mobile-reviews.carousel-style .book-description {
    font-size: 0.7rem;

    color: var(--text-medium);

    line-height: 1.3;

    display: -webkit-box;

    -webkit-line-clamp: 3;

    -webkit-box-orient: vertical;

    overflow: hidden;

    text-align: left;

    background: transparent;

    padding: 0;

    border: none;

    margin-top: 0;

    font-style: normal;

    opacity: 1;
  }

  /* Hide the original mobile-reviews-container when carousel is active */

  .mobile-reviews.carousel-style .mobile-reviews-container {
    display: none;
  }
}

/* Scroll to Top Button - Mobile Only */

.scroll-to-top {
  position: fixed;

  bottom: 20px;

  right: 20px;

  width: 50px;

  height: 50px;

  background: var(--primary-color);

  color: var(--text-color);

  border: none;

  border-radius: 8px;

  font-size: 20px;

  font-weight: bold;

  cursor: pointer;

  box-shadow: 0 4px 12px var(--shadow-strong);

  z-index: 1000;

  opacity: 0;

  visibility: hidden;

  transform: scale(0.8);

  transition: all 0.3s ease;

  display: flex;

  align-items: center;

  justify-content: center;
}

.scroll-to-top.visible {
  opacity: 1;

  visibility: visible;

  transform: scale(1);
}

.scroll-to-top:hover {
  background: var(--primary-hover);

  transform: scale(1.1);

  box-shadow: 0 6px 16px var(--shadow-dark);
}

.scroll-to-top:active {
  transform: scale(0.95);
}

/* Hide on desktop/tablet - mobile only */

@media (min-width: 768px) {
  .scroll-to-top {
    display: none;
  }
}

/* Footer Styles */

.reading-challenge-footer {
  margin-top: 40px;
}

/* Reading Recommendations Bar */

.recommendations-bar-wrapper {
  background-color: var(--background-color);
}

.recommendations-bar {
  background: var(--primary-color);

  padding: 12px 15px;

  text-align: center;

  color: var(--text-color);

  font-style: italic;

  font-size: clamp(14px, 2vw, 18px);

  box-sizing: border-box;

  line-height: 1.4;
}

.recommendations-bar a {
  color: var(--text-color);

  font-weight: bold;

  text-decoration: underline;

  text-decoration-thickness: 1px;

  text-underline-offset: 2px;

  transition: all 0.2s ease;

  white-space: nowrap;
}

.recommendations-bar a:hover {
  text-decoration: none;

  transform: translateY(-1px);

  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Footer Main */

.footer-main {
  background: var(--primary-dark);

  padding: 30px 0px;

  box-sizing: border-box;

  color: var(--text-color);
}

.footer-content {
  display: flex;

  flex-wrap: wrap;

  justify-content: space-around;

  gap: 20px;
}

.footer-column {
  flex: 0 0 250px;

  min-width: 200px;

  text-align: center;
}

.footer-column h3 {
  font-size: 20px;

  margin-bottom: 10px;
}

.footer-column a {
  color: var(--text-color);

  text-decoration: none;

  font-size: 0.9rem;
}

.footer-column a:hover {
  text-decoration: underline;
}

.footer-column p {
  font-size: 0.9rem;

  opacity: 0.9;

  line-height: 1.6;

  margin-bottom: 8px;
}

.footer-links {
  display: flex;

  flex-direction: column;

  gap: 8px;
}

/* Mobile Footer Override */

@media (max-width: 767px) {
  .footer-main {
    padding: 10px 0;
  }

  .recommendations-bar {
    padding: 10px 15px;

    font-size: 14px;

    line-height: 1.5;
  }

  .recommendations-bar a {
    display: inline-block;

    margin: 0 2px;
  }

  .footer-content {
    display: block;

    text-align: center;
  }

  .footer-column {
    margin: 10px 0;
  }

  .footer-column h3 {
    margin-bottom: 4px;
  }

  .footer-column p,
  .footer-column a {
    margin: 2px 0;

    line-height: 1.3;
  }
}

/* Disable hover effects for books without catalog links */
.carousel-book.no-catalog {
  cursor: default !important;
}

.carousel-book.no-catalog:hover,
.carousel-book.no-catalog:focus {
  background-color: transparent !important;
  transform: none !important;
  box-shadow: none !important;
  cursor: default !important;
}

.carousel-book.no-catalog.fully-visible:hover,
.carousel-book.no-catalog.fully-visible:focus {
  background-color: transparent !important;
  transform: none !important;
  cursor: default !important;
}

/* Leaderboard Notice Styling */
.leaderboard-notice-wrapper {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
  display: none; /* Hidden by default */
}

.leaderboard-notice {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 1.25rem;
  text-align: center;
  color: #2c3e50;
  font-size: 1.05rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.leaderboard-notice span {
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0.15rem;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .leaderboard-notice {
    font-size: 0.95rem;
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
}
