/* === LEGAL MODAL === */
.legal-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
  font-family: 'Arial', sans-serif;
}

.legal-modal.show {
  opacity: 1;
  pointer-events: all;
}

.legal-content {
  background: #fff;
  color: #333;
  border-radius: 16px;
  padding: 2rem;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.legal-content h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.legal-content p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Close button */
.close-legal {
  position: sticky;
  top: 0.2rem;
  right: 0.2rem;
  align-self: flex-end;
  font-size: 2.2rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #555;
  transition: color 0.2s ease;
  float: right;
}

.close-legal:hover {
  color: #000;
}

/* === Dark mode support === */
body.dark-mode .legal-content {
  background: #1e1e1e;
  color: #fff;
}

body.dark-mode .close-legal {
  color: #fff;
}
