/* ============================================
   LitRPG Index - Main Stylesheet
   ============================================

   Table of Contents:
   1. CSS Variables & Theming
   2. Base & Reset
   3. Layout & Container
   4. Navigation
   5. Buttons
   6. Forms
   7. Cards (Generic)
   8. Badges
   9. Tables
   10. Pagination
   11. Alerts & Toasts
   12. Home Page
   13. Book Components
   14. Series Components
   15. Genre Components
   16. Search
   17. Detail Pages (Book, Series, Author)
   18. Lists
   19. Reading Progress
   20. Notifications
   21. Settings
   22. Admin
   23. Submit Pages
   24. Legal & Error Pages
   25. Utility Classes
   26. Animations
   27. Accessibility

   ============================================ */


/* ============================================
   1. CSS Variables & Theming
   ============================================ */

:root {
  /* Colors */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Backgrounds */
  --bg: #f8fafc;
  --bg-card: #ffffff;

  /* Text */
  --text: #1e293b;
  --text-muted: #64748b;

  /* Borders & Effects */
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #94a3b8;
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.3);
}

html { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }


/* ============================================
   2. Base & Reset
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

main {
  padding: 2rem 0;
  flex: 1;
}


/* ============================================
   3. Layout & Container
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Sidebar Layout */
.layout-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

.sidebar {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  height: fit-content;
}

/* Catalog Layout (Books/Series pages) */
.catalog-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

.filter-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.filter-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.filter-form h2 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text-muted);
}

.filter-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.catalog-main {
  min-width: 0;
}

.results-info {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .layout-sidebar,
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: static;
  }
}


/* ============================================
   4. Navigation
   ============================================ */

nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav-logo {
  height: 24px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  display: block;
}

.nav-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--primary);
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

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

.nav-user {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background 0.2s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text);
  left: 0;
  transition: transform 0.3s ease;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  background: var(--bg);
  border-color: var(--text-muted);
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Mobile Nav Styles */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    justify-content: flex-start;
    padding: 5rem 1.5rem 2rem;
    gap: 2rem;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 100;
  }

  .nav-menu.is-open { right: 0; }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    padding: 1rem 0;
    display: block;
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 1rem;
  }

  .nav-actions .btn { text-align: center; }
  .nav-user { text-align: center; padding-bottom: 0.5rem; }

  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }
}

/* Footer */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: auto;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}


/* ============================================
   5. Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-amazon {
  background: #ff9900;
  color: black;
  font-size: 1.125rem;
}

.btn-amazon:hover {
  background: #e68a00;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Button Loading */
.btn-loading { position: relative; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}


/* ============================================
   6. Forms
   ============================================ */

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button input { flex: 1; }
.input-with-button .btn { flex-shrink: 0; white-space: nowrap; }

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
}


/* ============================================
   7. Cards (Generic)
   ============================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--border);
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-img-wrapper {
  position: relative;
}


/* ============================================
   8. Badges
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.badge-primary { background: var(--primary); color: white; }
.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--warning); color: white; }
.badge-danger { background: var(--danger); color: white; }
.badge-secondary { background: var(--secondary); color: white; }

.badge-ku {
  background: linear-gradient(135deg, #ff9900, #ff6600);
  color: #000;
}

.badge-audio {
  background: linear-gradient(135deg, #1db954, #169c46);
  color: #fff;
  padding: 0.3rem;
}

.badge-audio svg { display: block; }

.badge-lg {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  gap: 0.375rem;
}

.badge-lg svg {
  width: 14px;
  height: 14px;
}


/* ============================================
   9. Tables
   ============================================ */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}


/* ============================================
   10. Pagination
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination-list {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination-item {
  display: flex;
}

.pagination-link {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.pagination-link:hover:not(.disabled):not(.current) {
  background: var(--bg);
  border-color: var(--text-muted);
  text-decoration: none;
}

.pagination-link.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-ellipsis {
  padding: 0.5rem 0.5rem;
  color: var(--text-muted);
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.pagination a:hover {
  background: var(--bg);
  text-decoration: none;
}

.pagination .active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}


/* ============================================
   11. Alerts & Toasts
   ============================================ */

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  padding: 0;
  line-height: 1;
}

.alert-close:hover { opacity: 1; }

.alert-dismissing {
  animation: alertDismiss 0.3s ease forwards;
}

