/* ==========================================================
   DONATION / TOP-UP RPS MODAL (Prestige Final Fixed Version)
   ========================================================== */

/* ==========================================================
   Base Overlay + Centering
   ========================================================== */
#donate-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 40px 20px;
  z-index: 99999; /* Higher than any header */
  overflow-y: auto; /* Allows scroll on small screens */
}

#donate-modal.show {
  display: flex !important;
  animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================
   Modal Content
   ========================================================== */
#donate-modal .modal-content {
  position: relative;
  margin: auto;
  width: 90%;
  max-width: 900px;
  padding: 50px 60px;
  border-radius: 20px;
  background: radial-gradient(circle at top, rgba(15,25,60,0.98) 0%, rgba(5,10,25,0.98) 100%);
  border: 1px solid rgba(80,150,255,0.35);
  box-shadow: 0 0 50px rgba(0,150,255,0.3);
  color: #e0f0ff;
  overflow: visible;
  z-index: 2;
  transform: none !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
}

/* ==========================================================
   Title
   ========================================================== */
#donate-modal .modal-title span {
  display: block;
  font-size: 1.8em;
  font-weight: 700;
  color: #00d4ff;
  text-shadow: 0 0 12px rgba(0,200,255,0.7);
  letter-spacing: 1px;
  margin-bottom: 35px;
}

/* ==========================================================
   Tabs (Payment Method Switcher)
   ========================================================== */
#donate-modal .payment-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 35px;
}

#donate-modal .tab-btn {
  background: rgba(0, 40, 80, 0.7);
  border: 1px solid rgba(0,150,255,0.4);
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 1em;
  font-weight: 600;
  text-transform: uppercase;
  color: #aee3ff;
  cursor: pointer;
  transition: 0.3s;
}

#donate-modal .tab-btn.active,
#donate-modal .tab-btn:hover {
  background: linear-gradient(90deg, #009dff, #00eaff);
  color: #fff;
  box-shadow: 0 0 15px rgba(0,200,255,0.4);
}

/* ==========================================================
   Tab Content Animations
   ========================================================== */
#donate-modal .tab-content {
  display: none;
  animation: fadeTab 0.3s ease;
}
#donate-modal .tab-content.active {
  display: block;
}

@keyframes fadeTab {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   Payment Summary
   ========================================================== */
#donate-modal .payment-summary {
  background: rgba(10,20,40,0.85);
  border: 1px solid rgba(100,150,255,0.25);
  border-radius: 12px;
  padding: 25px 35px;
  margin: 0 auto 30px auto;
  width: 70%;
  text-align: left;
  font-size: 1.05em;
  color: #cfeaff;
  line-height: 1.6;
}

#donate-modal .payment-summary div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

#donate-modal .payment-summary .total span {
  color: #00ffff;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0,255,255,0.6);
}

/* ==========================================================
   Payment Method Content
   ========================================================== */
#donate-modal img {
  max-width: 260px;
  display: block;
  margin: 10px auto;
  border-radius: 8px;
}

#donate-modal .crypto-address {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

#donate-modal .crypto-address input {
  width: 360px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(80,150,255,0.3);
  color: #aee3ff;
  padding: 10px 12px;
  border-radius: 6px;
  text-align: center;
}

#donate-modal .copy-btn {
  background: linear-gradient(90deg,#00baff,#007fff);
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}
#donate-modal .copy-btn:hover {
  background: linear-gradient(90deg,#00eaff,#00aaff);
  box-shadow: 0 0 10px rgba(0,200,255,0.4);
}

/* ==========================================================
   Terms Text
   ========================================================== */
#donate-modal .terms-box {
  font-size: 0.9em;
  color: #9ecfff;
  text-align: center;
  margin-top: 20px;
}
#donate-modal .terms-box a {
  color: #00d4ff;
  text-decoration: none;
}
#donate-modal .terms-box a:hover { text-decoration: underline; }

/* ==========================================================
   Decorative Frame Corners + Aura
   ========================================================== */
#donate-modal .modal-content::before,
#donate-modal .modal-content::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  background: url('../images/crystal-frame-corner.png') no-repeat center/contain;
  opacity: 0.8;
  pointer-events: none;
}
#donate-modal .modal-content::before {
  top: -60px;
  left: -60px;
}
#donate-modal .modal-content::after {
  bottom: -60px;
  right: -60px;
  transform: rotate(180deg);
}

/* ==========================================================
   Aura Pulse Effect (Centered)
   ========================================================== */
#donate-modal::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(0,160,255,0.35) 0%, rgba(0,40,100,0) 70%);
  border-radius: 50%;
  filter: blur(40px);
  transform: translate(-50%, -50%);
  animation: auraPulse 4s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes auraPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.1); }
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 768px) {
  #donate-modal .modal-content {
    width: 95%;
    padding: 30px 20px;
  }
  #donate-modal .payment-summary {
    width: 100%;
    font-size: 0.95em;
  }
  #donate-modal .crypto-address input {
    width: 240px;
    font-size: 0.9em;
  }
}
/* ============================
   LAYOUT REFINEMENT (BETTER BALANCE)
   ============================ */

