html {
  font-size: 16px;
}

:root {
  --bg-dark: #fbfaf7;
  /* Warm Kindle E-Paper Cream */
  --bg-card: #ffffff;
  /* Pure White Cards */
  --text-primary: #1c1917;
  /* Kindle Deep Charcoal black */
  --text-secondary: #57534e;
  /* Kindle Stone Grey */

  --accent-highlight: #1c1917;
  /* High-Contrast E-Ink Black */
  --accent-blue: #1c1917;
  --accent-purple: #1c1917;
  --accent-green: #1c1917;

  --border-color: #d6d3d1;
  /* Crisp Stone Border */
  --border-thick: 1px solid var(--border-color);
  --shadow-soft: none;
  /* E-Ink has no shadows */
  --shadow-hover: none;

  --transition-smooth: none;
  /* Instant refresh, no motion blur */
  --font-display: 'Merriweather', Georgia, serif;
  --font-body: 'Inter', sans-serif;
}

body.dark-mode {
  --bg-dark: #121212;
  /* Kindle Dark Mode Charcoal */
  --bg-card: #1c1c1c;
  /* Dark Grey Cards */
  --text-primary: #e7e5e4;
  /* Kindle Off-White text */
  --text-secondary: #a8a29e;
  /* Muted Stone Gray */
  --accent-blue: #e7e5e4;
  --accent-highlight: #e7e5e4;
  --border-color: #2e2e2e;
  --shadow-soft: none;
  --shadow-hover: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) var(--bg-dark);
  -webkit-tap-highlight-color: transparent;
  -webkit-overflow-scrolling: touch;
}

*::-webkit-scrollbar {
  width: 6px;
}

*::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

*::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
}

.app-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* Main Split Layout Grid */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  min-height: 100vh;
}

/* Reset Pill Button inside Searchbar */
/* Premium Unified Search Row */
.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.dashed-control-box {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  background: var(--bg-dark);
  margin: 0.4rem 0;
}

#lucky-shuffle-box {
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease !important;
}

#lucky-shuffle-box:hover {
  background-color: rgba(14, 165, 233, 0.08) !important; /* soft light blue */
  border-color: rgba(14, 165, 233, 0.25) !important;
}

#lucky-shuffle-box:hover::before {
  color: #1c1917 !important;
}

#lucky-shuffle-box:active {
  background-color: rgba(14, 165, 233, 0.2) !important; /* soft medium blue */
  border-color: rgba(14, 165, 233, 0.45) !important;
  transform: scale(0.95) !important;
}

#fun-zone-container {
  transition: border-color 0.2s ease !important;
}
#fun-zone-container:hover {
  border-color: rgba(14, 165, 233, 0.25) !important;
}
#fun-zone-container:hover::before {
  color: #1c1917 !important;
}

body.dark-mode #lucky-shuffle-box:hover::before,
body.dark-mode #fun-zone-container:hover::before {
  color: #bae6fd !important;
}

#fun-zone-container .action-pill-btn {
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease !important;
}
#fun-zone-container .action-pill-btn:hover {
  background-color: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(14, 165, 233, 0.25) !important;
}
#fun-zone-container .action-pill-btn:active {
  background-color: rgba(14, 165, 233, 0.2) !important;
  border-color: rgba(14, 165, 233, 0.45) !important;
  transform: scale(0.93) !important;
}

.dashed-control-box::before {
  content: attr(data-label);
  position: absolute;
  top: -9px;
  left: 12px;
  background: var(--bg-card);
  padding: 0 6px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.dashed-control-box.fun-zone-box::before {
  left: 55%;
  transform: translateX(-50%);
}

.search-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.action-pill-btn {
  background: var(--bg-card);
  border: var(--border-thick);
  color: var(--text-secondary);
  height: 48px;
  /* Matches search wrapper height exactly */
  width: 48px;
  /* Square icon layout */
  padding: 0;
  border-radius: 8px;
  font-size: 1.45rem;
  /* Much bigger emoji */
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.action-pill-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--bg-dark);
}

.action-pill-btn.reset-btn {
  color: var(--text-secondary);
  font-weight: 600;
  border-style: dashed;
}

.action-pill-btn.reset-btn:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.content-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 3rem 4.5rem;
  position: relative;
}



/* Premium Card Profile Header & Layout Polish */
.celeb-card {
  padding: 1.75rem !important;
  overflow: hidden;
}

.card-header-profile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.avatar-wrapper {
  margin: 0;
  flex-shrink: 0;
}

.avatar-wrapper .avatar-initials {
  width: 68px;
  height: 68px;
  font-size: 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}

.avatar-wrapper .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
}

.celeb-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.card-body-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex-grow: 1;
  justify-content: flex-start;
  overflow: visible;
}

.card-body-content .celeb-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-stat {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
}

.nav-btn {
  background: transparent;
  color: var(--text-primary);
  border: var(--border-thick);
  padding: 0.5rem 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-btn:hover {
  background: var(--text-primary);
  color: var(--bg-card);
  border-color: var(--text-primary);
}

/* Controls Panel */
.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: var(--border-thick);
}

.search-wrapper {
  position: relative;
  width: 37.5%;
  min-width: 520px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  border: var(--border-thick);
  background: var(--bg-card);
  transition: var(--transition-smooth);
}

@media (max-width: 768px) {
  .search-wrapper {
    width: 100%;
    min-width: 0;
  }
  .desktop-only-shortcuts {
    display: none !important;
  }
}

.search-wrapper:focus-within {
  border-color: var(--text-primary);
}

.search-input {
  flex: 1;
  width: 100%;
  padding: 1rem 1.2rem 1rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 500;
}

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

.search-icon {
  color: var(--text-secondary);
  pointer-events: none;
  display: flex;
  align-items: center;
  margin-left: 1.1rem;
  flex-shrink: 0;
}

.clear-search-btn {
  display: none;
}

.clear-search-btn.visible {
  display: block !important;
}




/* Filter Controls */
.filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.filter-label {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  color: #0284c7;
  background: var(--border-color);
}

body.dark-mode .filter-btn:hover {
  color: #1c1917;
}

.filter-btn.active {
  background: rgba(0, 198, 255, 0.12);
  color: #0284c7;
  border-color: rgba(0, 198, 255, 0.35);
  font-weight: 700;
}

body.dark-mode .filter-btn.active {
  background: rgba(0, 198, 255, 0.1);
  color: #00c6ff;
  border-color: rgba(0, 198, 255, 0.3);
}

.filter-btn.active:hover {
  background: rgba(0, 198, 255, 0.2);
  color: #0284c7;
  border-color: rgba(0, 198, 255, 0.5);
}

body.dark-mode .filter-btn.active:hover {
  background: rgba(0, 198, 255, 0.15);
  color: #1c1917;
  border-color: rgba(0, 198, 255, 0.45);
}

.custom-dropdown {
  position: relative;
  display: inline-block;
}

.other-select-dropdown {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 2rem 0.45rem 1.1rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  transition: var(--transition-smooth);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23706e6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.9rem;
}