.alert-info {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.alert-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.alert-warning {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.alert-error,
.alert-danger {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

[data-theme="dark"] .alert-info {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

[data-theme="dark"] .alert-success {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

[data-theme="dark"] .alert-warning {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

[data-theme="dark"] .alert-error,
[data-theme="dark"] .alert-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
}

.toast-show { animation: toastSlideIn 0.3s ease forwards; }
.toast-hide { animation: toastSlideOut 0.3s ease forwards; }

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  flex: 1;
  font-size: 0.9375rem;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.toast-close:hover { color: var(--text); }

.toast-success { border-left: 4px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }

.toast-error { border-left: 4px solid var(--danger); }
.toast-error .toast-icon { color: var(--danger); }

.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-info { border-left: 4px solid var(--primary); }
.toast-info .toast-icon { color: var(--primary); }

@media (max-width: 480px) {
  #toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}


/* ============================================
   12. Home Page
   ============================================ */

/* Hero */
@keyframes heroGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero {
  position: relative;
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 25%, var(--primary-dark) 50%, #4f46e5 75%, var(--primary) 100%);
  background-size: 200% 200%;
  animation: heroGradient 15s ease infinite;
  color: white;
  border-radius: var(--radius);
  margin-bottom: 3rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: white;
  color: var(--primary);
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.2s;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  text-decoration: none;
}

.hero-decoration {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

@media (max-width: 640px) {
  .hero { padding: 3rem 1.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero-tagline { font-size: 1rem; }
}

/* Sections */
section {
  margin-bottom: 2rem;
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

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

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

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.section-link {
  font-weight: 500;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.section-link:hover {
  text-decoration: underline;
}

/* Page Header */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-description {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.page-subtitle {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

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

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.empty-state-card {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--bg);
  border-radius: 50%;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.empty-state-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.empty-state-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
}

.no-results p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Features Section */
.features-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  border-radius: 16px;
  color: white;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}


/* ============================================
   13. Book Components
   ============================================ */

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

/* Book Card */
.book-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.book-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.book-cover-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.book-cover {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.book-card .book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.book-card .book-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(145deg, var(--border) 0%, var(--bg) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  gap: 0.5rem;
}

.book-card .book-cover-placeholder::before {
  content: '';
  width: 32px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='40' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.6;
}

.book-badges {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.book-card .book-info {
  padding: 0.75rem;
  flex: 1;
}

.book-card .book-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.book-card .book-title a {
  color: var(--text);
  text-decoration: none;
}

.book-card .book-title a:hover {
  color: var(--primary);
}

.book-card .book-author {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.book-card-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.genre-chip {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  background: var(--bg);
  border-radius: 4px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
  }

  .book-card .book-info { padding: 0.5rem; }
  .book-card .book-title { font-size: 0.8125rem; }
}


/* ============================================
   14. Series Components
   ============================================ */

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

.series-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.series-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.series-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.series-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.series-card-link:hover {
  text-decoration: none;
}

.series-card-cover {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--border) 0%, var(--bg) 100%);
}

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

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

.series-card-cover .series-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  gap: 0.5rem;
}

.series-card-cover .series-cover-placeholder::before {
  content: '';
  width: 40px;
  height: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5'%3E%3Crect x='2' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='8' y1='3' x2='8' y2='21'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.5;
}

.series-status-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.series-status-badge.badge-complete {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

.series-status-badge.badge-ongoing {
  background: rgba(59, 130, 246, 0.9);
  color: white;
}

.series-card-info {
  padding: 1rem 1.25rem 1.25rem;
}

.series-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  line-height: 1.3;
  color: var(--text);
}

.series-card-author {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.series-card-count {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
  margin: 0;
}


/* ============================================
   15. Genre Components
   ============================================ */

.genres-section {
  margin-top: 1rem;
}

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

.genre-card {
  display: block;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.genre-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #4f46e5);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.genre-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
}

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

.genre-card:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.genre-card-content {
  position: relative;
  z-index: 1;
}

.genre-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.genre-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.genre-description {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.genre-book-count {
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
}

/* Genre Tags (on detail pages) */
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.genre-tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
}


/* ============================================
   16. Search
   ============================================ */

.search-page {
  max-width: 800px;
  margin: 0 auto;
}

.search-form-large {
  margin-bottom: 2rem;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

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

.search-result {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.result-type-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  background: var(--secondary);
  color: white;
  border-radius: 4px;
}

.search-result-book .result-type-badge { background: var(--primary); }
.search-result-series .result-type-badge { background: var(--success); }
.search-result-author .result-type-badge { background: var(--warning); }

.result-cover {
  flex-shrink: 0;
  width: 60px;
}

.result-cover img {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}

.cover-placeholder-small {
  width: 60px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--border) 0%, var(--bg) 100%);
  color: var(--text-muted);
  font-size: 0.625rem;
  text-align: center;
  border-radius: 4px;
}

.cover-placeholder-small::before {
  content: '';
  width: 24px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='30' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.5;
}

.author-avatar {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  border-radius: 50%;
}

.result-content {
  flex: 1;
  min-width: 0;
}

.result-content h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.result-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.result-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-suggestions {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

.autocomplete-dropdown.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.autocomplete-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.1s;
}

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

.autocomplete-item:hover,
.autocomplete-item.is-selected {
  background: var(--bg);
  text-decoration: none;
}

.autocomplete-title {
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0.5rem;
}

.autocomplete-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .search-input-group {
    flex-direction: column;
  }
}


/* ============================================
   17. Detail Pages
   ============================================ */

/* Detail Layout (Generic) */
.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
}

.detail-cover {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.detail-meta dt {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.detail-meta dd {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

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

  .detail-cover {
    max-width: 300px;
    margin: 0 auto;
  }
}

/* Book Detail Page */
.book-detail {
  max-width: 1000px;
  margin: 0 auto;
}

.book-detail-header {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.book-detail-cover {
  position: relative;
}

.book-detail-cover .cover-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.book-detail-cover .cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--border) 0%, var(--bg) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.book-detail-cover .cover-placeholder::before {
  content: '';
  width: 48px;
  height: 60px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='60' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.5;
}

.book-detail-info {
  display: flex;
  flex-direction: column;
}

.book-detail-info .book-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.book-detail-info .book-author {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.book-detail-info .book-author a {
  color: var(--primary);
  font-weight: 500;
}

.book-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.book-detail-badges a.badge { text-decoration: none; }
.book-detail-badges a.badge:hover { filter: brightness(1.1); }

.book-detail-info .book-series {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  width: fit-content;
}

.book-detail-info .book-series a {
  color: var(--primary);
  font-weight: 500;
}

.book-detail-info .book-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.book-detail-info .book-description {
  margin-bottom: 1.5rem;
}

.book-detail-info .book-description h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.book-detail-info .description-text {
  color: var(--text-muted);
  line-height: 1.8;
}

.book-detail-info .book-metadata {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.book-detail-info .book-metadata h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.book-detail-info .metadata-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.book-detail-info .metadata-item dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.book-detail-info .metadata-item dd {
  font-weight: 500;
  color: var(--text);
}

.book-detail-info .book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
}

@media (max-width: 768px) {
  .book-detail-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .book-detail-cover {
    max-width: 250px;
    margin: 0 auto;
  }

  .book-detail-info .book-title { font-size: 1.75rem; }
  .book-detail-info .metadata-list { grid-template-columns: 1fr; }
}

/* Series Detail Page */
.series-detail {
  max-width: 1000px;
  margin: 0 auto;
}

.series-detail-header {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.series-detail-cover {
  position: relative;
}

.series-detail-cover .cover-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.series-detail-cover .cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--border) 0%, var(--bg) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.series-detail-cover .cover-placeholder::before {
  content: '';
  width: 48px;
  height: 60px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='60' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5'%3E%3Crect x='2' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='8' y1='3' x2='8' y2='21'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.5;
}

.series-detail-info {
  display: flex;
  flex-direction: column;
}

.series-detail-info .series-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.series-detail-info .series-author {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.series-detail-info .series-author a {
  color: var(--primary);
  font-weight: 500;
}

.series-detail-info .series-status-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.series-detail-info .series-status-badge {
  position: static;
  display: inline-block;
}

.series-detail-info .follow-form {
  display: inline-block;
}

.series-detail-info .series-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.series-detail-info .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.series-detail-info .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.series-detail-info .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.series-detail-info .series-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.series-detail-info .series-description {
  margin-bottom: 1.5rem;
}

.series-detail-info .series-description h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.series-detail-info .series-description .description-text {
  color: var(--text-muted);
  line-height: 1.8;
}

/* Series Books List */
.series-books {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.series-books h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.series-book-count {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.series-book-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.series-book-item {
  background: var(--bg);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, transform 0.2s;
}

.series-book-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.series-book-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  text-decoration: none;
  color: var(--text);
}

.series-book-link:hover { text-decoration: none; }

.series-book-cover {
  flex-shrink: 0;
  width: 70px;
  position: relative;
}

.series-book-cover img {
  width: 70px;
  height: 105px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.series-book-cover .book-cover-placeholder {
  width: 70px;
  height: 105px;
  background: var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.625rem;
}

.series-book-cover .ku-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(135deg, #ff9900, #ff6600);
  color: #000;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 0.125rem 0.25rem;
  border-radius: 3px;
}

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

.series-book-number {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.series-book-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.series-book-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .series-detail-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .series-detail-cover {
    max-width: 250px;
    margin: 0 auto;
  }

  .series-detail-info .series-title { font-size: 1.75rem; }

  .series-book-link {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .series-book-cover { width: 50px; }

  .series-book-cover img,
  .series-book-cover .book-cover-placeholder {
    width: 50px;
    height: 75px;
  }
}

/* Author Detail Page */
.author-detail {
  max-width: 1000px;
  margin: 0 auto;
}

.author-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  border-radius: var(--radius);
  color: white;
}

.author-header .author-name {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.author-header .author-stats {
  margin: 0.5rem 0 0;
  opacity: 0.9;
}

.author-header .btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.author-header .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.author-bio {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.author-bio h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.author-bio .bio-text {
  color: var(--text-muted);
  line-height: 1.8;
}

.author-series,
.author-books {
  margin-bottom: 2.5rem;
}

.author-series h2,
.author-books h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-series h2::before,
.author-books h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.25rem;
  background: var(--primary);
  border-radius: 2px;
}

.series-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.series-cover-link {
  display: block;
  position: relative;
  overflow: hidden;
}

.series-card .series-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s;
}

.series-card:hover .series-cover {
  transform: scale(1.05);
}

.series-card .series-cover-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--border) 0%, var(--bg) 100%);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.series-card .series-info {
  padding: 1rem;
}

.series-card .series-info h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.series-card .series-info h3 a {
  color: var(--text);
}

.series-card .series-info h3 a:hover {
  color: var(--primary);
}

.series-card .badge-complete {
  font-size: 0.6875rem;
  padding: 0.1875rem 0.5rem;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 999px;
}

@media (max-width: 768px) {
  .author-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }

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

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

  .series-card .series-cover,
  .series-card .series-cover-placeholder {
    height: 140px;
  }
}


/* ============================================
   18. Lists
   ============================================ */

.lists-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.list-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.list-card-header h2 {
  font-size: 1.125rem;
  margin: 0;
}

.list-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.list-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.item-count {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* List Card Home */
.list-card-home {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.list-card-home:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.list-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--primary);
  flex-shrink: 0;
}

.list-card-content h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem 0;
}

.list-card-content h3 a {
  color: var(--text);
}

.list-card-content h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.list-card-content .list-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.list-card-content .separator {
  margin: 0 0.25rem;
  opacity: 0.5;
}

/* List Items */
.list-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.list-item-img {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.list-item-body {
  flex: 1;
}

.list-item-note {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-style: italic;
}

.rating {
  color: #fbbf24;
}

/* Share Link */
.share-link {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.share-link input {
  flex: 1;
  background: var(--bg);
}

/* Drag and Drop List Reordering */
.editable-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.editable-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.editable-item:hover {
  border-color: var(--primary);
}

.drag-handle {
  cursor: grab;
  padding: 0.25rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
}

.drag-handle:hover { color: var(--text); }
.drag-handle:active { cursor: grabbing; }

.editable-item .item-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.editable-item .item-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editable-item .item-note-preview {
  color: var(--text-muted);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editable-item .item-type-badge {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  flex-shrink: 0;
}

.editable-item .delete-form {
  flex-shrink: 0;
}

/* SortableJS states */
.sortable-ghost {
  opacity: 0.4;
  background: var(--bg);
}

.sortable-chosen {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.sortable-drag {
  opacity: 1;
}


/* ============================================
   19. Reading Progress
   ============================================ */

.reading-page {
  max-width: 1200px;
  margin: 0 auto;
}

.reading-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.reading-section {
  margin-bottom: 2.5rem;
}

.reading-section h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

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

.reading-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.reading-card-cover {
  flex-shrink: 0;
  width: 80px;
}

.reading-card-cover img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.reading-card-cover .no-cover {
  width: 80px;
  height: 120px;
  background: var(--bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.reading-card-content {
  flex: 1;
  min-width: 0;
}

.reading-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.reading-card-title a {
  color: var(--text);
  text-decoration: none;
}

.reading-card-title a:hover {
  color: var(--primary);
}

.reading-card-author {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.reading-card-author a {
  color: inherit;
  text-decoration: none;
}

.reading-card-author a:hover {
  color: var(--primary);
}

.reading-progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.reading-progress-bar .progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

.reading-progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.reading-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.reading-status-form {
  margin-top: 0.5rem;
}

.status-select {
  width: 100%;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.status-select:focus {
  outline: none;
  border-color: var(--primary);
}

.status-select.status-want_to_read { border-left: 3px solid #6c757d; }
.status-select.status-reading { border-left: 3px solid var(--primary); }
.status-select.status-completed { border-left: 3px solid var(--success); }
.status-select.status-dnf { border-left: 3px solid var(--warning); }

/* Reading tracker on book detail page */
.reading-tracker {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.reading-tracker h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.reading-tracker-form {
  display: flex;
  gap: 0.5rem;
}

.reading-tracker-form .status-select {
  flex: 1;
}

.reading-tracker-info {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
}

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

  .reading-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .filter-btn {
    flex-shrink: 0;
  }
}


/* ============================================
   20. Notifications
   ============================================ */

.notification-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.notification-bell:hover {
  background: var(--bg);
  text-decoration: none;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--danger);
  color: white;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notifications-page {
  max-width: 800px;
  margin: 0 auto;
}

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

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.notification-item:hover {
  border-color: var(--text-muted);
}

.notification-unread {
  background: rgba(59, 130, 246, 0.05);
  border-color: var(--primary);
}

[data-theme="dark"] .notification-unread {
  background: rgba(59, 130, 246, 0.1);
}

.notification-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg);
  border-radius: 50%;
}

.notification-icon .icon-success { color: var(--success); }
.notification-icon .icon-danger { color: var(--danger); }
.notification-icon .icon-primary { color: var(--primary); }
.notification-icon .icon-muted { color: var(--text-muted); }

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.notification-message {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.notification-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.notification-action {
  flex-shrink: 0;
}


/* ============================================
   21. Settings
   ============================================ */

.settings-page {
  max-width: 800px;
}

.settings-page h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

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

.settings-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.settings-description {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

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

.profile-info .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info p {
  margin-bottom: 0.5rem;
}

.api-key-display {
  margin: 1rem 0;
}

.api-key-display label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.api-key-value {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.api-key-value code {
  flex: 1;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 0.875rem;
  word-break: break-all;
}

.api-key-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.api-docs {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.api-docs summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 500;
  background: var(--bg);
}

.api-docs-content {
  padding: 1rem;
}

.api-docs-content pre {
  background: var(--bg);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.8125rem;
}

.api-docs-content code {
  font-family: monospace;
}

.api-docs-content h4 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.api-docs-content ul {
  margin: 0;
  padding-left: 1.5rem;
}

.api-docs-content li {
  margin-bottom: 0.25rem;
}

.submissions-table {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.settings-card h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.settings-card h3:first-of-type {
  margin-top: 0;
}


/* ============================================
   22. Admin
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}


/* ============================================
   23. Submit Pages
   ============================================ */

.submit-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.submit-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.submit-option:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.submit-option-icon {
  color: var(--primary);
  margin-bottom: 1rem;
}

.submit-option h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.submit-option p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}


/* ============================================
   24. Legal & Error Pages
   ============================================ */

/* Legal Pages */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.legal-updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

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

.legal-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.legal-section h3 {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
  color: var(--text);
}

.legal-section p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.legal-section ul {
  margin: 0.5rem 0 1rem 1.5rem;
  color: var(--text-muted);
}

.legal-section li {
  margin-bottom: 0.25rem;
}

/* Error Pages */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  min-height: 60vh;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.error-message {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 400px;
}


/* ============================================
   25. Utility Classes
   ============================================ */

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Text */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Spacing */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Flex */
.flex { display: flex; }
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Display */
.d-none { display: none; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }

/* Inline Form (for action buttons in tables) */
.form-inline {
  display: inline;
}


/* ============================================
   26. Animations
   ============================================ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes alertDismiss {
  to {
    opacity: 0;
    transform: translateY(-10px);
    height: 0;
    padding: 0;
    margin: 0;
  }
}

@keyframes toastSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}


/* ============================================
   27. Accessibility
   ============================================ */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 4px;
}


/* ============================================
   Social Sharing
   ============================================ */

.share-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.share-section h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.share-btn:active {
  transform: translateY(0);
}

.share-twitter { background: #000; color: #fff; }
.share-facebook { background: #1877f2; color: #fff; }
.share-reddit { background: #ff4500; color: #fff; }

.share-copy {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.share-copy:hover {
  background: var(--bg-card);
}

.share-link-container {
  margin-top: 1rem;
}

.share-link-container label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.share-link-container input {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

@media (max-width: 480px) {
  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================
   Recommendations Page
   ============================================ */

.recommendations-page {
  max-width: 1200px;
  margin: 0 auto;
}

.recommendation-section {
  margin-bottom: 2.5rem;
}

.recommendation-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
