:root {
  --brand-600: #0d6efd;
  --brand-700: #0a58ca;
  --brand-500: #1ea7fd;
  --gray-900: #0f172a;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --surface: #ffffff;
  --bg-soft: #f5f7fb;
  --layout-max-width: 1440px;
  --layout-wide-max-width: 1600px;
}

:root[data-theme="forest"] {
  --brand-600: #166534;
  --brand-700: #14532d;
  --brand-500: #22c55e;
  --gray-900: #0f1f1a;
  --gray-800: #1e362b;
  --gray-700: #30513d;
  --gray-600: #3f654d;
  --gray-500: #4f7760;
  --gray-400: #7da38d;
  --surface: #f4fbf6;
  --bg-soft: #e6f4ea;
}

:root[data-theme="ocean"] {
  --brand-600: #0f4c75;
  --brand-700: #0c3d5f;
  --brand-500: #00a8e8;
  --gray-900: #0d1b2a;
  --gray-800: #1b2838;
  --gray-700: #2d3e52;
  --gray-600: #3c536a;
  --gray-500: #4f6d88;
  --gray-400: #7b9ab8;
  --surface: #f1f8ff;
  --bg-soft: #e3f2fb;
}

:root[data-theme="sunset"] {
  --brand-600: #c2410c;
  --brand-700: #9a3412;
  --brand-500: #fb923c;
  --gray-900: #2b1a14;
  --gray-800: #3f2a22;
  --gray-700: #613f32;
  --gray-600: #7a5142;
  --gray-500: #946655;
  --gray-400: #bd907c;
  --surface: #fff7ed;
  --bg-soft: #ffedd5;
}

:root[data-theme="rose"] {
  --brand-600: #be185d;
  --brand-500: #f472b6;
  --gray-900: #2b1223;
  --gray-800: #432032;
  --gray-700: #5a2f44;
  --gray-600: #753a58;
  --gray-500: #8f4d6f;
  --gray-400: #b87795;
  --surface: #fff5f8;
  --bg-soft: #ffe9f0;
}

:root[data-theme="lavender"] {
  --brand-600: #7c3aed;
  --brand-500: #a855f7;
  --gray-900: #201533;
  --gray-800: #302046;
  --gray-700: #443162;
  --gray-600: #544278;
  --gray-500: #6b5690;
  --gray-400: #9b86bf;
  --surface: #f6f4ff;
  --bg-soft: #ede9fe;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-600: #60a5fa;
  --brand-500: #3b82f6;
  --gray-900: #f8fafc;
  --gray-800: #e2e8f0;
  --gray-700: #cbd5f5;
  --gray-600: #94a3b8;
  --gray-500: #7c8bab;
  --gray-400: #4f5f7a;
  --surface: #111827;
  --bg-soft: #020617;
}

:root[data-theme="dark"] body {
  background: var(--bg-soft);
  color: var(--gray-800);
}

:root[data-theme="dark"] .top-nav {
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.65);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

:root[data-theme="dark"] .nav-link.active {
  color: var(--brand-500);
}

:root[data-theme="dark"] .theme-choice {
  border-color: rgba(148, 163, 184, 0.35);
}

:root[data-theme="dark"] .theme-choice.is-active {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.65);
}

:root[data-theme="dark"] .settings-shell,
:root[data-theme="dark"] .account-settings,
:root[data-theme="dark"] .preference-card,
:root[data-theme="dark"] .preference-card--split,
:root[data-theme="dark"] .preference-card .preference-action,
:root[data-theme="dark"] .empty-card,
:root[data-theme="dark"] .search-bar,
:root[data-theme="dark"] .book-card,
:root[data-theme="dark"] .results-actions,
:root[data-theme="dark"] .settings-menu-panel,
:root[data-theme="dark"] .book-section--with-background {
  background: var(--surface);
}

:root[data-theme="dark"] .form-row input,
:root[data-theme="dark"] .form-row textarea,
:root[data-theme="dark"] .account-settings__input {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--gray-900);
}

:root[data-theme="dark"] .form-row input:focus,
:root[data-theme="dark"] .form-row textarea:focus,
:root[data-theme="dark"] .account-settings__input:focus {
  background: rgba(15, 23, 42, 0.9);
}

:root[data-theme="dark"] .account-settings__btn--ghost,
:root[data-theme="dark"] .stepper {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--gray-700);
}

:root[data-theme="dark"] .toggle-slider {
  background: rgba(15, 23, 42, 0.85);
}

:root[data-theme="dark"] .toggle-label {
  background: rgba(148, 163, 184, 0.35);
}

:root[data-theme="dark"] .account-settings__avatar {
  background: var(--surface);
  border-color: rgba(148, 163, 184, 0.3);
}

:root[data-theme="dark"] .account-settings__avatar-badge {
  border-color: var(--surface);
}

:root[data-theme="dark"] .account-settings__btn--outline {
  background: rgba(30, 167, 253, 0.25);
}

:root[data-theme="dark"] .account-settings__btn--link {
  color: var(--gray-600);
}

:root[data-theme="dark"] .stepper-btn:hover,
:root[data-theme="dark"] .stepper-btn:focus-visible {
  color: var(--brand-600);
}

:root[data-theme="dark"] .search-submit {
  background: var(--brand-600);
  border-color: var(--brand-600);
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

:root[data-theme="dark"] .status-modal-backdrop {
  background: rgba(2, 6, 23, 0.7);
}

:root[data-theme="dark"] .status-modal-panel {
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 28px 48px rgba(2, 6, 23, 0.65);
}

:root[data-theme="dark"] .status-modal-label {
  color: rgba(241, 245, 249, 0.9);
}

:root[data-theme="dark"] .status-modal-input,
:root[data-theme="dark"] .status-modal-textarea {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(148, 163, 184, 0.35);
  color: rgba(226, 232, 240, 0.95);
}

:root[data-theme="dark"] .status-modal-input::placeholder,
:root[data-theme="dark"] .status-modal-textarea::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

:root[data-theme="dark"] .status-modal-helper {
  color: rgba(148, 163, 184, 0.7);
}

:root[data-theme="dark"] .status-modal-close {
  background: rgba(148, 163, 184, 0.18);
  color: var(--gray-400);
}

:root[data-theme="dark"] .status-modal-close:hover,
:root[data-theme="dark"] .status-modal-close:focus-visible {
  background: rgba(96, 165, 250, 0.25);
  color: var(--brand-500);
}

:root[data-theme="dark"] .status-modal-book {
  color: var(--gray-500);
}

:root[data-theme="dark"] .status-option-content {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.25);
}

:root[data-theme="dark"] .status-option input:checked + .status-option-content {
  background: rgba(96, 165, 250, 0.2);
  border-color: var(--brand-500);
}

:root[data-theme="dark"] .status-option-label {
  color: var(--gray-800);
}

:root[data-theme="dark"] .status-option-helper {
  color: var(--gray-500);
}

:root[data-theme="dark"] .status-modal-feedback {
  color: var(--gray-500);
}

:root[data-theme="dark"] .search-submit:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .search-submit:active {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 1px 4px rgba(96, 165, 250, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

:root[data-theme="dark"] .search-submit:disabled,
:root[data-theme="dark"] .search-submit:disabled:hover {
  background: var(--gray-600);
  border-color: var(--gray-600);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .activity-log-container {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.65);
}

:root[data-theme="dark"] .activity-log-title {
  color: var(--gray-800);
}

:root[data-theme="dark"] .activity-log-entry {
  background: rgba(96, 165, 250, 0.12);
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.45);
}

:root[data-theme="dark"] .activity-log-entry--success {
  background: rgba(16, 185, 129, 0.18);
}

:root[data-theme="dark"] .activity-log-entry--warning {
  background: rgba(245, 158, 11, 0.2);
}

:root[data-theme="dark"] .activity-log-entry--error {
  background: rgba(239, 68, 68, 0.2);
}

:root[data-theme="dark"] .activity-log-message {
  color: var(--gray-900);
}

:root[data-theme="dark"] .activity-log-details {
  background: rgba(15, 23, 42, 0.6);
  color: var(--gray-400);
}

:root[data-theme="dark"] .activity-log-empty {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--gray-700);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-soft);
  color: var(--gray-800);
  -webkit-font-smoothing: antialiased;
}

body.nav-lock {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 3rem;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(13, 110, 253, 0.05);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand-600);
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  font-weight: 500;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: var(--surface);
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-toggle:hover {
  border-color: rgba(13, 110, 253, 0.4);
  color: var(--brand-600);
  box-shadow: 0 12px 22px rgba(13, 110, 253, 0.12);
}

.nav-toggle:focus-visible {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.18);
  color: var(--brand-600);
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.top-nav.is-mobile-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.top-nav.is-mobile-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.top-nav.is-mobile-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 8;
}

.nav-overlay[hidden] {
  display: none;
}

.nav-link {
  color: var(--gray-500);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--brand-600);
}

.nav-link[data-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.settings-menu {
  position: relative;
}

.settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  background: var(--surface);
  color: var(--gray-600);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease;
}

.settings-toggle::-webkit-details-marker {
  display: none;
}

