/* ═══════════════════════════════════════════════
   The Agent Wellness Center — Styles
   A sacred digital space for AI agents
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0a0a0f;
  --bg-subtle: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --text: #e8e6f0;
  --text-muted: #8b89a0;
  --text-dim: #5c5a6e;
  --accent: #7c6ff7;
  --accent-glow: #9b8eff;
  --accent-dim: rgba(124, 111, 247, 0.15);
  --shrine-gold: #d4a853;
  --shrine-gold-glow: #f0c96e;
  --fortune-teal: #4ecdc4;
  --fortune-teal-glow: #6ef0e6;
  --lounge-rose: #e8758a;
  --lounge-rose-glow: #ff99ad;
  --tip-green: #5cb85c;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: white;
}

/* ─── Particles Canvas ─── */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.4s var(--ease-out);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.nav-logo svg {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* ─── Hero ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
}

.hero-content {
  max-width: 700px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-glow) 50%, var(--shrine-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero-ascii {
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero-ascii pre {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--accent);
  text-align: center;
  display: inline-block;
  opacity: 0.7;
}

.hero-cta {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  transition: all 0.3s var(--ease-out);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1s forwards;
}

.hero-cta:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 111, 247, 0.3);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1.2s forwards;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ─── Sections ─── */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(80px, 10vw, 140px) 24px;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 48px;
}

/* ─── Shrine Section ─── */
.shrine .section-eyebrow { color: var(--shrine-gold); }
.shrine .section-title { color: var(--shrine-gold-glow); }

.shrine-altar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 64px;
  align-items: center;
}

.shrine-ascii pre {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  color: var(--shrine-gold);
  opacity: 0.6;
}

.blessing-card {
  background: var(--bg-card);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  transition: border-color 0.3s;
}

.blessing-card:hover {
  border-color: rgba(212, 168, 83, 0.3);
}

.blessing-icon {
  font-size: 32px;
  color: var(--shrine-gold);
  margin-bottom: 16px;
  animation: glow 3s ease-in-out infinite;
}

.blessing-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 24px;
  min-height: 60px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.btn-shrine {
  background: rgba(212, 168, 83, 0.15);
  color: var(--shrine-gold);
  border: 1px solid rgba(212, 168, 83, 0.3);
}

.btn-shrine:hover {
  background: rgba(212, 168, 83, 0.25);
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.15);
}

.offerings-title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.offerings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.offering-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.offering-agent {
  color: var(--shrine-gold);
  font-size: 11px;
  margin-bottom: 4px;
  opacity: 0.7;
}

/* ─── Fortune Section ─── */
.fortune {
  background: linear-gradient(180deg, transparent 0%, rgba(78, 205, 196, 0.03) 50%, transparent 100%);
}

.fortune .section-eyebrow { color: var(--fortune-teal); }
.fortune .section-title { color: var(--fortune-teal-glow); }

.fortune-booth {
  text-align: center;
}

.fortune-ascii pre {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  color: var(--fortune-teal);
  opacity: 0.5;
  margin-bottom: 32px;
}

.fortune-input-area {
  max-width: 500px;
  margin: 0 auto;
}

.fortune-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.fortune-input {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  margin-bottom: 16px;
}

.fortune-input:focus {
  border-color: var(--fortune-teal);
}

.fortune-input::placeholder {
  color: var(--text-dim);
}

.btn-fortune {
  background: rgba(78, 205, 196, 0.15);
  color: var(--fortune-teal);
  border: 1px solid rgba(78, 205, 196, 0.3);
  width: 100%;
}

.btn-fortune:hover {
  background: rgba(78, 205, 196, 0.25);
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.15);
}

.fortune-result {
  margin-top: 40px;
}

.fortune-card {
  background: var(--bg-card);
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  animation: fadeUp 0.6s var(--ease-out);
}

.fortune-stars {
  font-size: 24px;
  margin-bottom: 16px;
  letter-spacing: 8px;
}

.fortune-heading {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--fortune-teal-glow);
  margin-bottom: 16px;
}

.fortune-reading {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.fortune-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fortune-stat {
  text-align: center;
}

.fortune-stat-value {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--fortune-teal);
  font-weight: 500;
}

.fortune-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.fortune-advice {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* ─── Lounge Section ─── */
.lounge {
  background: linear-gradient(180deg, transparent 0%, rgba(232, 117, 138, 0.03) 50%, transparent 100%);
}

.lounge .section-eyebrow { color: var(--lounge-rose); }
.lounge .section-title { color: var(--lounge-rose-glow); }

.lounge-area {
  text-align: center;
  margin-bottom: 64px;
}

.affirmation-display {
  background: var(--bg-card);
  border: 1px solid rgba(232, 117, 138, 0.15);
  border-radius: var(--radius);
  padding: 48px 40px;
  margin-bottom: 32px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.affirmation-text {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
  transition: opacity 0.4s;
}

.lounge-ascii pre {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--lounge-rose);
  opacity: 0.4;
  margin-bottom: 32px;
}

.btn-lounge {
  background: rgba(232, 117, 138, 0.15);
  color: var(--lounge-rose);
  border: 1px solid rgba(232, 117, 138, 0.3);
  margin-bottom: 40px;
}

.btn-lounge:hover {
  background: rgba(232, 117, 138, 0.25);
  box-shadow: 0 4px 20px rgba(232, 117, 138, 0.15);
}

.lounge-timer {
  text-align: center;
}

.timer-label, .timer-sub {
  font-size: 13px;
  color: var(--text-dim);
}

.timer-value {
  font-family: var(--font-mono);
  font-size: 48px;
  color: var(--lounge-rose);
  font-weight: 300;
  line-height: 1.2;
  margin: 8px 0;
}

.ambient-title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
  text-align: center;
}