/* Reduce vertical space between title → tabs → summary */
#donate-modal .modal-title {
  margin-bottom: 15px !important;
}

#donate-modal .payment-tabs {
  margin-top: 5px !important;
  margin-bottom: 20px !important;
}

/* Move tab buttons closer together */
#donate-modal .tab-btn {
  padding: 10px 24px;
  font-size: 0.95em;
}

/* Compact PayPal / summary section */
#donate-modal .tab-content.active {
  display: block;
  margin-top: 5px;
}

#donate-modal .payment-summary {
  width: 60%;
  margin: 15px auto 15px auto;
  padding: 20px 30px;
  background: rgba(10,20,40,0.9);
  border: 1px solid rgba(0,160,255,0.25);
  border-radius: 10px;
  box-shadow: inset 0 0 25px rgba(0,120,255,0.15);
  line-height: 1.5;
  font-size: 1em;
}

/* Tighten the rows inside summary */
#donate-modal .payment-summary div {
  padding: 4px 0;
}

/* Make “Total” stand out more */
#donate-modal .payment-summary .total span {
  color: #00ffff;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(0,255,255,0.7);
  font-size: 1.1em;
}

/* Terms text spacing fix */
#donate-modal .terms-box {
  margin-top: 10px;
  font-size: 0.85em;
  opacity: 0.9;
}

/* Keep PayPal button area close to summary */
#paypal-button-container {
  margin-top: 10px;
}

/* Add subtle hover glow for crypto input/button */
#donate-modal .crypto-address input:focus {
  box-shadow: 0 0 8px rgba(0,200,255,0.4);
  border-color: rgba(0,200,255,0.4);
}
#donate-modal .copy-btn:hover {
  transform: translateY(-2px);
}

/* Balance everything vertically (center block look) */
#donate-modal .modal-content {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* ===========================
   Donation Modal Layout (Refined)
   =========================== */
.package-grid {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 25px 0 30px;
  flex-wrap: wrap;
}

.package-card {
  background: radial-gradient(circle at top, rgba(0,30,60,0.9), rgba(0,10,25,0.9));
  border: 1px solid rgba(0,160,255,0.3);
  border-radius: 12px;
  padding: 20px 25px;
  width: 160px;
  cursor: pointer;
  transition: 0.25s ease;
  text-align: center;
  box-shadow: inset 0 0 12px rgba(0,120,255,0.15);
}

.package-card.active,
.package-card:hover {
  border-color: rgba(0,255,255,0.8);
  box-shadow: 0 0 20px rgba(0,255,255,0.35);
  transform: translateY(-3px);
}

.package-value {
  font-size: 1.3em;
  color: #00ffff;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0,255,255,0.7);
}

.package-rps {
  font-size: 1em;
  color: #bfe8ff;
  margin-top: 5px;
}

.package-bonus {
  font-size: 0.9em;
  color: #00bfff;
  margin-top: 3px;
}

/* Summary Box */
.summary-box {
  width: 320px;
  margin: 0 auto 20px;
  background: rgba(10,20,40,0.85);
  border: 1px solid rgba(100,150,255,0.25);
  border-radius: 10px;
  padding: 20px 25px;
  font-size: 0.95em;
  text-align: left;
  line-height: 1.5;
  color: #cfeaff;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  font-weight: 700;
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0,255,255,0.6);
}

/* Streamer Section */
.streamer-section {
  margin-top: 25px;
  text-align: center;
}
.streamer-section label {
  font-size: 0.9em;
  color: #b0d8ff;
}
.streamer-section input {
  margin-top: 8px;
  width: 280px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0,160,255,0.4);
  background: rgba(10,20,40,0.9);
  color: #aee3ff;
  text-align: center;
}

/* Donate Button */
.donate-btn {
  margin-top: 25px;
  font-size: 1.1em;
  padding: 12px 40px;
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .package-grid { gap: 15px; }
  .package-card { width: 140px; padding: 15px 20px; }
  .summary-box { width: 90%; }
}
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 25px;
  justify-items: center;
  margin: 25px 0 30px;
  padding: 0 20px;
}

.package-card {
  width: 180px;
  padding: 18px 20px;
  background: radial-gradient(circle at top, rgba(0,30,60,0.9), rgba(0,10,25,0.9));
  border: 1px solid rgba(0,160,255,0.3);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: inset 0 0 12px rgba(0,120,255,0.15);
}

.package-card .package-total {
  margin-top: 4px;
  font-size: 0.9em;
  color: #82eaff;
  opacity: 0.9;
}
.package-card[data-id="4"],
.package-card[data-id="5"] {
  box-shadow: 0 0 20px rgba(0,255,255,0.2), inset 0 0 10px rgba(0,120,255,0.2);
}
.package-card[data-id="4"]:hover,
.package-card[data-id="5"]:hover {
  box-shadow: 0 0 25px rgba(0,255,255,0.4), inset 0 0 10px rgba(0,200,255,0.4);
}
.package-card.active {
  border-color: rgba(0,255,255,0.8);
  box-shadow: 0 0 25px rgba(0,255,255,0.35), inset 0 0 10px rgba(0,120,255,0.25);
  transform: translateY(-4px);
  transition: all 0.25s ease-in-out;
}
