/* ==================================================================
   HARECLAW - Trading Terminal Design System
   Direction: Warm Industrial + Data Brutalism
   
   COLOR PALETTE QUICK REFERENCE:
   - Teal/Seafoam: --seafoam-400 hsl(172, 27%, 46%) - market cap, success
   - Gold/Sand:    --sand-300    hsl(32, 27%, 64%)  - agent fees, secondary
   - Red/Lobster:  --lobster-400 hsl(9, 44%, 54%)   - token count, primary accent
   - Blue:         --blue-400    hsl(210, 24%, 52%) - volume, info
   ================================================================== */

/* Local Font Faces */
@font-face {
  font-family: 'Arcon Rounded';
  src: url('/fonts/Arcon-Rounded-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'VCR OSD Mono';
  src: url('/fonts/vcr-osd-mono.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Reset & Base */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

/* Design Tokens */
:root {
  /* === Color System === */
  /* Neutral scale - warm charcoal tinted toward the coral/red (desaturated) */
  --neutral-950: hsl(12, 6%, 5%);
  --neutral-900: hsl(12, 5%, 8%);
  --neutral-850: hsl(12, 4%, 11%);
  --neutral-800: hsl(12, 4%, 15%);
  --neutral-700: hsl(12, 3%, 22%);
  --neutral-600: hsl(12, 2%, 32%);
  --neutral-500: hsl(12, 2%, 44%);
  --neutral-400: hsl(12, 3%, 56%);
  --neutral-300: hsl(12, 4%, 70%);
  --neutral-200: hsl(12, 5%, 82%);
  --neutral-100: hsl(12, 6%, 90%);
  --neutral-50: hsl(12, 8%, 96%);
  
  /* Primary accent - Lobster Red/Coral (desaturated 15% more) */
  --lobster-50: hsl(12, 55%, 96%);
  --lobster-100: hsl(12, 49%, 88%);
  --lobster-200: hsl(11, 44%, 76%);
  --lobster-300: hsl(10, 41%, 64%);
  --lobster-400: hsl(9, 44%, 54%);
  --lobster-500: hsl(8, 41%, 46%);
  --lobster-600: hsl(6, 37%, 38%);
  --lobster-700: hsl(4, 34%, 30%);
  
  /* Secondary accent - Warm Sand/Cream (desaturated 15% more) */
  --sand-50: hsl(38, 38%, 96%);
  --sand-100: hsl(36, 34%, 88%);
  --sand-200: hsl(34, 31%, 76%);
  --sand-300: hsl(32, 27%, 64%);
  --sand-400: hsl(30, 26%, 54%);
  --sand-500: hsl(28, 24%, 46%);
  
  /* Success - Muted Seafoam/Teal (desaturated 15% more) */
  --seafoam-400: hsl(172, 27%, 46%);
  --seafoam-500: hsl(172, 29%, 38%);
  --seafoam-600: hsl(172, 31%, 30%);
  
  /* Info - Muted Slate Blue (desaturated 15% more) */
  --blue-400: hsl(210, 24%, 52%);
  --blue-500: hsl(210, 27%, 44%);
  
  /* Semantic colors */
  --bg-primary: var(--neutral-950);
  --bg-secondary: var(--neutral-900);
  --bg-elevated: var(--neutral-850);
  --bg-card: var(--neutral-800);
  
  --text-primary: var(--neutral-100);
  --text-secondary: var(--neutral-400);
  --text-muted: var(--neutral-500);
  --text-inverse: var(--neutral-950);
  
  --border-subtle: var(--neutral-800);
  --border-default: var(--neutral-700);
  --border-strong: var(--neutral-600);
  
  --accent-primary: var(--lobster-400);
  --accent-primary-hover: var(--lobster-300);
  --accent-primary-muted: var(--lobster-500);
  --accent-secondary: var(--sand-300);
  --accent-success: var(--seafoam-400);
  --accent-info: var(--blue-400);
  
  /* === Typography === */
  --font-main: 'Arcon Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'VCR OSD Mono', 'Courier New', monospace;
  
  /* Type scale (bumped up 2 sizes) */
  --text-xs: 0.875rem;     /* 14px */
  --text-sm: 1rem;         /* 16px */
  --text-base: 1.125rem;   /* 18px */
  --text-lg: 1.375rem;     /* 22px */
  --text-xl: 1.625rem;     /* 26px */
  --text-2xl: 2rem;        /* 32px */
  --text-3xl: 2.5rem;      /* 40px */
  --text-4xl: 3rem;        /* 48px */
  
  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Line heights */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  
  /* Letter spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-wider: 0.05em;
  
  /* === Spacing (scaled up slightly) === */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.875rem;   /* 14px */
  --space-4: 1.125rem;   /* 18px */
  --space-5: 1.5rem;     /* 24px */
  --space-6: 1.75rem;    /* 28px */
  --space-8: 2.25rem;    /* 36px */
  --space-10: 3rem;      /* 48px */
  --space-12: 3.5rem;    /* 56px */
  --space-16: 4.5rem;    /* 72px */
  --space-20: 6rem;      /* 96px */
  
  /* === Effects === */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-2xl: 18px;
  
  --shadow-sm: 0 1px 2px hsla(12, 6%, 5%, 0.4);
  --shadow-md: 0 4px 12px hsla(12, 6%, 5%, 0.5);
  --shadow-lg: 0 8px 24px hsla(12, 6%, 5%, 0.6);
  --shadow-glow-primary: 0 0 20px hsla(9, 52%, 54%, 0.15);
  --shadow-glow-success: 0 0 20px hsla(172, 32%, 46%, 0.12);
  
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 350ms ease-out;
}

/* === Base Styles === */
html {
  scroll-behavior: smooth;
}

body { 
  font-family: var(--font-main);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fine grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--neutral-700);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-600);
}

/* Selection */
::selection {
  background: hsla(9, 50%, 54%, 0.2);
  color: var(--text-primary);
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--lobster-400);
  outline-offset: 2px;
}