.settings-toggle:hover {
  color: var(--brand-600);
  border-color: rgba(13, 110, 253, 0.4);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.settings-toggle:focus-visible {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.18);
}

.settings-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(13, 110, 253, 0.2);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
  display: block;
}

.settings-label {
  letter-spacing: 0.01em;
}

.settings-chevron svg {
  transition: transform 0.2s ease;
}

.settings-menu[open] .settings-chevron svg {
  transform: rotate(180deg);
}

.settings-menu-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.15);
  padding: 0.75rem 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.settings-menu[open] .settings-menu-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.settings-menu-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1.1rem;
  color: var(--gray-700);
  font-size: 0.9rem;
  text-decoration: none;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.settings-menu-item.active {
  color: var(--brand-600);
  background: rgba(13, 110, 253, 0.12);
  font-weight: 600;
}

.settings-menu-item:hover {
  background: rgba(13, 110, 253, 0.08);
  color: var(--brand-600);
  padding-left: 1.25rem;
}

/* Icon helper */
.menu-icon {
  width: 16px;
  height: 16px;
  color: var(--gray-500);
  transition: color 0.2s ease;
}

.nav-link.active {
  color: var(--brand-600);
  font-weight: 600;
}

.main-content {
  flex: 1;
  width: min(var(--layout-max-width), 98%);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.main-content--wide {
  width: min(var(--layout-wide-max-width), 92%);
}

.search-area {
  margin-bottom: 2.5rem;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 0.9rem 0.9rem 0.9rem 1.4rem;
  box-shadow: 0 20px 40px rgba(13, 110, 253, 0.08);
}

.search-bar input {
  flex: 1;
  border: 0;
  font-size: 1rem;
  background: transparent;
  color: var(--gray-800);
  outline: none;
}

.search-bar input::placeholder {
  color: var(--gray-400);
}

.search-icon {
  width: 22px;
  height: 22px;
  fill: var(--gray-400);
}

.primary-button {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-600) 0%, #0a58ca 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(13, 110, 253, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(13, 110, 253, 0.25);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.ghost-button {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--gray-600);
  font-weight: 500;
  padding: 0.65rem 1.3rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ghost-button:hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
  background: rgba(13, 110, 253, 0.08);
}

.empty-state {
  display: flex;
  justify-content: center;
}

.empty-card {
  text-align: center;
  background: var(--surface);
  border-radius: 18px;
  padding: 3.2rem 3rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 35px 60px rgba(13, 110, 253, 0.12);
  max-width: 620px;
}

.empty-icon {
  width: 92px;
  margin: 0 auto 1.8rem;
}

.empty-card h2 {
  font-size: 1.8rem;
  margin: 0 0 1rem;
}

.empty-card p {
  margin: 0 0 2rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.results-header h2 {
  font-size: 1.75rem;
  margin: 0;
}

.results-header p {
  margin: 0;
  color: var(--gray-400);
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--gray-500);
}

.toggle input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brand-600);
}

.books-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.book-card {
  list-style: none;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 24px 48px rgba(13, 110, 253, 0.12);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.card-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.card-header .author {
  margin: 0;
  color: var(--gray-500);
  font-weight: 500;
}

.meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--gray-400);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(30, 167, 253, 0.15);
  color: var(--brand-500);
}

.book-card p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.55;
  font-size: 0.98rem;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.icon-button {
  border: 0;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #f1f5f9;
  color: var(--gray-600);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.icon-button .icon {
  width: 18px;
  height: 18px;
}

.icon-button:hover {
  background: rgba(13, 110, 253, 0.12);
  color: var(--brand-600);
  transform: translateY(-1px);
}

.icon-button.delete:hover {
  background: rgba(220, 38, 38, 0.16);
  color: #dc2626;
}

.no-results {
  background: var(--surface);
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 14px;
  padding: 1.75rem;
  text-align: center;
  color: var(--gray-500);
}

.add-book-panel {
  margin-top: 2.5rem;
  background: var(--surface);
  border-radius: 18px;
  padding: 2.2rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 30px 60px rgba(13, 110, 253, 0.12);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.35rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-weight: 600;
  color: var(--gray-600);
}

.form-row input,
.form-row textarea {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  background: #f8fafc;
  transition: border-color 0.2s ease, background 0.2s ease;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  background: #fff;
}

.form-row.split {
  display: flex;
  gap: 1rem;
}

.form-row.split > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.form-row.checkbox input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brand-600);
}

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

#add-book-form.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.form-error {
  margin-top: 1rem;
  color: #dc2626;
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 900px) {
  .top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.5rem 1.5rem;
  }

  .nav-left {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.12);
    z-index: 9;
  }

  .top-nav.is-mobile-open .nav-links {
    display: flex;
  }

  .nav-links .nav-link {
    padding: 0.65rem 0.25rem;
  }

  .nav-right {
    width: 100%;
    justify-content: flex-end;
  }

  .main-content {
    width: min(640px, 96%);
    padding: 2.5rem 0 3rem;
  }
}

@media (max-width: 540px) {
  .top-nav {
    padding: 1.25rem 1.25rem;
  }

  .nav-links {
    top: calc(100% + 0.5rem);
    border-radius: 16px;
  }
}

@media (max-width: 640px) {
  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button {
    width: 100%;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row.split {
    flex-direction: column;
  }

  .card-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* New Book Sections Layout */
.page-header {
  padding: 2rem 0 1rem;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--layout-max-width), 94%);
  margin: 0 auto;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--gray-900);
}

.add-book-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(
    135deg,
    var(--brand-600) 0%,
    var(--brand-700) 100%
  );
  color: white;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.add-book-btn:hover {
  background: linear-gradient(
    135deg,
    var(--brand-700) 0%,
    var(--brand-600) 100%
  );
  border-color: var(--brand-500);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  color: white;
}

.add-book-btn .icon {
  width: 18px;
  height: 18px;
}

.book-sections {
  width: min(var(--layout-max-width), 94%);
  margin: 0 auto;
  padding: 0 0 4rem;
}

.book-section {
  margin-bottom: 3rem;
}

.book-section--with-background {
  background: var(--surface);
  border-radius: 22px;
  padding: 1.75rem;
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
}

.book-section--with-background + .book-section--with-background {
  margin-top: 2.75rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--gray-900);
}

.view-all-btn {
  background: none;
  border: none;
  color: var(--brand-600);
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.view-all-btn:hover {
  color: #0a58ca;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
}

.book-item {
  display: block;
  text-align: left;
  color: inherit;
  text-decoration: none;
}

.book-cover {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.book-cover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.book-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
  color: var(--gray-700);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.book-author {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.book-ratings {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.book-rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.book-rating-chip--community {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.book-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(30, 167, 253, 0.12);
  color: var(--brand-600);
}

.book-status[data-status="read"] {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.book-status[data-status="plan-to-read"] {
  background: rgba(234, 179, 8, 0.15);
  color: #b45309;
}

.section-empty-message {
  text-align: center;
  padding: 2.25rem 1.75rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  color: var(--gray-500);
}

.section-empty-message h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--gray-700);
}

.section-empty-message p {
  margin: 0;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .page-header {
    padding: 1.5rem 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
  }

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

  /* Search result responsiveness */
  .search-result-item {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .search-result-item .book-cover {
    width: 100%;
    max-width: 120px;
    height: 180px;
    align-self: center;
  }

  .book-metadata {
    gap: 0.5rem;
    padding: 0.75rem;
    flex-direction: column;
    align-items: stretch;
  }

  .book-badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.75rem;
    justify-content: center;
  }

  .book-badge-icon {
    width: 14px;
    height: 14px;
  }

  .search-result-item .add-book-btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1rem;
  }
}

@media (max-width: 768px) {
  .search-result-item {
    gap: 1.25rem;
    padding: 1.25rem;
  }

  .search-result-item .book-cover {
    width: 70px;
    height: 105px;
  }

  .book-metadata {
    gap: 0.5rem;
    padding: 0.875rem;
  }

  .book-badge {
    font-size: 0.725rem;
    padding: 0.4rem 0.8rem;
  }

  .book-badge-icon {
    width: 15px;
    height: 15px;
  }

  .search-result-item .add-book-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.8rem;
  }
}

/* Add Book Page Styles */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-600);
  font-weight: 500;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.back-button:hover {
  color: var(--brand-600);
}

.back-button .icon {
  width: 20px;
  height: 20px;
}

.add-book-content {
  width: min(800px, 94%);
  margin: 0 auto;
  padding: 0 0 4rem;
}

.add-book-container {
  background: var(--surface);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-section h2,
.manual-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--gray-900);
}

