/* D&D 5e Reference Scoped Styles */
.dndr-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
  line-height: 1.5;
}

.dndr-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dndr-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px;
}

.dndr-tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}

.dndr-tab-btn:hover {
  color: #dc2626;
}

.dndr-tab-btn.dndr-active-tab {
  color: #b91c1c;
  border-bottom-color: #b91c1c;
}

.dndr-search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dndr-search-input {
  flex: 2;
  min-width: 240px;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  color: inherit;
  background: #ffffff;
}

.dndr-search-input:focus {
  outline: none;
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

.dndr-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.dndr-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dndr-filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dndr-select {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #ffffff;
  color: inherit;
}

.dndr-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #6b7280;
}

.dndr-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dndr-item-card {
  background: #fdfdfd;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #b91c1c;
  border-radius: 8px;
  padding: 18px;
  transition: all 0.15s ease;
}

.dndr-item-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dndr-item-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.dndr-item-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #991b1b;
}

.dndr-item-subtitle {
  font-size: 0.85rem;
  font-style: italic;
  color: #6b7280;
}

.dndr-tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: #fee2e2;
  color: #991b1b;
}

.dndr-stats-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 0;
  margin: 8px 0;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.85rem;
}

.dndr-stat-entry {
  color: #374151;
}

.dndr-stat-entry strong {
  color: #111827;
}

.dndr-desc {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.6;
  margin-top: 8px;
}

.dndr-abilities-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 12px 0;
  text-align: center;
  background: #f8fafc;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.dndr-ability-box {
  display: flex;
  flex-direction: column;
}

.dndr-ab-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
}

.dndr-ab-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