.other-select-dropdown:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.other-select-dropdown.active {
  background-color: var(--accent-highlight);
  color: var(--bg-card);
  border-color: var(--accent-highlight);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Floating Custom Dropdown Menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 120%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 0.6rem;
  width: 230px;
  z-index: 100;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-search-input {
  width: 100%;
  padding: 0.4rem 0.8rem;
  border: var(--border-thick);
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}

.dropdown-options-list {
  max-height: 135px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dropdown-option-btn {
  background: none;
  border: none;
  text-align: left;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  transition: var(--transition-smooth);
}

.dropdown-option-btn:hover {
  background: var(--bg-dark);
  color: var(--text-primary);
}

/* Sort / Surprise Actions */
.actions-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.reset-btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: var(--border-thick);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  transition: var(--transition-smooth);
}

.reset-btn:hover {
  background: rgba(0, 198, 255, 0.12);
  color: #0284c7;
  border-color: rgba(0, 198, 255, 0.35);
}

body.dark-mode .reset-btn:hover {
  background: rgba(0, 198, 255, 0.1);
  color: #00c6ff;
  border-color: rgba(0, 198, 255, 0.3);
}

.roulette-wrapper {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.roulette-wrapper span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.surprise-btn {
  background: var(--text-primary);
  color: var(--bg-card);
  border: 1px solid var(--text-primary);
  padding: 0.5rem 1.3rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.surprise-btn:hover {
  background: transparent;
  color: var(--text-primary);
}

/* Active Filter Badges */
.active-badge-container {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.active-filter-badge {
  background: var(--bg-dark);
  color: var(--text-primary);
  border: var(--border-thick);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.active-filter-badge:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.active-filter-badge:hover .close-badge {
  color: #ffffff;
}

body.dark-mode .active-filter-badge:hover {
  background: #1c1917;
  color: #0f172a;
  border-color: #1c1917;
}

body.dark-mode .active-filter-badge:hover .close-badge {
  color: #0f172a;
}

.active-filter-badge .close-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-highlight);
}

/* Grid Layout - Spacious Editorial Columns */
.celebs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 1550px) {
  html {
    font-size: 14.5px !important;
  }

  /* Scale down layout spacing */
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-panel {
    padding: 2.2rem 0.75rem;
  }

  .sidebar-section {
    gap: 0.6rem;
  }

  .content-panel {
    padding: 2.2rem 2.2rem;
  }

  /* Scale down header stats & title */
  .main-header {
    margin-bottom: 1.25rem !important;
  }

  #main-title {
    font-size: 1.95rem !important;
  }

  .header-subtitle {
    font-size: 0.85rem !important;
    max-width: 530px !important;
    margin: 0.3rem 0 0.5rem 0 !important;
  }

  .header-stats {
    gap: 1.2rem !important;
  }

  .header-stat {
    font-size: 0.8rem !important;
  }

  #results-count-container {
    margin-top: 1rem !important;
    font-size: 0.8rem !important;
  }

  .view-mode-selector {
    margin-bottom: 1.25rem !important;
  }

  /* Scale down grid gap */
  .celebs-grid {
    gap: 1.2rem !important;
  }

  /* Scale down card padding and height */
  .celeb-card {
    padding: 1.2rem !important;
    min-height: 500px !important;
  }



  .celeb-card.author-card {
    min-height: 520px !important;
  }

  /* Scale down card header profile */
  .card-header-profile {
    gap: 0.7rem !important;
    margin-bottom: 0.5rem !important;
  }

  .avatar-wrapper .avatar-initials {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.15rem !important;
  }

  .celeb-name {
    font-size: 1.15rem !important;
  }

  .celeb-profession {
    font-size: 0.65rem !important;
    margin-bottom: 0.5rem !important;
    letter-spacing: 0.5px !important;
  }

  .celeb-bio {
    font-size: 0.8rem !important;
    line-height: 1.45 !important;
    margin-bottom: 0.6rem !important;
  }

  /* Card wrapper min heights overrides */
  .celeb-card-top-wrapper {
    min-height: 180px !important;
    margin-bottom: 0.4rem !important;
  }

  .book-card-top-wrapper {
    min-height: 160px !important;
    margin-bottom: 0.4rem !important;
  }

  /* Scale down books list and items inside cards */
  .books-list {
    gap: 0.45rem !important;
    max-height: 250px !important;
  }

  .author-card .books-list {
    max-height: 315px !important;
  }

  .book-item {
    padding: 0.4rem 0.6rem !important;
  }

  .book-info {
    gap: 0.45rem !important;
  }

  .book-title {
    font-size: 0.76rem !important;
  }

  .book-author {
    font-size: 0.68rem !important;
  }

  .consensus-badge {
    font-size: 0.6rem !important;
    padding: 0.08rem 0.3rem !important;
  }

  .rec-count-badge {
    font-size: 0.58rem !important;
    bottom: 4px !important;
    right: 12px !important;
  }

  .shortcut-tag {
    padding: 0.28rem 0.65rem !important;
    font-size: 0.68rem !important;
  }
}

@media (max-width: 1350px) {
  .celebs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
  }
}

@media (max-width: 950px) {
  html {
    font-size: 13.5px !important;
  }

  .celebs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 12.5px !important;
  }

  /* ==========================================================================
     MOBILE PHONE VIEWPORT OVERRIDES (Brand New Mobile-Only Format)
     Adjust styles here to completely customize the look and feel on phone screens.
     ========================================================================== */

  /* Grid Layout for Mobile */
  .celebs-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  /* Core Layout Spacing on Mobile */
  .content-panel {
    padding: 1.5rem 1rem !important;
  }

  /* Mobile Header Styles */
  #main-title {
    font-size: 1.65rem !important;
    /* Custom mobile heading size */
    text-align: left;
  }

  .header-subtitle {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }

  .header-stats {
    flex-wrap: wrap !important;
    gap: 0.8rem !important;
  }

  .header-stat {
    font-size: 0.75rem !important;
  }

  /* Brand New Mobile Card Format */
  .celeb-card {
    padding: 1rem !important;
    /* Thinner padding on mobile */
    min-height: auto !important;
    /* Auto height to fit content naturally on mobile */
    border-radius: 12px !important;
  }

  .celeb-card-top-wrapper {
    min-height: auto !important;
    /* Remove desktop height restriction */
    margin-bottom: 0.4rem !important;
  }

  .book-card-top-wrapper {
    min-height: auto !important;
    margin-bottom: 0.4rem !important;
  }

  /* Mobile Typography - Customize mobile fonts here */
  .celeb-name {
    font-size: 1.1rem !important;
  }

  .celeb-profession {
    font-size: 0.62rem !important;
    letter-spacing: 0.2px !important;
  }

  .celeb-bio {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.6rem !important;
  }

  /* Mobile Books List formatting */
  .books-list {
    max-height: 220px !important;
  }

  .book-title {
    font-size: 0.75rem !important;
  }

  .book-author {
    font-size: 0.65rem !important;
  }

  .book-item {
    padding: 0.35rem 0.5rem !important;
  }

  .consensus-badge {
    font-size: 0.58rem !important;
    padding: 0.05rem 0.25rem !important;
  }

  .rec-count-badge {
    bottom: 3px !important;
    right: 10px !important;
  }

  /* Mobile Filter Tag pills formatting */
  .shortcut-tag {
    padding: 0.22rem 0.55rem !important;
    font-size: 0.65rem !important;
  }

  /* Mobile details modal formatting */
  #modal-overlay .modal-content {
    padding: 0 !important;
    width: 92vw !important;
    height: auto !important;
    max-height: 92vh !important;
    max-width: 92vw !important;
    border-radius: 12px !important;
    border: var(--border-thick) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .modal-celeb-name {
    font-size: 1.5rem !important;
  }

  .modal-scroll-area {
    padding: 1.2rem 1.2rem 1.8rem 1.2rem !important;
  }

  .modal-book-detail {
    padding: 1rem !important;
    margin-top: 0.8rem !important;
  }
}

