/* =============================================================
   modal.css — Welcome modal and theme selection overlay
   ============================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modal-fade-in 0.3s ease;
}

.modal-overlay[hidden] { display: none; }

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: #fff;
  color: #1c1917;
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: modal-slide-up 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header { margin-bottom: 1.75rem; text-align: center; }
.modal-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.modal-header p {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: #64748b;
}

.modal-themes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.theme-choice {
  display: grid;
  grid-template-columns: 2rem 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 0.75rem;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  text-align: left;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  cursor: pointer;
}

.theme-choice:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  transform: translateX(3px);
}

.theme-choice:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
}

.theme-choice[aria-pressed="true"] {
  border-color: #3b82f6;
  background: #eff6ff;
}

.theme-choice-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  font-size: 1.4rem;
  text-align: center;
}

.theme-choice-name {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.theme-choice-desc {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

.modal-footer-note {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

@media (max-width: 480px) {
  .modal-card {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }
}
