/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --chad-bg: #090c12;
  --chad-surface: #121824;
  --chad-surface-hover: #192233;
  --chad-surface-card: #151d2c;
  --chad-border: #222e44;
  --chad-border-light: rgba(255, 255, 255, 0.08);
  --chad-primary: #00f58c;
  --chad-primary-dark: #00b868;
  --chad-primary-rgb: 0, 245, 140;
  --chad-gold: #ffc83b;
  --chad-gold-rgb: 255, 200, 59;
  --chad-cyan: #00d2ff;
  --chad-red: #ff4757;
  --chad-text: #f1f5f9;
  --chad-muted: #94a3b8;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--chad-bg);
  color: var(--chad-text);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tabular-nums {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--chad-bg);
}
::-webkit-scrollbar-thumb {
  background: #2a374f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--chad-primary);
}

/* Animations */
@keyframes floatAnim {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(2deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 245, 140, 0.25);
  }
  50% {
    box-shadow: 0 0 35px rgba(0, 245, 140, 0.6);
  }
}

@keyframes flameFlicker {
  0%, 100% {
    transform: scale(1) rotate(-1deg);
    filter: drop-shadow(0 0 10px rgba(255, 71, 87, 0.6));
  }
  50% {
    transform: scale(1.08) rotate(1deg);
    filter: drop-shadow(0 0 20px rgba(255, 159, 26, 0.8));
  }
}

@keyframes tickerScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

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

@keyframes rowFlashBuy {
  0% { background-color: rgba(0, 245, 140, 0.25); }
  100% { background-color: transparent; }
}

@keyframes rowFlashSell {
  0% { background-color: rgba(255, 71, 87, 0.25); }
  100% { background-color: transparent; }
}

.animate-float {
  animation: floatAnim 4s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

.animate-flame {
  animation: flameFlicker 1.5s ease-in-out infinite;
}

.flash-buy {
  animation: rowFlashBuy 1.5s ease-out;
}

.flash-sell {
  animation: rowFlashSell 1.5s ease-out;
}

/* Marquee Ticker */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: #0d121c;
  border-bottom: 1px solid var(--chad-border);
  padding: 8px 0;
  position: relative;
  z-index: 40;
}

.ticker-content {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 35s linear infinite;
  width: max-content;
}

.ticker-wrap:hover .ticker-content {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--chad-muted);
}

/* Navbar */
.navbar-chad {
  background: rgba(9, 12, 18, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--chad-border);
  position: sticky;
  top: 0;
  z-index: 1020;
  transition: all 0.25s ease;
}

.nav-link-chad {
  color: var(--chad-muted) !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 0.75rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  background: transparent;
  border: none;
}

button.nav-link-chad {
  background: transparent;
  border: none;
}

button.dropdown-item {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.nav-link-chad:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.04);
}

.nav-link-chad.active {
  color: var(--chad-primary) !important;
  background: rgba(0, 245, 140, 0.08);
}

.nav-link-chad.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--chad-primary);
  border-radius: 2px;
}

.dropdown-item[data-bs-toggle="tab"].active,
.dropdown-item[data-nav-target].active {
  background: rgba(0, 245, 140, 0.12) !important;
  color: var(--chad-primary) !important;
  font-weight: 600;
}

.dropdown-item[data-bs-toggle="tab"]:hover,
.dropdown-item[data-nav-target]:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.tab-pane.fade {
  transition: opacity 0.2s linear;
}

/* Custom Card & Containers */
.chad-card {
  background: var(--chad-surface-card);
  border: 1px solid var(--chad-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chad-card:hover {
  border-color: rgba(0, 245, 140, 0.3);
}

.chad-card-interactive:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 245, 140, 0.4);
}

/* Buttons */
.btn-chad-primary {
  background: var(--chad-primary);
  color: #05160d;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-chad-primary:hover {
  background: #15fca0;
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0, 245, 140, 0.4);
}

.btn-chad-primary:active {
  transform: translateY(0);
}

.btn-chad-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--chad-text);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--chad-border);
  border-radius: 10px;
  padding: 0.65rem 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-chad-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--chad-primary);
  color: #fff;
}

.btn-chad-gold {
  background: linear-gradient(135deg, #ffc83b, #ff9f1a);
  color: #1a0f00;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-chad-gold:hover {
  box-shadow: 0 4px 18px rgba(255, 200, 59, 0.4);
  color: #000;
  transform: translateY(-1px);
}

/* Page Section Transitions */
.chad-page {
  display: none;
  opacity: 0;
  animation: fadeInPage 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.chad-page.active {
  display: block;
  opacity: 1;
}

/* Input Fields */
.chad-input {
  background: #0d121c;
  border: 1px solid var(--chad-border);
  border-radius: 12px;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.2s ease;
}

.chad-input:focus {
  outline: none;
  border-color: var(--chad-primary);
  box-shadow: 0 0 0 3px rgba(0, 245, 140, 0.15);
  background: #0d121c;
  color: #fff;
}

/* Presale Progress */
.presale-progress-bar {
  height: 12px;
  background: #0e1420;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--chad-border);
}

.presale-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f58c, #00d2ff, #ffc83b);
  border-radius: 6px;
  transition: width 0.8s ease-in-out;
}

/* Badge styling */
.chad-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--chad-border);
}