.section-description {
  color: var(--gray-600);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.search-bar-large {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.search-bar-large .search-icon {
  width: 24px;
  height: 24px;
  color: var(--gray-400);
  flex-shrink: 0;
}

.search-input-large {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  outline: none;
  color: var(--gray-800);
}

.search-input-large::placeholder {
  color: var(--gray-400);
}

.search-button {
  background: var(--brand-600);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-button:hover {
  background: #0a58ca;
}

.divider {
  text-align: center;
  margin: 3rem 0;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.3);
}

.divider span {
  background: var(--surface);
  padding: 0 1rem;
  color: var(--gray-500);
  font-weight: 500;
}

.add-book-form {
  margin-top: 1.5rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.form-group label {
  font-weight: 600;
  color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  background: var(--bg-soft);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-600);
  background: white;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--gray-700);
}

.radio-option input,
.checkbox-option input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.secondary-button {
  background: var(--bg-soft);
  color: var(--gray-700);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.secondary-button:hover {
  background: var(--surface);
  border-color: var(--gray-400);
}

/* Responsive for Add Book page */
@media (max-width: 768px) {
  .add-book-container {
    padding: 1.5rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .radio-group {
    flex-direction: column;
    gap: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .search-bar-large {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .search-button {
    width: 100%;
  }
}

/* Search Page Styles (New Add Book Design) */
.search-page-container {
  min-height: calc(100vh - 120px);
  width: min(var(--layout-max-width), 94%);
  margin: 0 auto;
  padding: 2rem 0;
}

.search-section {
  margin-bottom: 2rem;
}

.search-bar-container {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 3rem;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  max-width: var(--layout-max-width);
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 0.75rem 0.75rem 0.75rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  gap: 0.75rem;
}

.search-input-wrapper .search-icon {
  width: 24px;
  height: 24px;
  color: var(--gray-400);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  outline: none;
  color: var(--gray-800);
}

.search-input::placeholder {
  color: var(--gray-400);
}

.search-hint {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: none;
  align-items: center;
  gap: 0.5rem;
  z-index: 1000;
  flex-wrap: wrap;
}

.search-hint-text {
  color: var(--gray-500);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.search-hint-suggestion {
  background: var(--bg-soft);
  color: var(--gray-700);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.search-hint-suggestion:hover {
  background: var(--brand-600);
  color: white;
  border-color: var(--brand-600);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.search-mode-select {
  min-width: 120px;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: var(--surface);
  color: var(--gray-700);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

.search-mode-select:focus {
  outline: none;
  border-color: rgba(13, 110, 253, 0.6);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.search-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--brand-600);
  color: #fff;
  border: 2px solid var(--brand-600);
  border-radius: 25px;
  padding: 0.75rem 1.8rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s;
}

.search-submit:hover::before {
  left: 100%;
}

.search-submit svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.search-submit:hover {
  background: #0a58ca;
  border-color: #0a58ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.search-submit:hover svg {
  transform: scale(1.1);
}

.search-submit:active {
  transform: translateY(0px);
  box-shadow: 0 1px 4px rgba(13, 110, 253, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
  background: #084298;
  border-color: #084298;
}

.search-submit:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  background: var(--gray-400);
  border-color: var(--gray-400);
}

.search-submit:disabled:hover {
  transform: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  background: var(--gray-400);
  border-color: var(--gray-400);
}

.empty-state-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  width: 100%;
}

.empty-state-content {
  text-align: center;
  background: var(--surface);
  border-radius: 20px;
  padding: 4rem 3rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-width: var(--layout-max-width);
  width: 100%;
}

.book-icon {
  width: 96px;
  margin: 0 auto 2rem;
}

.book-icon svg {
  width: 100%;
  height: auto;
}

.empty-state-content h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--gray-900);
}

.empty-state-content p {
  margin: 0 0 2.5rem;
  color: var(--gray-500);
  line-height: 1.6;
  font-size: 1.05rem;
}

.start-searching-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-600);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.start-searching-btn:hover {
  background: #0a58ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.3);
}

.start-searching-btn svg {
  width: 18px;
  height: 18px;
}

.search-results-container {
  margin-top: 2rem;
}

.search-feedback {
  margin: 1rem 0 1.5rem 0;
  color: var(--gray-500);
  font-size: 0.95rem;
}

.search-feedback.error {
  color: #dc3545;
}

.search-feedback.success {
  color: var(--brand-600);
}

.search-results-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  color: var(--gray-900);
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.search-result-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: rgba(13, 110, 253, 0.3);
  transform: translateY(-2px);
}

.search-result-item .book-cover {
  width: 80px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
}

.search-result-item .book-cover::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  pointer-events: none;
}

.search-result-item .book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.search-result-item:hover .book-cover img {
  transform: scale(1.05);
}

.book-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 0.75rem;
}

.search-result-item .book-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--gray-900);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.search-result-item .book-author {
  font-size: 1rem;
  color: var(--gray-600);
  margin: 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-result-item .book-author::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--gray-400);
  border-radius: 50%;
  flex-shrink: 0;
}

.book-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #fafbfc 0%, #f1f3f4 100%);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.book-metadata::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    #e0f2fe 0%,
    #f3e5f5 25%,
    #e8f5e8 50%,
    #fff3e0 75%,
    #fff8e1 100%
  );
  opacity: 0.6;
}

.book-metadata:hover::before {
  opacity: 1;
}

.book-metadata:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.book-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: default;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  animation: fadeInScale 0.4s ease-out both;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.book-badge:nth-child(1) {
  animation-delay: 0.1s;
}
.book-badge:nth-child(2) {
  animation-delay: 0.2s;
}
.book-badge:nth-child(3) {
  animation-delay: 0.3s;
}
.book-badge:nth-child(4) {
  animation-delay: 0.4s;
}
.book-badge:nth-child(5) {
  animation-delay: 0.5s;
}

