/**
 * Genre Page Styles - Modern UI Update
 * Enhanced styling with glassmorphism, gradients, and smooth animations
 */

/* ===== CSS Variables ===== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #ec4899;
  --accent: #06b6d4;
  --dark: #1e1b4b;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ===== Genre Hero Section ===== */
.genre-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  padding: 140px 0 100px;
  position: relative;
  overflow: hidden;
}

.genre-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 40%),
              radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
  animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2%, 2%) rotate(1deg); }
  50% { transform: translate(0, 4%) rotate(0deg); }
  75% { transform: translate(-2%, 2%) rotate(-1deg); }
}

.genre-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, var(--gray-50), transparent);
  pointer-events: none;
}

.genre-hero .container {
  position: relative;
  z-index: 2;
}

.genre-hero h1 {
  color: #fff;
  font-size: 52px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.genre-hero h1 span {
  background: linear-gradient(135deg, #818cf8, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.genre-hero .genre-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 600px;
  line-height: 1.6;
}

/* Stats Counter */
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.hero-stat {
  text-align: left;
}

.hero-stat .number {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  display: block;
  line-height: 1;
}

.hero-stat .label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 5px;
}

/* Breadcrumb */
.breadcrumb-nav {
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
  color: #fff;
}

.breadcrumb-nav span {
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumb-nav .current {
  color: #fff;
  font-weight: 500;
}

/* ===== Search Bar in Hero ===== */
.hero-search {
  max-width: 500px;
  margin-top: 30px;
}

.hero-search form {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 20px;
  color: #fff;
  font-size: 16px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.hero-search input:focus {
  outline: none;
}

.hero-search button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* ===== All Genres Section ===== */
.all-genres-section {
  padding: 80px 0;
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 15px;
}

.section-header p {
  font-size: 18px;
  color: var(--gray-600);
  max-width: 500px;
  margin: 0 auto;
}

/* Category Groups */
.genre-category {
  margin-bottom: 50px;
}

.genre-category:last-child {
  margin-bottom: 0;
}

.category-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-title i {
  color: var(--primary);
}

.category-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
  margin-left: 15px;
}

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

.genre-card {
  background: #fff;
  padding: 24px 16px;
  border-radius: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--gray-100);
  position: relative;
  overflow: hidden;
}

.genre-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.genre-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.genre-card:hover::before {
  transform: scaleX(1);
}

.genre-card .icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  transition: all 0.3s ease;
}

.genre-card i {
  font-size: 26px;
  transition: all 0.3s ease;
}

