/* 🎨 FONT + RESET */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  background: #0b0f1c;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.wrapper {
  width: 100%;
  max-width: 1100px;
  padding: 20px;
  box-sizing: border-box;
}

.header {
  text-align: center;
  margin-bottom: 25px;
}

.header h1 {
  margin: 8px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #00d4ff;
}

.header p {
  color: #aaa;
  font-size: 0.9rem;
}

.container {
  display: flex;
  gap: 25px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* 🧱 CARD NHẬP THÔNG TIN */
.card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 25px;
  flex: 1;
  min-width: 300px;
  max-width: 450px;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.1);
}

.card h2 {
  font-weight: 600;
  margin-bottom: 20px;
  color: #fff;
  font-size: 1.2rem;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #b0b0b0;
}

input,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.95rem;
  box-sizing: border-box;
  resize: none;
}

textarea {
  min-height: 70px;
}

input:focus,
textarea:focus {
  outline: 2px solid #00d4ff;
}

/* 🧾 NÚT */
.button-group,
.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #7b2fff);
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #00d4ff;
  font-weight: 500;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.1);
}

/* 🧭 QR SECTION */
.qr-display-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 25px;
  flex: 1;
  min-width: 300px;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.1);
}

.qr-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  min-height: 300px;
}

.qr-image {
  width: 250px;
  height: 250px;
  max-width: 90%;
  border-radius: 8px;
}

.qr-placeholder {
  font-size: 0.85rem;
  color: #aaa;
}

.qr-title {
  margin-bottom: 8px;
  font-weight: 600;
  color: #00d4ff;
}

/* 🩵 HIỆU ỨNG KHI NHẬN DONATE */
.qr-success {
  background: rgba(15, 15, 15, 0.9);
  border: 2px solid #00ff99;
  color: #fff;
  padding: 20px 25px;
  border-radius: 16px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 0 25px #00ff99;
  animation: fadeIn 0.4s ease-out, pulse 2s infinite alternate;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  from { box-shadow: 0 0 20px #00ff99; }
  to { box-shadow: 0 0 35px #00ffaa; }
}
/* ⚡ CHO MOBILE */
@media (max-width: 768px) {
  body {
    align-items: flex-start;
  }

  .header h1 {
    font-size: 1.6rem;
  }

  .container {
    flex-direction: column;
    align-items: stretch;
  }

  .card,
  .qr-display-section {
    width: 100%;
    max-width: 100%;
    padding: 18px;
  }

  .qr-image {
    width: 200px;
    height: 200px;
  }

  button {
    font-size: 0.95rem;
    padding: 10px 15px;
  }
}

.footer {
  text-align: center;
  margin-top: 25px;
  font-size: 0.85rem;
  color: #777;
}
.qr-success {
  animation: glowSuccess 1.5s infinite alternate;
  text-align: center;
}
@keyframes glowSuccess {
  0% {
    box-shadow: 0 0 15px rgba(0, 255, 128, 0.4);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 25px rgba(0, 255, 128, 0.7);
    transform: scale(1.02);
  }
}
/* ✅ Loading xoay trong QR */
.qr-image-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.qr-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border-radius: inherit;
  backdrop-filter: blur(3px);
}

.qr-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 212, 255, 0.5);
  border-top-color: #00d4ff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ✅ Khi nhận donate */
.qr-success-box {
  background: linear-gradient(135deg, rgba(0, 255, 128, 0.15), rgba(0, 212, 255, 0.08));
  border: 1px solid rgba(0, 255, 170, 0.2);
  box-shadow: 0 0 25px rgba(0, 255, 150, 0.3);
  border-radius: 20px;
  padding: 25px 30px;
  text-align: center;
  animation: fadeInPop 0.6s ease-out;
}

.qr-success-text {
  font-size: 22px;
  color: #00ffcc;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(0, 255, 200, 0.6);
}

.qr-success-box p {
  font-size: 15px;
  color: #e6faff;
  margin-top: 4px;
}

@keyframes fadeInPop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ✅ Glow effect nhẹ cho toàn khung QR */
.qr-success-anim {
  animation: pulseGlow 2s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 20px rgba(0, 255, 150, 0.15);
  }
  100% {
    box-shadow: 0 0 35px rgba(0, 255, 180, 0.35);
  }
}

/* 📱 Responsive cho điện thoại (giữ gradient gốc) */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .card,
  .qr-display-section {
    width: 95%;
    border-radius: 18px;
  }

  .qr-image {
    width: 210px;
    height: 210px;
  }

  .qr-success-box {
    padding: 20px;
  }

  .qr-success-text {
    font-size: 20px;
  }
}
.footer i.fa-heart {
  color: #ff4b6e;
  text-shadow: 0 0 8px rgba(255, 75, 110, 0.6);
  animation: heartbeat 1.3s infinite ease-in-out;
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  25% {
    transform: scale(1.3);
    opacity: 1;
  }
  40% {
    transform: scale(1.1);
    opacity: 0.95;
  }
  60% {
    transform: scale(1.25);
    opacity: 1;
  }
  80% {
    transform: scale(1);
    opacity: 0.9;
  }
}

.footer a {
  color: #00d4ff;
  text-decoration: none;
  transition: 0.2s;
}

.footer a:hover {
  color: #00ffcc;
}
