/* Modal specific styles */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 2000; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius2);
  padding: 40px; width: 90%; max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative;
  max-height: 90vh; overflow-y: auto;
  min-height: 300px;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--light); border: none; border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.modal-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.modal-sub { font-size: 14px; color: var(--mid); margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; }
.form-input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit;
  transition: border-color .2s; outline: none;
}
.form-input:focus { border-color: var(--red); }

.modal-brand {
  display: flex; align-items: center; gap: 8px;
  justify-content: center; margin-bottom: 20px;
}
.modal-brand-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--grad1);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--white); font-family: 'Noto Serif SC', serif;
  font-weight: 700;
}
.modal-brand-text {
  font-size: 18px; font-weight: 800; color: var(--dark);
}
.modal-brand-text span { color: var(--red); }

.modal-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0 16px; color: var(--mid); font-size: 13px;
}
.modal-divider::before, .modal-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.btn-outline-modal {
  width: 100%; padding: 13px;
  background: transparent; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 14px; font-weight: 700;
  color: var(--dark); cursor: pointer; transition: all .2s;
  text-align: center; display: block;
}
.btn-outline-modal:hover {
  background: var(--light); border-color: var(--red); color: var(--red);
}

.form-link {
  font-size: 12px; color: var(--mid); text-decoration: underline; transition: color .2s;
}
.form-link:hover { color: var(--red); }

.auth-error {
  background: rgba(196,30,58,0.08);
  border: 1px solid rgba(196,30,58,0.25);
  color: var(--red);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.5;
  display: none;
}

@media (max-width: 768px) {
  .modal { padding: 24px; }
  .modal-title { font-size: 20px; }
  .modal-sub { font-size: 13px; }
  .form-input { padding: 11px 14px; font-size: 13px; }
}
