/* 
 * Book Detail Page Styling
 * Organized and consolidated to prevent conflicts
 */

/* ===== VARIABLES ===== */
:root {
  --primary-color: #8541d4; /* Dashboard Purple */
  --primary-hover: #9d5ce5;
  --secondary-color: #2a1f3d; /* Dashboard Gradient End */
  --secondary-hover: #3d2e55;
  --text-color: #f5f5f5;
  --text-muted: rgba(245, 245, 245, 0.6);
  --background-color: #0c0b13; /* Dashboard Dark */
  --card-bg: rgba(26, 26, 39, 0.8); /* Dashboard Elevated with opacity */
  --border-color: rgba(255, 255, 255, 0.08);
  --star-color: #fbbf24;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --tag-bg: rgba(133, 65, 212, 0.15);
  --tag-text: #e1e1e1;
  --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --feature-color: rgba(245, 245, 245, 0.8);
  --heading-color: #ffffff;
  --rating-color: #e5e7eb;
  --favorite-active: #ec4899;
  --favorite-hover: #db2777;
  --amazon-color: #f59e0b;
  --amazon-hover: #d97706;
}

body {
    background-color: #0c0b13 !important;
    /* Ultra-smooth gradient mesh - matching dashboard purple theme */
    background: 
        radial-gradient(circle at top left, rgba(133, 65, 212, 0.15), transparent 60%),
        radial-gradient(circle at bottom right, rgba(106, 53, 176, 0.1), transparent 60%),
        linear-gradient(to bottom, #0c0b13, #13111c) !important;
    background-attachment: fixed !important;
    color: var(--text-color) !important;
    min-height: 100vh;
}

body::before {
    display: none !important;
}

.main-content {
    background: transparent !important;
}

/* ===== LAYOUT STRUCTURE ===== */

.book-detail-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Breadcrumb styling */
.breadcrumb-container {
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--box-shadow);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.breadcrumb-item a:hover {
  color: var(--primary-hover);
  text-decoration: none;
  text-shadow: 0 0 8px rgba(133, 65, 212, 0.4);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding: 0 0.5rem;
  color: rgba(255, 255, 255, 0.2);
}

.breadcrumb-item.active {
  color: var(--text-color);
  font-weight: 600;
}



@media (max-width: 768px) {
  .breadcrumb-container {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
  }
  
  .breadcrumb-item {
    font-size: 0.85rem;
  }
}

.book-detail-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 40px;
  padding: 40px;
  background: var(--card-bg);
  box-shadow: var(--box-shadow);
  border-radius: 24px;
  margin-bottom: 40px;
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
}

/* ===== LEFT COLUMN - BOOK MEDIA ===== */
.book-detail-media {
  position: sticky;
  top: 100px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.book-primary-image {
  border-radius: 12px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
}

.book-primary-image:hover {
  transform: translateY(-5px);
}

.book-cover-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 550px;
  border-radius: 12px;
}

.book-cover-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  height: 450px;
  width: 100%;
  color: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
}

/* Preview images section */
.preview-section {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.preview-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-title span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.preview-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  padding-top: 141.4%; /* A4 Aspect Ratio */
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.preview-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(133, 65, 212, 0.2);
  transform: translateY(-2px);
}

