/* Axmol Engine — Dark-first theme with blue–purple gradient + neon accents */

/* Light theme base (kept minimal but consistent) */
:root {
  --bs-body-bg: #f8f9fa;
  --bs-body-color: #212529;
  --bs-primary: #4A90E2;
  --bs-link-color: #4A90E2;
  --bs-link-hover-color: #357ABD;
  --bs-border-color: #dee2e6;
}

/* Dark theme: immersive with blue–purple gradient */
[data-bs-theme="dark"] {
  --bs-body-bg: #0e0e12;
  --bs-body-color: #e9ecef;
  --bs-border-color: rgba(255,255,255,0.08);

  --bs-primary: #7289DA;          /* Tech blue-purple */
  --bs-link-color: #00C896;       /* Neon green accent */
  --bs-link-hover-color: #00E0A8;

  --bs-card-bg: #1a1a20;
  --bs-card-border-color: rgba(255,255,255,0.08);

  --bs-btn-primary-bg: #7289DA;
  --bs-btn-primary-border-color: #7289DA;
  --bs-btn-primary-hover-bg: #8ea1f2;
  --bs-btn-primary-hover-border-color: #8ea1f2;
}

/* Make dropdown full-width on mobile */
@media (max-width: 991.98px) {
  .navbar .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin-top: 0;
  }
}

/* Glass navbar effect (subtle transparency in dark) */
.glass-nav {
  backdrop-filter: saturate(150%) blur(8px);
  background-color: rgba(20, 20, 28, 0.65) !important;
}

/* Hero gradient and energy accents */
.hero-gradient {
  position: relative;
  color: var(--bs-body-color);
  background:
    radial-gradient(1000px 600px at 20% 30%, rgba(0, 255, 200, 0.15), transparent 95%),
    radial-gradient(800px 400px at 80% 70%, rgba(255, 0, 150, 0.1), transparent 90%),
    linear-gradient(
      135deg,
      var(--bs-body-bg) 0%,
      rgba(var(--bs-primary-rgb), 0.08) 40%,
      rgba(var(--bs-secondary-rgb), 0.08) 100%
    );
  background-size: 200% 200%;
  animation: heroPulse 10s ease-in-out infinite;
  overflow: hidden; /* ensure pseudo-element stays inside */
}

/* fade-out mask at the bottom */
.hero-gradient::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bs-body-bg));
  pointer-events: none; /* ✅ allow clicks to pass through */
  z-index: -1; /* push behind content */
}

@keyframes heroPulse {
  0% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg);
  }
  50% {
    background-position: 100% 50%;
    filter: hue-rotate(30deg);
  }
  100% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg);
  }
}

.text-glow {
  text-shadow: 0 0 18px rgba(114,137,218,0.45), 0 0 4px rgba(255,255,255,0.12);
}

.energy {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
  animation: drift 18s ease-in-out infinite;
}
.energy-a {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(114,137,218,0.35), transparent 60%);
  top: -40px; left: -60px;
}
.energy-b {
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(0,200,150,0.3), transparent 60%);
  bottom: -40px; right: -40px;
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(12px, -8px) scale(1.08); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Device frame in hero */
.device-frame {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.15);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.screen {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0f2027 0%, #2c5364 50%, #1a1a40 100%);
}
.shimmer {
  position: relative;
}
.shimmer::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.06) 40%, transparent 60%);
  animation: shine 2.4s linear infinite;
}
@keyframes shine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* Accent button */
.btn-accent {
  color: #0a0a0f;
  background-color: #00C896;
  border-color: #00C896;
}
.btn-accent:hover {
  color: #0a0a0f;
  background-color: #00E0A8;
  border-color: #00E0A8;
}