.chad-badge-green {
  background: rgba(0, 245, 140, 0.1);
  border-color: rgba(0, 245, 140, 0.3);
  color: var(--chad-primary);
}

.chad-badge-gold {
  background: rgba(255, 200, 59, 0.1);
  border-color: rgba(255, 200, 59, 0.3);
  color: var(--chad-gold);
}

/* Floating notification toast */
.whale-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1050;
  background: #111723;
  border: 1px solid var(--chad-primary);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 380px;
  animation: fadeInPage 0.4s ease forwards;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Canvas Meme Preview */
.meme-canvas-container {
  background: #0b0f17;
  border: 2px dashed var(--chad-border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  min-height: 380px;
}

#memeCanvas {
  max-width: 100%;
  max-height: 480px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Chart Container & TradingView */
.chart-container {
  background: #0d121c;
  border: 1px solid var(--chad-border);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  min-height: 440px;
  width: 100%;
}

#canvasChartContainer {
  width: 100%;
  height: 380px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #090e17;
}

#tradingChart {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
}

.tv-chart-wrapper {
  width: 100%;
  min-height: 440px;
  border-radius: 12px;
  overflow: hidden;
}

/* Uniform Image & Box Dimensions */
.img-uniform-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meme-tpl-btn {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.meme-tpl-img {
  width: 100%;
  height: 85px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.community-meme-img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.bento-thumb-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--chad-border);
  display: block;
}

.battle-avatar-container {
  width: 68px;
  height: 68px;
  min-width: 68px;
  min-height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  overflow: hidden;
  border: 2px solid var(--chad-border);
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.battle-avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.battle-avatar-container.active {
  border-color: var(--chad-primary);
  box-shadow: 0 0 15px rgba(0, 245, 140, 0.3);
}

/* Card equal heights and baseline alignment */
.chad-card-equal {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.uniform-countdown-box {
  flex: 1 1 0;
  min-width: 58px;
  max-width: 80px;
  text-align: center;
  padding: 8px 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

/* Chart HUD Header */
.chart-hud-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--chad-muted);
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  border: 1px solid var(--chad-border);
  margin-bottom: 12px;
}

.chart-hud-item strong {
  color: #fff;
}


/* Table live styles */
.table-dark-custom {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--chad-border);
  color: var(--chad-text);
  font-size: 0.88rem;
}

.table-dark-custom th {
  color: var(--chad-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--chad-border);
  padding: 12px 14px;
}

.table-dark-custom td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Orderbook Depth */
.order-bar-buy {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  background: rgba(0, 245, 140, 0.12);
  pointer-events: none;
  border-radius: 4px;
}

.order-bar-sell {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  background: rgba(255, 71, 87, 0.12);
  pointer-events: none;
  border-radius: 4px;
}

/* Accordion Dark Theme */
.accordion-chad .accordion-item {
  background: var(--chad-surface);
  border: 1px solid var(--chad-border);
  margin-bottom: 12px;
  border-radius: 12px !important;
  overflow: hidden;
}

.accordion-chad .accordion-button {
  background: var(--chad-surface);
  color: var(--chad-text);
  font-weight: 600;
  box-shadow: none;
  padding: 1.1rem 1.4rem;
}

.accordion-chad .accordion-button:not(.collapsed) {
  background: rgba(0, 245, 140, 0.05);
  color: var(--chad-primary);
  border-bottom: 1px solid var(--chad-border);
}

.accordion-chad .accordion-button::after {
  filter: invert(1);
}

.accordion-chad .accordion-body {
  background: var(--chad-surface);
  color: var(--chad-muted);
  line-height: 1.7;
}

/* Staking APY Glow */
.apy-glow-box {
  background: linear-gradient(135deg, rgba(0, 245, 140, 0.12), rgba(0, 210, 255, 0.08));
  border: 1px solid rgba(0, 245, 140, 0.35);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

/* Tokenomics Segment */
.token-stat-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  background: #0d121c;
  border: 1px solid var(--chad-border);
  margin-bottom: 8px;
}

.token-stat-pill .indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

/* Battle bar */
.battle-card {
  background: #0d121c;
  border: 1px solid var(--chad-border);
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s ease;
}

.battle-card:hover {
  border-color: var(--chad-primary);
  transform: translateY(-2px);
}

/* Responsive utilities */
@media (max-width: 768px) {
  .whale-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }
}
