/* ============================================
   ONE MILLION MEME COINS - Styles
   Fun, absurd, slightly unhinged aesthetic
   ============================================ */

:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --accent: #f7931a;
  --accent-bright: #ffd700;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.6);
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.45);
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --purple: #a855f7;
  --blue: #3b82f6;
  --gradient: linear-gradient(135deg, #f7931a 0%, #ffd700 50%, #ff6b6b 100%);
  /* Emoji font stack for cross-platform support */
  --emoji-font: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif;
}

/* Ensure emojis render properly across all platforms */
.floating-coins span,
.empty-icon,
.stats-card-icon,
.category-bar-label,
.filter-select option,
.section-header h2 {
  font-family: var(--emoji-font);
}

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

html {
  scroll-behavior: smooth;
}

/* Accessibility - Focus states */
a:focus-visible,
button:focus-visible,
.category-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated Background */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(247, 147, 26, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 147, 26, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

.floating-coins {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-coins span {
  position: absolute;
  font-size: 2rem;
  animation: float 20s infinite linear;
  opacity: 0.15;
}

.floating-coins span:nth-child(1) { left: 5%; animation-delay: 0s; }
.floating-coins span:nth-child(2) { left: 15%; animation-delay: 2s; }
.floating-coins span:nth-child(3) { left: 25%; animation-delay: 4s; }
.floating-coins span:nth-child(4) { left: 35%; animation-delay: 6s; }
.floating-coins span:nth-child(5) { left: 45%; animation-delay: 8s; }
.floating-coins span:nth-child(6) { left: 55%; animation-delay: 10s; }
.floating-coins span:nth-child(7) { left: 65%; animation-delay: 12s; }
.floating-coins span:nth-child(8) { left: 75%; animation-delay: 14s; }
.floating-coins span:nth-child(9) { left: 85%; animation-delay: 16s; }
.floating-coins span:nth-child(10) { left: 95%; animation-delay: 18s; }

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(247, 147, 26, 0.2);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.5rem;
}

.logo-svg {
  flex-shrink: 0;
}

.logo-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.1rem;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gas-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: help;
}

.gas-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

.gas-dot.yellow { background: var(--yellow); }
.gas-dot.red { background: var(--red); }

.gas-threshold {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: 0.25rem;
}

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

.chain-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(37, 99, 235, 0.4);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #60a5fa;
  text-decoration: none;
  transition: all 0.2s;
}

.chain-badge:hover {
  background: rgba(37, 99, 235, 0.3);
  border-color: rgba(37, 99, 235, 0.6);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.7;
  }
}

/* Hero / Counter Section */
.hero {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

/* BIGGER HERO TITLE - Extra large and impactful */
.hero-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 2rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 100px rgba(247, 147, 26, 0.5);
  letter-spacing: 0.08em;
  animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
  from { filter: drop-shadow(0 0 20px rgba(247, 147, 26, 0.4)); }
  to { filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.6)); }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Giant Counter */
.counter-container {
  background: var(--bg-card);
  border: 2px solid rgba(247, 147, 26, 0.3);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 
    0 0 60px rgba(247, 147, 26, 0.15),
    inset 0 0 40px rgba(0, 0, 0, 0.3);
}

