@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(255, 45, 120, 0.3);
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --accent: #ff2d78;
  --accent-glow: rgba(255, 45, 120, 0.15);
  --gold: #ffd700;
  --gold-glow: rgba(255, 215, 0, 0.15);
  --success: #10b981;
  --danger: #ef4444;
  --info: #06b6d4;
  --rarity-common: #9ca3af;
  --rarity-rare: #6366f1;
  --rarity-epic: #a855f7;
  --rarity-legendary: #ffd700;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(255, 45, 120, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(99, 102, 241, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { opacity: 0.85; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; text-decoration: none;
}
.nav-brand-icon { font-size: 24px; }
.nav-brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: 8px; }

.nav-link {
  padding: 8px 16px; border-radius: 8px;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: var(--transition); cursor: pointer;
  border: none; background: none; font-family: inherit;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active { color: var(--accent); }

.nav-hearts {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--gold-glow); border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 20px; font-size: 14px; font-weight: 600; color: var(--gold);
}

.nav-username { font-weight: 500; font-size: 14px; color: var(--text-primary); }

.btn-logout {
  padding: 6px 14px;
  background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444; border-radius: 8px; font-size: 13px;
  cursor: pointer; transition: var(--transition);
}
.btn-logout:hover { background: rgba(239, 68, 68, 0.2); }

/* ============ MAIN ============ */
.main { padding-top: 80px; min-height: 100vh; position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.view { display: none; }
.view.active { display: block; }

/* ============ AUTH ============ */
.auth-container { max-width: 420px; margin: 60px auto; padding: 0 24px; }
.auth-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
}
.auth-title { font-size: 28px; margin-bottom: 8px; text-align: center; }
.auth-subtitle { color: var(--text-secondary); text-align: center; margin-bottom: 32px; font-size: 15px; }

.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.form-input {
  width: 100%; padding: 12px 16px;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-primary);
  font-size: 15px; font-family: 'DM Sans', sans-serif;
  transition: var(--transition); outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder { color: var(--text-muted); }
.form-error { color: var(--danger); font-size: 13px; margin-top: 8px; display: none; }
.form-error.visible { display: block; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border: none; border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition); text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  color: white; box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255, 45, 120, 0.3); }

.btn-secondary { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-card-hover); border-color: var(--border-accent); }

.btn-gold { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #1a1a2e; box-shadow: 0 4px 16px var(--gold-glow); }
.btn-gold:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255, 215, 0, 0.3); }

.btn-danger { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #ef4444; }
.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.25); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-full { width: 100%; }

/* ============ MARKETPLACE ============ */
.marketplace-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 32px;
}
.marketplace-title { font-size: 32px; }
.marketplace-title span { color: var(--accent); }

.marketplace-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text-secondary); font-size: 13px;
  font-weight: 500; cursor: pointer; transition: var(--transition); font-family: inherit;
}
.filter-btn:hover, .filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.gf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-bottom: 60px;
}

/* ============ GIRLFRIEND CARD — SEDUCTIVE IMAGE CARDS ============ */
.gf-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}
.gf-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--border-accent);
  box-shadow: 0 16px 48px rgba(255, 45, 120, 0.15);
}

/* Full-bleed image area */
.gf-card-image {
  width: 100%;
  height: 320px;
  position: relative;
  overflow: hidden;
}
.gf-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}
.gf-card:hover .gf-card-image img {
  transform: scale(1.05);
}

/* Personality badge on image */
.personality-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
  z-index: 2;
}

