:root{
  --bg: #071e26;
  --card: #0b2c36;
  --text:  #f5fcfd;
  --muted: #d2edf2;
  --border: rgba(255,255,255,.15);
  --primary: #4ecdc4;
  --primary-hover:#6adbd3;
  --danger: #ff6b6b;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(
      1200px 800px at 20% 10%,
      #7fd3de 0%,
      #2b7c8a 55%,
      #0f3a44 100%
    );
  color: var(--text);
}

.page{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
}

.card{
  width: min(860px, 100%);
  background: rgba(30, 84, 98, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
}

.header{
  padding: 22px 22px 0 22px;
}

.header h1{
  margin:0 0 8px 0;
  font-size: 1.35rem;
  letter-spacing: .2px;
}

.subtext{
  margin:0 0 12px 0;
  color: var(--muted);
  font-size: .95rem;
}

.callout{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255, 107, 107, .10);
  color: var(--text);
  line-height: 1.35;
}
.callout strong{ color: #ffe7e7; }

.nowrap{ white-space: nowrap; }

.meta{
  margin: 12px 0 0 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
}

.terms{
  margin: 16px 22px 0 22px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  max-height: 320px;
  overflow:auto;
}

.terms h2{
  margin: 10px 0 8px;
  font-size: 1.05rem;
}

.terms p, .terms li{
  color: var(--muted);
  line-height: 1.45;
  font-size: .95rem;
}

.terms ul{
  margin: 8px 0 0 20px;
}

.actions{
  padding: 18px 22px 22px 22px;
}

.checkboxes{
  display:flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}

.checkbox input{
  transform: translateY(2px);
}

.error{
  margin: 10px 2px 0;
  min-height: 1.2em;
  color: var(--danger);
  font-size: .9rem;
}

.buttons{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration:none;
  font-weight: 600;
  cursor:pointer;
  user-select:none;
}

.btn.primary{
  background: var(--primary);
  color: #081227;
  border-color: transparent;
}
.btn.primary:hover{ background: var(--primary-hover); }

.btn.secondary{
  background: transparent;
  color: var(--text);
}
.btn.secondary:hover{
  background: rgba(255,255,255,.06);
}

.btn.disabled{
  opacity: .45;
  pointer-events: auto;
  cursor: not-allowed;
}

.footer{
  padding: 0 22px 18px 22px;
  color: var(--muted);
}

.rule{
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.small{
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}

.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
}

.overlay-card{
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.overlay-card h2{
  margin: 0 0 8px 0;
}

.overlay-card p{
  margin: 0 0 14px 0;
  color: var(--muted);
}

/* Force hidden overlays to stay hidden */
.overlay[hidden] { display: none !important; }

@media (max-width: 520px){
  .terms{ max-height: 280px; }
  .buttons{ flex-direction: column; }
  .btn{ width: 100%; }
}