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

:root {
  /* ---- Brand palette: Tropical Lagoon — bright cyan/turquoise sea, gold sun accents ---- */
  --cream:  #F3FBFF;
  --navy:   #063A4A;
  --navy-2: #0A5066;

  --cyan:       #1EC8E0;
  --cyan-deep:  #0EA5C4;
  --cyan-bright:#7FE8F5;
  --gold:       #FFD166;
  --gold-deep:  #E8A93C;
  --ocean:      #2196C4;

  --text:  #063A4A;
  --muted: #3F7688;
  --dim:   #7BA6B5;

  --border:      rgba(30, 200, 224, 0.4);
  --border-soft: rgba(30, 200, 224, 0.2);

  --card:      rgba(255, 255, 255, 0.88);
  --card-tint: rgba(227, 249, 255, 0.92);

  --grad-cyan: linear-gradient(135deg, #7FE8F5 0%, #1EC8E0 45%, #0EA5C4 100%);
  --grad-gold: linear-gradient(135deg, #FFE49B 0%, #FFD166 50%, #E8A93C 100%);
  --grad-text: linear-gradient(135deg, #0EA5C4 0%, #1EC8E0 45%, #E8A93C 100%);

  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --glow-cyan: 0 0 0 1px rgba(30,200,224,0.35), 0 0 26px rgba(30,200,224,0.25), 0 14px 32px rgba(6,58,74,0.25);
  --shadow-card: 0 20px 60px rgba(6,58,74,0.35);

  --font-display: 'Prompt', sans-serif;
  --container-sm: 440px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Prompt', sans-serif;
  background-color: #6FD6E8;
  color: var(--text);
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 74px;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }

/* ===== BACKGROUND LAYER ===== */
.bg-wrap {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('assets/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,58,74,0.15) 0%, rgba(6,58,74,0.06) 30%, rgba(6,58,74,0.18) 70%, rgba(6,58,74,0.4) 100%);
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-btn {
  position: fixed;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 20;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  box-shadow: 0 6px 18px rgba(6,58,74,0.3);
}
.lang-btn svg { width: 100%; height: 100%; border-radius: 50%; }

/* ===== CENTER STAGE (fills viewport, centers the card) ===== */
.center-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1.1rem 2rem;
  position: relative;
  z-index: 2;
}

/* ===== LOGIN CARD ===== */
.login-card {
  width: 100%;
  max-width: var(--container-sm);
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.75rem 1.5rem 2rem;
  text-align: center;
}
.card-logo {
  width: min(58vw, 210px);
  height: auto;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 8px 18px rgba(6,58,74,0.25));
}
.login-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4.6vw, 1.5rem);
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.35rem;
}
.login-card form { width: 100%; }
.field {
  width: 100%;
  margin-bottom: 0.9rem;
  text-align: left;
}
.field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
  padding-left: 0.2rem;
}
.field-input {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  background: var(--card-tint);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem 1.1rem;
}
.field-input svg { flex-shrink: 0; color: var(--cyan-deep); width: 17px; height: 17px; }
.field-input input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-family: 'Prompt', sans-serif;
  font-size: 0.9rem;
  color: var(--navy);
}
.field-input input::placeholder { color: #8FB4C0; }

.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--grad-cyan);
  color: #04303D;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(14,165,196,0.45);
  margin-top: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-login:hover { transform: translateY(-2px); }
.btn-login svg { width: 18px; height: 18px; }
.btn-login:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-login:disabled:hover { transform: none; }

.btn-forgot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 14px;
  margin-top: 0.6rem;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn-forgot:hover { transform: translateY(-2px); background: var(--navy-2); }

.card-footer {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.card-footer .register-link {
  color: var(--cyan-deep);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.card-line {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
}
.card-line .ico-line {
  display: inline-flex; align-items: center; justify-content: center;
  background: #06C755; color: #fff; font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.02em; border-radius: 4px; padding: 2px 6px; line-height: 1.3;
}

/* ===== ABOUT TEXT ===== */
.about-text {
  position: relative;
  z-index: 2;
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: 0 1.5rem 1.5rem;
  text-align: center;
}
.about-text h2 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.about-text p {
  font-size: 0.76rem;
  line-height: 1.8;
  color: var(--navy);
  opacity: 0.85;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-sm);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(210, 248, 255, 0.9);
  border-top: 1px solid var(--border-soft);
  border-left: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.55rem 0.5rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--dim);
  padding: 0.3rem 0.2rem;
  background: none;
  border: none;
}
.bn-item svg { width: 21px; height: 21px; color: var(--dim); }
.bn-item.active,
.bn-item:hover { color: var(--cyan-deep); }
.bn-item.active svg,
.bn-item:hover svg { color: var(--cyan-deep); }
.bn-item .ico-line {
  display: inline-flex; align-items: center; justify-content: center;
  background: #06C755; color: #fff; font-size: 0.56rem; font-weight: 800;
  letter-spacing: 0.02em; border-radius: 4px; padding: 2px 5px; line-height: 1.3;
}

/* ===== HOW-TO MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 58, 74, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-sheet {
  width: 100%;
  max-width: var(--container-sm);
  background: #F3FBFF;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 1.5rem 1.5rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px rgba(6,58,74,0.3);
  transform: translateY(24px);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.modal-head h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--cyan-deep);
}
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(30,200,224,0.14); border: 1px solid var(--border);
  color: var(--navy); font-size: 1rem; display: flex; align-items: center; justify-content: center;
}
.modal-steps { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.modal-steps li { display: flex; gap: 0.75rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--grad-cyan); color: #04303D; font-weight: 800; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}
.modal-steps p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.modal-steps strong { color: var(--navy); }
