:root {
  --bg: #2F2C3D;
  --fg: #e9e9ee;
  --muted: rgba(233,233,238,0.65);
  --muted2: rgba(233,233,238,0.35);
  --card: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

/* body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  letter-spacing: -0.2px;
} */

body {
  margin: 0;
  min-height: 100vh;
  
  background-color: #000;
  background-image: url("/assets/bg2.gif");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;

  color: #fff;
  font-family: monospace;
  
  /* 텍스트 선택 방지 */
  user-select: none;
  -webkit-user-select: none;
}

/* 이미지 드래그 방지 */
img {
  -webkit-user-drag: none;
  user-drag: none;
}

.wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.amount {
  text-align: center;
  margin-bottom: 100px;
}

.amount__value {
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1;
  font-weight: 700;
}

.address {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  position: relative;
  margin-top: 18px; 
  margin-bottom: 28px;
  max-width: min(680px, 92vw);
}

.address__text {
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(520px, 70vw);
}

.copyBtn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--fg);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.copyBtn:hover { background: rgba(255,255,255,0.05); }
.copyBtn:active { transform: translateY(1px); }

.copyBtn__icon {
  width: 18px;
  height: 18px;
}

.toast {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.55);
  color: var(--fg);
  border-radius: 999px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.toast.show { opacity: 1; }

.character {
  display: grid;
  place-items: center;
}

.character__img {
  width: 80px;
  height: auto;
  image-rendering: pixelated; /* 도트 느낌 강화 */
  filter: contrast(1.05) saturate(0.95);
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms ease;
}

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

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  width: 90%;
  max-width: 400px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal__content {
  transform: translateY(0);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.modal__close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal__close:hover {
  color: #fff;
}

.modal__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.qr-placeholder {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.qr-placeholder__box {
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted2);
  letter-spacing: 2px;
}

.wallet-info__label {
  display: block;
  font-size: 12px;
  color: var(--muted2);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.wallet-info__address {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  word-break: break-all;
  color: #fff;
  font-family: monospace;
}

.modal__footer {
  margin-top: 32px;
}

.confirmBtn {
  width: 100%;
  padding: 14px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease;
}

.confirmBtn:hover {
  opacity: 0.9;
}

.confirmBtn:active {
  transform: scale(0.98);
}

.donationBtn {
  margin-top: 10px;

  background: transparent;
  border: 1px solid rgba(255,255,255,0.55);
  color: rgba(255,255,255,0.95);

  padding: 7px 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-family: monospace;

  cursor: pointer;

  animation: donationPulse 4.5s ease-in-out infinite;
}

@keyframes donationPulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255,255,255,0);
    opacity: 0.85;
  }
  50% {
    box-shadow: 0 0 8px rgba(255,255,255,0.35);
    opacity: 1;
  }
}

.donationBtn:hover {
  background: rgba(255,255,255,0.08);
}

.qr-placeholder__box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}