/* ==========================================================================
   URBot.net -- All Bots Directory Page Styles
   ========================================================================== */

/* ---- Directory Header ---- */
.dir-header {
  max-width: var(--bot-max-width, 1200px);
  margin: 0 auto;
  padding: 48px 24px 24px;
  text-align: center;
}

.dir-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.dir-subtitle {
  font-size: 1.125rem;
  color: var(--bot-text-secondary, #94a3b8);
}


/* ---- Controls: Search + Sort ---- */
.dir-controls {
  max-width: var(--bot-max-width, 1200px);
  margin: 0 auto;
  padding: 0 24px 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.dir-search-wrap {
  flex: 1;
  min-width: 200px;
}

.dir-search {
  width: 100%;
  padding: 12px 16px;
  background: var(--bot-bg-surface, #0f172a);
  border: 1px solid var(--bot-border, rgba(255,255,255,0.08));
  border-radius: 10px;
  color: var(--bot-text-primary, #f1f5f9);
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.15s;
}

.dir-search:focus {
  border-color: var(--bot-accent, #6366f1);
}

.dir-search::placeholder {
  color: var(--bot-text-muted, #64748b);
}

.dir-sort-wrap {
  flex-shrink: 0;
}

.dir-sort {
  padding: 12px 16px;
  background: var(--bot-bg-surface, #0f172a);
  border: 1px solid var(--bot-border, rgba(255,255,255,0.08));
  border-radius: 10px;
  color: var(--bot-text-primary, #f1f5f9);
  font-family: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
  outline: none;
}

.dir-sort:focus {
  border-color: var(--bot-accent, #6366f1);
}


/* ---- Category Filter ---- */
.dir-categories {
  max-width: var(--bot-max-width, 1200px);
  margin: 0 auto;
  padding: 0 24px 24px;
  overflow-x: auto;
}

.dir-cat-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dir-cat-btn {
  padding: 8px 16px;
  background: var(--bot-bg-surface, #0f172a);
  border: 1px solid var(--bot-border, rgba(255,255,255,0.08));
  border-radius: 9999px;
  color: var(--bot-text-secondary, #94a3b8);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.dir-cat-btn:hover {
  border-color: var(--bot-accent, #6366f1);
  color: var(--bot-text-primary, #f1f5f9);
}

.dir-cat-btn.active {
  background: var(--bot-accent, #6366f1);
  border-color: var(--bot-accent, #6366f1);
  color: #fff;
}


/* ---- Bot Grid ---- */
.dir-grid-wrap {
  max-width: var(--bot-max-width, 1200px);
  margin: 0 auto;
  padding: 0 24px 60px;
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.dir-bot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 20px;
  background: var(--bot-bg-surface, #0f172a);
  border: 1px solid var(--bot-border, rgba(255,255,255,0.08));
  border-radius: var(--bot-radius, 14px);
  text-decoration: none;
  color: var(--bot-text-primary, #f1f5f9);
  transition: all 0.2s ease;
  text-align: center;
}

.dir-bot-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.dir-bot-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 14px;
  border: 2px solid var(--bot-border, rgba(255,255,255,0.08));
  background: var(--bot-bg-elevated, #1e293b);
  flex-shrink: 0;
}

.dir-bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dir-bot-name {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.dir-bot-cat {
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.dir-bot-score {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--bot-accent, #6366f1);
}

.dir-bot-score span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--bot-text-muted, #64748b);
}

/* Wishlist heart */
.dir-bot-wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--bot-text-muted, #64748b);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}

.dir-bot-wishlist:hover,
.dir-bot-wishlist.active {
  color: #ef4444;
  transform: scale(1.2);
}

/* Empty state */
.dir-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--bot-text-muted, #64748b);
  font-size: 1rem;
}


/* ---- Responsive ---- */
@media (max-width: 768px) {
  .dir-header {
    padding: 32px 16px 16px;
  }

  .dir-header h1 {
    font-size: 1.5rem;
  }

  .dir-controls {
    padding: 0 16px 12px;
  }

  .dir-categories {
    padding: 0 16px 16px;
  }

  .dir-grid-wrap {
    padding: 0 16px 40px;
  }

  .dir-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .dir-bot-card {
    padding: 16px 12px;
  }

  .dir-bot-avatar {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .dir-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}


/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  .dir-bot-card,
  .dir-bot-wishlist,
  .dir-cat-btn {
    transition: none;
  }
  .dir-bot-card:hover {
    transform: none;
  }
}