.counter-label {
  font-size: 0.9rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.counter {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(2rem, 8vw, 4rem);
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.digit {
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a0f 100%);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(247, 147, 26, 0.2);
  min-width: 1.5em;
  text-align: center;
  color: var(--accent-bright);
  text-shadow: 0 0 20px var(--accent);
}

.separator {
  color: var(--accent-bright);
  text-shadow: 0 0 20px var(--accent);
  padding: 0 0.1rem;
  font-size: inherit;
}

.counter-target {
  font-size: 1.5rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* Progress Bar */
.progress-bar {
  position: relative;
  height: 30px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  margin-top: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(247, 147, 26, 0.3);
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 15px;
  transition: width 1s ease-out;
  width: 0%;
  min-width: 2px;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
}

/* Stats Row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Section */
.section {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  font-size: 1.5rem;
}

.refresh-btn {
  background: rgba(247, 147, 26, 0.1);
  border: 1px solid rgba(247, 147, 26, 0.3);
  color: var(--accent);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.refresh-btn:hover {
  background: rgba(247, 147, 26, 0.2);
  transform: rotate(180deg);
}

/* Filter Controls */
.stats-filters,
.tokens-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.filter-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-select:hover {
  border-color: rgba(247, 147, 26, 0.4);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-select option {
  background: var(--bg-dark);
  color: var(--text);
}

/* Stats Section */
.stats-section {
  background: var(--bg-card);
  border-radius: 20px;
  margin: 2rem auto;
  max-width: calc(1200px - 4rem);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stats-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.stats-card:hover {
  border-color: rgba(247, 147, 26, 0.3);
  transform: translateY(-4px);
}

.stats-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.stats-card-value {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.stats-card-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Gas Stats Card */
.gas-card {
  position: relative;
}

.gas-threshold-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 1rem;
  overflow: hidden;
}

.gas-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.5s ease, background 0.3s ease;
  width: 0%;
}

.gas-fill.yellow { background: var(--yellow); }
.gas-fill.red { background: var(--red); }

.gas-threshold-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* Top Tokens Section */
.top-tokens-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.top-tokens-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

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

.top-token-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.top-token-item:hover {
  border-color: rgba(247, 147, 26, 0.3);
}

.top-token-rank {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: var(--accent);
  width: 2rem;
}

.top-token-info {
  flex: 1;
  margin-left: 1rem;
}

.top-token-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.top-token-symbol {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.top-token-volume {
  font-weight: 600;
  color: var(--green);
}

.tokens-empty-mini {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Category Breakdown */
/* Token Types Accordion */
.token-types-breakdown {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.token-types-breakdown h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.token-types-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.token-type-item {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.token-type-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  gap: 1rem;
}

.token-type-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.token-type-emoji {
  font-size: 1.5rem;
  width: 40px;
  text-align: center;
}

.token-type-info {
  flex: 1;
}

.token-type-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.token-type-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.token-type-bar {
  flex: 1;
  max-width: 200px;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.token-type-bar-fill {
  height: 100%;
  background: var(--cat-color, var(--gradient));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.token-type-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 100px;
  justify-content: flex-end;
}

.token-type-count {
  font-weight: 600;
  font-size: 0.9rem;
}

.token-type-percent {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.token-type-chevron {
  font-size: 0.8rem;
  transition: transform 0.2s;
  color: var(--text-dim);
}

.token-type-item.expanded .token-type-chevron {
  transform: rotate(90deg);
}

/* Subcategories (nested) */
.token-type-subcategories {
  display: none;
  padding: 0 1rem 1rem 1rem;
  margin-left: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.token-type-item.expanded .token-type-subcategories {
  display: block;
}

.subcategory-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  gap: 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
}

.subcategory-item:hover {
  color: var(--primary);
}

.subcategory-name {
  flex: 1;
}

.subcategory-bar {
  width: 100px;
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.subcategory-bar-fill {
  height: 100%;
  background: var(--cat-color, #f7931a);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.subcategory-count {
  min-width: 40px;
  text-align: right;
  color: var(--text-dim);
}

/* Token type colors */
.token-type-item[data-type="rivalry"] { --cat-color: #ff4444; }
.token-type-item[data-type="reality-check"] { --cat-color: #9747ff; }
.token-type-item[data-type="copypasta"] { --cat-color: #00ff88; }
.token-type-item[data-type="wildcard"] { --cat-color: #ff44ff; }
.token-type-item[data-type="original"] { --cat-color: #44ffff; }
.token-type-item[data-type="variation"] { --cat-color: #ffaa00; }
.token-type-item[data-type="trending"] { --cat-color: #ff6b6b; }

/* Tokens Grid */
.tokens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.token-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s;
}

.token-card:hover {
  border-color: rgba(247, 147, 26, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(247, 147, 26, 0.1);
}

.token-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.token-number {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(247, 147, 26, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.token-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.token-symbol {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.token-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.token-type-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  background: rgba(247, 147, 26, 0.2);
  border-radius: 4px;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 600;
}

.token-category {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(168, 85, 247, 0.2);
  border-radius: 4px;
  color: var(--purple);
}

.token-address {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem;
  border-radius: 6px;
  margin: 1rem 0;
  word-break: break-all;
}

.token-actions {
  display: flex;
  gap: 0.5rem;
}

.trade-btn {
  flex: 1;
  padding: 0.75rem;
  background: var(--gradient);
  border: none;
  border-radius: 8px;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}

.trade-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 20px rgba(247, 147, 26, 0.3);
}

.link-btn {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.2s;
}

.link-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* Empty / Loading States */
.tokens-empty,
.tokens-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(247, 147, 26, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.load-more-btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 2rem auto 0;
  padding: 1rem;
  background: rgba(247, 147, 26, 0.1);
  border: 1px solid rgba(247, 147, 26, 0.3);
  border-radius: 10px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background: rgba(247, 147, 26, 0.2);
}

/* About Section */
.about {
  background: var(--bg-card);
  border-radius: 20px;
  margin: 2rem auto;
  max-width: calc(1200px - 4rem);
}

.about h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.about-content strong {
  color: var(--accent);
}

/* Footer - Cryke style */
.footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4rem 2rem 2rem;
  margin-top: 3rem;
}

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

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand-section {
  max-width: 400px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.footer-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-links-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-links-group h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-links-group a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color 0.2s;
}

.footer-links-group a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.6;
  font-style: italic;
}

/* Responsive */
@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-links-section {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 1rem;
  }
  
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero-title {
    font-size: clamp(1.5rem, 6vw, 3rem);
  }
  
  .counter {
    font-size: 1.5rem;
  }
  
  .digit {
    padding: 0.3rem 0.4rem;
  }
  
  .stats-row {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .section {
    padding: 2rem 1rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .stats-filters,
  .tokens-controls {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .filter-select {
    flex: 1;
    min-width: 120px;
  }
  
  .about,
  .stats-section {
    margin: 1rem;
  }
  
  .footer-main {
    gap: 2rem;
  }
  
  .footer-links-section {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Header Navigation */
.header-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: #8888aa;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #f7931a;
}

/* Categories Section */
.categories-section {
  padding: 4rem 2rem;
}

.categories-section .section-header {
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.categories-section .section-header h2 {
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: #8888aa;
  margin-top: 0;
  margin-bottom: 2rem;
  text-align: center;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  background: linear-gradient(135deg, #12121a 0%, #1a1a25 100%);
  border: 1px solid #2a2a3a;
  border-radius: 16px;
  padding: 2rem;
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cat-color, #f7931a);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--cat-color, #f7931a);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.category-card:hover::before {
  transform: scaleX(1);
}

.category-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.category-card h3 {
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.category-card p {
  color: #8888aa;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.category-stat {
  display: inline-block;
  background: rgba(247, 147, 26, 0.1);
  color: var(--cat-color, #f7931a);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.category-card--full {
  grid-column: 1 / -1;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(10px);
  z-index: 99;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 1rem 2rem;
  transition: color 0.2s, transform 0.2s;
}

.mobile-nav a:active {
  transform: scale(0.95);
}

.mobile-nav a:hover {
  color: var(--accent);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .header-nav {
    display: none;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .category-card {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   PAIR SEARCH SECTION
   ========================================================================== */

.pair-search-section {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1));
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 3rem;
}

.pair-search-container {
  max-width: 700px;
  margin: 0 auto;
}

.search-input-wrapper {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pair-search-input {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  outline: none;
  transition: border-color 0.3s;
}

.pair-search-input:focus {
  border-color: var(--accent);
}

.pair-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.pair-search-btn {
  padding: 1rem 2rem;
  background: var(--gradient);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pair-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(247, 147, 26, 0.4);
}

.pair-search-results {
  min-height: 100px;
}

.pair-search-hint {
  text-align: center;
  color: var(--text-dim);
  padding: 1rem;
}

.pair-search-hint code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.pair-result-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(247, 147, 26, 0.3);
}

.pair-result-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.pair-tokens-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.pair-token {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.pair-token-symbol {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.pair-token-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pair-vs {
  font-size: 1.5rem;
  color: var(--accent);
}

.pair-not-found {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .search-input-wrapper {
    flex-direction: column;
  }
  
  .pair-tokens-grid {
    grid-template-columns: 1fr;
  }
  
  .pair-vs {
    transform: rotate(90deg);
  }
}

/* Platform Token Strip */
.platform-token-strip {
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.15) 0%, rgba(255, 215, 0, 0.1) 50%, rgba(255, 107, 107, 0.15) 100%);
  border-top: 1px solid rgba(247, 147, 26, 0.3);
  border-bottom: 1px solid rgba(247, 147, 26, 0.3);
  padding: 0.75rem 1rem;
}

.platform-token-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.platform-token-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #f7931a;
}

.platform-token-icon {
  font-size: 1.25rem;
}

.platform-token-name {
  font-size: 0.95rem;
}

.platform-token-address {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.platform-token-address:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(247, 147, 26, 0.5);
  color: var(--text);
}

.platform-token-address.copied {
  border-color: #00ff88;
  color: #00ff88;
}

.platform-token-actions {
  display: flex;
  gap: 0.5rem;
}

.platform-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.platform-btn-trade {
  background: linear-gradient(135deg, #f7931a 0%, #ffd700 100%);
  color: #000;
  border-color: transparent;
}

.platform-btn-trade:hover {
  background: linear-gradient(135deg, #ffd700 0%, #f7931a 100%);
  color: #000;
}

@media (max-width: 768px) {
  .platform-token-inner {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .platform-token-address {
    font-size: 0.7rem;
    word-break: break-all;
  }
}