.preview-thumbnail-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.preview-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(133, 65, 212, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.preview-item:hover .preview-overlay {
  opacity: 1;
}

/* ===== MIDDLE COLUMN - BOOK INFO ===== */
.book-detail-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.book-detail-header {
  margin-bottom: 10px;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 20px;
}

.book-title {
  flex: 1;
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.rating-summary {
  text-align: right;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

/* Book tags */
.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.book-tag {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.book-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-tag {
  background: rgba(133, 65, 212, 0.15);
  color: #d8b4fe;
  border-color: rgba(133, 65, 212, 0.3);
}

.difficulty-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.theme-tag {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

.age-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

/* Rating display */
.star-rating {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--star-color);
  margin-bottom: 4px;
}

.star-rating .fa-star,
.stars .fa-star,
.rating-stars .fa-star {
  color: var(--star-color);
  filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.4));
}

.rating-value {
  font-weight: 700;
  margin-left: 8px;
  color: #fff;
  font-size: 1.1rem;
}

.review-count {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 6px;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.review-count:hover {
  text-decoration: none;
  color: var(--primary-color);
}

.download-count {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
  font-weight: 500;
}

/* Book description section */
.book-detail-description, 
.book-detail-features {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 32px;
  margin-bottom: 0;
}

.book-detail-description h2,
.book-detail-features h2,
.book-detail-reviews h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.book-detail-description p {
  color: rgba(245, 245, 245, 0.8);
  line-height: 1.8;
  font-size: 1.05rem;
}

.no-description {
  color: var(--text-muted);
  font-style: italic;
}

/* Features list */
.features-list {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: var(--feature-color);
  font-weight: 500;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.features-list li:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.05);
}

.features-list li i {
  color: var(--success-color);
  font-size: 1.1rem;
}

/* Action buttons section */
.actions-container {
    margin: 32px 0;
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
}

.action-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
    align-items: stretch;
}

.action-btn {
    flex: 1 1 0;
    min-width: 200px;
    max-width: 280px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.action-btn:active {
    transform: translateY(-1px);
}

.download-book-btn {
    background: linear-gradient(135deg, #8541d4 0%, #6a35b0 100%);
    color: white !important;
    order: 1;
    box-shadow: 0 4px 15px rgba(133, 65, 212, 0.3);
    border: none;
}

.download-book-btn:hover {
    background: linear-gradient(135deg, #9656e0 0%, #7c42c4 100%);
    box-shadow: 0 8px 25px rgba(133, 65, 212, 0.4);
}

.toggle-favorite {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color) !important;
    order: 2;
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.toggle-favorite:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.favorited {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
    color: white !important;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.favorited:hover {
    background: linear-gradient(135deg, #f472b6 0%, #e11d48 100%) !important;
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.amazon-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white !important;
    order: 3;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    border: none;
}

.amazon-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #b45309 100%);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.amazon-btn i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .action-buttons-row {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        max-width: none;
    }
}

/* Reviews section */
.book-detail-reviews {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: none !important;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.write-review-btn {
    padding: 10px 24px;
    background: rgba(133, 65, 212, 0.1);
    color: #d8b4fe;
    border: 1px solid rgba(133, 65, 212, 0.3);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.write-review-btn:hover {
    background: rgba(133, 65, 212, 0.2);
    color: #fff;
    border-color: rgba(133, 65, 212, 0.5);
    transform: translateY(-2px);
}

.write-review-btn i {
    font-size: 0.9rem;
}

.write-review-btn:active {
    transform: translateY(0);
}

.rating-overview {
  display: flex;
  gap: 40px;
  margin-bottom: 32px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.average-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding-right: 40px;
  border-right: 1px solid var(--border-color);
}

.average-rating .rating-value {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
  line-height: 1;
}

.average-rating .rating-stars {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.average-rating .rating-count {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.rating-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.rating-bar-item {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.rating-bar-item:hover {
  opacity: 0.8;
}

.bar-label {
  width: 50px;
  font-size: 0.9rem;
  text-align: right;
  color: var(--text-muted);
  font-weight: 500;
}

.bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  width: 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
}

.bar-percent {
  width: 45px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: right;
}

/* Reviews container and items */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 30px;
}

.review-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 24px;
    position: relative;
    transition: all 0.2s ease;
}

.review-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reviewer-name {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}

.review-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.review-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.7;
    margin: 16px 0;
    padding: 0;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.helpful-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.helpful-btn:hover,
.helpful-btn.active {
    background: rgba(133, 65, 212, 0.1);
    color: #d8b4fe;
    border-color: rgba(133, 65, 212, 0.3);
}

/* Related books section */
.related-books {
  margin-top: 30px;
  border-top: none;
  padding-top: 20px;
}

.related-books h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

.related-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.related-book {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.related-book:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.related-book-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-book-image {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.related-book-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-book-info {
  padding: 15px;
}

.related-book-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: var(--text-color);
}

.related-book-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.related-book-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--star-color);
}

/* Ensure all star groups are horizontal */
.rating-stars,
.star-rating,
.stars {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px;
  margin: 5px 0;
}

/* Lightbox styling */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  z-index: 2000;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.lightbox-caption {
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 14px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 2010;
}

.lightbox-navigation {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.lightbox-nav {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-nav:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Rating Modal Styles */
.rating-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
}

.rating-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rating-modal .modal-dialog {
  width: 100%;
  max-width: 500px;
  margin: 1.75rem auto;
}

.rating-modal .modal-content {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--box-shadow);
}

.rating-modal .modal-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rating-modal .modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.rating-modal .modal-body {
  padding: 1.5rem;
}

.rating-modal .modal-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Rating Form Styles */
.rating-section {
  margin-bottom: 1.5rem;
}

.rating-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.rating-stars {
  display: flex !important;
  gap: 0.5rem;
  font-size: 1.5rem;
}

.rating-star {
  color: var(--star-color);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.rating-star:hover {
  transform: scale(1.2);
}

.rating-text {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Review Form */
.review-section {
  margin-bottom: 1rem;
}

.review-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-color);
  min-height: 120px;
  resize: vertical;
}

.review-guidelines {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Error Message */
.rating-error {
  display: none;
  color: var(--danger-color);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Modal Buttons */
.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
}

/* Review Rating Alignment */
.review-rating {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin-left: auto;
}

.stars {
    color: #ffd700;
    display: flex;
    gap: 2px;
}

/* Submit Review Button */
#submit-review {
    background: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: 25px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(66, 99, 235, 0.2);
    margin-top: 16px;
}

#submit-review:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 99, 235, 0.3);
}

#submit-review:active {
    transform: translateY(0);
}

#submit-review:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none; 
}

#submit-review i {
    font-size: 16px;
}

/* Review Form Container */
#review-form-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#review-comment {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    background: var(--card-bg);
    color: var(--text-color);
}

#review-comment:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 99, 235, 0.1);
}

.review-rating-stars {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.rating-star {
    font-size: 24px;
    color: var(--star-color);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.rating-star:hover {
    transform: scale(1.2);
}

/* Mobile responsiveness */
@media (max-width: 1200px) {
  .book-detail-container {
    grid-template-columns: 1fr;
  }
  
  .book-detail-media {
    position: static;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .rating-overview {
    flex-direction: column;
  }
  
  .average-rating {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .action-buttons-row {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
  }
  
  .header-main {
    flex-direction: column;
    gap: 15px;
  }
  
  .rating-summary {
    text-align: left;
  }
  
  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}