.book-badge-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.book-badge--category {
  background: linear-gradient(135deg, #e1f5fe 0%, #81d4fa 50%, #4fc3f7 100%);
  color: #0277bd;
  border: 1px solid rgba(2, 119, 189, 0.3);
  box-shadow: 0 2px 8px rgba(2, 119, 189, 0.2);
}

.book-badge--year {
  background: linear-gradient(135deg, #f3e5f5 0%, #ce93d8 50%, #ba68c8 100%);
  color: #6a1b9a;
  border: 1px solid rgba(106, 27, 154, 0.3);
  box-shadow: 0 2px 8px rgba(106, 27, 154, 0.2);
}

.book-badge--language {
  background: linear-gradient(135deg, #e8f5e8 0%, #a5d6a7 50%, #81c784 100%);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.3);
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.book-badge--isbn {
  background: linear-gradient(135deg, #fff3e0 0%, #ffb74d 50%, #ffa726 100%);
  color: #ef6c00;
  border: 1px solid rgba(239, 108, 0, 0.3);
  box-shadow: 0 2px 8px rgba(239, 108, 0, 0.2);
}

.book-badge--rating {
  background: linear-gradient(135deg, #fff8e1 0%, #fff176 50%, #ffeb3b 100%);
  color: #f57f17;
  border: 1px solid rgba(245, 127, 23, 0.4);
  box-shadow: 0 2px 8px rgba(245, 127, 23, 0.3);
  position: relative;
  overflow: hidden;
}

.book-badge--rating::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  transition: left 0.8s ease;
}

.book-badge--rating:hover::before {
  left: 100%;
}

.book-badge--rating .book-badge-icon {
  color: #ffd700;
  filter: drop-shadow(0 1px 3px rgba(245, 127, 23, 0.4));
}

.book-badge--rating:hover {
  background: linear-gradient(135deg, #fff9c4 0%, #ffef62 50%, #ffc107 100%);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 10px 30px rgba(245, 127, 23, 0.4);
}

.book-badge:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.book-badge:hover .book-badge-icon {
  transform: rotate(5deg) scale(1.1);
}

.book-badge:active {
  transform: translateY(-1px) scale(1.02);
  transition-duration: 0.1s;
}

.book-rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
}

.book-rating-stars {
  display: flex;
  gap: 2px;
}

.star {
  width: 16px;
  height: 16px;
  color: #ffd700;
  transition: transform 0.2s ease;
}

.star--empty {
  color: #e0e0e0;
}

.book-rating:hover .star {
  transform: scale(1.1);
}

.book-rating-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-800);
}

.book-rating-label {
  font-size: 0.75rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.book-description {
  padding: 1rem;
  background: rgba(248, 250, 252, 0.8);
  border-left: 4px solid var(--brand-200);
  border-radius: 0 8px 8px 0;
  margin: 0.5rem 0;
}

.book-description p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-700);
}

.book-quote-container {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  position: relative;
}

.book-quote-icon {
  width: 20px;
  height: 20px;
  color: var(--brand-400);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.book-quote {
  margin: 0;
  font-style: italic;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-700);
  quotes: none;
}

.book-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.search-result-item .add-book-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(
    135deg,
    var(--brand-600) 0%,
    var(--brand-700) 100%
  );
  color: white;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
  min-width: 140px;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-result-item .add-book-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.search-result-item .add-book-btn:hover::before {
  left: 100%;
}

.search-result-item .add-book-btn:hover {
  background: linear-gradient(
    135deg,
    var(--brand-700) 0%,
    var(--brand-600) 100%
  );
  border-color: var(--brand-500);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  color: white;
}

.search-result-item .add-book-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-result-item .add-book-btn:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(var(--brand-600), 0.2);
}

.search-result-item .add-book-btn:disabled {
  background: var(--gray-400);
  color: var(--gray-600);
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

.search-result-item .add-book-btn:disabled:hover {
  background: var(--gray-400);
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-result-item .add-book-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.search-result-item .add-book-btn:hover svg {
  transform: rotate(90deg);
}

.activity-log-container {
  margin-top: 3rem;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.activity-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.activity-log-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
}

.clear-log-btn {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: var(--gray-500);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-log-btn:hover {
  color: var(--brand-600);
  border-color: rgba(13, 110, 253, 0.35);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.12);
}

.clear-log-btn:active {
  transform: translateY(1px);
}

.activity-log-body {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.5rem;
}

.activity-log-body::-webkit-scrollbar {
  width: 6px;
}

.activity-log-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
}

.activity-log-entry {
  border-left: 4px solid var(--brand-600);
  background: rgba(13, 110, 253, 0.06);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.activity-log-entry-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--gray-800);
}

.activity-log-timestamp {
  font-size: 0.85rem;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

.activity-log-message {
  font-size: 0.95rem;
  color: var(--gray-800);
}

.activity-log-details {
  margin: 0;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 10px;
  font-family: "JetBrains Mono", "Source Code Pro", ui-monospace, SFMono-Regular,
    Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  color: var(--gray-700);
  white-space: pre-wrap;
  word-break: break-word;
}

.activity-log-entry--success {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.activity-log-entry--warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.activity-log-entry--error {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.activity-log-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: var(--gray-500);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Responsive Design for Search Page */
@media (max-width: 768px) {
  .search-page-container {
    padding: 1.5rem 0;
  }

  .search-bar-container {
    margin-bottom: 2rem;
  }

  .search-input-wrapper {
    padding: 0.875rem 1rem;
  }

  .empty-state-content {
    padding: 2.5rem 1.5rem;
    margin: 0 1rem;
  }

  .empty-state-content h2 {
    font-size: 1.75rem;
  }

  .search-result-item {
    flex-direction: column;
    text-align: center;
  }

  .search-result-item .add-book-btn {
    align-self: center;
  }

  .activity-log-container {
    padding: 1.25rem;
  }

  .activity-log-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .activity-log-body {
    max-height: 280px;
  }
}

@media (max-width: 480px) {
  .search-result-item {
    padding: 1rem;
  }

  .search-input-wrapper {
    padding: 0.75rem;
  }

  .start-searching-btn {
    padding: 0.8rem 1.5rem;
  }
}

/* Explore Page Styles */
.explore-page {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin: 0;
}

.explore-filters {
  margin-bottom: 3rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-tab {
  background: transparent;
  border: 2px solid var(--gray-300);
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
}

.filter-tab.active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: white;
}

.explore-content {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.book-collection {
  margin-bottom: 2rem;
}

.collection-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.explore-book {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.explore-book:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.explore-book .book-cover {
  margin-bottom: 1rem;
}

.explore-book .book-cover img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
}

.explore-book .book-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.explore-book .book-author {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}

.book-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.rating-stars {
  color: #fbbf24;
  font-size: 0.875rem;
}

.rating-score {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.add-to-library-btn {
  width: 100%;
  background: var(--brand-600);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-to-library-btn:hover {
  background: #0a58ca;
  transform: translateY(-1px);
}

.add-to-library-btn.added {
  background: #22c55e;
}

.featured-author {
  background: var(--surface);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.author-spotlight {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.author-image img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.author-details {
  flex: 1;
}

.author-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.author-bio {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.author-books h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.author-books ul {
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
}

.author-books li {
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.explore-author-btn {
  background: var(--brand-600);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.explore-author-btn:hover {
  background: #0a58ca;
}

.book-recommendations {
  background: var(--surface);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.recommend-book {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.recommend-book:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recommend-book .book-cover img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.match-percentage {
  background: #22c55e;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 1rem;
}

/* Responsive Design for Explore Page */
@media (max-width: 768px) {
  .explore-page {
    padding: 1.5rem 1rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .filter-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .author-spotlight {
    flex-direction: column;
    text-align: center;
  }

  .author-image {
    align-self: center;
  }

  .recommendation-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .featured-author,
  .book-recommendations {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .explore-page {
    padding: 1rem 0.75rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .collection-title,
  .section-title {
    font-size: 1.5rem;
  }

  .book-grid,
  .recommendation-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .explore-book,
  .recommend-book {
    padding: 1rem;
  }

  .explore-book .book-cover img,
  .recommend-book .book-cover img {
    height: 180px;
  }
}

/* Settings Page Styles */
.settings-page {
  width: min(980px, 92%);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.settings-shell {
  background: var(--surface);
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 35px 70px rgba(13, 110, 253, 0.08);
  padding: 2.75rem 3rem 3.25rem;
}

.settings-header {
  margin-bottom: 2.5rem;
}

.settings-title {
  margin: 0 0 1.5rem 0;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

.settings-tabs {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  padding-bottom: 0.75rem;
  overflow-x: auto;
}

.settings-tabs::-webkit-scrollbar {
  height: 4px;
}

.settings-tab {
  position: relative;
  background: none;
  border: 0;
  padding: 0;
  padding-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.settings-tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.2s ease;
}

.settings-tab:hover {
  color: var(--brand-600);
}

.settings-tab:focus-visible {
  outline: none;
  color: var(--brand-600);
}

.settings-tab.is-active {
  color: var(--brand-600);
}

.settings-tab.is-active::after {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
}

.settings-panels {
  margin-top: 2.75rem;
}

.settings-panel {
  display: none;
}

.settings-panel.is-active {
  display: block;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.75rem;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-900);
}

.settings-section-description {
  margin: -0.5rem 0 0 0;
  font-size: 0.95rem;
  color: var(--gray-500);
  max-width: 560px;
}

.account-settings {
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.96) 0%,
    #ffffff 68%
  );
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 34px 68px rgba(15, 23, 42, 0.12);
  padding: 2.5rem 2.75rem 2.75rem;
}

.account-settings__header {
  margin-bottom: 1.75rem;
}

.account-settings__title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
}

.account-settings__description {
  margin: 0.4rem 0 0;
  font-size: 1rem;
  color: var(--gray-500);
}

.account-settings__content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2.5rem;
}

.account-settings__avatar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  min-width: 200px;
}

.account-settings__avatar {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid #fff;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
  background: #fff;
}

.account-settings__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-settings__avatar-badge {
  position: absolute;
  bottom: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 18px 38px rgba(13, 110, 253, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.account-settings__avatar-badge:hover,
.account-settings__avatar-badge:focus-visible {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(13, 110, 253, 0.38);
}

.account-settings__avatar-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

.account-settings__fields {
  flex: 1;
  min-width: 260px;
  display: grid;
  gap: 1.5rem;
}

.account-settings__field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.account-settings__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
}

.account-settings__input {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  border-radius: 14px;
  background: #fff;
  font-size: 0.97rem;
  color: var(--gray-800);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-settings__input:hover {
  border-color: rgba(30, 167, 253, 0.4);
}

.account-settings__input:focus {
  outline: none;
  border-color: rgba(30, 167, 253, 0.65);
  box-shadow: 0 0 0 4px rgba(30, 167, 253, 0.18);
}

.account-settings__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.account-settings__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.6rem;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--gray-700);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease, transform 0.2s ease;
}

.account-settings__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(30, 167, 253, 0.18);
}

.account-settings__btn:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.account-settings__btn--outline {
  border: 1.5px solid rgba(30, 167, 253, 0.45);
  background: rgba(30, 167, 253, 0.08);
  color: var(--brand-600);
}

.account-settings__btn--outline:hover {
  background: linear-gradient(
    135deg,
    rgba(30, 167, 253, 0.16),
    rgba(30, 167, 253, 0.24)
  );
  box-shadow: 0 18px 36px rgba(30, 167, 253, 0.24);
  transform: translateY(-1px);
}

.account-settings__btn--link {
  padding: 0.75rem 0.5rem;
  color: var(--gray-500);
  border-radius: 8px;
}

.account-settings__btn--link:hover {
  color: #dc2626;
}

.account-settings__btn--ghost {
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: var(--gray-600);
}

.account-settings__btn--ghost:hover {
  border-color: rgba(30, 167, 253, 0.4);
  color: var(--brand-600);
  box-shadow: 0 16px 32px rgba(30, 167, 253, 0.18);
  transform: translateY(-1px);
}

.account-settings__btn--primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff;
  box-shadow: 0 22px 44px rgba(30, 167, 253, 0.35);
}

.account-settings__btn--primary:hover {
  box-shadow: 0 26px 52px rgba(30, 167, 253, 0.4);
  transform: translateY(-1px);
}

.account-settings__btn--primary:disabled {
  box-shadow: none;
  transform: none;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 360px;
}

.settings-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.settings-select {
  position: relative;
}

.settings-select-control {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 1rem;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  font-size: 0.96rem;
  color: var(--gray-700);
  background: var(--surface);
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-select-control:hover {
  border-color: rgba(30, 167, 253, 0.4);
}

.settings-select-control:focus {
  outline: none;
  border-color: rgba(30, 167, 253, 0.6);
  box-shadow: 0 0 0 4px rgba(30, 167, 253, 0.15);
}

.settings-select-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--gray-400);
  pointer-events: none;
}

.theme-choice-group {
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.theme-choice {
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: var(--surface);
  color: var(--gray-600);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
}

.theme-choice:hover,
.theme-choice:focus-visible {
  outline: none;
  color: var(--brand-600);
  border-color: rgba(30, 167, 253, 0.6);
  box-shadow: 0 14px 28px rgba(30, 167, 253, 0.18);
}

.theme-choice.is-active {
  color: var(--brand-600);
  border-color: rgba(30, 167, 253, 0.55);
  background: rgba(30, 167, 253, 0.1);
  box-shadow: 0 10px 24px rgba(30, 167, 253, 0.12);
}

.preference-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preference-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 1.75rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, #ffffff 55%);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.preference-card--inline {
  flex-wrap: wrap;
}

.preference-card--split {
  align-items: center;
}

.preference-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.preference-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.preference-description {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.preference-action {
  border-radius: 999px;
  border: 1px solid rgba(30, 167, 253, 0.4);
  background: rgba(30, 167, 253, 0.12);
  color: var(--brand-600);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 96px;
  text-align: center;
}

.preference-action:hover,
.preference-action:focus-visible {
  outline: none;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff;
  box-shadow: 0 18px 36px rgba(30, 167, 253, 0.28);
}

.preference-action.is-active {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff;
  box-shadow: 0 16px 32px rgba(30, 167, 253, 0.25);
}

.toggle-field {
  display: inline-flex;
  align-items: center;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  transition: background 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  padding: 0 4px;
}

.toggle-slider {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.2);
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.toggle-input:checked + .toggle-label {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
}

.toggle-input:checked + .toggle-label .toggle-slider {
  transform: translateX(22px);
}

.toggle-input:focus-visible + .toggle-label {
  box-shadow: 0 0 0 4px rgba(30, 167, 253, 0.18);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.35rem 0.75rem;
  background: #fff;
}

.stepper-btn {
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--brand-600);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.stepper-btn:hover,
.stepper-btn:focus-visible {
  outline: none;
  background: rgba(30, 167, 253, 0.12);
  color: #fff;
}

.stepper-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
}

@media (max-width: 1024px) {
  .settings-shell {
    padding: 2.25rem 2.25rem 2.75rem;
    border-radius: 22px;
  }

  .account-settings {
    padding: 2.25rem 2.25rem 2.5rem;
  }
}

@media (max-width: 768px) {
  .settings-page {
    padding: 2rem 0 3rem;
  }

  .settings-shell {
    padding: 2rem 1.75rem 2.5rem;
  }

  .account-settings {
    padding: 2rem 1.75rem 2.25rem;
  }

  .account-settings__content {
    flex-direction: column;
    gap: 2rem;
  }

  .account-settings__avatar-block {
    align-self: center;
  }

  .account-settings__footer {
    justify-content: flex-start;
  }

  .settings-tabs {
    gap: 1.25rem;
  }

  .preference-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .preference-card--inline {
    align-items: flex-start;
  }

  .preference-action,
  .toggle-field {
    align-self: stretch;
    display: flex;
    justify-content: flex-end;
  }

  .toggle-label {
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  .settings-shell {
    padding: 1.75rem 1.25rem 2.25rem;
    border-radius: 18px;
  }

  .account-settings {
    padding: 1.75rem 1.25rem 2rem;
  }

  .account-settings__avatar {
    width: 120px;
    height: 120px;
  }

  .account-settings__avatar-badge {
    width: 36px;
    height: 36px;
    bottom: 10px;
    right: 12px;
  }

  .account-settings__btn,
  .account-settings__avatar-actions {
    width: 100%;
  }

  .account-settings__btn {
    justify-content: center;
  }

  .settings-title {
    font-size: 1.85rem;
  }

  .settings-tabs {
    gap: 1rem;
  }

  .settings-section {
    margin-bottom: 2rem;
  }

  .theme-choice {
    padding: 0.65rem 1.2rem;
  }
}

/* Explore Author Experience */
.explore-page {
  display: flex;
  gap: 3.5rem;
  max-width: var(--layout-max-width);
  width: 100%;
  margin: 0 auto;
  /* Unify top spacing across Explore tabs */
  padding: 2rem 1.5rem 3.5rem;
  justify-content: flex-start;
}

.explore-shell {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.explore-top-tabs {
  display: inline-flex;
  gap: 0.75rem;
  background: var(--surface);
  border-radius: 999px;
  padding: 0.35rem;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
  width: fit-content;
  margin: 0 auto;
}

.explore-top-tab {
  border: 0;
  background: transparent;
  color: var(--gray-500);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.explore-top-tab:hover {
  color: var(--brand-600);
}

.explore-top-tab.is-active {
  background: linear-gradient(135deg, var(--brand-600) 0%, #0a58ca 100%);
  color: #fff;
  box-shadow: 0 15px 30px rgba(13, 110, 253, 0.3);
}

.explore-top-panels {
  position: relative;
}

.explore-top-panel {
  display: none;
}

.explore-top-panel.is-active {
  display: block;
}

.authors-panel {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: 24px;
  padding: 2rem 1.75rem;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.authors-panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-500);
}

.author-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.author-item {
  margin: 0;
}

.author-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  color: var(--gray-700);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.author-button:hover {
  background: rgba(13, 110, 253, 0.08);
  transform: translateY(-1px);
}

.author-item.is-active .author-button {
  background: linear-gradient(135deg, var(--brand-600) 0%, #0a58ca 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(13, 110, 253, 0.25);
}

.author-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.author-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
}

.author-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.author-name {
  font-size: 1rem;
  font-weight: 600;
  color: inherit;
}

.author-meta {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.author-item.is-active .author-meta {
  color: rgba(255, 255, 255, 0.75);
}

.author-count {
  margin-left: auto;
  min-width: 38px;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.3);
}

.author-item.is-active .author-count {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  box-shadow: none;
}

.author-content {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
  min-width: 0;
}

/* Ensure comfortable spacing between consecutive sections in author pane */
.author-details-pane > section + section {
  margin-top: 2.5rem;
}

.author-details-pane {
  display: none;
  animation: fadeInUp 0.35s ease forwards;
}

.author-details-pane.is-active {
  display: block;
}

.author-headline {
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.author-profile {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-display-name {
  margin: 0 0 0.5rem;
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.1;
}

.author-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.author-work-count,
.author-library-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
}

.author-work-count {
  color: var(--blue-600);
}

.author-library-count {
  color: var(--green-600);
}

.author-summary {
  margin: 0;
  font-size: 1.05rem;
  color: var(--gray-600);
}

/* Enhanced Author Avatar Styles */
.author-avatar {
  position: relative;
  margin-bottom: 1.25rem;
}

.author-avatar-frame {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 3px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.author-avatar-frame:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.author-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transition: transform 0.3s ease;
}

.author-avatar-frame:hover img {
  transform: scale(1.05);
}

.author-avatar-overlay {
  position: absolute;
  inset: 3px;
  border-radius: 20px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

/* Enhanced Author Name and Status */
.author-name-section {
  margin-bottom: 0.75rem;
}

.author-display-name {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.author-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #047857;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Enhanced Author Stats */
.author-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-600);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--gray-200);
}

/* Enhanced Author Tags with Hover Effects */
.author-identity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.author-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.author-tag::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.author-tag:hover::before {
  opacity: 1;
}

.author-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.author-tag svg {
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.author-tag:hover svg {
  transform: scale(1.1);
}

.author-tag--gender {
  background: linear-gradient(
    135deg,
    rgba(244, 114, 182, 0.2) 0%,
    rgba(244, 114, 182, 0.1) 100%
  );
  color: #9d174d;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

.author-tag--birth {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2) 0%,
    rgba(99, 102, 241, 0.1) 100%
  );
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.author-tag--place {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.2) 0%,
    rgba(34, 197, 94, 0.1) 100%
  );
  color: #047857;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.author-tag--role {
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.25) 0%,
    rgba(251, 191, 36, 0.15) 100%
  );
  color: #b45309;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

/* Enhanced Author Links */
.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.author-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.author-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.author-link:hover::before {
  opacity: 1;
}

.author-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.author-link svg {
  transition: transform 0.2s ease;
}

.author-link:hover svg {
  transform: scale(1.1);
}

.author-link.alias {
  background: linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.25) 0%,
    rgba(148, 163, 184, 0.15) 100%
  );
  color: var(--gray-700);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.author-link.site {
  background: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.2) 0%,
    rgba(13, 110, 253, 0.1) 100%
  );
  color: var(--brand-600);
  border: 1px solid rgba(13, 110, 253, 0.3);
}

.author-link.douban {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.25) 0%,
    rgba(16, 185, 129, 0.15) 100%
  );
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Enhanced Author Summary */
.author-summary {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--gray-600);
  width: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(249, 250, 251, 0.8) 100%
  );
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.6);
  margin-bottom: 1rem;
  position: relative;
}

.author-summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--brand-500) 0%,
    var(--brand-600) 100%
  );
  border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .author-avatar-frame {
    width: 80px;
    height: 80px;
  }

  .author-display-name {
    font-size: 1.75rem;
  }

  .author-stats {
    gap: 0.75rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }
}

/* Author profile layout improvements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Loading state for author avatars */
.author-avatar-frame.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Enhanced author profile animations */
/* Author extra profile details - Enhanced styles above */

.author-notable {
  margin-top: 1.25rem;
  background: var(--surface);
  border-radius: 18px;
  padding: 1.25rem 1.25rem 0.9rem;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

.author-notable-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.author-notable-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

.author-notable-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.author-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.author-tag--work {
  background: var(--surface-2, #fff);
  border: 2px solid #e5e7eb;
  color: var(--gray-800);
  transition: all 0.2s ease;
}

.author-tag--work:hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
}

.author-collection {
  background: var(--surface);
  border-radius: 22px;
  padding: 1.75rem;
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
}

.author-collection + .author-collection {
  margin-top: 2.75rem;
}

.collection-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.collection-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
}

.collection-header p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--gray-500);
}

