#terms-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6, 16, 30, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: termsOverlayIn 0.18s ease;
}

#terms-overlay[hidden] {
  display: none;
}

.terms-modal {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  width: min(100%, 440px);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.12);
  animation: termsModalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.terms-modal-accent {
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #c6a354 20%,
    #e8c47a 50%,
    #c6a354 80%,
    transparent
  );
}

.terms-modal-body {
  padding: 28px 28px 24px;
}

.terms-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(39, 62, 87, 0.07);
  border: 1.5px solid rgba(39, 62, 87, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.terms-modal-icon svg {
  width: 20px;
  height: 20px;
  color: #273e57;
}

.terms-modal-body h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0a1626;
  letter-spacing: 0;
}

.terms-modal-body p {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: #4a5a73;
  line-height: 1.6;
}

.terms-modal-body a {
  color: #273e57;
  font-weight: 600;
}

.terms-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f6f9fd;
  border: 1px solid rgba(39, 62, 87, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  cursor: pointer;
}

.terms-check-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #273e57;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.terms-check-label {
  font-size: 13px;
  color: #273e57;
  line-height: 1.5;
  cursor: pointer;
}

.terms-check-label a {
  color: #c6a354;
}

.terms-modal-actions {
  display: flex;
  gap: 8px;
}

.terms-btn-primary {
  flex: 1;
  height: 46px;
  background: linear-gradient(135deg, #c6a354, #d9b96a 50%, #c6a354);
  background-size: 200% 100%;
  color: #0a1626;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition:
    background-position 0.3s,
    opacity 0.15s;
}

.terms-btn-primary:hover {
  background-position: 100% 0;
}

.terms-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.terms-btn-ghost {
  height: 46px;
  padding: 0 18px;
  background: none;
  border: 1px solid rgba(39, 62, 87, 0.18);
  border-radius: 12px;
  color: #4a5a73;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.terms-btn-ghost:hover {
  background: rgba(39, 62, 87, 0.05);
}

@keyframes termsOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes termsModalIn {
  from {
    transform: scale(0.94) translateY(8px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