/* Personality badge colors — each archetype gets a unique vibe */
.personality-tsundere { background: rgba(236, 72, 153, 0.85); color: white; }
.personality-yandere { background: rgba(220, 38, 38, 0.85); color: white; }
.personality-kuudere { background: rgba(99, 102, 241, 0.85); color: white; }
.personality-genki { background: rgba(34, 197, 94, 0.85); color: white; }
.personality-flirty { background: rgba(6, 182, 212, 0.85); color: white; }
.personality-dominant { background: rgba(245, 158, 11, 0.85); color: #1a1a2e; }
.personality-nurturing { background: rgba(16, 185, 129, 0.85); color: white; }
.personality-dark { background: rgba(75, 85, 99, 0.85); color: white; }
.personality-dandere { background: rgba(249, 115, 22, 0.85); color: white; }
.personality-wild { background: rgba(168, 85, 247, 0.85); color: white; }
.personality-mysterious { background: rgba(99, 102, 241, 0.85); color: white; }
.personality-sophisticated { background: rgba(14, 165, 233, 0.85); color: white; }
.personality-default { background: rgba(255, 45, 120, 0.85); color: white; }

/* Small personality badge for chat header */
.personality-badge-sm {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
.personality-badge-sm.personality-tsundere { background: rgba(236, 72, 153, 0.2); color: #ec4899; }
.personality-badge-sm.personality-yandere { background: rgba(220, 38, 38, 0.2); color: #ef4444; }
.personality-badge-sm.personality-kuudere { background: rgba(99, 102, 241, 0.2); color: #6366f1; }
.personality-badge-sm.personality-genki { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.personality-badge-sm.personality-flirty { background: rgba(6, 182, 212, 0.2); color: #06b6d4; }
.personality-badge-sm.personality-dominant { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.personality-badge-sm.personality-nurturing { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.personality-badge-sm.personality-dark { background: rgba(75, 85, 99, 0.2); color: #9ca3af; }
.personality-badge-sm.personality-dandere { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.personality-badge-sm.personality-wild { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.personality-badge-sm.personality-mysterious { background: rgba(99, 102, 241, 0.2); color: #6366f1; }
.personality-badge-sm.personality-sophisticated { background: rgba(14, 165, 233, 0.2); color: #0ea5e9; }
.personality-badge-sm.personality-default { background: rgba(255, 45, 120, 0.2); color: var(--accent); }

/* Rarity badge positioned on card image */
.card-rarity {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.gf-card-body { padding: 16px 20px 20px; }

.gf-card-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: 'Space Grotesk', sans-serif;
}

.gf-card-tagline {
  color: var(--text-secondary);
  font-size: 13px;
  font-style: italic;
  margin-bottom: 12px;
  line-height: 1.4;
}

.gf-card-traits { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.trait-tag {
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gf-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.gf-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.gf-status.available { color: var(--success); }
.gf-status.taken { color: var(--accent); }

.gf-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.gf-status.available .gf-status-dot { background: var(--success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.gf-status.taken .gf-status-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

.gf-card-stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.gf-card-stats span { display: flex; align-items: center; gap: 3px; }

/* Rarity border glow */
.gf-card[data-rarity="rare"] { border-color: rgba(99, 102, 241, 0.3); }
.gf-card[data-rarity="rare"]:hover { box-shadow: 0 16px 48px rgba(99, 102, 241, 0.2); }
.gf-card[data-rarity="epic"] { border-color: rgba(168, 85, 247, 0.3); }
.gf-card[data-rarity="epic"]:hover { box-shadow: 0 16px 48px rgba(168, 85, 247, 0.2); }
.gf-card[data-rarity="legendary"] { border-color: rgba(255, 215, 0, 0.4); }
.gf-card[data-rarity="legendary"]:hover { box-shadow: 0 16px 48px rgba(255, 215, 0, 0.25); }
.gf-card[data-rarity="legendary"]::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 170, 0, 0.1), rgba(255, 215, 0, 0.3));
  z-index: -1;
  animation: legendaryShimmer 3s ease infinite;
}
@keyframes legendaryShimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.rarity-badge {
  padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.rarity-common { background: rgba(156, 163, 175, 0.15); color: var(--rarity-common); }
.rarity-rare { background: rgba(99, 102, 241, 0.15); color: var(--rarity-rare); }
.rarity-epic { background: rgba(168, 85, 247, 0.15); color: var(--rarity-epic); }
.rarity-legendary { background: rgba(255, 215, 0, 0.15); color: var(--rarity-legendary); border: 1px solid rgba(255, 215, 0, 0.3); }

/* ============ PROFILE VIEW ============ */
.profile-hero {
  display: flex; gap: 32px; align-items: flex-start;
  margin-bottom: 40px; flex-wrap: wrap;
}

.profile-image-container {
  width: 320px;
  height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  border: 1px solid var(--border);
}
.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.profile-image-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px;
  display: flex;
  align-items: flex-end;
  min-height: 80px;
}
.profile-image-badges {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.profile-image-badges .personality-badge {
  position: static;
}

.profile-info { flex: 1; min-width: 280px; }

.profile-name {
  font-size: 36px; margin-bottom: 4px;
  display: flex; align-items: center; gap: 12px;
}

.profile-tagline {
  color: var(--text-secondary);
  font-style: italic; font-size: 16px;
  margin-bottom: 16px;
}

.profile-personality-section {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.profile-personality-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.profile-personality {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 14px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px; margin-bottom: 20px;
}

.stat-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px; font-weight: 700; color: var(--text-primary);
}
.stat-label {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px;
}

.profile-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.profile-owner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--accent-glow); border: 1px solid rgba(255, 45, 120, 0.2);
  border-radius: 10px; font-size: 14px; margin-bottom: 16px;
}
.profile-owner .owner-label { color: var(--text-secondary); }
.profile-owner .owner-name { color: var(--accent); font-weight: 600; }

/* ============ CHAT ============ */
.chat-container {
  max-width: 800px; margin: 0 auto;
  display: flex; flex-direction: column;
  height: calc(100vh - 100px);
}

.chat-header {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.chat-header-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.chat-header-info h3 { font-size: 18px; }
.chat-header-info span { font-size: 13px; color: var(--text-secondary); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px 0;
  display: flex; flex-direction: column; gap: 12px;
}

.chat-msg {
  max-width: 75%; padding: 12px 18px;
  border-radius: 18px; font-size: 14px;
  line-height: 1.5; animation: msgIn 0.3s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  color: white; border-bottom-right-radius: 4px;
}
.chat-msg.assistant {
  align-self: flex-start;
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-primary); border-bottom-left-radius: 4px;
}
.chat-msg-time { font-size: 10px; color: rgba(255, 255, 255, 0.5); margin-top: 4px; }
.chat-msg.assistant .chat-msg-time { color: var(--text-muted); }

.chat-input-container {
  display: flex; gap: 12px; padding: 16px 0;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1; padding: 14px 20px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 24px; color: var(--text-primary);
  font-size: 14px; font-family: inherit;
  outline: none; transition: var(--transition);
}
.chat-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.chat-send-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  border: none; color: white; font-size: 18px;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover:not(:disabled) { transform: scale(1.05); }
.chat-send-btn:disabled { opacity: 0.5; }

.chat-typing {
  align-self: flex-start;
  padding: 12px 18px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 18px; border-bottom-left-radius: 4px;
  display: none;
}
.chat-typing.visible { display: flex; gap: 4px; align-items: center; }

.typing-dot {
  width: 6px; height: 6px;
  background: var(--text-muted); border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ============ LEADERBOARD ============ */
.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px; margin-bottom: 60px;
}
.lb-section {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.lb-section-title {
  font-size: 18px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.lb-list { list-style: none; }
.lb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.lb-item:last-child { border-bottom: none; }

.lb-rank {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: var(--bg-card); color: var(--text-secondary); flex-shrink: 0;
}
.lb-rank.gold { background: var(--gold-glow); color: var(--gold); }
.lb-rank.silver { background: rgba(192, 192, 192, 0.15); color: #c0c0c0; }
.lb-rank.bronze { background: rgba(205, 127, 50, 0.15); color: #cd7f32; }

.lb-item-info { flex: 1; min-width: 0; }
.lb-item-name {
  font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-item-sub { font-size: 12px; color: var(--text-muted); }
.lb-item-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}

.activity-list { max-height: 500px; overflow-y: auto; }
.activity-item {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; line-height: 1.5;
}
.activity-item:last-child { border-bottom: none; }
.activity-time { color: var(--text-muted); font-size: 11px; margin-top: 4px; }
.activity-type { font-weight: 600; }
.activity-type.claim { color: var(--success); }
.activity-type.steal { color: var(--accent); }
.activity-type.steal_failed { color: var(--text-muted); }

/* ============ COLLECTION ============ */
.dashboard-header { margin-bottom: 32px; }
.dashboard-header h2 { font-size: 28px; margin-bottom: 8px; }

.dashboard-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px; margin-bottom: 32px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.collection-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: center; gap: 16px;
  transition: var(--transition); cursor: pointer;
}
.collection-card:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }

.collection-avatar {
  width: 64px; height: 64px;
  border-radius: 50%; flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--border);
}
.collection-info { flex: 1; min-width: 0; }
.collection-name { font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.collection-personality {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 2px;
}
.collection-sub { font-size: 12px; color: var(--text-secondary); }
.collection-actions { display: flex; gap: 8px; }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; color: var(--text-primary); }

/* ============ TOAST ============ */
.toast-container {
  position: fixed; top: 80px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 14px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
  max-width: 400px; box-shadow: var(--shadow);
}
.toast.success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--success); }
.toast.error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }
.toast.info { background: rgba(6, 182, 212, 0.15); border: 1px solid rgba(6, 182, 212, 0.3); color: var(--info); }

@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(20px); } }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; display: none;
}
.modal-overlay.visible { display: flex; }

.modal {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  max-width: 480px; width: 100%;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal h3 { font-size: 22px; margin-bottom: 12px; }
.modal p { color: var(--text-secondary); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ============ LOADING ============ */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border); border-top: 3px solid var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-container { display: flex; justify-content: center; padding: 60px 0; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .nav-links { gap: 4px; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .nav-brand-text { display: none; }
  .container { padding: 0 16px; }
  .marketplace-title { font-size: 24px; }

  .gf-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .gf-card-image { height: 260px; }

  .profile-hero { flex-direction: column; align-items: center; text-align: center; }
  .profile-image-container { width: 100%; max-width: 400px; height: 380px; }
  .profile-actions { justify-content: center; }

  .leaderboard-grid { grid-template-columns: 1fr; }
  .chat-msg { max-width: 85%; }
}

@media (max-width: 480px) {
  .gf-grid { grid-template-columns: 1fr; }
  .gf-card-image { height: 300px; }
  .auth-card { padding: 24px; }
  .nav-hearts { display: none; }
  .collection-grid { grid-template-columns: 1fr; }
}