/* Cards Design - Minimalist Profile Catalog */
.celeb-card {
  background: var(--bg-card);
  border: var(--border-thick);
  border-radius: 16px;
  position: relative;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 250px;
  box-shadow: var(--shadow-soft);
  padding: 1.75rem;
  text-align: left;
  box-sizing: border-box;
  content-visibility: auto;
  contain-intrinsic-size: auto 250px;
}

.celeb-card.book-card {
  min-height: auto !important;
}

.celeb-card.book-card .celeb-bio {
  max-height: 90px;
  overflow-y: auto;
  padding-right: 4px;
}

.celeb-card.book-card .celeb-bio::-webkit-scrollbar {
  width: 4px;
}

.celeb-card.book-card .celeb-bio::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.celeb-card.author-card {
  min-height: 555px;
}

.celeb-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.rec-count-badge {
  position: absolute !important;
  bottom: 6px !important;
  right: 16px !important;
}

.card-header-bg {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.avatar-initials {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.tags-container {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.category-tag {
  font-size: 0.68rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--text-secondary);
  border: var(--border-thick);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  display: inline-block;
  vertical-align: middle;
  transition: max-width 0.25s ease-in-out, background-color 0.2s, color 0.2s;
}

.category-tag:hover {
  max-width: 320px;
  text-overflow: clip;
}

.origin-tag {
  font-size: 0.68rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--text-secondary);
  border: var(--border-thick);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
  transition: max-width 0.25s ease-in-out, background-color 0.2s, color 0.2s;
}

.origin-tag:hover {
  max-width: 320px;
  text-overflow: clip;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.celeb-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.celeb-profession {
  color: var(--accent-highlight);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.celeb-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  cursor: pointer;
}

/* Books List in Card */
.books-section-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: var(--border-thick);
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
}

.books-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 250px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  margin-bottom: 0.6rem;
  scroll-behavior: smooth;
}

.author-card .books-list {
  max-height: 380px;
}

.book-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.book-item:hover {
  background: var(--bg-card);
  border-color: var(--text-secondary);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.book-info {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.book-icon {
  font-size: 0.95rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.book-text {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.book-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.book-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-author {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
  font-weight: 500;
}

.consensus-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 12px;
  background: rgba(0, 198, 255, 0.08);
  color: #0284c7;
  border: 1px solid rgba(0, 198, 255, 0.15);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: var(--transition-smooth);
  position: relative;
}

.consensus-badge:hover {
  background: #ff5252;
  color: #fff;
  border-color: #ff5252;
}



/* Modal Styling - Classic Dialog overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(28, 26, 24, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  border: var(--border-thick);
  border-radius: 16px;
  width: 90%;
  max-width: 620px;
  height: auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  position: relative;
  box-shadow: var(--shadow-hover);
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.modal-scroll-area {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 1.8rem 3rem 2.5rem 3rem;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

@media (min-width: 951px) {
  #modal-overlay .modal-content {
    max-width: 1020px;
    height: 840px;
    max-height: 88vh;
  }
}


.modal-controls {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 15;
}

.close-modal, .share-modal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  opacity: 0.6;
  cursor: pointer;
  font-size: 1.05rem;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
  width: auto;
  height: auto;
  border-radius: 0;
}

.close-modal {
  font-size: 1.25rem;
  line-height: 1;
}

.modal-content > .close-modal {
  position: absolute !important;
}

.close-modal:hover, .share-modal:hover {
  color: var(--text-primary);
  opacity: 1;
  background: transparent !important;
  transform: scale(1.1);
}


.modal-celeb-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  text-align: left;
}

.modal-celeb-prof {
  color: var(--accent-highlight);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.8rem;
  text-align: left;
}

#modal-books-container {
  max-height: none !important;
  overflow-y: visible !important;
  padding-right: 10px;
}

.modal-book-detail,
.details-book-card,
.modal-recommender-card {
  position: relative;
  background: var(--bg-dark);
  border: var(--border-thick);
}

.modal-book-detail {
  margin-top: 1.2rem;
  padding: 1.8rem;
  border-radius: 12px;
}

.details-book-card {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
}

.modal-recommender-card {
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  border-radius: 8px;
}

.modal-book-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  padding-right: 2rem;
}

.modal-book-author {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.modal-book-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.modal-book-meta-row > div {
  margin-left: auto;
}

.book-genre-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border: var(--border-thick);
  border-radius: 12px;
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text-secondary);
}

.amazon-buy-btn {
  background: rgba(0, 198, 255, 0.08);
  /* Faint sky light blue */
  border: 1px solid rgba(0, 198, 255, 0.25);
  color: #0284c7 !important;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 5px rgba(0, 198, 255, 0.08);
  transition: var(--transition-smooth);
}

.amazon-buy-btn:hover {
  background: rgba(0, 198, 255, 0.15);
  border-color: rgba(0, 198, 255, 0.45);
}

body.dark-mode .amazon-buy-btn {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: #1c1917 !important;
}

body.dark-mode .amazon-buy-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
}

.modal-book-desc {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.65;
  font-style: italic;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
  margin-bottom: 1rem;
}

.modal-book-desc.expanded {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
  cursor: zoom-out;
}

.expandable-book-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.8rem;
}


/* Suggest Form Section */
.suggest-section {
  margin-top: 7rem;
  background: var(--bg-card);
  border: var(--border-thick);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: var(--shadow-soft);
}

.suggest-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
  color: var(--text-primary);
}

.suggest-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.form-group label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  background: var(--bg-card);
  border: var(--border-thick);
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 500;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--text-primary);
}

.form-group-full {
  grid-column: 1 / -1;
}

.submit-btn {
  background: var(--text-primary);
  color: var(--bg-card);
  border: 1px solid var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
}

.submit-btn:hover {
  background: transparent;
  color: var(--text-primary);
}

/* Success Message */
.form-success {
  display: none;
  background: rgba(42, 90, 59, 0.08);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 1.2rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem;
  color: var(--text-secondary);
  font-size: 1.15rem;
  font-family: var(--font-display);
  font-style: italic;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.4s ease-out forwards;
}

/* Curated Info Banner (Compact inline view next to Reset) */
.curated-banner {
  background: var(--bg-dark);
  border: var(--border-thick);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-sizing: border-box;
  max-width: 580px;
  flex: 1;
}

.curated-banner.hidden {
  display: none !important;
}

.banner-badge {
  background: var(--text-primary);
  color: var(--bg-card);
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.62rem;
  padding: 0.2rem 0.4rem;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.banner-body-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
}

.banner-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.banner-text {
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
}

