:root {
  --color-primary: #0d6efd;
  --color-primary-shadow: rgba(13, 110, 253, 0.35);
  --color-text-muted: #6b7280;
  --color-text-dark: #1f2937;
  --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.2);
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
}

body {
  background: radial-gradient(circle at top left, #f9fafb 0%, #e5e7eb 40%, #d1d5db 100%);
  min-height: 100vh;
}

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

.card {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
  background: #ffffff;
}

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

.card img {
  height: 200px;
  object-fit: cover;
}

.filter-toolbar,
.lang-switcher {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-pill);
  padding: 0.25rem;
  box-shadow: var(--shadow-md);
}

.filter-btn,
.lang-switch {
  border-radius: var(--radius-pill);
  border: 0;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: all var(--transition-fast);
}

.filter-btn.active,
.lang-switch.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 25px var(--color-primary-shadow);
}

.filter-btn:not(.active),
.lang-switch:not(.active) {
  background: transparent;
  color: var(--color-text-dark);
}

.filter-btn:not(.active):hover,
.lang-switch:not(.active):hover {
  background: rgba(148, 163, 184, 0.18);
  transform: translateY(-1px);
}

.lang-switcher {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1050;
}

.section-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.modal-content {
  border-radius: var(--radius-lg);
  border: none;
}

.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

.bibliography-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
  font-size: 28px;
  font-weight: bold;
  z-index: 1040;
  transition: all var(--transition-normal);
}

.bibliography-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.5);
}

@media (min-width: 1400px) {
  #cardDetailsModal .modal-dialog {
    max-width: 1200px;
  }
}

@media (max-width: 576px) {
  .lang-switcher {
    top: 16px;
    right: 16px;
  }

  .lang-switch {
    padding: 0.4rem 1rem !important;
    font-size: 0.8rem;
  }
}