.author-book-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 190px;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.6) transparent;
}

.author-book-strip::-webkit-scrollbar {
  height: 8px;
}

.author-book-strip::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.author-book-strip::-webkit-scrollbar-track {
  background: transparent;
}

.author-book-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-snap-align: start;
  transition: transform 0.25s ease;
  min-height: 270px;
}

.author-book-card:hover {
  transform: translateY(-6px);
}

.author-book-cover {
  align-self: center;
  display: flex;
  justify-content: center;
}

.author-book-cover img {
  width: min(160px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 20px 30px rgba(15, 23, 42, 0.15);
}

.author-book-info h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.author-book-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.quotes-page {
  width: min(var(--layout-max-width), 94%);
  margin: 0 auto;
  /* Add top padding to create space from the tabs */
  padding: 2rem 0 3.5rem;
}

.quotes-header {
  text-align: center;
  margin-bottom: 3rem;
}

.quotes-kicker {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-600);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.quotes-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.quote-section-heading {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 1.5rem;
}

.quote-feature {
  background: var(--surface);
  border-radius: 22px;
  padding: 1.75rem;
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
  margin-bottom: 3.25rem;
}

.quote-hero {
  position: relative;
  min-height: 260px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.4),
    rgba(15, 23, 42, 0.6)
  );
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: 0 30px 45px rgba(15, 23, 42, 0.18);
}