/* Recommenders Avatars Row styling */
.recommenders-scroll-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
  overflow: hidden;
  box-sizing: border-box;
}

.recommenders-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.recommenders-avatars-list {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.recommenders-avatars-list::-webkit-scrollbar {
  display: none;
}

.tiny-recommender-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.55rem;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.tiny-recommender-avatar:hover {
  transform: scale(1.15) translateY(-1px);
  z-index: 10;
}

.tiny-recommender-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
}

.recommenders-expand-trigger {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-highlight);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

.recommenders-expand-trigger:hover {
  color: var(--text-primary);
}

.recommenders-avatars-list.hidden {
  display: none !important;
}

/* Modal Recommenders Section styles */
.modal-recommenders-row {
  margin-top: 0.8rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
  line-height: 1.5;
}

.recommenders-names-list {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline;
  position: relative;
}

.rec-name-link {
  color: var(--accent-blue);
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.rec-name-link:hover {
  color: var(--text-primary);
}

.rec-name-link.block-rec {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  text-decoration: underline;
  font-weight: 600;
  transition: all 0.15s ease;
}

.rec-name-link.block-rec:hover {
  background: var(--bg-dark);
}

.more-recs-trigger {
  color: var(--accent-highlight);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-body);
  font-size: 0.8rem;
  display: inline-block;
  white-space: nowrap;
}

.more-recs-trigger:hover {
  color: var(--text-primary);
}

.more-recs-dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  background: var(--bg-card);
  border: var(--border-thick);
  border-radius: 8px;
  padding: 0.3rem;
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: var(--shadow-soft);
  z-index: 100;
  margin-top: 0.15rem;
  box-sizing: border-box;
  min-width: 140px;
}

.more-recs-dropdown::-webkit-scrollbar {
  width: 3px;
}

.more-recs-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.more-recs-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.more-recs-dropdown.hidden {
  display: none !important;
}

/* Bookmark Buttons styling */
.bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.35;
  transition: var(--transition-smooth);
  padding: 0.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bookmark-btn:hover {
  transform: scale(1.2);
  opacity: 1;
}

.bookmark-btn.active {
  opacity: 1;
}

/* Details modal bookmark tab integration */
.modal-book-detail .bookmark-btn {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  font-size: 1.3rem;
}

/* Favorites list style */
.favorites-item {
  background: var(--bg-card);
  border: var(--border-thick);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.favorites-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-right: 1.8rem;
}

.favorites-item-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.favorites-item-author {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.favorites-item-recommender {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-highlight);
  margin-top: 0.15rem;
}

.favorites-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
}

.remove-favorite-btn {
  background: none;
  border: none;
  color: var(--accent-highlight);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
}

.remove-favorite-btn:hover {
  color: var(--text-primary);
}

/* Search Term Highlighting */
.search-highlight {
  background-color: #ffd166;
  color: #1c1a18 !important;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
}

body.dark-mode .search-highlight {
  background-color: #ffd166;
  color: #1c1a18 !important;
}

/* Roulette Spinner Animations */
.celeb-card.spin-active {
  border-color: var(--text-primary) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.celeb-card.winner-bounce {
  animation: winnerBounce 0.5s ease-out 2 alternate;
}

@keyframes winnerBounce {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-8px);
    border-color: var(--accent-highlight) !important;
    box-shadow: var(--shadow-hover);
  }
}



/* Centered main header */
.main-header {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: var(--border-thick);
}

.header-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.header-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 500;
  max-width: none;
  margin: 0 auto 1.5rem auto;
}

.header-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.header-stat {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
}

.hdr-interactive-stat {
  color: var(--text-secondary);
  font-weight: 750;
  cursor: pointer;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.hdr-interactive-stat:hover {
  color: var(--text-primary) !important;
  text-decoration: underline !important;
}

/* Mobile Layout Toggle Button (Hidden on Desktop, visible on Mobile next to Theme) */
.mobile-layout-toggle-stat {
  display: none !important;
}

@media (max-width: 950px) {
  .mobile-layout-toggle-stat {
    display: flex !important;
  }
}

/* Footer & Spill the Tea trigger styling */
.main-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6rem;
  padding: 2.5rem 4.5rem;
  border-top: var(--border-thick);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-left {
  text-align: left;
}

.footer-left .disclaimer {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 0.5rem;
  max-width: 600px;
  line-height: 1.4;
}

.footer-suggest-btn {
  background: transparent;
  color: var(--text-primary);
  border: var(--border-thick);
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-suggest-btn:hover {
  background: var(--text-primary);
  color: var(--bg-card);
  border-color: var(--text-primary);
}

/* Responsive details for compressed header & split grid layout */
@media (max-width: 950px) {


  .main-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sidebar-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 85vw;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    padding: 2.5rem 1.5rem;
    border-right: var(--border-thick);
  }

  .sidebar-panel.drawer-active {
    transform: translateX(0);
  }

  .close-drawer-btn {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
  }

  .mobile-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4);
    z-index: 900;
    cursor: pointer;
    transition: var(--transition-smooth);
  }

  .mobile-filter-trigger:hover {
    transform: translateY(-2px);
    background: #0369a1;
  }

  .content-panel {
    padding: 2rem;
  }
}

@media (max-width: 900px) {
  .app-container {
    padding: 1.5rem;
    padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
    padding-left: calc(1.5rem + env(safe-area-inset-left, 0px));
    padding-right: calc(1.5rem + env(safe-area-inset-right, 0px));
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }

  .header-title {
    font-size: 2.2rem;
  }
}

/* Load More Option */
.load-more-container {
  display: flex;
  justify-content: flex-start;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.load-more-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border: var(--border-thick);
  padding: 0.5rem 1.4rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  transition: var(--transition-smooth);
}

