/* CSS Custom Properties (Variables) */
:root {
  /* Light Mode (Default) - Pink Theme */
  --bg-color: #fef7f7;
  --text-color: #000000;
  --text-muted: #4a4a4a;
  --border-color: #ffd6e8;
  --card-bg: #ffffff;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Georgia', 'Cambria', "Times New Roman", serif;
  --container-width: 1000px;
  --sidebar-width: 220px;

  /* Pink Shades */
  --pink-light: #ffb3d9;
  --pink-medium: #ff91c7;
  --pink-dark: #ff6bb5;
  --pink-deep: #ff4da6;
  --pink-accent: #ff91c7;
  --pink-hover: #ff6bb5;
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --bg-color: #1a0f14;
  --text-color: #ffffff;
  --text-muted: #d4a5c0;
  --border-color: #4a2a3a;
  --card-bg: #2a1a20;

  /* Adjusted Pink Shades for Dark Mode */
  --pink-light: #ffb3d9;
  --pink-medium: #ff91c7;
  --pink-dark: #ff6bb5;
  --pink-deep: #ff4da6;
  --pink-accent: #ff91c7;
  --pink-hover: #ffb3d9;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 1.125rem;
  /* ~18px */
  line-height: 1.75;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: url('/assets/sunny-cursor.png') 16 16, auto;
  /* Center hotspot roughly */
}

@keyframes wiggle {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-3deg);
  }

  50% {
    transform: rotate(3deg);
  }

  75% {
    transform: rotate(-1deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  margin-top: 3rem;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.75rem;
}

/* Global Links */
a {
  color: var(--pink-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--pink-deep);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout - Sidebar + Content */
body {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation (Desktop) */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--card-bg);
  border-right: 1px solid var(--border-color);
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar .site-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar .site-title:hover {
  text-decoration: none;
  color: var(--pink-dark);
}

.sidebar .site-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.sidebar .site-title:hover .site-icon {
  animation: wiggle 0.5s ease-in-out;
}

.sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar nav a {
  font-family: var(--font-heading);
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 12px;
  display: block;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sidebar nav a:hover,
.sidebar nav a[aria-current="page"] {
  color: var(--text-color);
  background-color: var(--pink-light);
  text-decoration: none;
}

.sidebar .theme-toggle {
  margin-top: auto;
  margin-bottom: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.sidebar .theme-toggle:hover {
  background-color: var(--pink-light);
  color: var(--pink-dark);
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 40px 20px;
}

/* Mobile Navigation (Top Header) */
.mobile-header {
  display: none;
}

/* Cards / Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

/* Wide Container */
.container-wide {
  max-width: 1600px;
}

/* Photo Grid - Masonry (Columns) Layout */
.photo-grid {
  display: block;
  column-count: 1;
  column-gap: 25px;
  margin-top: 30px;
}

.photo-item {
  width: 100%;
  margin-bottom: 25px;
  /* Spacing between items in column */
  break-inside: avoid;
  /* Prevent split */
  overflow: hidden;
  border-radius: 8px;
  background-color: var(--card-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
  /* Helps with break-inside generally */
}

/* Fix for inline-block extra spacing if any */
.photo-item {
  display: block;
}

.photo-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.photo-item img,
.photo-item picture {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  object-fit: cover;
}

.photo-img {
  transition: opacity 0.3s ease, filter 0.3s ease;
  opacity: 0;
  filter: blur(10px);
}

.photo-img.loaded {
  opacity: 1;
  filter: blur(0);
}

.photo-item picture img {
  width: 100%;
  height: auto;
  display: block;
}

/* Projects Grid - Larger cards */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 769px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  }
}

/* Responsive Masonry Columns */
@media (min-width: 769px) {
  .photo-grid {
    column-count: 2;
  }
}

@media (min-width: 1200px) {
  .photo-grid {
    column-count: 3;
  }
}

/* Photo Modal / Lightbox */
.photo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.photo-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.photo-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
}

.photo-modal-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  z-index: 1;
}

.photo-modal-image-container {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-modal-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.photo-modal.active .photo-modal-image {
  opacity: 1;
  transform: scale(1);
}

.photo-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 32px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.photo-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.photo-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 36px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.photo-modal-nav:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.photo-modal-prev {
  left: 20px;
}

.photo-modal-next {
  right: 20px;
}

.photo-modal-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  font-family: var(--font-heading);
  background-color: rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  z-index: 2;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
  .photo-modal-container {
    padding: 40px 20px;
  }
  
  .photo-modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
  
  .photo-modal-nav {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }
  
  .photo-modal-prev {
    left: 10px;
  }
  
  .photo-modal-next {
    right: 10px;
  }
  
  .photo-modal-counter {
    bottom: 20px;
    font-size: 14px;
    padding: 8px 16px;
  }
}

.card {
  background-color: var(--card-bg);
  padding: 0;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid var(--border-color);
  border-left: 4px solid transparent;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  /* Keep the lift but... */
  animation: wiggle 0.4s ease-in-out;
  box-shadow: 0 5px 15px rgba(255, 107, 181, 0.1);
}

.card-image {
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
}

.card-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 20px;
}

