/* ── Cards ─────────────────────────────────────────────── */

.cards-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%),
    rgba(28, 25, 42, 0.7);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(232, 168, 124, 0.28);
  transform: translateY(-1px);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.badge-green {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.14);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.14);
}

.badge-yellow {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.12);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.12);
}

.badge-magenta {
  background: rgba(217, 70, 239, 0.15);
  color: #e879f9;
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.14);
}

.badge-verified {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.card-explanation {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.genre-badge {
  font-size: 10px;
  font-weight: 500;
  background: rgba(245, 240, 232, 0.08);
  color: var(--text-dim);
  display: inline-block;
  text-transform: none;
  letter-spacing: 0;
}

.pros-cons-table {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.pros-col,
.cons-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pro-item {
  color: #4ade80;
}

.con-item {
  color: #f87171;
}

.card-feedback {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.star-rating {
  display: flex;
  align-items: center;
  gap: 2px;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-dim);
  padding: 0 2px;
  transition: color 0.1s, transform 0.1s;
}

.star-btn:hover,
.star-btn.star-active {
  color: var(--yellow);
}

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

.feedback-saved {
  margin-left: 8px;
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}

.comment-area {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-input {
  font-size: 13px;
  resize: vertical;
}

/* ── Rerank Button ──────────────────────────────────────── */

.rerank-section {
  padding: 16px 0 32px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-rerank {
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-rerank:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(232, 168, 124, 0.24);
  color: var(--text);
}

.btn-rerank:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