.load-more-btn:hover {
  background: rgba(0, 198, 255, 0.12);
  color: #0284c7;
  border-color: rgba(0, 198, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

body.dark-mode .load-more-btn:hover {
  background: rgba(0, 198, 255, 0.10);
  color: #00c6ff;
  border-color: rgba(0, 198, 255, 0.30);
}

/* Enriched Modal Details */
.modal-profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.modal-profile-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.modal-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.modal-celeb-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
  text-align: left;
  border-bottom: var(--border-thick);
  padding-bottom: 1.5rem;
}

/* Header Shortcut Badges */
.header-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.shortcut-tag {
  background: var(--bg-dark);
  color: var(--text-secondary);
  border: var(--border-thick);
  border-radius: 20px;
  padding: 0.45rem 1.1rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: var(--transition-smooth);
}

.shortcut-tag:hover {
  background: var(--border-color);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.shortcut-tag.active {
  background: rgba(0, 198, 255, 0.12);
  color: #0f172a;
  border-color: rgba(0, 198, 255, 0.35);
}

body.dark-mode .shortcut-tag.active {
  background: rgba(0, 198, 255, 0.1);
  color: #00c6ff;
  border-color: rgba(0, 198, 255, 0.3);
}

.shortcut-tag.disabled-shortcut {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(80%);
}

/* Modal Navigation Controls */
.modal-header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding: 2.5rem 6.8rem 1rem 3rem;
  border-bottom: var(--border-thick);
  width: 100%;
  box-sizing: border-box;
}

.modal-nav-btn {
  background: transparent;
  color: var(--text-primary);
  border: var(--border-thick);
  border-radius: 20px;
  padding: 0.5rem 1.2rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-nav-btn:hover {
  background: var(--text-primary);
  color: var(--bg-card);
  border-color: var(--text-primary);
}

.modal-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

/* View Mode Switcher Styles */
.view-mode-selector {
  margin: 0;
  display: flex;
  gap: 0.15rem;
  background: var(--bg-dark);
  padding: 0.2rem;
  border: var(--border-thick);
  border-radius: 10px;
  width: fit-content;
  height: 36px;
  box-sizing: border-box;
  align-items: center;
}

.view-mode-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 0 0.9rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  height: 28px;
  /* inner height */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease !important;
}

.view-mode-selector>.view-mode-btn[data-view] {
  padding: 0 1.5rem;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .view-mode-selector {
    width: auto !important;
    max-width: none !important;
  }
  .view-mode-selector>.view-mode-btn[data-view] {
    width: auto !important;
    flex: none !important;
  }
}



/* Blue view-mode-btn styles removed to let high-contrast Kindle overrides apply */

.view-mode-selector>.view-mode-btn[data-shortcut="all"] {
  margin-right: 0.75rem !important;
}

.view-mode-selector>.view-mode-btn[data-shortcut="all"]::after {
  content: "";
  position: absolute;
  right: -0.42rem;
  top: 20%;
  height: 60%;
  width: 1px;
  background-color: var(--border-color);
  opacity: 0.85;
}

.quiz-nav-btn {
  border: 1px solid rgba(14, 165, 233, 0.25);
  background: rgba(14, 165, 233, 0.08);
  color: #1c1917;
  height: 44px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
}

.quiz-nav-btn:hover:not(:disabled) {
  background: #1c1917 !important;
  /* solid happier blue */
  color: white !important;
  border-color: #1c1917 !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

body.dark-mode .quiz-nav-btn {
  background: rgba(14, 165, 233, 0.06);
  border-color: rgba(14, 165, 233, 0.2);
  color: #1c1917;
}

body.dark-mode .quiz-nav-btn:hover:not(:disabled) {
  background: #1c1917 !important;
  color: white !important;
  border-color: #1c1917 !important;
}

.hidden {
  display: none !important;
}

.amazon-cart-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: var(--border-thin);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  z-index: 1010;
}

body.light-mode .modal-nav-btn {
  border-color: rgba(0, 0, 0, 0.12);
}

.modal-nav-btn:hover {
  background: var(--bg-dark);
  color: var(--text-primary);
  border-color: var(--text-secondary);
  transform: scale(1.05);
}

.modal-nav-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}



.drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 950;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 500px) {
  .content-panel {
    padding: 1.5rem 1rem !important;
  }

  .header-title {
    font-size: 1.85rem !important;
  }

  .main-header {
    margin-bottom: 1.5rem !important;
  }
}

/* Quiz Game Styles */
.quiz-option-btn {
  background: var(--bg-card);
  border: var(--border-thick);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 750;
  color: var(--text-primary);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  flex: 1;
  box-sizing: border-box;
}

.quiz-option-btn:hover:not(:disabled) {
  background: var(--bg-dark);
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

.quiz-option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.quiz-option-btn.correct-choice {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: #10b981 !important;
  color: #064e3b !important;
}

.quiz-option-btn.wrong-choice {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: #ef4444 !important;
  color: #7f1d1d !important;
}

.final-score-container {
  animation: pop-scale 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes pop-scale {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#quiz-amazon-btn:hover {
  background: rgba(0, 198, 255, 0.16) !important;
  border-color: rgba(0, 198, 255, 0.45) !important;
  transform: scale(1.05);
}

/* Premium Responsive Header Styles */
.header-content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
}

.header-stats-horizontal {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
  align-items: center;
  padding: 0.6rem 0;
}

@media (max-width: 768px) {
  .header-content-wrapper {
    flex-direction: column !important;
    gap: 1.25rem !important;
    align-items: flex-start !important;
  }

  .header-stats-horizontal {
    align-self: flex-start !important;
    padding: 0 !important;
    margin-top: 0.25rem !important;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.12);
    opacity: 1;
    color: #ef4444;
  }
}


/* ==========================================================================
   TINDER CARD BRWSING STACK FOR MOBILE
   ========================================================================== */
@media (max-width: 950px) {
  .desktop-only-stat {
    display: none !important;
  }
  #header-cart-btn {
    display: none !important;
  }
  /* Declutter mobile header & spacing */
  .header-subtitle {
    display: block !important;
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    margin-top: 0.35rem !important;
    text-align: left !important;
  }
  .header-title {
    font-size: 1.6rem !important;
    text-align: left !important;
  }
  .main-header {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0 !important;
  }
  .header-stats-horizontal {
    gap: 1rem !important;
    padding: 0.2rem 0 !important;
  }
  .header-stat strong {
    font-size: 0.9rem !important;
  }
  .header-stat span {
    font-size: 0.72rem !important;
  }
  #desktop-stats-row {
    gap: 0.4rem 0.75rem !important;
    justify-content: flex-start !important;
  }
  .header-content-wrapper {
    gap: 1rem !important;
    align-items: center !important;
  }
  
  /* Declutter main panel & spacing controls */
  .content-panel {
    padding: 0.5rem 0.8rem !important;
  }
  #header-shortcuts-wrapper {
    margin-bottom: 0.6rem !important;
  }
  .search-row {
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
  }
  .search-wrapper {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Scale down labels and padding on mobile to prevent overlaps */
  .dashed-control-box {
    padding: 0.45rem 0.6rem !important;
  }
  .dashed-control-box::before {
    font-size: 0.58rem !important;
    padding: 0 5px !important;
    letter-spacing: 0.3px !important;
  }



  /* Bottom Cart Button next to Load More on mobile */
  .bottom-cart-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-card);
    border: var(--border-thick);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--text-primary);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    margin-left: auto;
    height: 36px;
    box-sizing: border-box;
  }
  .bottom-cart-btn:hover {
    background: rgba(0, 198, 255, 0.1);
    color: #0284c7;
    border-color: rgba(0, 198, 255, 0.35);
    transform: translateY(-2px);
  }
  .load-more-container {
    display: flex;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 380px !important;
    margin: 2rem auto 3rem auto !important;
  }
  
  .bottom-ratio-stat {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 0.75rem;
  }

  /* Mobile view tab and fun zone vertical stack (fun zone on top) */
  .controls-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.6rem !important;
    width: 100% !important;
    margin-bottom: 1.5rem !important;
  }
  .controls-row::-webkit-scrollbar {
    display: none;
  }
  .fun-zone-box {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    border: var(--border-thick) !important;
    background: var(--bg-card) !important;
    padding: 0.35rem 0.6rem 0.25rem 0.6rem !important;
    box-shadow: var(--shadow-soft) !important;
    display: flex !important;
    gap: 0.4rem !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    max-width: 100% !important;
    align-self: center !important;
  }
  .mode-selectors-container {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }
  .view-mode-selector {
    margin: 0 !important;
    align-self: center !important;
  }
  #elite-mode-container {
    width: fit-content !important;
    max-width: 100% !important;
    align-self: center !important;
  }
  .modal-profile-details {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    width: 100% !important;
  }
}