.card h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
  font-family: var(--font-heading);
}

/* Hero Section */
.hero {
  text-align: left;
  margin-bottom: 60px;
}

.hero-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.hero-text {
  flex: 1;
}

.hero-image {
  flex: 1;
  max-width: 500px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
}

/* Responsive: Stack hero content on mobile */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
  }

  .hero-image {
    max-width: 100%;
  }
}

/* About Page Layout */
.about-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 1;
  max-width: 400px;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-bottom-image {
  margin-top: 40px;
  width: 100%;
}

.about-bottom-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive: Stack about content on mobile */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
  }

  .about-image {
    max-width: 100%;
  }
}

/* Pink Card Colors - Cycle through pink shades */
.grid .card:nth-child(4n+1) {
  border-left-color: var(--pink-light);
}

.grid .card:nth-child(4n+1) h3 a {
  color: var(--pink-light);
}

.grid .card:nth-child(4n+1):hover h3 a {
  color: var(--pink-medium);
}

.grid .card:nth-child(4n+1):hover {
  border-color: var(--pink-medium);
}

.grid .card:nth-child(4n+2) {
  border-left-color: var(--pink-medium);
}

.grid .card:nth-child(4n+2) h3 a {
  color: var(--pink-medium);
}

.grid .card:nth-child(4n+2):hover h3 a {
  color: var(--pink-dark);
}

.grid .card:nth-child(4n+2):hover {
  border-color: var(--pink-dark);
}

.grid .card:nth-child(4n+3) {
  border-left-color: var(--pink-dark);
}

.grid .card:nth-child(4n+3) h3 a {
  color: var(--pink-dark);
}

.grid .card:nth-child(4n+3):hover h3 a {
  color: var(--pink-deep);
}

.grid .card:nth-child(4n+3):hover {
  border-color: var(--pink-deep);
}

.grid .card:nth-child(4n+4) {
  border-left-color: var(--pink-deep);
}

.grid .card:nth-child(4n+4) h3 a {
  color: var(--pink-deep);
}

.grid .card:nth-child(4n+4):hover h3 a {
  color: var(--pink-dark);
}

.grid .card:nth-child(4n+4):hover {
  border-color: var(--pink-dark);
}

/* Footer */
footer {
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: var(--font-heading);
}

/* Mobile Styles */
@media (max-width: 1024px) {
  .sidebar {
    display: none;
  }

  .mobile-header {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .mobile-header .site-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
  }

  .mobile-header .site-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .mobile-header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
    flex-wrap: wrap;
  }

  .mobile-header nav a {
    font-family: var(--font-heading);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 5px 0;
  }

  .mobile-header nav a:hover,
  .mobile-header nav a[aria-current="page"] {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 2px solid var(--pink-medium);
  }

  .mobile-header .theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2rem;
    padding: 5px;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
    padding-top: 100px;
    /* Account for fixed mobile header */
  }

  .container {
    padding: 20px;
  }
}

/* Books Controls */
.books-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
  padding: 20px;
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 150px;
}

.filter-group label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.filter-select:hover {
  border-color: var(--pink-medium);
}

.filter-select:focus {
  outline: none;
  border-color: var(--pink-dark);
  background-color: var(--card-bg);
}

/* Year Sections */
.year-section {
  margin-bottom: 50px;
}

