/* MemeChronicle.com Brand System - "Neon Degen Ledger" */

/* Import custom fonts */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap"); /* Pixel font for specific accents */

:root {
  /* Color Palette */
  --primary-dark: #0d0c0f; /* Void Black */
  --secondary-dark: #1a161f; /* Deep Space Slate */
  --surface-card: #1f1c25; /* Slightly lighter for cards */
  --surface-overlay: rgba(13, 12, 15, 0.8); /* For modal backdrops, etc. */

  --accent-primary: #00ff99; /* Meme Mint */
  --accent-primary-hover: #00e68a;
  --accent-secondary: #7f5af0; /* Techno Violet */
  --accent-secondary-hover: #6b3bef;
  --accent-tertiary: #ffd700; /* Doge Gold */

  --text-primary: #eaeaea; /* Starlight White */
  --text-secondary: #a09daa; /* Lunar Gray */
  --text-muted: #676370; /* Comet Gray - Darker for more subtlety */
  --text-on-accent: #0d0c0f; /* Text on bright accents */

  --status-positive: var(--accent-primary);
  --status-negative: #ff4d6a; /* Rugpull Red */
  --status-warning: #ffa500; /* Caution Orange */
  --status-info: #00c2ff; /* Digital Blue (can replace accent-secondary if preferred) */

  --border-color: #3a3645; /* Subtle borders */
  --border-color-strong: #4a4655; /* Stronger borders */

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --gradient-glow: linear-gradient(135deg, rgba(0, 255, 153, 0.2), rgba(127, 90, 240, 0.2));
  --gradient-text: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary),
    var(--accent-tertiary),
    var(--accent-primary)
  );

  /* Typography */
  --font-heading: "Space Grotesk", "Arial Black", sans-serif;
  --font-body: "Inter", "Arial", sans-serif;
  --font-pixel: "Press Start 2P", cursive; /* For specific meme accents */

  --font-size-base: 16px;
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-md: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */
  --font-size-2xl: 1.5rem; /* 24px */
  --font-size-3xl: 2rem; /* 32px */
  --font-size-4xl: 2.5rem; /* 40px */

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing System (based on 4px grid) */
  --space-unit: 4px;
  --space-xs: calc(var(--space-unit) * 2); /* 8px */
  --space-sm: calc(var(--space-unit) * 3); /* 12px */
  --space-md: calc(var(--space-unit) * 4); /* 16px */
  --space-lg: calc(var(--space-unit) * 6); /* 24px */
  --space-xl: calc(var(--space-unit) * 8); /* 32px */
  --space-2xl: calc(var(--space-unit) * 12); /* 48px */
  --space-3xl: calc(var(--space-unit) * 16); /* 64px */

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows - More pronounced for a "floating UI" feel on dark bg */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow-primary: 0 0 15px rgba(0, 255, 153, 0.3), 0 0 5px rgba(0, 255, 153, 0.2);
  --shadow-glow-secondary: 0 0 15px rgba(127, 90, 240, 0.3), 0 0 5px rgba(127, 90, 240, 0.2);

  /* Animation Timing */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index Layers */
  --z-base: 1;
  --z-sticky: 100;
  --z-dropdown: 1000;
  --z-modal-backdrop: 1010;
  --z-modal: 1020;
  --z-tooltip: 1030;
  --z-max: 9999;

  /* Legacy variable mapping for style.css compatibility (will be phased out or updated in style.css) */
  --primary-color: var(--primary-dark);
  --secondary-color: var(--secondary-dark); /* Used for some backgrounds */
  --accent-color: var(--accent-primary);
  --accent-hover-color: var(--accent-primary-hover);
  --text-color: var(--text-primary);
  --text-muted-color: var(--text-muted);
  --container-width: 1200px;
  --header-height: 70px;

  /* Animation constants */
  --animation-duration: 0.3s;
  --animation-timing: ease-in-out;
}

/* Base Typography from Brand System */
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--primary-dark);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  margin: 0 0 var(--space-md) 0;
  color: var(--text-primary);
}

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-md);
}

p {
  margin: 0 0 var(--space-md) 0;
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary-hover);
}

/* Text Utilities */
.text-gradient {
  background: var(--gradient-text);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

/* Utility Classes */
.positive { color: var(--status-positive); }
.negative { color: var(--status-negative); }
.warning { color: var(--status-warning); }
.info { color: var(--status-info); }

/* Loading Animation */
.loader-dots {
  display: inline-flex;
  gap: var(--space-xs);
}

.loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  animation: pulse 1.4s ease-in-out infinite both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes pulse {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Button Styles */
.btn-view-all {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  background: var(--gradient-accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-view-all:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--text-on-accent);
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-refresh:hover {
  background: var(--accent-primary);
  color: var(--text-on-accent);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Loading Indicator */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  color: var(--text-secondary);
}

.loading-indicator p {
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
}