/* Match Connection Modal Premium Styling */
.match-modal-content {
  animation: matchIntro 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.match-neon-title {
  background: linear-gradient(to right, #10b981, #34d399, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.match-avatars-wrap {
  perspective: 800px;
}

.match-avatar {
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.match-avatar.user {
  animation: slideInLeftAvatar 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2) both;
}

.match-avatar.celeb {
  animation: slideInRightAvatar 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2) both;
}

.match-avatar-badge {
  font-size: 2.2rem;
  z-index: 10;
  animation: badgePop 0.8s infinite alternate cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes matchIntro {
  0% {
    transform: scale(0.85) translateY(30px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeftAvatar {
  0% {
    transform: translateX(-120px) rotate(-30deg);
    opacity: 0;
  }
  100% {
    transform: translateX(15px) rotate(0deg);
    opacity: 1;
  }
}

@keyframes slideInRightAvatar {
  0% {
    transform: translateX(120px) rotate(30deg);
    opacity: 0;
  }
  100% {
    transform: translateX(-15px) rotate(0deg);
    opacity: 1;
  }
}

@keyframes badgePop {
  0% {
    transform: scale(0.9) translate3d(0, 0, 0);
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.3);
  }
  100% {
    transform: scale(1.15) translate3d(0, -2px, 0);
    text-shadow: 0 0 20px rgba(14, 165, 233, 0.6);
  }
}

.bottom-cart-btn,
.bottom-ratio-stat {
  display: none !important;
}

/* Liked Celebrities Tray (Likes Cart) styling */
.likes-tray-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: calc(100% - 32px);
  max-width: 380px;
  margin: 0.8rem auto 1.5rem auto;
  padding: 0.45rem 0.8rem;
  background: var(--bg-dark);
  border: var(--border-thin);
  border-radius: 20px;
  box-sizing: border-box;
  box-shadow: var(--shadow-soft), inset 0 1px 2px rgba(255,255,255,0.03);
}

.likes-tray-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.likes-tray-avatars {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  flex-grow: 1;
  padding: 2px 0;
  min-width: 0; /* Allows shrinking to keep checkout button visible */
}

.likes-tray-avatars::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.likes-tray-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #1c1917;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.likes-tray-avatar:hover,
.likes-tray-avatar:active {
  transform: scale(1.15) translateY(-2px);
  border-color: #10b981;
  box-shadow: 0 6px 12px rgba(16,185,129,0.3);
  z-index: 10;
}
/* Prevent vertical page scrolling/bouncing during tinder gestures */
body.tinder-active {
  overflow: hidden !important;
  touch-action: none !important;
}

.likes-add-all-btn {
  transition: all 0.2s ease;
}
.likes-add-all-btn:hover {
  background: #059669 !important;
  border-color: #059669 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16,185,129,0.3);
}
.likes-add-all-btn:active {
  transform: translateY(0);
}

.cart-tray-books::-webkit-scrollbar {
  display: none;
}

.likes-clear-all-btn {
  transition: all 0.2s ease;
}
.likes-clear-all-btn:hover {
  background: rgba(239,68,68,0.15) !important;
  border-color: rgba(239,68,68,0.3) !important;
  transform: translateY(-1px);
}
.likes-clear-all-btn:active {
  transform: translateY(0);
}

#cart-clear-all-btn {
  transition: all 0.2s ease;
}
#cart-clear-all-btn:hover {
  background: rgba(239,68,68,0.15) !important;
  border-color: rgba(239,68,68,0.35) !important;
  transform: translateY(-1px);
}
#cart-clear-all-btn:active {
  transform: translateY(0);
}

body.no-animations *:not(.fade-in):not(.skeleton-card):not(.skeleton-shimmer):not(.skeleton-shimmer::after) {
  animation: none !important;
  transition: none !important;
}

/* Thumbs Up Like Button Styles */
.celeb-like-btn {
  font-size: 1.1rem !important;
  filter: grayscale(1);
  opacity: 0.62;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}