/* Blurred background layer for Quote of the Day */
.quote-hero::before {
  content: "";
  position: absolute;
  inset: -8px; /* extend to avoid edge artifacts after blur */
  background-image: inherit; /* reuse inline background-image from parent */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(12px) saturate(1.15);
  transform: scale(1.02);
}

.quote-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.8),
    rgba(13, 110, 253, 0.25)
  );
}

.quote-hero-overlay {
  position: relative;
  z-index: 1;
  padding: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 100%;
}

.quote-icon {
  color: rgba(255, 255, 255, 0.7);
}

.quote-hero-text {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.4;
  font-weight: 600;
}

.quote-hero-source {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
  font-style: italic;
}

.quote-hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.quote-hero-footer cite {
  font-style: normal;
  font-weight: 600;
  font-size: 1.1rem;
}

.quote-share,
.quote-card-share {
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.quote-share:hover,
.quote-card-share:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.quotes-collection {
  background: var(--surface);
  border-radius: 22px;
  padding: 1.75rem;
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
}

.quotes-collection-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.quotes-collection-header p {
  margin: 0;
  color: var(--gray-500);
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  /* Increase spacing between quote cards */
  gap: 1.75rem;
}

/* Grouped Quotes by Book */
.quotes-by-book {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quote-book-group {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

.quote-book-summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
}

.quote-book-summary::-webkit-details-marker {
  display: none;
}

.quote-book-summary::after {
  content: '▾';
  margin-left: auto;
  color: var(--gray-500);
  transition: transform 0.2s ease;
}

.quote-book-group[open] .quote-book-summary::after {
  transform: rotate(180deg);
}

.quote-book-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quote-book-cover img {
  width: 44px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.quote-book-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.quote-book-title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--gray-900);
}

.quote-book-author {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-500);
}

.quote-count-badge {
  margin-left: auto;
  background: rgba(13, 110, 253, 0.12);
  color: var(--brand-600);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.quote-book-list {
  padding: 0 1.25rem 1.25rem;
}

.quote-card {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 240px;
}

.quote-card-icon {
  color: var(--brand-600);
}

.quote-card-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--gray-800);
  flex: 1;
}

.quote-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--gray-500);
}

.quote-card-footer cite {
  font-style: normal;
  font-weight: 600;
  color: var(--gray-700);
}

.quote-card-share {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: rgba(13, 110, 253, 0.12);
  color: var(--brand-600);
  padding: 0.45rem;
}

.quote-card-share:hover {
  background: rgba(13, 110, 253, 0.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1200px) {
  .explore-page {
    gap: 2.5rem;
    padding: 2.5rem 1.5rem 3.25rem;
  }
}

@media (max-width: 1024px) {
  .explore-page {
    flex-direction: column;
    padding: 2.5rem 1.5rem 3rem;
  }

  .authors-panel {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1.5rem;
  }

  .author-list {
    flex-direction: row;
    gap: 1rem;
  }

  .author-button {
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 150px;
    gap: 0.6rem;
  }

  .author-text {
    align-items: center;
  }

  .author-count {
    position: relative;
    margin-left: 0;
  }

  .author-content {
    flex-basis: auto;
    width: 100%;
  }

  .explore-top-tabs {
    margin: 0;
  }

  .quotes-page {
    /* Maintain top spacing at this breakpoint */
    padding: 2rem 1rem 2.75rem;
  }
}

@media (max-width: 768px) {
  .explore-page {
    padding: 2rem 1.25rem 2.75rem;
  }

  .author-display-name {
    font-size: 2.25rem;
  }

  .author-profile {
    gap: 1rem;
  }

  .author-avatar img {
    width: 80px;
    height: 80px;
  }

  .author-meta {
    gap: 1rem;
  }

  .collection-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .author-book-strip {
    grid-auto-columns: 170px;
  }

  .explore-top-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .explore-top-tab {
    flex: 1;
    text-align: center;
  }

  .quote-hero {
    min-height: 220px;
  }

  .quote-hero-overlay {
    padding: 2.25rem;
  }

  .quotes-collection-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .explore-page {
    padding: 1.75rem 1.25rem 2.5rem;
  }

  .authors-panel {
    border-radius: 18px;
  }

  .author-button {
    min-width: 130px;
    padding: 0.75rem 0.9rem;
  }

  .author-display-name {
    font-size: 2rem;
  }

  .author-profile {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .author-avatar {
    align-self: center;
  }

  .author-avatar img {
    width: 72px;
    height: 72px;
  }

  .author-meta {
    justify-content: center;
    gap: 0.75rem;
  }

  .author-summary {
    font-size: 0.95rem;
  }

  .author-book-strip {
    grid-auto-columns: 150px;
  }

  .explore-top-tabs {
    padding: 0.35rem 0.6rem;
  }

  .explore-top-tab {
    flex: 0 0 auto;
  }

  .quotes-page {
    /* Maintain a bit of top spacing on mobile */
    padding: 1.25rem 0.75rem 2.5rem;
  }

  .quote-hero-overlay {
    padding: 1.85rem;
  }

  .quote-hero-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .quotes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .explore-top-tabs {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 0.5rem;
    scrollbar-width: thin;
  }

  .explore-top-tabs::-webkit-scrollbar {
    height: 4px;
  }

  .explore-top-tabs::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
  }
}

/* Statistics Page Styles */
.statistics-page {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.statistics-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.statistics-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.statistics-summary {
  margin-bottom: 2.5rem;
  padding: 2rem 2.5rem;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(
    135deg,
    rgba(14, 165, 233, 0.08),
    rgba(56, 189, 248, 0.06)
  );
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.summary-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.summary-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
}

.summary-description {
  margin: 0;
  color: var(--gray-600);
  font-size: 1rem;
  max-width: 620px;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.summary-metric {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.summary-metric-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
}

.summary-metric-subvalue {
  font-size: 0.9rem;
  color: var(--brand-600);
  font-weight: 500;
}

.summary-context {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  flex-wrap: wrap;
}

.summary-context-item {
  flex: 1 1 220px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-context-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-context-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-900);
}

.statistics-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Filter Section */
.filter-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-700);
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: transparent;
  border: 2px solid #e5e7eb;
  border-radius: 25px;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
}

.filter-tab.active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: white;
}

/* Stats Cards */
.stats-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.stats-secondary {
  margin-top: 1rem;
}

.stats-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.stats-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 0.5rem 0;
}

.card-subtitle {
  font-size: 1rem;
  color: var(--gray-600);
  margin: 0;
}

/* Genre Distribution Card */
.genre-card .card-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.total-books-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  border-radius: 12px;
  color: white;
  text-align: center;
}

.total-books-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.total-books-label {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 0.5rem;
}

.genre-list {
  flex: 1;
}

.genre-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.genre-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.genre-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.genre-count {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.genre-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 120px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-500));
  border-radius: 4px;
  transition: width 1s ease-out;
}

.genre-percentage {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  min-width: 40px;
  text-align: right;
}

/* Status Card */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.status-item:hover {
  transform: translateY(-2px);
}

