
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.auth-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-radius: 28px;
  padding: 48px 40px;
  max-width: 440px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.auth-modal::-webkit-scrollbar {
  display: none;
}
.auth-modal .modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.auth-modal .modal-close:hover {
  background: rgba(28, 156, 252, 0.1);
  color: rgba(28, 156, 252, 1);
  transform: rotate(90deg);
}
.auth-modal .modal-header {
  text-align: center;
  margin-bottom: 30px;
}
.auth-modal .modal-header .modal-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #1C9CFC 0%, #5AC8FA 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(28, 156, 252, 0.3);
}
.auth-modal .modal-header h2 {
  color: #1d1d1f;
  font-size: 1.8rem;
  margin-bottom: 10px;
  font-weight: 600;
}
.auth-modal .modal-header p {
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.95rem;
}
.auth-modal .auth-form .form-group {
  margin-bottom: 20px;
}
.auth-modal .auth-form .form-group label {
  display: block;
  color: #1d1d1f;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.auth-modal .auth-form .form-group input {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 17px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(0, 0, 0, 0.03);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}
.auth-modal .auth-form .form-group input:focus {
  outline: none;
  border-color: rgba(28, 156, 252, 0.5);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(28, 156, 252, 0.1);
}
.auth-modal .auth-form .form-group input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}
.auth-modal .auth-form .form-group input.error {
  border-color: #FF3B30;
  background: rgba(255, 59, 48, 0.05);
}
.auth-modal .auth-form .form-group .error-message {
  color: #FF3B30;
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}
.auth-modal .auth-form .form-group .error-message.show {
  display: block;
}
.auth-modal .auth-form .form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.auth-modal .auth-form .form-checkbox input[type=checkbox] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.auth-modal .auth-form .form-checkbox label {
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0;
}
.auth-modal .auth-form .form-checkbox label a {
  color: #1C9CFC;
  text-decoration: none;
}
.auth-modal .auth-form .form-checkbox label a:hover {
  text-decoration: underline;
}
.auth-modal .auth-form .btn-submit {
  width: 100%;
  background: linear-gradient(180deg, #1C9CFC 0%, #1478B8 100%);
  color: white;
  padding: 17px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(28, 156, 252, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}
.auth-modal .auth-form .btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(28, 156, 252, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.auth-modal .auth-form .btn-submit:active {
  transform: scale(0.98);
}
.auth-modal .auth-form .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.auth-modal .auth-form .forgot-password {
  text-align: center;
  margin-bottom: 20px;
}
.auth-modal .auth-form .forgot-password a {
  color: #1C9CFC;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.auth-modal .auth-form .forgot-password a:hover {
  text-decoration: underline;
}
.auth-modal .modal-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.auth-modal .modal-footer p {
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.95rem;
}
.auth-modal .modal-footer p a {
  color: #1C9CFC;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.auth-modal .modal-footer p a:hover {
  text-decoration: underline;
}
.auth-modal .register-fields {
  display: none;
}
.auth-modal .register-fields.show {
  display: block;
}
.auth-modal .auth-form .form-checkbox.register-fields {
  display: none;
}
.auth-modal .auth-form .form-checkbox.register-fields.show {
  display: flex;
}

.auth-modal .disclaimer {
  background: rgba(255, 204, 0, 0.1);
  border: 1px solid rgba(255, 204, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.7);
}

.auth-modal .disclaimer strong {
  color: rgba(0, 0, 0, 0.85);
  display: block;
  margin-bottom: 8px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-divider span {
  padding: 0 16px;
}

.btn-google {
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.87);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-google:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-google:active {
  transform: scale(0.98);
}

.btn-google svg {
  flex-shrink: 0;
}

@media (max-width: 500px) {
  .auth-modal {
    padding: 30px 20px;
    border-radius: 20px;
  }
}