.celeb-like-btn:hover {
  transform: scale(1.15) !important;
  opacity: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.celeb-like-btn.active {
  filter: none;
  opacity: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.celeb-like-btn.active:hover {
  transform: scale(1.15) !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Amazon Cart Button and Book Shelf Button Styles - Premium Kindle/Google Design */
.amazon-cart-btn-circle, .book-fav-btn, .book-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem !important;
  opacity: 0.75 !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: none !important;
  padding: 0 !important;
  line-height: 1 !important;
  position: relative !important;
}
.amazon-cart-btn-circle:hover, .book-fav-btn:hover, .book-icon:hover {
  opacity: 1 !important;
  transform: scale(1.15) !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.book-fav-btn.active, .book-icon.active {
  background: transparent !important;
  border: none !important;
  opacity: 1 !important;
}
body.dark-mode .amazon-cart-btn-circle, 
body.dark-mode .book-fav-btn,
body.dark-mode .book-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
body.dark-mode .amazon-cart-btn-circle:hover, 
body.dark-mode .book-fav-btn:hover,
body.dark-mode .book-icon:hover {
  background: transparent !important;
  border: none !important;
  opacity: 1 !important;
}
body.dark-mode .book-fav-btn.active,
body.dark-mode .book-icon.active {
  background: transparent !important;
  border: none !important;
  opacity: 1 !important;
}

.amazon-cart-btn-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  height: 28px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.amazon-cart-btn-pill.active-cart-pill {
  background: #1e40af !important;
  border: 1px solid #1e40af !important;
  color: #ffffff !important;
}

.amazon-cart-btn-pill.active-history-pill {
  background: #15803d !important;
  border: 1px solid #15803d !important;
  color: #ffffff !important;
}

@media (max-width: 950px) {
  .amazon-cart-btn-circle {
    font-size: 0.85rem !important;
    width: 18px !important;
    height: 18px !important;
  }
  .celeb-like-btn {
    font-size: 0.97rem !important;
    padding: 4px !important;
  }
}






/* Kindle High-Contrast Button and Active Pill Overrides */
.view-mode-btn:hover {
  background: var(--border-color) !important;
  border-color: var(--text-secondary) !important;
  color: var(--text-primary) !important;
}

.view-mode-btn.active,
body.dark-mode .view-mode-btn.active {
  background: #1c1917 !important;
  color: #ffffff !important;
  border-color: #1c1917 !important;
  box-shadow: none !important;
}

.filter-btn:hover,
body.dark-mode .filter-btn:hover {
  color: #1c1917 !important;
  background: var(--border-color) !important;
}

.filter-btn.active,
body.dark-mode .filter-btn.active {
  background: #1c1917 !important;
  color: #ffffff !important;
  border-color: #1c1917 !important;
}

.other-select-dropdown.active {
  background: #1c1917 !important;
  color: #ffffff !important;
  border-color: #1c1917 !important;
}

.dropdown-option-btn:hover {
  background: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Adjust title styles to look like print books */
.celeb-name, .modal-book-title {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
}

.celeb-card.keyboard-selected {
  outline: 3px solid var(--text-primary) !important;
  outline-offset: 4px;
}

.header-title {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
}

/* keyboard-help-trigger styling removed */

/* Premium Curator & Custom Book Form styles */
.modal-form-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

.modal-form-input:hover {
  border-color: var(--text-primary);
}

.modal-form-input:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px rgba(120, 120, 120, 0.15);
}

select.modal-form-input {
  cursor: pointer;
}

textarea.modal-form-input {
  height: 64px;
  padding: 10px 12px;
  resize: none;
}

.modal-form-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--text-primary);
  color: var(--bg-card);
  transition: opacity 0.2s ease, transform 0.1s ease;
  line-height: 1;
}

.modal-form-btn:hover {
  opacity: 0.9;
}

.modal-form-btn:active {
  transform: scale(0.98);
}

.modal-form-btn.secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.modal-form-btn.secondary:hover {
  background: rgba(120, 120, 120, 0.05);
}

.modal-form-btn.danger {
  background: #ef4444;
  color: #ffffff;
}

.modal-form-btn.danger:hover {
  background: #dc2626;
}

/* Autocomplete suggestions dropdown styles */
.autocomplete-suggestions {
  position: absolute;
  z-index: 2000;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-height: 160px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-top: 2px;
  top: 100%;
  left: 0;
  box-sizing: border-box;
}

.autocomplete-suggestion {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.autocomplete-suggestion:last-child {
  border-bottom: none;
}

.modal-like-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 3.8rem;
}

.modal-celeb-like-btn-mobile {
  display: none;
}

.autocomplete-suggestion:hover {
  background: var(--bg-dark);
}

@media (max-width: 950px) {
  /* Safe Area Top Overlap Prevention & 92vw/92vh Layout */
  #modal-overlay .modal-content {
    padding: 0 !important;
    width: 92vw !important;
    height: 85vh !important;
    max-height: 92vh !important;
    max-width: 92vw !important;
    border-radius: 12px !important;
    border: var(--border-thick) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .modal-controls {
    position: static !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.4rem 1rem 0 1rem !important;
    border-bottom: none !important;
    background: transparent !important;
    width: 100% !important;
    box-sizing: border-box !important;
    order: 1 !important;
    gap: 1rem !important;
  }
  .modal-controls .close-modal, .modal-controls .share-modal {
    position: static !important;
    top: auto !important;
    right: auto !important;
  }
  .close-modal {
    font-size: 1.8rem !important;
    padding: 4px !important;
    cursor: pointer !important;
    line-height: 1 !important;
  }
  .share-modal {
    font-size: 1.3rem !important;
    padding: 4px !important;
    cursor: pointer !important;
    line-height: 1 !important;
  }
  .modal-scroll-area {
    padding: 0.2rem 1rem 0.2rem 1rem !important;
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    order: 2 !important;
  }
  .modal-like-wrapper {
    display: none !important;
  }
  .modal-celeb-like-btn-mobile {
    display: inline-block !important;
  }
  .modal-profile-header {
    padding-top: 0 !important;
    margin-bottom: 0.75rem !important;
  }
  .modal-header-nav {
    margin-bottom: 0 !important;
    padding: 0 1rem 0.4rem 1rem !important;
    background: transparent !important;
    border-top: none !important;
    border-bottom: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-right: 1rem !important;
    position: static !important;
    z-index: 100 !important;
    order: 3 !important;
  }
  .modal-nav-btn {
    flex: 1 !important;
    text-align: center !important;
    max-width: 120px !important;
    height: 30px !important;
    font-size: 0.82rem !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
  }
  .sidebar-panel {
    padding-top: calc(2.5rem + env(safe-area-inset-top, 0px)) !important;
  }
  .close-drawer-btn {
    top: calc(1rem + env(safe-area-inset-top, 0px)) !important;
  }
  #modal-books-container {
    max-height: none !important;
    overflow-y: visible !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 600px) {
  /* Inherit modal flex layout from 950px block */
}

/* Fun Zone Dropdown */
.header-funzone-parent {
  position: relative;
}

.funzone-dropdown {
  display: none;
  position: absolute;
  top: 125%;
  right: 0;
  background: var(--bg-card);
  border: var(--border-thick);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  padding: 0.5rem;
  width: 185px;
  z-index: 1000;
  text-align: left;
  flex-direction: column;
  gap: 0.25rem;
}

.funzone-dropdown.active {
  display: flex;
}

.funzone-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.funzone-dropdown-item:hover {
  background-color: var(--bg-dark);
  color: #1c1917;
}

body.dark-mode .funzone-dropdown-item:hover {
  color: #00c6ff;
}

/* Minimalist Footer layout */
.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .footer-bottom-row {
    justify-content: center;
    text-align: center;
    flex-direction: column-reverse;
    gap: 0.75rem;
  }
}

/* Shake Animation for funny error screen */
@keyframes shake {
  0% { transform: translate(2px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.icon-shake {
  display: inline-block;
  animation: shake 0.6s infinite;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 2.2fr 1.6fr 1.2fr;
  gap: 3rem;
  text-align: left;
  width: 100%;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .footer-grid div {
    align-items: center;
  }
  #fun-zone-container {
    justify-content: center !important;
  }
}

/* Safari/iOS Scroll momentum fix for scroll containers */
.modal-scroll-area,
.books-list,
.sidebar-panel,
.autocomplete-suggestions,
.dropdown-options-list,
.more-recs-dropdown,
.celeb-card.book-card .celeb-bio,
[style*="overflow-y: auto"],
[style*="overflow-y: scroll"] {
  -webkit-overflow-scrolling: touch !important;
}

/* Orientation Blocker Styles */
#orientation-blocker {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-card);
  color: var(--text-primary);
  z-index: 999999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
}


@keyframes rotate-phone {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-90deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Collapsible Backup & Sync menu styling */
.backup-sync-details {
  border-top: var(--border-thin);
  padding-top: 1.2rem;
  margin-top: 1.2rem;
}

.backup-sync-summary {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  outline: none;
  user-select: none;
}

.backup-sync-summary::-webkit-details-marker {
  display: none;
}

.backup-sync-summary .expand-arrow {
  font-size: 0.8rem;
  transition: transform 0.22s ease;
  color: var(--text-secondary);
}

.backup-sync-details[open] .expand-arrow {
  transform: rotate(180deg);
}

.backup-sync-expand-hint::after {
  content: "(Click to expand)";
}

.backup-sync-details[open] .backup-sync-expand-hint::after {
  content: "(Click to collapse)";
}

.backup-sync-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.2rem;
  padding-bottom: 0.5rem;
}

/* Skeleton Shimmering Styles for Option B */
.skeleton-card {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-card) !important;
  border: var(--border-thick) !important;
  border-radius: 16px;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  box-sizing: border-box;
}

.skeleton-shimmer {
  position: relative;
  background: var(--bg-dark);
  opacity: 0.7;
  border-radius: 4px;
  overflow: hidden;
}

.skeleton-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0.3) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer-effect 1.8s infinite;
}

body.dark-mode .skeleton-shimmer::after {
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 255, 255, 0.1) 60%,
    rgba(255, 255, 255, 0) 100%
  );
}

@keyframes shimmer-effect {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-tag {
  width: 90px;
  height: 18px;
  border-radius: 4px;
  margin-bottom: 0.8rem;
}

.skeleton-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.skeleton-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
}