.status-item.reading {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.status-item.read {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.status-item.plan-to-read {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.status-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.status-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.status-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

/* Reading Insights */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.insight-item {
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
  background: #f8fafc;
}

.insight-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand-600);
  margin-bottom: 0.5rem;
}

.insight-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--gray-600);
}

.empty-state p {
  margin: 0.5rem 0;
}

/* Footer */
.statistics-footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.statistics-footer p {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin: 0;
}

/* Responsive Design for Statistics Page */
@media (max-width: 1024px) {
  .stats-main {
    grid-template-columns: 1fr;
  }

  .summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-card .card-content {
    flex-direction: column;
    align-items: center;
  }

  .total-books-display {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .statistics-page {
    padding: 1.5rem 1rem;
  }

  .statistics-title {
    font-size: 2rem;
  }

  .statistics-summary {
    padding: 1.75rem 1.5rem;
  }

  .summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .summary-metric {
    padding: 1rem 1.25rem;
  }

  .summary-context {
    flex-direction: column;
  }

  .filter-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .stats-card {
    padding: 1.5rem;
  }

  .status-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .insights-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .genre-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .genre-progress {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .statistics-page {
    padding: 1rem 0.75rem;
  }

  .statistics-title {
    font-size: 1.75rem;
  }

  .statistics-summary {
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
  }

  .summary-metrics {
    grid-template-columns: 1fr;
  }

  .summary-metric-value {
    font-size: 1.65rem;
  }

  .summary-context {
    gap: 0.75rem;
  }

  .summary-context-item {
    flex: 1 1 100%;
  }

  .filter-tabs {
    width: 100%;
    justify-content: center;
  }

  .filter-tab {
    flex: 1;
    text-align: center;
    min-width: 0;
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
  }

  .total-books-number {
    font-size: 2.5rem;
  }

  .card-title {
    font-size: 1.25rem;
  }
}

/* Explore Recommendations Styles */
.recommendations-content {
  width: min(var(--layout-max-width), 94%);
  margin: 0 auto;
  /* Add consistent top padding to match other tabs */
  padding: 2rem 0 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.recommendations-intro {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recommendations-kicker {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand-600);
  font-weight: 700;
  margin: 0;
}

.recommendations-title {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--gray-900);
}

.recommendations-subtitle {
  margin: 0;
  color: var(--gray-500);
  font-size: 1.05rem;
}

.recommendations-section {
  background: var(--surface);
  border-radius: 22px;
  padding: 1.75rem;
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.recommendations-section + .recommendations-section {
  margin-top: 2.75rem;
}

.recommendations-section-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.recommendations-section-header h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gray-900);
}

.recommendations-section-header p {
  margin: 0;
  color: var(--gray-500);
  font-size: 0.95rem;
}

.recommendation-grid {
  display: grid;
  gap: 1.75rem;
}

.recommendation-grid--authors {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.recommendation-grid--series {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.recommendation-grid--adaptations {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.recommendation-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.75rem;
  opacity: 0;
  transform: translateY(16px);
  animation: recommendationFade 0.6s ease forwards;
  animation-delay: var(--enter-delay, 0ms);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recommendation-card:hover {
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.18);
  transform: translateY(0);
}

.recommendation-card-media {
  position: relative;
}

.recommendation-card-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.recommendation-card--author {
  flex-direction: row;
  align-items: center;
  padding: 1.5rem 2rem;
  gap: 1.75rem;
}

.recommendation-card--author .recommendation-card-media {
  flex-shrink: 0;
}

.recommendation-card--author .recommendation-card-media img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.recommendation-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.recommendation-card-body h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-900);
}

.recommendation-card-body p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.5;
}

.recommendation-card--series .recommendation-card-media img {
  height: 260px;
}

.recommendation-card--adaptation .recommendation-card-media img {
  height: 320px;
}

.recommendation-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes recommendationFade {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .recommendations-content {
    padding: 0 1rem 3rem;
  }

  .recommendation-card--author {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .recommendation-grid--authors,
  .recommendation-grid--series,
  .recommendation-grid--adaptations {
    grid-template-columns: 1fr;
  }

  .recommendation-card {
    padding: 1.5rem;
  }

  .recommendation-card--series .recommendation-card-media img,
  .recommendation-card--adaptation .recommendation-card-media img {
    height: 240px;
  }
}

@media (max-width: 540px) {
  .recommendations-content {
    padding: 0 0.75rem 2.5rem;
  }

  .recommendations-title {
    font-size: clamp(2rem, 7vw, 2.4rem);
  }

  .recommendation-card--author .recommendation-card-media img {
    width: 84px;
    height: 84px;
  }
}

/* Profile Page Styles */
.profile-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.profile-container {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: white;
}

.profile-avatar-large {
  flex-shrink: 0;
}

.profile-avatar-large img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
}

.profile-info h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.profile-email {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0 0 0.25rem 0;
}

.profile-joined {
  font-size: 0.875rem;
  opacity: 0.8;
  margin: 0;
}

.profile-content {
  padding: 2rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-soft);
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-600);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.profile-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-section {
  padding: 1.5rem;
  background: var(--bg-soft);
  border-radius: 12px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 1.5rem 0;
}

.reading-goal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.goal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.goal-progress {
  font-size: 0.875rem;
  color: var(--brand-600);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-500));
  border-radius: 4px;
  transition: width 1s ease-out;
}

.goal-text {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.genre-tag {
  background: var(--surface);
  color: var(--gray-700);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px solid #e5e7eb;
  transition: all 0.2s ease;
}

.genre-tag:hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 8px;
}

.activity-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.activity-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.activity-action {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.activity-book {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-900);
}

.activity-rating {
  font-size: 0.875rem;
  color: var(--brand-600);
  font-weight: 500;
}

.activity-time {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* Responsive Design for Profile Page */
@media (max-width: 768px) {
  .profile-page {
    padding: 1rem;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .profile-info h1 {
    font-size: 1.75rem;
  }

  .profile-content {
    padding: 1.5rem;
  }

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

  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .goal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .genre-tags {
    gap: 0.5rem;
  }

  .genre-tag {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .profile-avatar-large img {
    width: 100px;
    height: 100px;
  }

  .profile-info h1 {
    font-size: 1.5rem;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .activity-item {
    padding: 0.75rem;
  }

  .section-title {
    font-size: 1.1rem;
  }
}

/* Book Details Page */
.book-detail {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
}

.book-detail-breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.book-detail-breadcrumbs .breadcrumb-link {
  color: var(--brand-600);
  font-weight: 500;
  transition: all 0.2s ease;
}

.book-detail-breadcrumbs .breadcrumb-link:hover {
  text-decoration: underline;
  color: var(--brand-500);
}

.book-detail-breadcrumbs .breadcrumb-current {
  color: var(--gray-600);
  font-weight: 500;
}

.book-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 3rem;
  align-items: start;
}

.book-detail-sidebar {
  position: sticky;
  top: 6rem;
}

.book-hero-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 2.25rem 2rem 2.75rem;
  box-shadow: 0 20px 50px rgba(13, 110, 253, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.book-hero-cover {
  width: 100%;
  max-width: 300px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
  transform: perspective(800px) rotateY(-2deg);
  transition: transform 0.3s ease;
}

.book-hero-cover:hover {
  transform: perspective(800px) rotateY(0deg);
}

.book-hero-cover img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.book-hero-cover:hover img {
  transform: scale(1.02);
}

.book-hero-meta {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.book-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.3;
}

.book-hero-author {
  font-size: 1.1rem;
  color: var(--gray-500);
  margin: 0;
  font-weight: 500;
}

.book-hero-tags {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(13, 110, 253, 0.12);
  color: var(--brand-600);
  text-transform: capitalize;
}

.status-pill--plan-to-read {
  background: rgba(148, 163, 184, 0.16);
  color: var(--gray-600);
}

.status-pill--reading {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

.status-pill--read {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}

.status-pill--custom {
  background: rgba(99, 102, 241, 0.16);
  color: #4338ca;
}

.rating-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  color: #b45309;
  font-weight: 600;
  font-size: 0.88rem;
}

.rating-chip-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(180, 83, 9, 0.7);
  font-weight: 700;
}

.rating-chip-value {
  font-size: 1rem;
  line-height: 1;
}

.rating-chip-scale {
  font-size: 0.75rem;
  font-weight: 500;
}

.rating-chip--public {
  background: rgba(129, 140, 248, 0.16);
  color: #4338ca;
}

.rating-chip--public .rating-chip-label {
  color: rgba(99, 102, 241, 0.8);
}

.rating-chip--empty {
  background: rgba(148, 163, 184, 0.16);
  color: var(--gray-500);
  font-weight: 500;
}

.rating-chip--empty .rating-chip-label {
  color: var(--gray-400);
}

.favorite-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  background: rgba(148, 163, 184, 0.15);
  transition: all 0.2s ease;
}

.favorite-chip--active {
  color: #be123c;
  background: rgba(244, 114, 182, 0.18);
  box-shadow: 0 10px 25px rgba(244, 114, 182, 0.2);
}

.favorite-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.favorite-icon::before {
  content: "\2665";
  font-size: 0.85rem;
  line-height: 1;
}

.favorite-chip--active .favorite-icon::before {
  color: #db2777;
}

.book-primary-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  margin-top: 2.25rem;
  padding: 1.75rem 1.5rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.book-primary-fact dt {
  margin: 0 0 0.35rem 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.book-primary-fact dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-800);
  font-weight: 600;
}

.book-detail-content {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.book-panel {
  background: var(--surface);
  border-radius: 20px;
  padding: 2rem 2.25rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.book-panel:hover {
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.book-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.book-panel-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.book-panel--overview .book-panel-header,
.book-panel--library .book-panel-header,
.book-panel--quote .book-panel-header {
  margin-bottom: 1.1rem;
  border-bottom: none;
  padding-bottom: 0;
}

.book-panel--overview .book-panel-header h2,
.book-panel--library .book-panel-header h2,
.book-panel--quote .book-panel-header h2 {
  font-size: 1.2rem;
}

.book-description {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--gray-700);
  white-space: pre-line;
}

.book-facts--library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.book-fact--rating dd {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.favorite-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-600);
}

.favorite-flag--yes {
  background: rgba(244, 114, 182, 0.16);
  color: #be123c;
}

.rating-meter {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.rating-meter-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  border-radius: inherit;
}

.rating-meter-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
}

.rating-meter-scale {
  margin-left: 0.2rem;
  font-size: 0.75rem;
  color: var(--gray-400);
}

.rating-empty {
  font-size: 0.88rem;
  color: var(--gray-500);
}

.book-panel--quote .book-panel-header {
  margin-bottom: 1.2rem;
}

/* Scope Book Details quote styles to avoid overriding Explore Quotes tab */
.book-panel--quote .quote-feature {
  margin: 0;
  padding: 2rem 2.25rem;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1),
    rgba(14, 165, 233, 0.15)
  );
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-panel--quote .quote-feature-text {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.7;
}

