/* Copyright (c) 2025 Sikape. All rights reserved. */
:root {
  --bg1: #0f1724;
  --bg2: #1a2233;
  --bg3: #0b1628;
  --muted: #9aa6b2;
  --accent: linear-gradient(90deg,#3b82f6,#06b6d4);
  --btn-bg: rgba(255,255,255,0.06);
  --btn-hover: rgba(255,255,255,0.09);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

* { box-sizing: border-box; }

body {
  background:
    radial-gradient(1200px 800px at 85% 10%, rgba(46,91,173,0.28), rgba(0,0,0,0) 60%),
    linear-gradient(125deg, #0c1424 0%, #1b2f55 35%, #0b1628 70%, #1a2f52 100%);
  background-size: auto, 300% 300%;
  background-position: center, 0% 0%;
  animation: bgShift 30s ease-in-out infinite;
  color: #eef2f7;
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none !important; }
}

@keyframes bgShift {
  0%   { background-position: center, 0% 0%; }
  50%  { background-position: center, 100% 100%; }
  100% { background-position: center, 0% 0%; }
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  position: relative;
}

.page::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 180px;
  background: linear-gradient(to top, rgba(0,0,0,0.35), transparent);
  pointer-events: none;
}

.card {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 48px 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 20px;
  text-align: center;
  overflow: hidden;
  transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), filter 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

#starsCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.avatar-wrap {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 5px;
  border-radius: 50%;
  background: white;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.avatar-wrap:hover {
  transform: scale(1.03);
}

.avatar-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  background-size: 300% 300%;
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: normal;
}
.avatar-wrap:hover::after {
  opacity: 0.85;
  animation: avatarGradient 3s ease infinite;
}
@media (prefers-reduced-motion: reduce) {
  .avatar-wrap::after { animation: none; transition: none; opacity: 0.75; }
}
@keyframes avatarGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.name {
  font-size: 26px;
  z-index: 1;
  position: relative;
  margin-top: 14px;
  cursor: default;
}

.role {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
  z-index: 1;
  position: relative;
  cursor: default;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease;
  cursor: pointer;
}
.social-icons a:hover { transform: scale(1.15); }
.social-icons img { width: 40px; height: 40px; display:block; }

.section-title,
.donate-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-top: 8px;
  margin-bottom: 8px;
  text-align: left;
  opacity: .9;
  cursor: default;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.btn {
  position: relative;
  display: block;
  padding: 0 18px;
  min-height: 56px;
  border-radius: 12px;
  background: var(--btn-bg);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  user-select: none;
  display: flex;
  align-items: center;
}
.btn:hover { background: var(--btn-hover); }
.btn, a { cursor: pointer; }

.btn-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: left .34s cubic-bezier(.2,.9,.2,1), transform .34s cubic-bezier(.2,.9,.2,1);
  white-space: nowrap;
  font-weight: 700;
  font-size: 16px;
  pointer-events: none;
}

.btn-desc {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%) translateX(-8px);
  opacity: 0;
  width: calc(100% - 36px);
  padding-left: 120px;
  box-sizing: border-box;
  text-align: left;
  font-size: 12px;
  line-height: 1.2;
  color: #e6f7ff;
  transition: opacity .28s ease, transform .28s ease, padding-left .34s ease;
  pointer-events: none;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.btn:hover .btn-text {
  left: 20px;
  transform: translateY(-50%);
}
.btn:hover .btn-desc {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 520px) {
  .page { padding: 18px 12px; }
  .card { padding: 30px 20px; }
  .btn { min-height: 50px; padding: 0 12px; }
  .btn-desc { display: none; }
  .btn:hover .btn-text { left: 50%; transform: translate(-50%,-50%); }
  #starsCanvas { will-change: auto; }
}

.wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--btn-bg);
  padding: 12px 14px;
  border-radius: 12px;
  transition: transform .12s ease, background .12s ease;
}
.wallet:hover {
  transform: translateY(-3px);
  background: var(--btn-hover);
}
.wallet-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.wallet-label { font-size: 13px; color: var(--muted); cursor: default; }
.wallet-address { font-size: 14px; user-select: none; cursor: default; }

.copy-btn {
  background: transparent;
  border: none;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, filter .15s ease;
}
.copy-btn:hover { transform: scale(1.15); }
.copy-icon {
  width: 22px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}

.btn:focus, .copy-btn:focus, .social-icons a:focus {
  outline: 3px solid rgba(59,130,246,0.18);
  outline-offset: 2px;
  border-radius: 10px;
}

.footer {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  z-index: 1;
  position: relative;
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .wallet {
    flex-wrap: wrap;
    gap: 8px;
  }
  .wallet-address {
    word-break: break-all;
    max-width: calc(100% - 40px);
  }
  .copy-btn {
    position: relative;
    right: 0;
    flex-shrink: 0;
  }
}

.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 600px at 50% 20%, rgba(59,130,246,.18), rgba(0,0,0,0) 60%),
    rgba(3, 10, 20, 0.72);
  backdrop-filter: blur(6px);
  animation: fadeIn .22s ease;
}
.modal-overlay.fade-out { animation: fadeOut .24s ease forwards; }

.modal-card {
  width: min(92vw, 420px);
  padding: 28px 22px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  text-align: center;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.modal-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}
.modal-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.loader {
  width: 38px; height: 38px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}

.r18-modal-card {
  width: min(92vw, 560px);
}
.r18-modal-title {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 10px;
}
.r18-modal-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}
.r18-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.r18-modal-btn {
  min-width: 120px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--btn-bg);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
  font-weight: 700;
  cursor: pointer;
}
.r18-modal-btn:hover { background: var(--btn-hover); transform: translateY(-2px); }


@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeOut { from { opacity: 1 } to { opacity: 0 } }

.falling-words {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}
.falling-words .word {
  position: absolute;
  top: -40px;
  left: var(--x, 50vw);
  transform: translateX(-50%);
  font-weight: 800;
  font-size: clamp(14px, 2.2vw, 22px);
  color: #e8f3ff;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
  opacity: 0;
  animation: wordFall var(--dur, 3s) linear forwards;
  will-change: transform, opacity;
}

@keyframes wordFall {
  0%   { transform: translate(-50%, -10vh) rotate(var(--rotS, -8deg)); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate(-50%, 110vh) rotate(var(--rotE, 8deg)); opacity: 0; }
}

.card.effect-shake-1 { animation: shake-1 0.5s ease-in-out; }
.card.effect-shake-2 { animation: shake-2 0.6s ease-in-out; }
.card.effect-blur { filter: blur(1.5px); }
.card.effect-insane { transform: perspective(800px) rotate3d(0, 1, 0, 25deg) rotate(-3deg); }
.card.effect-upside-down { transform: rotate(180deg); }

@keyframes shake-1 {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
@keyframes shake-2 {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  10% { transform: translate(-4px, -2px) rotate(-1deg); }
  20% { transform: translate(4px, 2px) rotate(1deg); }
  30% { transform: translate(-4px, 2px) rotate(0deg); }
  40% { transform: translate(4px, -2px) rotate(-1deg); }
  50% { transform: translate(-4px, -2px) rotate(1deg); }
  60% { transform: translate(4px, 2px) rotate(0deg); }
  70% { transform: translate(-4px, 2px) rotate(-1deg); }
  80% { transform: translate(4px, -2px) rotate(1deg); }
  90% { transform: translate(-4px, -2px) rotate(0deg); }
}