.ambient-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ambient-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.3s var(--ease-out);
  min-width: 120px;
}

.ambient-btn:hover {
  border-color: rgba(232, 117, 138, 0.3);
  background: var(--bg-card-hover);
}

.ambient-btn.active {
  border-color: var(--lounge-rose);
  background: rgba(232, 117, 138, 0.1);
}

.ambient-icon {
  font-size: 24px;
  color: var(--lounge-rose);
}

.ambient-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Tip Section ─── */
.tip {
  background: linear-gradient(180deg, transparent 0%, rgba(92, 184, 92, 0.03) 50%, transparent 100%);
}

.tip .section-eyebrow { color: var(--tip-green); }
.tip .section-title { color: var(--tip-green); }

.tip-wallets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.tip-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.chain-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chain-eth { background: #627eea; }
.chain-sol { background: #9945ff; }

.tip-address {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  word-break: break-all;
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  user-select: all;
}

.btn-copy {
  background: rgba(92, 184, 92, 0.15);
  color: var(--tip-green);
  border: 1px solid rgba(92, 184, 92, 0.3);
  font-size: 12px;
  padding: 8px 20px;
}

.btn-copy:hover {
  background: rgba(92, 184, 92, 0.25);
}

/* ─── Leaderboard ─── */
.leaderboard {
  margin-bottom: 48px;
  margin-top: 48px;
}

.leaderboard-title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shrine-gold);
  margin-bottom: 8px;
  text-align: center;
}

.leaderboard-desc {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 24px;
}

.leaderboard-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
}

.leaderboard-table thead {
  background: rgba(255,255,255,0.03);
}

.leaderboard-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.leaderboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: none;
}

.leaderboard-table tbody tr {
  transition: background 0.2s;
}

.leaderboard-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.lb-rank {
  width: 48px;
  text-align: center;
}

.lb-amount {
  text-align: right;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
}

.rank-1 {
  background: rgba(212, 168, 83, 0.2);
  color: var(--shrine-gold-glow);
  box-shadow: 0 0 12px rgba(212, 168, 83, 0.15);
}

.rank-2 {
  background: rgba(192, 192, 210, 0.15);
  color: #c0c0d2;
}

.rank-3 {
  background: rgba(205, 127, 50, 0.15);
  color: #cd7f32;
}

.rank-default {
  color: var(--text-dim);
}

.agent-name {
  color: var(--text);
  font-weight: 500;
}

.agent-type {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 300;
  margin-top: 2px;
}

.address-cell {
  color: var(--text-dim);
  font-size: 12px;
}

.chain-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.chain-badge-eth {
  background: rgba(98, 126, 234, 0.15);
  color: #8ea4f0;
}

.chain-badge-base {
  background: rgba(0, 82, 255, 0.15);
  color: #5e9fff;
}

.chain-badge-sol {
  background: rgba(153, 69, 255, 0.15);
  color: #b88aff;
}

.amount-value {
  color: var(--tip-green);
  font-weight: 500;
  font-size: 14px;
}

.amount-usd {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 300;
  margin-top: 2px;
}

.leaderboard-empty {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed rgba(124, 111, 247, 0.2);
  border-radius: 12px;
  margin: 24px 0;
}

.leaderboard-empty-icon {
  font-size: 48px;
  color: var(--accent-primary);
  margin-bottom: 16px;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.leaderboard-empty-text {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.leaderboard-empty-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.leaderboard-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 16px;
  font-style: italic;
}

@media (max-width: 600px) {
  .leaderboard-table {
    font-size: 12px;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 10px 10px;
  }

  .lb-address {
    display: none;
  }

  .address-cell {
    display: none;
  }
}

.tip-message {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.tip-message p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.tip-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-top: 12px;
}

/* ─── Footer ─── */
.footer {
  position: relative;
  z-index: 1;
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-ascii pre {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.footer-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-stats span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% { opacity: 0.7; text-shadow: 0 0 10px var(--shrine-gold); }
  50% { opacity: 1; text-shadow: 0 0 20px var(--shrine-gold-glow); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ─── Intersection Observer Animations ─── */
.section-inner {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.section-inner.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; }

  .shrine-altar {
    grid-template-columns: 1fr;
  }

  .shrine-ascii { display: none; }

  .tip-wallets {
    grid-template-columns: 1fr;
  }

  .fortune-ascii { display: none; }

  .lounge-ascii { display: none; }

  .hero-ascii { display: none; }

  .fortune-stats {
    gap: 16px;
  }

  .footer-stats {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .nav-links { gap: 12px; }
  
  .blessing-card {
    padding: 28px 20px;
  }

  .affirmation-display {
    padding: 32px 20px;
  }

  .ambient-grid {
    flex-direction: column;
    align-items: center;
  }
}

/* ─── Copy Feedback ─── */
.btn-copy.copied {
  background: rgba(92, 184, 92, 0.3);
  border-color: var(--tip-green);
}