.year-heading {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 25px;
  color: var(--text-color);
  border-bottom: 2px solid var(--pink-medium);
  padding-bottom: 10px;
}

/* Books Grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 0;
}

.book-item {
  position: relative;
  cursor: pointer;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(255, 107, 181, 0.2);
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--pink-medium) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  text-align: center;
  color: var(--text-color);
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--pink-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  line-height: 1.3;
  word-wrap: break-word;
  overflow: hidden;
}

.book-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  color: var(--text-color);
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
}

.book-item:hover .book-overlay {
  opacity: 1;
}

.book-overlay-content {
  width: 100%;
}

.book-overlay-content .book-title {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 8px;
  color: #ffffff;
  font-family: var(--font-heading);
}

.book-overlay-content .book-author {
  font-size: 0.9rem;
  color: var(--pink-light);
  margin-bottom: 12px;
  font-family: var(--font-heading);
}

.book-rating {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-stars {
  color: #ffd700;
  font-size: 1rem;
}

.rating-number {
  color: #ffffff;
  font-size: 0.9rem;
}

.book-date {
  font-size: 0.85rem;
  color: #cccccc;
  margin-bottom: 12px;
  font-family: var(--font-heading);
}

.book-review {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #ffffff;
  margin-top: 12px;
}

.book-review p {
  margin: 0;
}

/* Book Modal */
.book-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.book-modal.active {
  visibility: visible;
  opacity: 1;
}

.book-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.book-modal-content {
  position: relative;
  background-color: var(--card-bg);
  border-radius: 8px;
  max-width: 900px;
  max-height: 90vh;
  width: 90%;
  margin: auto;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.book-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-color);
  cursor: pointer;
  z-index: 1002;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.book-modal-close:hover {
  background-color: var(--pink-light);
  color: var(--pink-dark);
}

.book-modal-body {
  display: flex;
  gap: 30px;
  padding: 30px;
  overflow-y: auto;
  max-height: calc(90vh - 60px);
}

.book-modal-cover {
  flex-shrink: 0;
  width: 250px;
}

.book-modal-cover-img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: block;
}

.book-modal-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--pink-medium) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--pink-dark);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  line-height: 1.3;
  word-wrap: break-word;
  overflow: hidden;
}

.book-modal-details {
  flex: 1;
  min-width: 0;
}

.book-modal-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--text-color);
}

.book-modal-author {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--pink-dark);
  margin-bottom: 20px;
}

.book-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.book-modal-meta>div {
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.6;
}

.book-modal-meta strong {
  color: var(--text-color);
  margin-right: 8px;
}

.book-modal-rating .rating-stars {
  color: #ffd700;
  font-size: 1.1rem;
}

.book-modal-rating .rating-number {
  color: var(--text-color);
  font-size: 1rem;
}

.book-modal-genre,
.book-modal-tags {
  margin-bottom: 15px;
  padding: 10px;
  background-color: var(--bg-color);
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--text-color);
}

.book-modal-genre strong,
.book-modal-tags strong {
  color: var(--pink-dark);
  margin-right: 8px;
}

.book-modal-review {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.book-modal-review strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text-color);
  font-family: var(--font-heading);
  font-size: 1rem;
}

.modal-review-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-color);
  white-space: pre-wrap;
}

@media (max-width: 1024px) {
  .books-controls {
    flex-direction: column;
    gap: 15px;
  }

  .filter-group {
    min-width: 100%;
  }

  .year-heading {
    font-size: 1.5rem;
  }

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

  .book-overlay {
    padding: 15px;
  }

  .book-overlay-content .book-title {
    font-size: 1rem;
  }

  .book-review {
    font-size: 0.85rem;
  }

  .book-modal-body {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .book-modal-cover {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .book-modal-title {
    font-size: 1.5rem;
  }

  .book-modal-author {
    font-size: 1rem;
  }

  .book-modal-content {
    width: 95%;
    max-height: 95vh;
  }
}

@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Half-star styling for movie ratings using SVG */
.rating-stars .star-half-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.1em;
  margin: 0;
  padding: 0;
}

.rating-stars .star-full {
  color: #ffd700;
}

.rating-stars .star-empty {
  color: #ddd;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}