/* Auth modal — 1:1 dyoot login/register overlay */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.auth-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.auth-modal {
  position: relative;
  width: min(400px, 100%);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s;
}

.auth-modal-overlay.open .auth-modal {
  transform: translateY(0) scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(0, 0, 0, 0.35);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}

.auth-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.6);
}

.auth-modal-body {
  padding: 36px 32px 20px;
}

.auth-modal-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.auth-modal-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(46, 103, 84, 0.18);
  margin-bottom: 10px;
}

.auth-modal-name {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  color: #141414;
  letter-spacing: -0.02em;
}

.auth-modal-error {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.auth-modal-error.show { display: block; }

.auth-modal-hint {
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #f0fdf4;
  color: #166534;
  border-radius: 8px;
  font-size: 12px;
  display: none;
}

.auth-modal-hint.show { display: block; }

.auth-modal-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(20, 20, 20, 0.1);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-modal-field:focus-within {
  border-color: rgba(46, 103, 84, 0.45);
  box-shadow: 0 0 0 3px rgba(46, 103, 84, 0.08);
}

.auth-modal-field svg {
  flex-shrink: 0;
  color: rgba(20, 20, 20, 0.35);
}

.auth-modal-field input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #141414;
  background: transparent;
  min-width: 0;
}

.auth-modal-field input::placeholder {
  color: rgba(20, 20, 20, 0.35);
}

.auth-modal-code-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-modal-code-row .auth-modal-field {
  flex: 1;
  margin-bottom: 0;
}

.auth-modal-code-btn {
  flex-shrink: 0;
  width: 118px;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  color: #5b6b8a;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-modal-code-btn:hover:not(:disabled) {
  background: #e8eaef;
}

.auth-modal-code-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-modal-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: #2e6754;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.auth-modal-submit:hover:not(:disabled) {
  background: #285b4a;
}

.auth-modal-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  font-size: 12px;
  color: rgba(20, 20, 20, 0.35);
}

.auth-modal-divider::before,
.auth-modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(20, 20, 20, 0.08);
}

.auth-modal-alt {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(20, 20, 20, 0.1);
  border-radius: 10px;
  background: #fff;
  color: #141414;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-modal-alt:hover {
  background: rgba(20, 20, 20, 0.03);
}

.auth-modal-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(20, 20, 20, 0.45);
  cursor: pointer;
}

.auth-modal-agree input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #2e6754;
}

.auth-modal-agree a {
  color: #2e6754;
  text-decoration: none;
}

.auth-modal-agree a:hover {
  text-decoration: underline;
}

.auth-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: #161242;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
}

.auth-modal-footer-bonus {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.auth-modal-footer-bonus .bolt {
  color: #fbbf24;
}

/* Standalone login page */
.auth-modal-page {
  min-height: 100vh;
}

.auth-modal-page .auth-modal-overlay {
  position: relative;
  opacity: 1;
  visibility: visible;
  min-height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.auth-modal-page .auth-modal {
  transform: none;
}

@media (max-width: 480px) {
  .auth-modal-body { padding: 32px 20px 16px; }
  .auth-modal-footer { padding: 12px 20px; font-size: 12px; }
  .auth-modal-code-btn { width: 104px; font-size: 12px; }
}
