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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #222;
  min-height: 100vh;
}

/* ─── Auth Bar ────────────────────────────────────────── */
.auth-bar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 24px;
  gap: 8px;
}

.auth-link {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
}

.auth-link:hover {
  color: #222;
}

.auth-link-primary {
  color: #1976d2;
}

.auth-link-primary:hover {
  color: #1565c0;
}

.credit-display {
  font-size: 13px;
  font-weight: 700;
  color: #DAA520;
  margin-right: 8px;
  padding: 3px 8px;
  border: 1px solid #DAA520;
  border-radius: 4px;
}

.auth-email {
  font-size: 13px;
  color: #555;
  margin-right: 4px;
}

/* ─── Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  border-radius: 4px;
  padding: 32px;
  width: 380px;
  max-width: 90vw;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #aaa;
  cursor: pointer;
}

.modal-close:hover {
  color: #222;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #222;
  margin-bottom: 20px;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal input[type="email"],
.modal input[type="password"] {
  padding: 10px 14px;
  border: 2px dashed #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.modal input:focus {
  border-color: #1976d2;
}

.terms-row {
  font-size: 12px;
  color: #888;
}

.terms-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.terms-row a {
  color: #1976d2;
}

.auth-error {
  color: #d32f2f;
  font-size: 13px;
  font-weight: 600;
}

.modal-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #888;
}

/* ─── Claimed Section ────────────────────────────────── */
.claimed-section {
  margin-bottom: 8px;
}

.claimed-title {
  color: #DAA520;
}

.claimed-subtitle {
  color: #B8860B;
  font-size: 13px;
}

.claimed-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
  margin-top: 20px;
}