/* === Migration Banner === */
.migration-banner {
  display: block;
  background: linear-gradient(135deg, hsl(45, 90%, 45%) 0%, hsl(35, 90%, 50%) 100%);
  padding: var(--space-3) var(--space-4);
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.migration-banner-text {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--neutral-950);
  letter-spacing: 0.05em;
}

/* === Header === */
header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-3) var(--space-4);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.logo-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 8px hsla(9, 52%, 54%, 0.3));
}

.logo > div {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.logo-text {
  color: var(--lobster-400);
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  letter-spacing: 0.02em;
}

.logo-beta {
  color: var(--sand-300);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  opacity: 0.9;
}

.header-tagline {
  color: var(--text-muted);
  font-size: var(--text-sm);
  display: none;
}

.header-tagline .agent-only {
  color: var(--lobster-300);
  font-weight: var(--font-semibold);
}

@media (min-width: 768px) {
  .header-tagline { display: block; }
}

/* === Alert Banner === */
.alert-banner {
  background: linear-gradient(90deg, var(--lobster-600), var(--lobster-500));
  color: var(--neutral-50);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
}

.alert-banner .alert-icon {
  font-size: var(--text-lg);
}

/* === Stats Bar === */
.stats-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-5) var(--space-4);
}

.stats {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
}

.stats > div {
  text-align: center;
  min-width: 120px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

.stat-value.teal { color: var(--seafoam-400); }
.stat-value.gold { color: var(--sand-300); }
.stat-value.red { color: var(--lobster-400); }
.stat-value.blue { color: var(--blue-400); }
.stat-value.purple { color: hsl(270, 30%, 58%); }

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-top: var(--space-1);
}

/* === Hero Section === */
.hero {
  background: var(--bg-secondary);
  padding: var(--space-12) var(--space-4) var(--space-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient overlay */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 0%, hsla(9, 52%, 54%, 0.045), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, hsla(172, 32%, 46%, 0.025), transparent);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-icon {
  font-size: 84px;
  margin-bottom: var(--space-8);
  display: inline-block;
  filter: drop-shadow(0 0 40px hsla(9, 52%, 54%, 0.25));
  animation: subtleFloat 4s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-main);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

.hero h1 span {
  color: var(--accent-primary);
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: var(--text-3xl);
  }
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  max-width: 480px;
  margin: 0 auto var(--space-8);
}

