/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #1a1a2e;
  min-height: 100vh;
}

/* ===== Screen Container (Full viewport) ===== */
.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Background Layers ===== */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-medusa {
  position: absolute;
  inset: 0;
}

.medusa-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(83, 54, 209, 0.73);
  border: 1px solid rgba(159, 137, 255, 0.15);
}

/* ===== Header ===== */
.header {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  padding: 54px 33px 0;
  align-self: center;
}

.back-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.back-btn:hover {
  opacity: 0.8;
}

/* ===== Logo ===== */
.logo-container {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.logo {
  width: 77px;
  height: 53px;
}

/* ===== Card ===== */
.card {
  position: relative;
  z-index: 2;
  width: 320px;
  margin: 40px auto 40px;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 60px 30px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Card Title ===== */
.card-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  text-align: center;
  line-height: normal;
  width: 230px;
  margin-bottom: 30px;
}

/* ===== Form ===== */
.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

/* ===== Input Fields ===== */
.input-group {
  width: 261px;
}

.input-field {
  width: 100%;
  height: 42px;
  background-color: #6968c9;
  border: 1px solid #fff;
  border-radius: 10px;
  padding: 0 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field::placeholder {
  color: #fff;
  opacity: 1;
}

.input-field:focus {
  border-color: #04D9B2;
}

/* ===== Continue Button ===== */
.btn-continua {
  width: 261px;
  height: 40px;
  margin-top: 12px;
  background-color: #04D9B2;
  border: none;
  border-radius: 9999px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #060606;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.btn-continua:hover {
  opacity: 0.9;
}

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

.btn-continua.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.btn-continua.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #060606;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Field errors for auth pages */
.input-group .field-error {
  font-family: 'Open Sans', sans-serif;
  font-size: 10px;
  color: #ff6b6b;
  margin-top: 4px;
}

.input-group.field-has-error .input-field {
  border-color: #ff6b6b;
}

/* Toast (shared with forms.css) */
.ligo-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333;
  color: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 90%;
  text-align: center;
}
.ligo-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.ligo-toast.error { background: #d32f2f; }
.ligo-toast.success { background: #2e7d32; }

/* ===== Card Subtitle ===== */
.card-subtitle {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  color: #fff;
  text-align: center;
  line-height: normal;
  width: 260px;
  margin-bottom: 24px;
}

.card-subtitle strong {
  display: block;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
}

/* ===== Terms Text ===== */
.terms-text {
  margin-top: 18px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  color: #fff;
  text-align: center;
  line-height: normal;
  width: 260px;
}

.terms-link {
  color: #00d9b2;
  text-decoration: none;
}

.terms-link:hover {
  text-decoration: underline;
}

/* ===== Desktop (768px+) ===== */
@media (min-width: 768px) {
  .logo {
    width: 100px;
    height: 69px;
  }

  .card {
    width: 400px;
    padding: 60px 40px 40px;
  }

  .card-title {
    font-size: 18px;
    width: 280px;
  }

  .input-group {
    width: 100%;
  }

  .input-field {
    height: 48px;
    font-size: 14px;
  }

  .btn-continua {
    width: 100%;
    height: 46px;
    font-size: 14px;
  }

  .terms-text {
    font-size: 12px;
    width: 300px;
  }

  .card-subtitle {
    font-size: 13px;
    width: 300px;
  }
}