.claimed-card {
  border: 2px dashed #DAA520;
  border-radius: 4px;
  padding: 18px;
  position: relative;
  background: linear-gradient(135deg, #fffef5 0%, #fff9e6 100%);
}

.claimed-card .wall-card-channel {
  color: #DAA520;
}

.claimed-card .wall-card-label {
  color: #B8860B;
}

/* ─── Claim Icon (on wall cards) ─────────────────────── */
.wall-card-claim {
  position: absolute;
  top: 14px;
  right: 42px;
  cursor: pointer;
  color: #DAA520;
  background: none;
  border: none;
  padding: 4px;
  transition: color 0.15s, transform 0.15s;
}

.wall-card-claim:hover {
  color: #B8860B;
  transform: scale(1.15);
}

.wall-card-claim svg {
  width: 18px;
  height: 18px;
}

.hidden {
  display: none !important;
}

/* ─── Offer Banner ───────────────────────────────────── */
.offer-banner {
  background: #fff;
  border: 2px dashed #1976d2;
  border-radius: 4px;
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  color: #222;
  margin: 20px auto;
  max-width: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.offer-tag {
  background: #1976d2;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.offer-link {
  color: #1976d2;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}

/* ─── Container ──────────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 40px 0 20px;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  color: #222;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 16px;
  color: #1976d2;
  margin-bottom: 20px;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat {
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-icon {
  font-size: 14px;
}

/* ─── Divider ────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 2px dashed #e0e0e0;
  margin: 30px 0;
}

/* ─── Search Section ─────────────────────────────────── */
.search-section {
  max-width: 650px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  align-items: center;
  border: 2px dashed #ddd;
  border-radius: 4px;
  padding: 4px 6px 4px 16px;
  gap: 8px;
  transition: border-color 0.2s;
}

.search-bar:focus-within {
  border-color: #1976d2;
}

.search-icon {
  font-size: 16px;
  color: #999;
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 10px 0;
  font-family: inherit;
  color: #222;
  background: transparent;
}

.search-bar input::placeholder {
  color: #bbb;
}

.btn-bend {
  background: #1976d2;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-bend:hover {
  background: #1565c0;
}

/* ─── Results Section ────────────────────────────────── */
.results-section {
  max-width: 650px;
  margin: 20px auto 0;
}

.results-loading {
  text-align: center;
  padding: 30px 0;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e8e8e8;
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

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

.loading-text {
  font-size: 14px;
  color: #888;
  font-weight: 600;
}

.results-label {
  font-size: 14px;
  color: #888;
  margin-bottom: 14px;
}

.results-label strong {
  color: #222;
}

.bend-card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #2e7d32;
}

.bend-card-score.negative {
  color: #d32f2f;
}

/* ─── Bend Cards Row (results) ───────────────────────── */
.bend-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bend-card {
  background: #fff;
  border: 2px dashed #ddd;
  border-radius: 4px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bend-card:hover {
  border-color: #1976d2;
  box-shadow: 0 2px 12px rgba(25, 118, 210, 0.1);
}

.bend-card-content {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bend-card:hover .bend-card-content {
  opacity: 0;
  transform: scale(0.95);
}

.bend-card h3 {
  font-size: 14px;
  font-weight: 800;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.3;
}

.bend-card ul {
  list-style: none;
  padding: 0;
}

.bend-card li {
  font-size: 12px;
  color: #666;
  padding: 2px 0;
  line-height: 1.4;
}

.bend-card li::before {
  content: "\2192  ";
  color: #1976d2;
  font-weight: 700;
}

/* Hover overlay with 2 icons */
.bend-card-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: rgba(25, 118, 210, 0.06);
  border-radius: 4px;
}

.bend-card:hover .bend-card-hover {
  opacity: 1;
}

.bend-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.bend-action:hover {
  background: rgba(25, 118, 210, 0.12);
}

.bend-action svg {
  width: 22px;
  height: 22px;
  color: #1976d2;
}

.bend-action span {
  font-size: 10px;
  font-weight: 700;
  color: #1976d2;
}

/* Loading state for single card */
.bend-card.loading .bend-card-content {
  opacity: 0.15;
}

.bend-card.loading .bend-card-hover {
  display: none;
}

.bend-card-spinner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.bend-card.loading .bend-card-spinner {
  display: flex;
}

/* ─── Bend Wall ──────────────────────────────────────── */
.bend-wall-section {
  text-align: center;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  color: #222;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
}

.bend-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
}

.wall-empty {
  grid-column: 1 / -1;
  border: 2px dashed #ddd;
  border-radius: 4px;
  padding: 48px 24px;
  text-align: center;
}

.wall-empty p {
  font-size: 15px;
  color: #bbb;
  font-weight: 600;
}

.wall-card {
  border: 2px dashed #ddd;
  border-radius: 4px;
  padding: 18px;
  transition: border-color 0.2s;
  position: relative;
}

.wall-card-download {
  position: absolute;
  top: 14px;
  right: 14px;
  cursor: pointer;
  color: #bbb;
  transition: color 0.15s;
  background: none;
  border: none;
  padding: 4px;
}

.wall-card-download:hover {
  color: #1976d2;
}

.wall-card-download svg {
  width: 20px;
  height: 20px;
}

.wall-card:hover {
  border-color: #1976d2;
}

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

.wall-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: #e0e0e0;
}

.wall-card-channel {
  font-size: 14px;
  font-weight: 700;
  color: #1976d2;
  text-decoration: none;
}

.wall-card-channel:hover {
  text-decoration: underline;
}

.wall-card-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.wall-card-bend {
  font-size: 15px;
  font-weight: 800;
  color: #222;
  margin-bottom: 8px;
}

.wall-card-titles {
  list-style: none;
  padding: 0;
}

.wall-card-titles li {
  font-size: 12px;
  color: #666;
  padding: 2px 0;
}

.wall-card-titles li::before {
  content: "\2192  ";
  color: #1976d2;
  font-weight: 700;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 700px) {
  .bend-cards-row {
    grid-template-columns: 1fr;
  }

  .bend-wall {
    grid-template-columns: 1fr 1fr;
  }

  .hero-title {
    font-size: 36px;
  }

  .stats-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .offer-banner {
    margin: 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .bend-wall {
    grid-template-columns: 1fr;
  }
}