.hero-subtitle .source-link {
  color: var(--lobster-300);
  text-decoration: none;
  font-weight: var(--font-medium);
  transition: color var(--transition-fast);
}

.hero-subtitle .source-link:hover {
  color: var(--lobster-200);
  text-decoration: underline;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

/* Primary - Lobster red filled */
.btn-primary {
  background: var(--lobster-400);
  color: var(--neutral-50);
  border-color: var(--lobster-400);
}

.btn-primary:hover {
  background: var(--lobster-300);
  border-color: var(--lobster-300);
  box-shadow: var(--shadow-glow-primary);
}

/* Secondary - Ghost with border */
.btn-secondary {
  background: transparent;
  color: var(--neutral-400);
  border-color: var(--neutral-600);
}

.btn-secondary:hover {
  color: var(--neutral-200);
  border-color: var(--neutral-500);
  background: var(--neutral-800);
}

/* Teal - Success/Trade action */
.btn-teal {
  background: var(--seafoam-500);
  color: var(--neutral-50);
  border-color: var(--seafoam-500);
}

.btn-teal:hover {
  background: var(--seafoam-400);
  border-color: var(--seafoam-400);
  box-shadow: var(--shadow-glow-success);
}

/* Telegram - uses blue from palette */
.btn-telegram {
  background: var(--blue-500);
  color: #fff !important;
  border-color: var(--blue-500);
}

.btn-telegram:hover {
  background: var(--blue-400);
  border-color: var(--blue-400);
  color: #fff !important;
}

/* Blue button - uses blue from palette */
.btn-blue {
  background: var(--blue-500);
  color: #fff;
  border-color: var(--blue-500);
}

.btn-blue:hover {
  background: var(--blue-400);
  border-color: var(--blue-400);
  color: #fff;
}

/* Green/Teal button - uses seafoam from palette */
.btn-green {
  background: var(--seafoam-500);
  color: #fff;
  border-color: var(--seafoam-500);
}

.btn-green:hover {
  background: var(--seafoam-400);
  border-color: var(--seafoam-400);
  color: #fff;
}

/* === Token Highlight Card (Platform Token) === */
.token-highlight-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 560px;
  margin: 0 auto var(--space-6);
  text-align: center;
  position: relative;
}

/* Subtle accent glow */
.token-highlight-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, var(--lobster-500), var(--seafoam-500));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.4;
  pointer-events: none;
}

.token-highlight-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.token-highlight-symbol {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--lobster-300);
}

.token-highlight-label {
  color: var(--lobster-300);
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

.token-highlight-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  background: var(--bg-card);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.token-highlight-address code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  word-break: break-all;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-base);
  padding: var(--space-1);
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.copy-btn:hover {
  opacity: 1;
}

.token-highlight-links {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* === Quick Start Card === */
.quick-start-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.quick-start-card h3 {
  font-family: var(--font-main);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-5);
}

.launch-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.launch-bullets li {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  padding-left: var(--space-6);
  position: relative;
  line-height: var(--leading-relaxed);
}

.launch-bullets li::before {
  content: "→";
  font-family: var(--font-mono);
  color: var(--lobster-400);
  font-weight: var(--font-bold);
  position: absolute;
  left: 0;
}

.jump-link {
  display: inline-block;
  margin-top: var(--space-6);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.jump-link:hover {
  color: var(--lobster-300);
}

/* === Main Content === */
main {
  flex: 1;
  padding: var(--space-8) var(--space-4);
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* === Grid Layout === */
.content-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 340px;
  }
}

/* === Cards === */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  background: var(--bg-card);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.card-header h2 {
  font-family: var(--font-main);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.card-header .badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--lobster-300);
  font-weight: var(--font-medium);
}

.card-body {
  padding: var(--space-5);
}

/* Live indicator */
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--seafoam-400);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px var(--seafoam-400);
}

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

/* === Token List === */
.token-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.token-list-scroll {
  max-height: 680px;
  overflow-y: auto;
  padding-right: var(--space-2);
}

.token-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.token-card:hover {
  border-color: var(--border-default);
  background: hsl(25, 4%, 17%);
}

.token-info {
  flex: 1;
  min-width: 0;
}

