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

:root {
  /* ---- Brand palette: Star Stage — purple spotlight scene, gold star badge, magenta glow ---- */
  --void:        #0A0518;
  --purple-deep: #2B1050;
  --purple:      #4A1F8C;

  --magenta:      #E040FB;
  --magenta-deep: #B026C7;
  --gold:         #F5C542;
  --gold-bright:  #FFE28A;
  --gold-deep:    #C79A1E;

  --text:  #F5EFFF;
  --muted: #C4AEE0;
  --dim:   #8A72B0;

  --border:      rgba(245, 197, 66, 0.4);
  --border-soft: rgba(224, 64, 251, 0.28);

  --grad-gold: linear-gradient(135deg, #FFE28A 0%, #F5C542 45%, #C79A1E 100%);
  --font-display: 'Prompt', sans-serif;
  --container-sm: 400px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Prompt', sans-serif;
  background-color: #060310;
  color: var(--text);
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 88px;
}

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.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,3,16,0.35) 0%, rgba(6,3,16,0.05) 30%, rgba(6,3,16,0.35) 62%, rgba(6,3,16,0.85) 100%);
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(20, 10, 40, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  box-shadow: 0 0 16px rgba(224,64,251,0.35);
}
.lang-btn svg { width: 100%; height: 100%; border-radius: 50%; }

/* ===== HERO ===== */
.hero {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1.25rem 0.25rem;
  position: relative;
  z-index: 2;
}
.hero-logo {
  width: min(48vw, 190px);
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 0 30px rgba(224,64,251,0.4)) drop-shadow(0 8px 20px rgba(0,0,0,0.5));
}

/* ===== LOGIN FORM (borderless, floats on the stage) ===== */
.login-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1.25rem 2.5rem;
  max-width: var(--container-sm);
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.login-main form { width: 100%; }

.login-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 5.2vw, 1.65rem);
  font-weight: 800;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(224,64,251,0.3);
  margin-bottom: 1.4rem;
}

.field {
  width: 100%;
  margin-bottom: 1rem;
  text-align: left;
}
.field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}
.field-input {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: rgba(245, 239, 255, 0.94);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  box-shadow: 0 8px 22px rgba(20,8,40,0.4);
}
.field-input svg { flex-shrink: 0; color: var(--purple); 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: #2B1050;
}
.field-input input::placeholder { color: #A695C0; }

.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--grad-gold);
  color: #3A2400;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(245,197,66,0.3), 0 0 26px rgba(245,197,66,0.35), 0 14px 30px rgba(20,8,40,0.5);
  margin-top: 0.4rem;
  transition: transform 0.2s ease;
}
.btn-login:hover:not(:disabled) { transform: translateY(-2px); }
.btn-login svg { width: 19px; height: 19px; }
.btn-login:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.register-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.register-link svg { width: 16px; height: 16px; }

.btn-line {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #35e07a 0%, #06C755 60%, #04a344 100%);
  color: #04270f;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 999px;
  margin-top: 1.1rem;
  box-shadow: 0 0 0 1px rgba(6,199,85,0.35), 0 14px 30px rgba(20,8,40,0.4);
  transition: transform 0.2s ease;
}
.btn-line:hover { transform: translateY(-2px); }
.btn-line .ico-line {
  display: inline-flex; align-items: center; justify-content: center;
  background: #04270f; color: #fff; font-size: 0.62rem; font-weight: 800;
  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.9rem;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 0.5rem;
}
.about-text p {
  font-size: 0.78rem;
  line-height: 1.85;
  color: var(--muted);
}

/* ===== 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(16, 8, 30, 0.88);
  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: 600;
  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(--gold-bright); }
.bn-item.active svg,
.bn-item:hover svg { color: var(--magenta); filter: drop-shadow(0 0 8px rgba(224,64,251,0.6)); }
.bn-item .ico-line {
  display: inline-flex; align-items: center; justify-content: center;
  background: #06C755; color: #fff; font-size: 0.56rem; font-weight: 800;
  border-radius: 4px; padding: 2px 5px; line-height: 1.3;
}

/* ===== HOW-TO MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 5, 24, 0.82);
  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: var(--purple-deep);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  padding: 1.5rem 1.5rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  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.02rem;
  font-weight: 800;
  color: var(--gold-bright);
}
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(245,197,66,0.14); border: 1px solid var(--border);
  color: var(--text); 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-gold); color: #3A2400; 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(--gold-bright); }
