/* ===== Warstwa odswiezenia wizualnego (nakladka na 01-base.css) ===== */

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

:root {
  --rep-green: #00ff41;
  --rep-cyan: #00ffff;
  --rep-red: #ff4444;
  --rep-ink: #05080d;
  --rep-glass: rgba(11, 16, 23, 0.72);
  --rep-line: rgba(255, 255, 255, 0.07);
  --rep-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Tlo: subtelna siatka + poswiata --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(0, 255, 65, 0.09), transparent 60%),
    radial-gradient(50% 45% at 92% 8%, rgba(0, 190, 255, 0.08), transparent 62%),
    linear-gradient(transparent 95%, rgba(0, 255, 65, 0.045) 95%) 0 0 / 100% 46px,
    linear-gradient(90deg, transparent 95%, rgba(0, 255, 65, 0.035) 95%) 0 0 / 46px 100%;
  animation: gridDrift 26s linear infinite;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 0 0, 0 0, 0 460px, 460px 0; }
}

/* --- Panele: glassmorphism + delikatna krawedz swiatla --- */
.glass-panel {
  position: relative;
  background: var(--rep-glass) !important;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--rep-line) !important;
  border-radius: 18px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 50px -34px rgba(0, 0, 0, 0.9);
  transition: border-color 0.3s var(--rep-ease), box-shadow 0.3s var(--rep-ease), transform 0.3s var(--rep-ease);
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.55), rgba(0, 255, 255, 0.35), transparent);
  opacity: 0.6;
  pointer-events: none;
  border-radius: 18px 18px 0 0;
}

.glass-panel:hover {
  border-color: rgba(0, 255, 65, 0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 28px 60px -32px rgba(0, 255, 65, 0.28);
}

/* --- Naglowki sekcji --- */
.section-title {
  position: relative;
  padding-left: 14px;
  letter-spacing: 0.01em;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 68%;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--rep-green), var(--rep-cyan));
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.6);
}

/* --- Przyciski --- */
.btn, .toggle-btn, .filter-btn, .calc-btn, .portfolio-btn {
  transition: transform 0.18s var(--rep-ease), box-shadow 0.22s var(--rep-ease),
              background 0.22s var(--rep-ease), border-color 0.22s var(--rep-ease) !important;
}

.btn:hover, .toggle-btn:hover, .filter-btn:hover, .calc-btn:hover, .portfolio-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -14px rgba(0, 255, 65, 0.75);
}

.btn:active, .toggle-btn:active, .filter-btn:active, .portfolio-btn:active { transform: translateY(0) scale(0.985); }

.filter-btn.active {
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.45), 0 0 18px -6px rgba(0, 255, 65, 0.7);
}

/* --- Tabele: czytelniejszy hover i sticky naglowek --- */
.lp-table thead th, .holders-table thead td {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(8, 12, 18, 0.96);
  backdrop-filter: blur(8px);
}

.lp-table tbody tr, .holders-table tbody tr {
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.lp-table tbody tr:hover, .holders-table tbody tr:hover {
  background: rgba(0, 255, 65, 0.055) !important;
  box-shadow: inset 3px 0 0 var(--rep-green);
}

/* --- Karty challenge: lekki relief --- */
.challenge-card-pro {
  border-radius: 14px;
  transition: transform 0.25s var(--rep-ease), box-shadow 0.25s var(--rep-ease);
}

.challenge-card-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -24px rgba(0, 255, 65, 0.6);
}

.challenge-value-pro { font-variant-numeric: tabular-nums; }

/* --- Pojawianie sie sekcji przy przewijaniu --- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--rep-ease), transform 0.65s var(--rep-ease);
  will-change: opacity, transform;
}

.reveal.is-visible { opacity: 1; transform: none; }

/* --- Pasek scrolla --- */
* { scrollbar-color: rgba(0, 255, 65, 0.35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 255, 65, 0.5), rgba(0, 200, 255, 0.4));
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 65, 0.75); background-clip: padding-box; }

/* --- Loading shimmer --- */
.loading {
  background: linear-gradient(90deg, rgba(0, 255, 65, 0.25), rgba(0, 255, 255, 0.7), rgba(0, 255, 65, 0.25));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.4s linear infinite;
}

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