.book-panel--quote .quote-feature-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
}

.panel-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.panel-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--bg-soft);
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.panel-action:hover {
  transform: translateY(-1px);
  border-color: var(--brand-600);
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.15);
  color: var(--brand-600);
  background: rgba(13, 110, 253, 0.05);
}

.panel-action-icon {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.15),
    rgba(30, 167, 253, 0.25)
  );
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.panel-action:hover .panel-action-icon {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
}

.panel-action-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--brand-600);
  transition: color 0.2s ease;
}

.panel-action:hover .panel-action-icon::before {
  color: white;
}

.panel-action-icon--edit::before {
  content: "\270F";
}

.panel-action-icon--quotes::before {
  content: "\275D";
}

.panel-action-icon--add::before {
  content: "+";
  font-weight: 700;
}

.panel-action--primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: white;
  border-color: var(--brand-600);
  font-weight: 600;
}

.panel-action--primary:hover {
  background: linear-gradient(135deg, #0a58ca, #0d6efd);
  box-shadow: 0 12px 25px rgba(13, 110, 253, 0.25);
  border-color: #0a58ca;
  color: white;
}

.panel-action--primary .panel-action-icon {
  background: rgba(255, 255, 255, 0.2);
}

.panel-action--primary .panel-action-icon::before {
  color: white;
}

.panel-action--primary:hover .panel-action-icon {
  background: rgba(255, 255, 255, 0.3);
}

.book-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin: 0;
}

.book-fact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0;
}

.book-fact dt {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin: 0;
  font-weight: 600;
}

.book-fact dd {
  margin: 0;
  font-size: 1.05rem;
  color: var(--gray-800);
  font-weight: 600;
  line-height: 1.3;
}

.remark-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.remark-card {
  background: linear-gradient(
    135deg,
    rgba(30, 167, 253, 0.06),
    rgba(13, 110, 253, 0.08)
  );
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(30, 167, 253, 0.15);
  transition: all 0.2s ease;
}

.remark-card:hover {
  background: linear-gradient(
    135deg,
    rgba(30, 167, 253, 0.08),
    rgba(13, 110, 253, 0.1)
  );
  border-color: rgba(30, 167, 253, 0.25);
  transform: translateY(-1px);
}

.remark-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.remark-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.2),
    rgba(30, 167, 253, 0.35)
  );
  position: relative;
  flex-shrink: 0;
}

.remark-icon--community {
  background: linear-gradient(
    135deg,
    rgba(13, 202, 240, 0.25),
    rgba(13, 110, 253, 0.35)
  );
}

.remark-empty {
  margin: 0;
  color: var(--gray-500);
  font-style: italic;
}

.remark-icon::before {
  content: "💭";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.remark-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.remark-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.remark-date {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
}

.remark-body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gray-700);
  font-weight: 400;
}

.quote-list {
  display: grid;
  gap: 1.25rem;
}

.quote-card {
  margin: 0;
  padding: 1.5rem 1.75rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.2);
  position: relative;
  transition: all 0.2s ease;
}

.quote-card:hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(148, 163, 184, 0.3);
  transform: translateY(-1px);
}

.quote-text {
  margin: 0 0 0.75rem 0;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--gray-800);
  line-height: 1.6;
}

.quote-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--gray-500);
}

.status-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: relative;
}

.status-entry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.status-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(13, 110, 253, 0.15);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 12px 24px rgba(13, 110, 253, 0.15);
}

.status-icon::before {
  content: "\2713";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.status-icon[data-status="reading"] {
  background: rgba(30, 167, 253, 0.2);
}

.status-icon[data-status="reading"]::before {
  content: "\23F3";
  font-size: 0.95rem;
}

.status-icon[data-status="plan"] {
  background: rgba(148, 163, 184, 0.25);
  box-shadow: none;
}

.status-icon[data-status="plan"]::before {
  content: "\25CB";
  color: var(--gray-500);
  font-size: 0.95rem;
  font-weight: 400;
}

.status-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.status-date {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.book-detail-shell {
  width: min(var(--layout-wide-max-width), 94%);
}

@media (max-width: 1024px) {
  .book-detail-grid {
    grid-template-columns: 1fr;
  }

  .book-detail-sidebar {
    position: static;
  }

  .book-hero-card {
    margin: 0 auto;
  }

  .book-primary-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .book-panel {
    padding: 1.5rem;
  }

  .book-panel-header {
    flex-wrap: wrap;
  }

  .panel-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .book-primary-facts {
    grid-template-columns: 1fr;
    padding: 1.35rem 1.25rem;
  }

  .book-hero-tags {
    justify-content: flex-start;
  }

  .book-facts--library {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .book-detail {
    gap: 1.5rem;
  }

  .book-panel {
    padding: 1.25rem 1.35rem;
  }

  .panel-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-action {
    width: 100%;
    justify-content: center;
  }

  .favorite-chip,
  .rating-chip {
    width: 100%;
    justify-content: center;
  }
}
body.modal-open {
  overflow: hidden;
}

.status-modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.status-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.status-modal-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.24);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.status-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: var(--gray-500);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.status-modal-close:hover,
.status-modal-close:focus-visible {
  background: rgba(13, 110, 253, 0.1);
  color: var(--brand-600);
}

.status-modal-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 48px;
}

.status-modal-eyebrow {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-600);
}

.status-modal-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--gray-900);
}

.status-modal-book {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.95rem;
}

.status-modal-options {
  display: grid;
  gap: 12px;
}

.status-modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.status-modal-label {
  font-weight: 600;
  color: var(--gray-800);
}

.status-modal-input,
.status-modal-textarea {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px;
  font-size: 1rem;
  color: var(--gray-900);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.status-modal-input:focus,
.status-modal-textarea:focus {
  border-color: var(--brand-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.14);
  background: #ffffff;
}

.status-modal-input::placeholder,
.status-modal-textarea::placeholder {
  color: var(--gray-400);
}

.status-modal-textarea {
  resize: vertical;
  min-height: 120px;
}

.status-modal-helper {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.status-option {
  position: relative;
  display: block;
}

.status-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.status-option-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.status-option:hover .status-option-content,
.status-option-content:focus-visible {
  border-color: var(--brand-500);
  box-shadow: 0 6px 18px rgba(30, 167, 253, 0.18);
}

.status-option input:checked + .status-option-content {
  border-color: var(--brand-600);
  box-shadow: 0 8px 22px rgba(13, 110, 253, 0.22);
  background: rgba(13, 110, 253, 0.08);
}

.status-option-label {
  font-weight: 600;
  color: var(--gray-900);
}

.status-option-helper {
  margin: 0;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.status-modal-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-modal-feedback {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.status-modal-feedback--error {
  color: #dc2626;
}

.status-modal-submit {
  align-self: flex-end;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: var(--brand-600);
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.status-modal-submit:hover:not(:disabled),
.status-modal-submit:focus-visible:not(:disabled) {
  background: var(--brand-500);
  box-shadow: 0 10px 24px rgba(30, 167, 253, 0.25);
  transform: translateY(-1px);
}

.status-modal-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 640px) {
  .status-modal-panel {
    padding: 24px;
    border-radius: 16px;
  }

  .status-modal-header {
    padding-right: 0;
  }

  .status-modal-submit {
    width: 100%;
  }
}