/* Feature cards with subtle border and hover lift */
.feature-card {
  border: 1px solid var(--bs-border-color);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(114,137,218,0.35);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* Colored dots for features */
.feature-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}
.dot-blue   { color: #4A90E2; background-color: currentColor; }
.dot-purple { color: #7289DA; background-color: currentColor; }
.dot-green  { color: #00C896; background-color: currentColor; }
.dot-cyan   { color: #00B8D9; background-color: currentColor; }
.dot-yellow { color: #FFC400; background-color: currentColor; }
.dot-pink   { color: #FF4D8C; background-color: currentColor; }

/* Code card: dark editor vibe */
.code-card {
  background: #1e1e2a;
  border: 1px solid rgba(255,255,255,0.08);
}
.code-block {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: #f8f9fa;
  white-space: pre;
}

/* Info card links */
.link-accent {
  color: var(--bs-link-color);
  text-decoration: none;
}
.link-accent:hover {
  color: var(--bs-link-hover-color);
  text-decoration: underline;
}

/* Showcase cards */
.showcase {
  border: 1px solid var(--bs-border-color);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.showcase:hover {
  transform: translateY(-3px);
  border-color: rgba(114,137,218,0.35);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* Spacing utilities for hero section */
.py-lg-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }


/* Keep icon aligned and sized consistently */
.github-icon {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

/* Ensure good contrast in both themes */
:root .nav-link {
  color: var(--bs-nav-link-color, inherit);
}
[data-bs-theme="dark"] .nav-link {
  color: #e9ecef;
}
[data-bs-theme="dark"] .nav-link:hover {
  color: #ffffff;
}

.nav-link:hover .github-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(114,137,218,0.45));
}

.navbar .nav-link svg {
  vertical-align: middle;
}

.nav-link.active {
  font-weight: 600;
  border-bottom: 2px solid var(--bs-primary);
  color: var(--bs-primary) !important;
}

/* donate card style */

.sponsor-bio {
  color: var(--bs-body-color);
}

.sponsor-intro {
  font-style: italic;
  font-weight: bold;
  color: var(--bs-body-color);
}

/* hide original radio */
.sponsor-radio {
  position: absolute;
  opacity: 0;
}

/* card container */
.sponsor-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .sponsor-cards {
    grid-template-columns: 1fr;
  }
}

/* card style */
.sponsor-card {
  position: relative;
  padding: 1.5rem;
  border: 2px solid var(--bs-border-color);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

/* card selected style */
.sponsor-radio:checked + .sponsor-card {
  border-color: var(--bs-primary);
  box-shadow: 0 4px 15px rgba(var(--bs-primary-rgb), 0.2);
}

/* price style */
.price {
  font-size: 1.5rem;
  color: var(--bs-primary);
  margin: 0.5rem 0;
}

/* custom amount */
.custom-amount {
  display: none;
  margin-top: 1.25rem;
}

#custom:checked ~ .custom-amount {
  display: block;
}

/* amount input */
.amount-wrapper {
  position: relative;
  width: 250px;
  margin: 1.25rem 0;
}

.amount-input {
  width: 100%;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--bs-border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
}

.currency-symbol {
  font-weight: bold;
  position: absolute;
  top: 52%;
  transform: translateY(-50%);
  color: var(--bs-body-color);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#amount-prefix {
  left: 12px;
}

#amount-suffix {
  right: 12px;
}

.amount-input:focus ~ .currency-symbol,
.amount-input:not(:placeholder-shown) ~ .currency-symbol {
  opacity: 1;
}

/* checkbox */
input[type="checkbox"] {
  display: none;
}

.checkbox {
  width: 30px;
  height: 30px;
  border: 3px solid var(--bs-primary);
  border-radius: 0.375rem;
  display: inline-block;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  box-sizing: border-box;
  background-color: transparent;
}

input[type="checkbox"]:checked + .checkbox {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

input[type="checkbox"]:checked + .checkbox::after {
  content: '';
  position: absolute;
  top: 42%;
  left: 50%;
  width: 9px;
  height: 15px;
  border: solid var(--bs-light);
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  box-sizing: border-box;
}

.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  gap: 0.625rem;
  cursor: pointer;
  font-weight: bold;
  color: var(--bs-body-color);
}

/* scroll behavior */
html {
  scroll-behavior: smooth;
}
section {
  scroll-margin-top: 80px;
}

/* nav donate button style */
.nav-donate {
  border: 1px solid var(--bs-primary);
  border-radius: 0.375rem; /* same as .btn rounded */
  padding: 0.375rem 0.75rem;
  color: var(--bs-primary);
  transition: all 0.2s ease-in-out;
}

.nav-donate:hover,
.nav-donate:focus {
  background-color: var(--bs-primary);
  color: #fff;
  text-decoration: none;
}

/* wexin/alipay donate via qrcode */
/* QR card container */
.qr-card {
  height: 360px; /* unified card height */
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background-color: var(--bs-body-bg);
  padding: 0.5rem; /* small margin inside card */
  text-align: center;
}

/* QR image scaling */
.qr-card img {
  max-height: 100%;   /* fill card height */
  max-width: 100%;    /* fill card width */
  object-fit: contain; /* keep aspect ratio */
  flex-grow: 1;        /* expand inside flex container */
}

/* base fade-in animation */
.fade-in-list .list-group-item {
  opacity: 0;
  transform: translateY(10px);
}

.fade-in-list .list-group-item.visible {
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-list .list-group-item.visible:nth-child(1) { animation-delay: 0.2s; }
.fade-in-list .list-group-item.visible:nth-child(2) { animation-delay: 0.4s; }
.fade-in-list .list-group-item.visible:nth-child(3) { animation-delay: 0.6s; }
.fade-in-list .list-group-item.visible:nth-child(4) { animation-delay: 0.8s; }
.fade-in-list .list-group-item.visible:nth-child(5) { animation-delay: 1.0s; }
.fade-in-list .list-group-item.visible:nth-child(6) { animation-delay: 1.2s; }
.fade-in-list .list-group-item.visible:nth-child(7) { animation-delay: 1.4s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* bootstrap tooltip style */
.tooltip {
  --bs-tooltip-max-width: 390px;
}

.tooltip-inner {
  white-space: pre-line; /* preserve lf */
  text-align: left;
}

/* ensure svg icon align vertical center */
svg.bi {
  width: 1em;
  height: 1em;
  vertical-align: -.125em;
}