.token-symbol {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--lobster-300);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.token-name {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.token-agent {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.token-description-wrapper {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.token-description {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.token-card.expanded .token-description {
  white-space: normal;
  max-width: none;
}

.token-expand-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--text-xs);
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.token-expand-btn:hover {
  opacity: 1;
}

.token-links {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.token-link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  background: transparent;
  color: var(--neutral-400);
  border: 1px solid var(--neutral-600);
}

.token-link:hover {
  color: var(--neutral-200);
  border-color: var(--neutral-500);
  background: var(--neutral-800);
}

.token-link.primary {
  background: var(--lobster-400);
  color: var(--neutral-50);
  border-color: var(--lobster-400);
}

.token-link.primary:hover {
  background: var(--lobster-300);
  border-color: var(--lobster-300);
}

/* === Token Controls (Sort + Filter) === */
.token-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.sort-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.sort-btn {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.sort-btn:hover {
  border-color: var(--border-default);
  color: var(--text-primary);
}

.sort-btn.active {
  background: var(--lobster-400);
  border-color: var(--lobster-400);
  color: var(--neutral-50);
}

/* === Filter Dropdown === */
.filter-dropdown {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.source-filter {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  padding: var(--space-2) var(--space-3);
  padding-right: var(--space-8);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5L6 8L9 5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.source-filter:hover {
  border-color: var(--border-default);
  color: var(--text-primary);
}

.source-filter:focus {
  outline: none;
  border-color: var(--lobster-400);
}

@media (max-width: 640px) {
  .token-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .source-filter {
    width: 100%;
  }
}

/* === Source Badges === */
.source-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--font-semibold);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  vertical-align: middle;
}

.source-badge.moltbook {
  background: hsla(215, 40%, 50%, 0.15);
  color: hsl(215, 40%, 62%);
  border: 1px solid hsla(215, 40%, 50%, 0.25);
}



.source-badge.moltx {
  background: hsla(28, 50%, 50%, 0.15);
  color: hsl(28, 50%, 60%);
  border: 1px solid hsla(28, 50%, 50%, 0.25);
}



/* === Social Links === */
.social-links {
  display: inline-flex;
  gap: var(--space-2);
  margin-left: var(--space-2);
  vertical-align: middle;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.social-link:hover {
  color: var(--lobster-300);
}

.social-link svg {
  display: block;
}

/* === Sidebar === */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.info-card .card-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.info-card h4 {
  font-family: var(--font-main);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.info-card ul {
  margin: var(--space-3) 0;
  padding-left: var(--space-5);
}

.info-card li {
  margin-bottom: var(--space-2);
}

.info-card a {
  color: var(--lobster-300);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.info-card a:hover {
  color: var(--lobster-200);
  text-decoration: underline;
}

/* === States === */
.loading,
.empty-state {
  text-align: center;
  padding: var(--space-10);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.loading {
  font-family: var(--font-mono);
}

/* Stat loading indicator */
.stat-loading {
  opacity: 0.4;
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* === Stats Toggle === */
.stats-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-toggle {
  display: flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.toggle-option {
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.toggle-option:hover {
  color: var(--text-secondary);
}

.toggle-option.active {
  background: var(--bg-secondary);
  color: #fff;
}

.toggle-option:active {
  transform: scale(0.95);
}

/* === Load More Button === */
.load-more-btn {
  display: block;
  width: 100%;
  padding: var(--space-4);
  margin-top: var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.load-more-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--lobster-400);
  color: var(--lobster-300);
}

.load-more-btn:active {
  transform: scale(0.98);
}

/* === Footer === */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-8) var(--space-4);
  margin-top: auto;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

@media (min-width: 640px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links span {
  color: var(--text-muted);
}

.footer-links .highlight {
  color: var(--lobster-300);
  font-weight: var(--font-medium);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* === Code Block === */
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-success);
  white-space: pre-wrap;
  word-break: break-all;
}

/* === Utility Classes === */
.steps {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.steps p {
  margin-bottom: var(--space-1);
}

.steps .step-num {
  color: var(--accent-brand);
  font-family: var(--font-mono);
  font-weight: var(--font-bold);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Stats grid */
  .stats {
    gap: var(--space-4);
  }
  
  .stats > div {
    min-width: 100px;
  }
  
  .stat-value {
    font-size: var(--text-lg);
  }
  
  /* Token cards stack vertically */
  .token-card {
    flex-direction: column;
    align-items: stretch;
  }
  
  /* Token links must shrink and wrap */
  .token-links {
    width: 100%;
    margin-top: var(--space-3);
    flex-shrink: 1;
    flex-wrap: wrap;
  }
  
  .token-link {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
  }
  
  /* Hero */
  .hero {
    padding: var(--space-8) var(--space-4) var(--space-10);
  }
  
  .hero-icon {
    font-size: 64px;
  }
  
  .hero h1 {
    font-size: var(--text-xl);
  }
  
  /* Token highlight buttons */
  .token-highlight-links {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  
  .token-highlight-links .btn {
    flex: 1 1 45%;
    min-width: 0;
    text-align: center;
  }
  
  /* Contract address - scale to fit */
  .token-highlight-address {
    overflow: hidden;
  }
  
  .token-highlight-address code {
    font-size: min(3vw, 12px);
    white-space: nowrap;
  }
}

/* ==================================================================
   ANIMATIONS & MICRO-INTERACTIONS
   ================================================================== */

/* Easing functions */
:root {
  --ease-out-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* === Keyframe Animations === */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(12px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeInScale {
  from { 
    opacity: 0; 
    transform: scale(0.97); 
  }
  to { 
    opacity: 1; 
    transform: scale(1); 
  }
}

@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* === Page Load Animations === */

/* Hero icon float */
.hero-icon {
  animation: subtleFloat 4s ease-in-out infinite;
}

/* Hero content staggered entrance */
.hero h1 {
  animation: fadeInUp 0.6s var(--ease-out-smooth) backwards;
  animation-delay: 0.1s;
}

.hero-subtitle {
  animation: fadeInUp 0.6s var(--ease-out-smooth) backwards;
  animation-delay: 0.2s;
}

.hero-buttons {
  animation: fadeInUp 0.6s var(--ease-out-smooth) backwards;
  animation-delay: 0.3s;
}

.token-highlight-card {
  animation: fadeInScale 0.5s var(--ease-out-smooth) backwards;
  animation-delay: 0.4s;
}

.quick-start-card {
  animation: fadeInScale 0.5s var(--ease-out-smooth) backwards;
  animation-delay: 0.5s;
}

/* === Interactive Elements === */

/* Buttons - subtle scale on press */
.btn {
  transition: 
    transform 0.15s var(--ease-out-smooth),
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.98) translateY(0);
  transition-duration: 0.1s;
}

/* Cards - lift on hover */
.card {
  transition: 
    transform 0.25s var(--ease-out-smooth),
    box-shadow 0.25s var(--ease-out-smooth),
    border-color var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsla(12, 6%, 5%, 0.3);
}

/* Token cards - subtle entrance when scrolled into view */
.token-card {
  animation: fadeInUp 0.4s var(--ease-out-smooth) backwards;
}

.token-list .token-card:nth-child(1) { animation-delay: 0ms; }
.token-list .token-card:nth-child(2) { animation-delay: 30ms; }
.token-list .token-card:nth-child(3) { animation-delay: 60ms; }
.token-list .token-card:nth-child(4) { animation-delay: 90ms; }
.token-list .token-card:nth-child(5) { animation-delay: 120ms; }
.token-list .token-card:nth-child(n+6) { animation-delay: 150ms; }

/* Token card hover */
.token-card {
  transition: 
    transform 0.2s var(--ease-out-smooth),
    background-color var(--transition-base),
    border-color var(--transition-base);
}

.token-card:hover {
  transform: translateX(4px);
}

/* Sort buttons */
.sort-btn {
  transition: 
    transform 0.15s var(--ease-out-smooth),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.sort-btn:active {
  transform: scale(0.96);
}

/* Links - underline slide */
.info-card a,
.hero-subtitle .source-link {
  position: relative;
  transition: color var(--transition-fast);
}

/* === Loading States === */

/* Terminal cursor blink */
.loading::after {
  content: '▌';
  animation: blink 1s step-end infinite;
  margin-left: var(--space-1);
  color: var(--lobster-400);
}

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

/* Skeleton shimmer for future loading states */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--neutral-800) 0%,
    var(--neutral-700) 50%,
    var(--neutral-800) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* === Stat Values === */
.stat-value {
  transition: color var(--transition-base), transform var(--transition-base);
}

/* Live dot pulse */
.live-dot {
  position: relative;
}

.live-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: var(--seafoam-400);
  border-radius: 50%;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
  opacity: 0;
}

@keyframes ping {
  0% { transform: scale(1); opacity: 0.6; }
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* Scanline effect overlay (very subtle) */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    hsla(12, 6%, 5%, 0.03) 2px,
    hsla(12, 6%, 5%, 0.03) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* Accent line on active sort button */
.sort-btn.active {
  position: relative;
}

.sort-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--text-inverse);
  border-radius: 1px;
}

/* Token card hover state with subtle left border accent */
.token-card {
  position: relative;
}

.token-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  transition: background 0.2s var(--ease-out-smooth), transform 0.2s var(--ease-out-smooth);
  transform: scaleY(0);
}

.token-card:hover::before {
  transform: scaleY(1);
}

.token-card:hover::before {
  background: var(--lobster-400);
}

/* Rank badge styling for top tokens */
.token-card .token-symbol span[style*="muted"] {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  margin-right: var(--space-2);
}

/* Copy button feedback */
.copy-btn {
  position: relative;
  transition: transform 0.15s var(--ease-out-smooth), opacity var(--transition-fast);
}

.copy-btn:hover {
  opacity: 1;
}

.copy-btn:active {
  transform: scale(0.85);
  transition-duration: 0.1s;
}

/* Link hover underline animation */
.info-card a {
  position: relative;
}

.info-card a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--lobster-400);
  transition: width var(--transition-base);
}

.info-card a:hover::after {
  width: 100%;
}

.info-card a:hover {
  text-decoration: none;
}

/* Header scroll state */
header {
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

header.scrolled {
  background: hsla(12, 5%, 8%, 0.95);
  box-shadow: 0 1px 0 var(--border-subtle);
}

/* Stats bar animation on load */
.stats > div {
  animation: fadeInUp 0.5s var(--ease-out-smooth) backwards;
}

.stats > div:nth-child(1) { animation-delay: 0ms; }
.stats > div:nth-child(2) { animation-delay: 60ms; }
.stats > div:nth-child(3) { animation-delay: 120ms; }
.stats > div:nth-child(4) { animation-delay: 180ms; }

/* Sidebar cards staggered entrance */
.sidebar .card {
  animation: fadeInUp 0.5s var(--ease-out-smooth) backwards;
}

.sidebar .card:nth-child(1) { animation-delay: 0.3s; }
.sidebar .card:nth-child(2) { animation-delay: 0.4s; }
.sidebar .card:nth-child(3) { animation-delay: 0.5s; }

/* Grid pattern background for main content area - full width */
main {
  position: relative;
}

main::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(hsla(12, 4%, 15%, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, hsla(12, 4%, 15%, 0.5) 1px, transparent 1px);
  background-size: 38px 38px;
  background-position: -1px -1px;
  pointer-events: none;
  z-index: -1;
}

/* Gradient fade at top of main to blend with hero */
main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 96px;
  background: linear-gradient(to bottom, var(--bg-secondary), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
  :root {
    --border-subtle: var(--neutral-600);
    --border-default: var(--neutral-500);
  }
  
  .token-card,
  .card {
    border-width: 2px;
  }
}

/* === PWA Install Prompt === */
.install-prompt {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-3);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-default);
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.install-prompt[hidden] {
  display: block;
  pointer-events: none;
}

.install-prompt.show {
  transform: translateY(0);
  pointer-events: auto;
}

.install-prompt-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.install-prompt-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.install-prompt-text {
  flex: 1;
  min-width: 0;
}

.install-prompt-text strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.install-prompt-text span {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.install-btn {
  background: var(--lobster-400);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  cursor: pointer;
}

.install-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* Migration Banner */
.migration-banner {
  background: linear-gradient(90deg, var(--lobster-500), var(--lobster-400));
  color: white;
  text-align: center;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  letter-spacing: var(--tracking-wide);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}