/* --- Modale: miekkie wejscie --- */
#donateModal > div, .holder-modal-content, .dao-modal-inner, #ilModal .il-modal-content {
  animation: modalIn 0.32s var(--rep-ease) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* --- Kursor/fokus dostepnosc --- */
:focus-visible {
  outline: 2px solid rgba(0, 255, 65, 0.75);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .loading { animation: none; }
}

/* Odstep miedzy tytulem sekcji a tickerem */
#poolTicker { margin-left: 6px; color: var(--rep-cyan); }

/* ===== Price badges with 24h change ===== */
.token-price-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.9);
}

.token-price-val { font-variant-numeric: tabular-nums; }

.token-price-chg {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.3;
}

.token-price-chg.up {
  color: #00ff41;
  background: rgba(0, 255, 65, 0.14);
  border: 1px solid rgba(0, 255, 65, 0.32);
}

.token-price-chg.down {
  color: #ff5b5b;
  background: rgba(255, 68, 68, 0.14);
  border: 1px solid rgba(255, 68, 68, 0.32);
}

/* ===== Background image layer: brighter, animated ===== */
.bg-photo {
  position: fixed;
  inset: 0;
  z-index: -4;
  background-image: url('../assets/bg-nebula.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.72;
  filter: saturate(1.15) contrast(1.06);
  transform: scale(1.06);
  animation: bgDrift 42s ease-in-out infinite alternate;
  pointer-events: none;
}

.bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0) 0%, rgba(2, 5, 9, 0.34) 60%, rgba(2, 5, 9, 0.8) 100%),
    linear-gradient(180deg, rgba(2, 5, 9, 0.28) 0%, rgba(2, 5, 9, 0.06) 30%, rgba(2, 5, 9, 0.5) 100%);
}

@keyframes bgDrift {
  0%   { transform: scale(1.06) translate3d(0, 0, 0); }
  50%  { transform: scale(1.12) translate3d(-1.6%, -1.2%, 0); }
  100% { transform: scale(1.08) translate3d(1.4%, 1%, 0); }
}

/* token watermark: visible, colourful, slowly rotating */
.bg-watermark {
  opacity: 0.3 !important;
  filter: saturate(140%) contrast(115%) blur(0.6px)
          drop-shadow(0 0 60px var(--primary-glow, rgba(0, 255, 65, 0.6))) !important;
  mix-blend-mode: screen;
  animation: watermarkSpin 90s linear infinite, watermarkPulse 9s ease-in-out infinite !important;
}

@keyframes watermarkSpin {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}

@keyframes watermarkPulse {
  0%, 100% { opacity: 0.22; }
  50%      { opacity: 0.36; }
}

/* halo ring behind the watermark */
.bg-halo {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 78vmin;
  height: 78vmin;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: -3;
  pointer-events: none;
  background:
    conic-gradient(from 0deg,
      rgba(0, 255, 65, 0.22), rgba(0, 255, 255, 0.16),
      rgba(157, 0, 255, 0.2), rgba(0, 255, 65, 0.22));
  filter: blur(60px);
  opacity: 0.55;
  animation: haloSpin 60s linear infinite;
}

@keyframes haloSpin {
  from { rotate: 0deg; }
  to   { rotate: -360deg; }
}

.bg-aurora { opacity: 0.85; }
.bg-grid { opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
  .bg-photo, .bg-halo, .bg-watermark { animation: none !important; }
}

/* ===== Mobile: keep the token rails out of the content ===== */
@media (max-width: 900px) {
  /* floating price bubbles cover the layout on small screens */
  .token-price-badge { display: none !important; }

  .sidebar {
    gap: 7px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.72);
    max-height: 78vh;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { width: 0; }
  .sidebar.left { left: 4px; }
  .sidebar.right { right: 4px; }
  .token-btn {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
    border-width: 1px;
  }
  .token-btn::after { display: none; }
}

@media (max-width: 520px) {
  .token-btn { width: 28px; height: 28px; }
  .sidebar { gap: 5px; }
}

@media (max-width: 900px) {
  /* leave room for the fixed token rails so text is never clipped */
  .container { padding-left: 46px !important; padding-right: 46px !important; }
}
@media (max-width: 520px) {
  .container { padding-left: 38px !important; padding-right: 38px !important; }
  .contract-box, .address-text { word-break: break-all; }
}
