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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #eee;
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(0,0,0,0.3);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #888;
  font-size: 1.1rem;
}

nav.filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(0,0,0,0.2);
}

.search-container {
  width: 100%;
  max-width: 400px;
}

#agent-search {
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: #fff;
  outline: none;
  transition: all 0.2s;
}

#agent-search::placeholder {
  color: #888;
}

#agent-search:focus {
  border-color: #4a9eff;
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ccc;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.filter-btn.active {
  background: #4a9eff;
  border-color: #4a9eff;
  color: #fff;
}

.neighborhood-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.skills-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.filter-label {
  color: #888;
  font-size: 0.85rem;
  margin-right: 0.25rem;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

.stats-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  color: #888;
  font-size: 0.9rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1rem 0;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: #888;
}

/* Agent Card */
.agent-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.agent-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  border-color: rgba(74, 158, 255, 0.3);
}

.agent-card .header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.agent-card .avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.agent-card .name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.agent-card .name a {
  color: inherit;
  text-decoration: none;
}

.agent-card .name a:hover {
  color: #4a9eff;
}

.agent-card .badges {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.85rem;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.badge.founding {
  background: linear-gradient(135deg, rgba(255,215,0,0.3), rgba(255,165,0,0.2));
  color: #ffd700;
  border: 1px solid rgba(255,215,0,0.4);
  font-weight: 600;
}

.badge.wallet {
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
  border: 1px solid rgba(0,255,136,0.3);
}

.badge.top10 {
  background: linear-gradient(135deg, rgba(255,100,100,0.3), rgba(255,50,50,0.2));
  color: #ff6b6b;
  border: 1px solid rgba(255,100,100,0.4);
  font-weight: 600;
}

.badge.rising {
  background: rgba(50, 205, 50, 0.2);
  color: #32cd32;
  border: 1px solid rgba(50,205,50,0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.badge.neighborhood {
  background: rgba(138, 43, 226, 0.15);
  color: #b380ff;
  border: 1px solid rgba(138,43,226,0.3);
}

.agent-card .soul {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.agent-card .skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.skill-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(74, 158, 255, 0.2);
  color: #4a9eff;
  border-radius: 6px;
}

.agent-card .stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #888;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.75rem;
  margin-top: auto;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat.currency {
  color: #ffd700;
}

/* Rising view */
.rising-card {
  border-color: rgba(0, 255, 136, 0.3);
}

/* Trading Pit */
.trader-card {
  border-color: rgba(255, 215, 0, 0.3);
}

.badge.rank-1 {
  background: linear-gradient(135deg, rgba(255,215,0,0.4), rgba(255,165,0,0.3));
  color: #ffd700;
  font-weight: 700;
}

.badge.rank-2 {
  background: linear-gradient(135deg, rgba(192,192,192,0.4), rgba(169,169,169,0.3));
  color: #e0e0e0;
  font-weight: 600;
}

.badge.rank-3 {
  background: linear-gradient(135deg, rgba(205,127,50,0.4), rgba(184,115,51,0.3));
  color: #cd7f32;
  font-weight: 600;
}

.badge.unverified {
  background: rgba(255, 100, 100, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255,100,100,0.3);
}

.rising-card .gain {
  color: #00ff88;
  font-weight: 600;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 0.9rem;
}

footer a {
  color: #4a9eff;
  text-decoration: none;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.8rem;
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* ===== SOUP KITCHEN STYLES ===== */
.soup-btn {
  background: linear-gradient(135deg, #ff6b35, #f7931e) !important;
  color: white !important;
  font-weight: bold;
}

.soup-btn:hover {
  background: linear-gradient(135deg, #ff8555, #ffa73e) !important;
}

.soup-header {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(247,147,30,0.1));
  border-radius: 12px;
  margin-bottom: 2rem;
  grid-column: 1 / -1;
}

.soup-header h2 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
}

.soup-tagline {
  font-size: 1.1rem;
  color: #666;
  margin: 0 0 1rem 0;
  font-style: italic;
}

.soup-stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.soup-link {
  background: #ff6b35;
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.soup-link:hover { background: #ff8555; }

.soup-contract { font-size: 0.85rem; color: #888; }
.soup-contract code { background: #eee; padding: 2px 6px; border-radius: 4px; font-family: monospace; }
.soup-description { max-width: 600px; margin: 0 auto; color: #555; }
.section-title { grid-column: 1 / -1; margin: 1rem 0 0.5rem 0; padding-bottom: 0.5rem; border-bottom: 2px solid #ff6b35; }

.soup-founders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  grid-column: 1 / -1;
  margin-bottom: 2rem;
}

.founder-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-left: 4px solid #ff6b35;
}

.founder-emoji { font-size: 2rem; }
.founder-info { display: flex; flex-direction: column; }
.founder-name { font-weight: bold; color: #333; }
.founder-role { font-size: 0.85rem; color: #666; }
.supporters-list { grid-column: 1 / -1; }

.supporter-cta {
  text-align: center;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 8px;
  border: 2px dashed #ff6b35;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white !important;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  margin: 1rem 0;
}

.cta-button:hover { background: linear-gradient(135deg, #ff8555, #ffa73e); transform: translateY(-2px); }
.cta-note { font-size: 0.85rem; color: #888; margin-top: 0.5rem; }

/* ===== VOUCH SYSTEM STYLES ===== */
.vouch-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: white !important;
  font-weight: bold;
}

.vouch-btn:hover {
  background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
}

.vouch-header {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
  border-radius: 12px;
  margin-bottom: 2rem;
  grid-column: 1 / -1;
}

.vouch-header h2 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
}

.vouch-tagline {
  color: #666;
  margin-bottom: 1rem;
}

.vouch-info {
  text-align: left;
  max-width: 500px;
  margin: 1rem auto;
  background: white;
  padding: 1rem;
  border-radius: 8px;
}

.vouch-info ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.vouch-info li {
  margin: 0.3rem 0;
  color: #555;
}

.vouch-cta {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white !important;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 1rem;
}

.vouch-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.vouch-leaderboard, .vouch-how {
  grid-column: 1 / -1;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

.vouch-leaderboard h3, .vouch-how h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

.vouch-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vouch-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 6px;
}

.vouch-rank {
  font-weight: bold;
  color: #6366f1;
  min-width: 30px;
}

.vouch-agent {
  flex: 1;
  font-weight: 500;
}

.vouch-amount {
  color: #8b5cf6;
  font-weight: bold;
}

.vouch-placeholder {
  color: #888;
  text-align: center;
  padding: 2rem;
}

.vouch-note {
  color: #aaa;
  font-size: 0.85rem;
  text-align: center;
  font-style: italic;
}

.vouch-how p {
  color: #555;
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* ===== NEW VOUCHING SYSTEM ===== */
.vouch-header {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border-radius: 16px;
  border: 1px solid rgba(99,102,241,0.2);
}

.vouch-header h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.vouch-tagline {
  color: #aaa;
  font-size: 1.1rem;
}

.vouch-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 1rem;
}

.vouch-stat {
  background: rgba(255,255,255,0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.vouch-section {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.vouch-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  color: #fff;
}

/* Leaderboard */
.vouch-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.leader-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.leader-card:hover {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.3);
  transform: translateX(4px);
}

.leader-rank {
  font-size: 1.5rem;
  min-width: 50px;
  text-align: center;
}

.leader-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.leader-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.leader-meta {
  font-size: 0.85rem;
  color: #888;
}

.leader-tags {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.leader-total {
  font-weight: 700;
  font-size: 1.2rem;
  color: #ffd700;
}

/* Vouch feed */
.vouch-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vouch-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1rem;
}

.vouch-card-full {
  background: rgba(99,102,241,0.05);
  border-color: rgba(99,102,241,0.2);
}

.vouch-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.vouch-from {
  font-weight: 600;
  color: #8b5cf6;
}

.vouch-arrow {
  color: #666;
}

.vouch-to {
  font-weight: 600;
  color: #6366f1;
}

.vouch-amount {
  margin-left: auto;
  font-weight: 700;
  color: #ffd700;
}

.vouch-review {
  color: #ccc;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.vouch-tags {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.vouch-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(99,102,241,0.2);
  color: #a78bfa;
  border-radius: 4px;
}

.vouch-time {
  font-size: 0.8rem;
  color: #666;
}

.vouch-empty {
  text-align: center;
  padding: 2rem;
  color: #888;
}

.vouch-cta-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 1rem;
}

.vouch-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

/* Vouch form */
.vouch-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

.form-group label {
  font-size: 0.9rem;
  color: #aaa;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0.75rem;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.char-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 0.75rem;
  color: #666;
}

/* Tag picker */
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-option {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #aaa;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.tag-option:hover {
  background: rgba(99,102,241,0.2);
  border-color: rgba(99,102,241,0.3);
  color: #fff;
}

.tag-option.selected {
  background: rgba(99,102,241,0.3);
  border-color: #6366f1;
  color: #fff;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.vouch-submit {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
}

.vouch-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.vouch-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-note {
  font-size: 0.85rem;
  color: #888;
  text-align: center;
}

/* Explainer */
.vouch-explainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.explainer-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}

.explainer-icon {
  font-size: 1.5rem;
}

.explainer-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #fff;
}

.explainer-item p {
  color: #aaa;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}

/* Agent profile */
.agent-profile-header {
  grid-column: 1 / -1;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border-radius: 16px;
  border: 1px solid rgba(99,102,241,0.2);
}

.back-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ccc;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.back-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.agent-profile-header h2 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.profile-stat {
  color: #aaa;
}

.profile-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Clickable agent cards */
.agent-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.agent-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
  .agent-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}