.genre-card span {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.genre-card .book-count {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 4px;
  font-weight: 400;
}

/* Genre Card Colors */
.genre-card.action .icon-wrapper { background: #fef2f2; }
.genre-card.action i { color: #ef4444; }
.genre-card.adventure .icon-wrapper { background: #fef3c7; }
.genre-card.adventure i { color: #f59e0b; }
.genre-card.comedy .icon-wrapper { background: #fef9c3; }
.genre-card.comedy i { color: #eab308; }
.genre-card.drama .icon-wrapper { background: #fce7f3; }
.genre-card.drama i { color: #ec4899; }
.genre-card.fantasy .icon-wrapper { background: #ede9fe; }
.genre-card.fantasy i { color: #8b5cf6; }
.genre-card.romance .icon-wrapper { background: #ffe4e6; }
.genre-card.romance i { color: #f43f5e; }
.genre-card.horror .icon-wrapper { background: #f1f5f9; }
.genre-card.horror i { color: #475569; }
.genre-card.mystery .icon-wrapper { background: #e0e7ff; }
.genre-card.mystery i { color: #6366f1; }
.genre-card.sci-fi .icon-wrapper { background: #cffafe; }
.genre-card.sci-fi i { color: #06b6d4; }
.genre-card.wuxia .icon-wrapper { background: #fee2e2; }
.genre-card.wuxia i { color: #dc2626; }
.genre-card.xianxia .icon-wrapper { background: #dbeafe; }
.genre-card.xianxia i { color: #3b82f6; }
.genre-card.xuanhuan .icon-wrapper { background: #d1fae5; }
.genre-card.xuanhuan i { color: #10b981; }
.genre-card.mature .icon-wrapper { background: #fef2f2; }
.genre-card.mature i { color: #991b1b; }
.genre-card.default .icon-wrapper { background: var(--gray-100); }
.genre-card.default i { color: var(--gray-600); }

/* ===== Book Listing Section ===== */
.book-listing-section {
  padding: 60px 0 80px;
  background: var(--gray-50);
  min-height: 600px;
}

/* Filter Bar */
.filter-bar {
  background: #fff;
  padding: 20px 24px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-bar .search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 250px;
}

.filter-bar .search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: var(--gray-50);
}

.filter-bar .search-box input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  outline: none;
}

.filter-bar .search-box i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-600);
  font-size: 18px;
}

.filter-bar .search-box button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-bar .search-box button:hover {
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.filter-bar .filter-options {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-bar .sort-box select {
  padding: 14px 44px 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  background: var(--gray-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 8L1 3h10z'/%3E%3C/svg%3E") right 16px center no-repeat;
  appearance: none;
  cursor: pointer;
  min-width: 160px;
  transition: all 0.3s ease;
}

.filter-bar .sort-box select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Results Info */
.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  color: var(--gray-600);
  font-size: 14px;
}

.results-info strong {
  color: var(--gray-800);
}

/* ===== Book Cards ===== */
.book-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  border: 1px solid var(--gray-100);
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.book-cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-card:hover .book-cover img {
  transform: scale(1.08);
}

.book-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.btn-read {
  background: #fff;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  transform: translateY(20px);
}

.book-card:hover .btn-read {
  transform: translateY(0);
}

.btn-read:hover {
  background: var(--primary);
  color: #fff;
}

.badge-completed {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.badge-hot {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #fff;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.4);
}

.book-info {
  padding: 16px;
}

.book-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.book-author {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.book-meta .rating {
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.book-meta .rating i {
  font-size: 14px;
}

.book-meta .chapters {
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

/* ===== Pagination ===== */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 50px;
  padding: 20px;
}

.pagination-wrapper button {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pagination-wrapper button:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.pagination-wrapper button:disabled,
.pagination-wrapper button.disabled {
  background: var(--gray-100);
  color: var(--gray-300);
  border-color: var(--gray-200);
  cursor: not-allowed;
  transform: none;
}

.pagination-wrapper #page-info {
  font-size: 15px;
  color: var(--gray-600);
  font-weight: 600;
  padding: 0 20px;
}

/* ===== Related Genres Section ===== */
.related-genres-section {
  padding: 70px 0;
  background: #fff;
}

.related-genres-section h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 30px;
  color: var(--gray-800);
}

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.genre-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--gray-100);
  color: var(--gray-800);
  border-radius: 30px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.genre-tag:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.genre-tag i {
  font-size: 16px;
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: #fff;
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  margin-bottom: 40px;
}

.cta-section .download-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-section .download-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  background: #fff;
  color: var(--gray-800);
  text-decoration: none;
  border-radius: 14px;
  transition: all 0.3s ease;
}

.cta-section .download-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cta-section .download-btn .icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 26px;
}

.cta-section .download-btn .icon.apple {
  background: #1a1a1a;
  color: #fff;
}

.cta-section .download-btn .icon.play {
  background: linear-gradient(135deg, #34a853, #0f9d58);
  color: #fff;
}

.cta-section .download-btn .text {
  text-align: left;
  line-height: 1.3;
}

.cta-section .download-btn .text small {
  font-size: 12px;
  color: var(--gray-600);
  display: block;
}

.cta-section .download-btn .text b {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
}

/* ===== App Download Modal ===== */
.app-modal .modal-content {
  border-radius: 20px;
  border: none;
  overflow: hidden;
}

.app-modal .modal-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  border: none;
  padding: 24px 28px;
}

.app-modal .modal-title {
  font-weight: 700;
  font-size: 20px;
}

.app-modal .modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.app-modal .modal-body {
  padding: 35px 28px;
  text-align: center;
}

.app-modal .modal-body .icon-big {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.app-modal .modal-body .icon-big i {
  font-size: 36px;
  color: #fff;
}

.app-modal .modal-body h5 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.app-modal .modal-body p {
  color: var(--gray-600);
  margin-bottom: 30px;
  font-size: 15px;
}

.app-modal .download-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.app-modal .download-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--gray-800);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.app-modal .download-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.app-modal .download-btn i {
  font-size: 26px;
}

.app-modal .download-btn .text {
  text-align: left;
  line-height: 1.2;
}

.app-modal .download-btn .text small {
  font-size: 10px;
  opacity: 0.8;
}

.app-modal .download-btn .text b {
  font-size: 15px;
}

/* ===== Empty State ===== */
.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.empty-state .icon-wrapper {
  width: 100px;
  height: 100px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.empty-state i {
  font-size: 48px;
  color: var(--gray-300);
}

.empty-state h4 {
  font-size: 22px;
  color: var(--gray-800);
  margin-bottom: 10px;
  font-weight: 700;
}

.empty-state p {
  color: var(--gray-600);
  font-size: 15px;
}

/* ===== Loading State ===== */
.loading-state {
  padding: 80px 20px;
  text-align: center;
}

.spinner-border {
  width: 3.5rem;
  height: 3.5rem;
  border-width: 4px;
  color: var(--primary);
}

.loading-state p {
  color: var(--gray-600);
  margin-top: 20px;
  font-size: 15px;
}

/* ===== Skeleton Loading ===== */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.book-card.skeleton .book-cover {
  background: var(--gray-200);
}

.book-card.skeleton .book-title {
  height: 20px;
  background: var(--gray-200);
  margin-bottom: 10px;
}

.book-card.skeleton .book-author {
  height: 14px;
  width: 60%;
  background: var(--gray-200);
}

/* ===== Responsive Styles ===== */
@media (max-width: 1199px) {
  .genre-hero h1 {
    font-size: 44px;
  }
  
  .genres-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 991px) {
  .genre-hero {
    padding: 120px 0 80px;
  }
  
  .genre-hero h1 {
    font-size: 36px;
  }
  
  .genre-hero .genre-description {
    font-size: 18px;
  }
  
  .hero-stats {
    gap: 30px;
  }
  
  .hero-stat .number {
    font-size: 28px;
  }
  
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-bar .search-box {
    max-width: 100%;
  }
  
  .filter-bar .filter-options {
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  .genre-hero {
    padding: 100px 0 70px;
  }
  
  .genre-hero h1 {
    font-size: 30px;
  }
  
  .genre-hero .genre-description {
    font-size: 16px;
  }
  
  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .hero-stat {
    min-width: 80px;
  }
  
  .hero-stat .number {
    font-size: 24px;
  }
  
  .section-header h2 {
    font-size: 28px;
  }
  
  .all-genres-section {
    padding: 50px 0;
  }
  
  .book-listing-section {
    padding: 40px 0 60px;
  }
  
  .book-info {
    padding: 14px;
  }
  
  .book-title {
    font-size: 14px;
    min-height: 38px;
  }
  
  .pagination-wrapper {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .pagination-wrapper button {
    padding: 12px 20px;
    font-size: 13px;
  }
  
  .cta-section {
    padding: 70px 0;
  }
  
  .cta-section h2 {
    font-size: 28px;
  }
  
  .cta-section p {
    font-size: 16px;
  }
  
  .cta-section .download-btns {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .cta-section .download-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .genres-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .genre-card {
    padding: 18px 12px;
  }
  
  .genre-card .icon-wrapper {
    width: 48px;
    height: 48px;
  }
  
  .genre-card i {
    font-size: 22px;
  }
  
  .genre-card span {
    font-size: 13px;
  }
  
  .hero-search form {
    flex-direction: column;
    gap: 10px;
  }
  
  .hero-search button {
    width: 100%;
    justify-content: center;
  }
}
