* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, sans-serif;
  background: #000;
  color: #eaeaea;
}

body.modal-open {
  overflow: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: -1;
}

.topbar {
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.topbar-inner {
  max-width: 1200px;
  margin: auto;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Cinzel, serif;
  font-weight: 700;
}

.brand img {
  width: 36px;
}

nav a {
  margin-left: 20px;
  color: #aaa;
  text-decoration: none;
}

nav a.active,
nav a:hover {
  color: #f5c46b;
}

.container {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}

h1 {
  font-family: Cinzel, serif;
  color: #f5c46b;
  margin: 0 0 10px;
}

.subtitle {
  opacity: .8;
  margin: 0;
}

.donate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .donate-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #0b0b0b;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 24px;
  text-align: left;
}

.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.amounts button {
  background: #111;
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: .15s ease;
}

.amounts button.active,
.amounts button:hover {
  background: #f5c46b;
  color: #000;
}

.custom-box {
  margin-top: 14px;
}

.custom-box label {
  display: block;
  font-size: 13px;
  opacity: .8;
  margin-bottom: 6px;
}

.custom-box input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #111;
  color: #fff;
  outline: none;
}

.custom-box .hint {
  margin-top: 6px;
  font-size: 12px;
  opacity: .65;
}

.rewards {
  margin-top: 20px;
}

.rewards .total {
  margin-top: 10px;
  font-size: 18px;
  color: #f5c46b;
}

.summary {
  background: #111;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.summary .big {
  font-size: 36px;
  color: #6dd6ff;
}

.summary .small {
  margin-top: 8px;
  color: #f5c46b;
}

.range-label {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 14px;
  opacity: .85;
}

input[type=range] {
  width: 100%;
  margin: 15px 0;
}

.range-values {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: .7;
}

.checkbox {
  display: block;
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.6;
}

.checkbox a {
  color: #f5c46b;
}

#donateBtn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #8b6b2d, #f5c46b);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: not-allowed;
  opacity: .6;
  color: #111;
}

#donateBtn.enabled {
  cursor: pointer;
  opacity: 1;
}

.secure {
  margin-top: 12px;
  font-size: 12px;
  opacity: .7;
  text-align: center;
}

.afterpay {
  margin-top: 10px;
  font-size: 12px;
  opacity: .7;
  text-align: center;
}

/* OLD TERMS PAGE STYLES */
.terms-card {
  background: #0b0b0b;
  border: 1px solid rgba(245,196,107,.25);
  border-radius: 16px;
  max-width: 900px;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

.terms-head {
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.terms-head h2 {
  margin: 0;
  font-family: Cinzel, serif;
  color: #f5c46b;
}

.terms-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 26px;
  cursor: pointer;
}

.terms-body {
  max-height: 65vh;
  overflow: auto;
  padding: 20px;
  text-align: left;
}

.terms-body h3 {
  color: #f5c46b;
  font-family: Cinzel, serif;
}

.terms-body p {
  font-size: 14px;
  line-height: 1.55;
}

.terms-note {
  margin-top: 14px;
  font-style: italic;
  opacity: .75;
}

.terms-foot {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.terms-accept {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  background: linear-gradient(135deg,#8b6b2d,#f5c46b);
  cursor: pointer;
}

/* POLICY MODAL */
.policy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.74);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

/* IMPORTANT FIX */
.policy-overlay[hidden] {
  display: none !important;
}

.policy-modal {
  width: min(860px, 92vw);
  background: #1f2d43;
  border-radius: 16px;
  padding: 26px 28px 22px;
  box-shadow: 0 25px 80px rgba(0,0,0,.65);
  text-align: left;
  border: 1px solid rgba(255,255,255,.08);
}

.policy-modal h2 {
  margin: 0 0 12px;
  font-size: 28px;
  font-family: Cinzel, serif;
  color: #ff8a00;
}

.policy-sub {
  margin: 0 0 14px;
  color: rgba(255,255,255,.85);
  font-size: 14px;
}

.policy-list {
  margin: 0 0 18px;
  padding-left: 18px;
  color: rgba(255,255,255,.88);
  font-size: 14px;
  line-height: 1.7;
}

.policy-list li {
  margin: 7px 0;
}

.policy-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.policy-cancelbtn,
.policy-closebtn,
.policy-acceptbtn {
  flex: 1 1 180px;
  padding: 16px 18px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.policy-cancelbtn {
  background: #334861;
  color: #fff;
}

.policy-closebtn {
  background: #ff7a00;
  color: #ffffff;
}

.policy-acceptbtn {
  background: linear-gradient(135deg, #8b6b2d, #f5c46b);
  color: #111;
}

.policy-cancelbtn:hover,
.policy-closebtn:hover,
.policy-acceptbtn:hover {
  filter: brightness(1.05);
}

@media (max-width: 640px) {
  .policy-modal {
    padding: 20px 18px 18px;
  }

  .policy-modal h2 {
    font-size: 22px;
  }

  .policy-actions {
    flex-direction: column;
  }
}