.skeleton-title {
  width: 120px;
  height: 20px;
}

.skeleton-subtitle {
  width: 160px;
  height: 14px;
}

.skeleton-bio {
  width: 100%;
  height: 48px;
  margin-bottom: 1.25rem;
}

.skeleton-books-header {
  width: 150px;
  height: 12px;
  margin-bottom: 0.8rem;
}

.skeleton-book-item {
  width: 100%;
  height: 36px;
  margin-bottom: 0.5rem;
  border-radius: 6px;
}

/* Premium Layout for Book Cards inside Detail Modals */
.modal-book-inner {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  width: 100%;
  position: relative;
  padding-bottom: 24px;
}

.modal-book-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .modal-book-inner {
    gap: 0.75rem;
  }
}

/* Hide Visual Scrollbars for cleaner, premium dashboard feel */
.modal-scroll-area::-webkit-scrollbar,
.content-panel::-webkit-scrollbar,
#modal-books-container::-webkit-scrollbar {
  display: none !important;
}

.modal-scroll-area,
.content-panel,
#modal-books-container {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;  /* Firefox */
}

/* Autocomplete suggestions: Create Brand New style overrides */
.autocomplete-suggestion.create-new-suggestion {
  background: rgba(245, 175, 25, 0.04) !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}
.autocomplete-suggestion.create-new-suggestion:hover {
  background: rgba(245, 175, 25, 0.09) !important;
}
body.dark-mode .autocomplete-suggestion.create-new-suggestion {
  background: rgba(245, 175, 25, 0.06) !important;
}
body.dark-mode .autocomplete-suggestion.create-new-suggestion:hover {
  background: rgba(245, 175, 25, 0.12) !important;
}




select.card-inline-status, select.card-inline-status:focus, select.card-inline-status:active {
  box-shadow: none !important;
  outline: none !important;
  background-color: transparent !important;
  border: none !important;
  position: relative !important;
  z-index: 5 !important;
}

.help-modal-list {
  font-size: 0.95rem;
}
@media (max-width: 550px) {
  .help-modal-list {
    font-size: 2.8vw;
  }
}

/* Responsive modal book cover wrapper sizing */
.modal-book-cover-wrapper {
  width: 54px;
  height: 78px;
  flex-shrink: 0;
  transition: all 0.2s ease-in-out;
}

@media (max-width: 480px) {
  .modal-book-cover-wrapper {
    width: 38px !important;
    height: 55px !important;
  }
  .modal-book-title {
    font-size: 0.84rem !important;
  }
  .modal-book-author {
    font-size: 0.72rem !important;
  }
  .card-inline-status {
    max-width: 100px !important;
    font-size: 0.68rem !important;
  }
  .modal-book-inner {
    gap: 0.6rem !important;
    padding-bottom: 12px !important;
  }
  .modal-book-detail {
    padding: 0.75rem !important;
  }
  .book-icon {
    font-size: 0.85rem !important;
  }
}

/* Fluid modal title scaling for long titles */
.modal-celeb-name.modal-title-long {
  font-size: clamp(1.1rem, 4.5vw, 1.45rem) !important;
}

/* Responsive Book Modal notes textarea */
.book-modal-notes-area {
  height: 100px;
}

@media (max-width: 480px) {
  .book-modal-notes-area {
    height: 70px !important;
  }
  .quiz-option-btn {
    padding: 0.5rem 0.8rem !important;
    font-size: 0.82rem !important;
  }
  #direct-share-qr-img {
    width: 90px !important;
    height: 90px !important;
  }
  #profile-modal .modal-content {
    padding: 1.5rem 1.25rem !important;
  }
}

/* Expand mobile touch targets safely, avoiding overlap with adjacent text/controls */
.amazon-cart-btn-circle::before,
.book-fav-btn::before,
.book-icon::before,
.amazon-cart-btn-pill::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -4px;
  right: -8px;
  bottom: -3px;
  cursor: pointer;
}

/* Floating PWA Update Banner Styling - Sleek Top-Right Badge */
.pwa-banner {
  position: fixed !important;
  top: 1.25rem !important;
  right: 1.25rem !important;
  left: auto !important;
  transform: translateY(-100px) !important;
  width: 290px !important;
  background: var(--bg-card, #27272a) !important;
  border: 1px solid var(--accent-highlight, rgba(251, 191, 36, 0.2)) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important;
  border-radius: 8px !important;
  padding: 0.6rem 0.85rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  z-index: 100000 !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s !important;
  opacity: 0 !important;
  box-sizing: border-box !important;
}

.pwa-banner.visible {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

.pwa-banner.hidden {
  display: none !important;
}

.pwa-banner-content {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  min-width: 0 !important;
}

.pwa-banner-text {
  font-family: var(--font-body) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  white-space: nowrap !important;
}

.pwa-banner-actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  flex-shrink: 0 !important;
}

.pwa-banner-btn {
  border: none !important;
  font-family: var(--font-body) !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  padding: 4px 8px !important;
  transition: all 0.2s ease !important;
}

.pwa-banner-btn.primary {
  background: var(--text-primary) !important;
  color: var(--bg-card) !important;
}

.pwa-banner-btn.primary:hover {
  opacity: 0.9 !important;
}

.pwa-banner-btn.secondary {
  background: transparent !important;
  color: var(--text-secondary) !important;
  padding: 2px 4px !important;
  font-size: 0.8rem !important;
}

.pwa-banner-btn.secondary:hover {
  color: var(--text-primary) !important;
}

/* Sleek Top Progress Bar Loader */
.top-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue, #3b82f6), #10b981, var(--accent-blue, #3b82f6));
  background-size: 200% 100%;
  z-index: 1000000;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.29, 1), opacity 0.2s ease-in-out;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 1px 10px rgba(59, 130, 246, 0.4);
}
.top-loading-bar.active {
  opacity: 1;
  animation: shimmer-bar 2s linear infinite;
}
@keyframes shimmer-bar {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Floating Search Suggestions Dropdown */
.suggestions-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border: var(--border-thick);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  max-height: 290px;
  overflow-y: auto;
  padding: 0.4rem 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

body.dark-mode .suggestions-dropdown {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.suggestions-dropdown.hidden {
  display: none !important;
}

.suggestions-group-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.5rem 0.8rem 0.25rem 0.8rem;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
  border-bottom: 1px dashed var(--border-color);
  margin-bottom: 0.2rem;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: var(--text-primary);
  text-align: left;
}

.suggestion-item:hover {
  background: var(--bg-dark);
}

.suggestion-item-image {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.suggestion-item-image.book-cover {
  width: 20px;
  height: 28px;
  border-radius: 2px;
}

.suggestion-item-text {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-item-subtext {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: auto;
  padding-left: 8px;
  flex-shrink: 0;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-match-highlight {
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Responsive Game Surprise Recommendation Card Fixes */
.game-recommendation-card .modal-book-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-recommendation-card .modal-book-author {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  white-space: normal !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 420px) {
  .game-recommendation-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.8rem !important;
    padding: 0.8rem !important;
  }

  .game-recommendation-info {
    width: 100% !important;
  }

  .game-recommendation-actions {
    justify-content: flex-end !important;
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.6rem !important;
    margin-top: 0.2rem !important;
  }
}



