/* ---------- Custom cursor ---------- */
#cursor-dot, #cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}

#cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  transition: background .2s ease;
}

#cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--muted-2);
  transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease;
}

#cursor-ring.hot {
  width: 64px;
  height: 64px;
  border-color: var(--pink);
  background: rgba(255, 92, 138, .08);
}

#cursor-ring.hot-donate {
  width: 70px;
  height: 70px;
  border-color: var(--amber);
  background: rgba(255, 184, 77, .1);
}

@media (max-width: 900px) {
  #cursor-dot, #cursor-ring {
    display: none;
  }
}

/* ---------- Ambient blobs ---------- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
}

.blob1 {
  width: 520px;
  height: 520px;
  background: var(--purple);
  top: -160px;
  left: -120px;
  animation: float1 22s ease-in-out infinite;
}

.blob2 {
  width: 460px;
  height: 460px;
  background: var(--cyan);
  top: 20%;
  right: -160px;
  animation: float2 26s ease-in-out infinite;
}

.blob3 {
  width: 420px;
  height: 420px;
  background: var(--pink);
  bottom: -140px;
  left: 20%;
  animation: float3 20s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(60px, 80px, 0); }
}

@keyframes float2 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-70px, 60px, 0); }
}

@keyframes float3 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(50px, -60px, 0); }
}

@media (max-width: 768px) {
  .blob {
    opacity: .32;
    filter: none; /* Replaces heavy GPU blur filter with lightweight radial-gradient */
    animation: none; /* Disables continuous re-rasterization during mobile touch scroll */
    transform: translate3d(0, 0, 0);
  }

  .blob1 {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(155, 107, 255, 0.42) 0%, rgba(155, 107, 255, 0) 70%);
    top: -80px;
    left: -80px;
  }

  .blob2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(69, 232, 212, 0.35) 0%, rgba(69, 232, 212, 0) 70%);
    top: 30%;
    right: -100px;
  }

  .blob3 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 92, 138, 0.35) 0%, rgba(255, 92, 138, 0) 70%);
    bottom: -60px;
    left: 5%;
  }
}


/* ---------- Buttons & Buttons Base ---------- */
.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 40px;
  color: #0a0a0f;
  font-weight: 700;
  background: var(--grad-warm);
  background-size: 180% 180%;
  box-shadow: 0 0 0 0 rgba(255, 92, 138, .5);
  animation: donateGlow 2.6s ease-in-out infinite;
  white-space: nowrap;
}

.donate-btn .heart {
  font-size: 13px;
}

@keyframes donateGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 92, 138, .45); }
  50% { box-shadow: 0 0 22px 4px rgba(255, 184, 77, .45); }
}

.donate-btn:hover {
  background-position: 100% 0%;
}

.btn-ghost {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  border: 1px solid var(--line);
  padding: 13px 22px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: border-color .3s ease, color .3s ease;
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  letter-spacing: .04em;
  border: 1px solid var(--line);
  padding: 16px 30px;
  border-radius: 40px;
  transition: border-color .3s ease, color .3s ease;
}

.cta-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.float-donate {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 400;
  display: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.45), 0 0 16px rgba(236, 72, 153, 0.35);
  animation: floatDonateGlow 3s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.float-donate:hover {
  transform: scale(1.08);
}

.float-donate-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

@keyframes floatDonateGlow {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4), 0 0 14px rgba(236, 72, 153, 0.3);
  }
  50% {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(168, 85, 247, 0.65), 0 0 22px rgba(236, 72, 153, 0.55);
  }
}

@media (max-width: 900px) {
  .float-donate {
    display: flex;
  }
}

/* ---------- Marquee ---------- */
.marquee-wrap {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  overflow: hidden;
  background: var(--bg-soft);
}

.marquee {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}

.marquee:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee span {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--muted-2);
  padding: 0 28px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 28px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.marquee span.c1 { color: var(--cyan); }
.marquee span.c2 { color: var(--purple); }
.marquee span.c3 { color: var(--pink); }
.marquee span.c4 { color: var(--amber); }
.marquee span.dot::before { content: '●'; font-size: 9px; opacity: .7; }

/* ---------- Goal Bar ---------- */
.goal-box {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 32px;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.goal-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.goal-top h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.goal-top .pct {
  font-family: 'JetBrains Mono', monospace;
  color: var(--amber);
  font-size: 14px;
}

.goal-bar {
  height: 10px;
  border-radius: 20px;
  background: var(--line);
  overflow: hidden;
}

.goal-fill {
  height: 100%;
  width: 64%;
  border-radius: 20px;
  background: var(--grad-brand);
  background-size: 200% 200%;
  animation: gradShift 6s ease infinite;
}

.goal-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Terminal ---------- */
.terminal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.terminal .tbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #0d0d16;
}

.terminal .tbar .tdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.terminal .tbar .tdot:nth-child(1) { background: var(--pink); }
.terminal .tbar .tdot:nth-child(2) { background: var(--amber); }
.terminal .tbar .tdot:nth-child(3) { background: var(--cyan); }

.terminal .tbar .live-tag {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--pink);
  border: 1px solid rgba(255, 92, 138, .4);
  padding: 3px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}

.terminal .tbody {
  padding: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.9;
  min-height: 220px;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.terminal .tbody .prompt { color: var(--cyan); }
.terminal .tbody .out { color: var(--muted); }
.terminal .cursor-blink {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--pink);
  vertical-align: middle;
  animation: blink 1s steps(1) infinite;
}

@media (max-width: 640px) {
  .terminal .tbar {
    padding: 10px 12px;
    gap: 6px;
  }
  .terminal .tbar .tdot {
    width: 7px;
    height: 7px;
  }
  .terminal .tbar .live-tag {
    font-size: 9px;
    padding: 2px 6px;
  }
  .terminal .tbody {
    padding: 14px 12px;
    font-size: 11.5px;
    line-height: 1.65;
    min-height: 190px;
  }
}

/* ---------- Preview Modal Overlay ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(9, 9, 15, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: scale(0.92) translateY(20px);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}

.modal-backdrop.open .modal-window {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: border-color .25s ease, color .25s ease, transform .25s ease;
}

.modal-close:hover {
  border-color: var(--pink);
  color: var(--pink);
  transform: scale(1.08);
}

.modal-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.modal-preview-img,
.modal-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: var(--cyan);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(69, 232, 212, 0.3);
}

.modal-body {
  padding: 32px 36px 38px;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.modal-index {
  font-size: 13px;
  color: var(--muted-2);
  display: block;
  margin-bottom: 4px;
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.modal-stack-badge {
  font-size: 12px;
  color: var(--cyan);
  background: rgba(69, 232, 212, 0.08);
  border: 1px solid rgba(69, 232, 212, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
}

.modal-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.modal-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .modal-body {
    padding: 24px 20px 28px;
  }
  .modal-title {
    font-size: 22px;
  }
}

