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

:root {
  /* ---- Brand palette: Golden Ganesha — warm gold/orange temple-glow, prosperity theme ---- */
  --cream:       #FFF3D6;
  --brown-deep:  #3A1A08;
  --panel:       rgba(58, 26, 8, 0.55);
  --panel-soft:  rgba(58, 26, 8, 0.32);

  --orange:       #FF6B35;
  --orange-deep:  #E8483A;
  --gold:         #FFC93C;
  --gold-deep:    #E8A317;
  --blue:         #29ABE2;
  --blue-deep:    #1B7FB0;

  --text:  #3A1A08;
  --muted: #7A4A22;
  --dim:   #A9835A;

  --border:      rgba(255, 201, 60, 0.45);
  --border-soft: rgba(255, 201, 60, 0.22);

  --grad-gold: linear-gradient(135deg, #FFE08A 0%, #FFC93C 45%, #E8A317 100%);
  --grad-text: linear-gradient(135deg, #FF6B35 0%, #FFC93C 60%, #E8A317 100%);

  --r:    14px;
  --r-lg: 22px;
  --r-xl: 30px;

  --glow-gold: 0 0 0 1px rgba(255,201,60,0.4), 0 0 26px rgba(255,140,20,0.32), 0 14px 32px rgba(58,26,8,0.4);

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

html { scroll-behavior: smooth; }

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

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 20%;
  background-repeat: no-repeat;
}
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(58,20,6,0.42) 0%, rgba(58,20,6,0.05) 22%, rgba(58,20,6,0.08) 55%, rgba(40,14,4,0.55) 82%, rgba(30,10,3,0.85) 100%);
}

/* ===== TOP TICKER ===== */
.ticker {
  position: relative;
  z-index: 5;
  width: 100%;
  overflow: hidden;
  background: rgba(40, 16, 4, 0.55);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.5rem 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: 2rem;
  animation: ticker-scroll 22s linear infinite;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
}
.ticker-item .dot { color: var(--gold); font-size: 0.9rem; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-btn {
  position: fixed;
  top: 3rem;
  right: 0.9rem;
  z-index: 20;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(58, 26, 8, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  box-shadow: var(--glow-gold);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lang-btn svg { width: 100%; height: 100%; border-radius: 50%; }

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0.25rem;
  text-align: center;
}
.hero-logo {
  width: min(72vw, 300px);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(58,20,6,0.45)) drop-shadow(0 0 40px rgba(255,193,60,0.35));
  animation: logo-float 4.5s ease-in-out infinite;
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
}

/* ===== LOGIN FORM ===== */
.login-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.65rem 2.5rem;
  max-width: var(--container-sm);
  width: 100%;
  margin: 0 auto;
}
.login-main form { width: 100%; }
.login-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 5vw, 1.65rem);
  font-weight: 800;
  color: #FFF8E8;
  -webkit-text-stroke: 1px #3A1A08;
  text-shadow: -1.5px -1.5px 0 #3A1A08, 1.5px -1.5px 0 #3A1A08, -1.5px 1.5px 0 #3A1A08, 1.5px 1.5px 0 #3A1A08, 0 6px 16px rgba(0,0,0,0.4);
  margin-bottom: 1.35rem;
}
.field {
  width: 100%;
  margin-bottom: 1rem;
  text-align: left;
}
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFF8E8;
  -webkit-text-stroke: 0.6px #3A1A08;
  text-shadow: -1px -1px 0 #3A1A08, 1px -1px 0 #3A1A08, -1px 1px 0 #3A1A08, 1px 1px 0 #3A1A08, 0 3px 8px rgba(0,0,0,0.35);
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}
.field-input {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  box-shadow: 0 8px 24px rgba(58,20,6,0.25), 0 0 0 1px rgba(255,140,20,0.08) inset;
}
.field-input svg { flex-shrink: 0; color: var(--orange-deep); width: 18px; height: 18px; }
.field-input input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-family: 'Prompt', sans-serif;
  font-size: 0.92rem;
  color: #3A1A08;
}
.field-input input::placeholder { color: #B99A78; }

.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--grad-gold);
  color: #4A2200;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  padding: 0.95rem 1.5rem;
  border: none;
  border-radius: 999px;
  box-shadow: var(--glow-gold);
  margin-top: 0.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-login:hover { transform: translateY(-2px); }
.btn-login svg { width: 19px; height: 19px; }
.btn-login:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-login:disabled:hover { transform: none; }

.register-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFF8E8;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-text-stroke: 0.5px #3A1A08;
  text-shadow: -1px -1px 0 #3A1A08, 1px -1px 0 #3A1A08, -1px 1px 0 #3A1A08, 1px 1px 0 #3A1A08, 0 3px 8px rgba(0,0,0,0.35);
}
.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(58,20,6,0.35);
  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;
  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: 1.5rem 1.5rem 2rem;
  text-align: center;
}
.about-text h2 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brown-deep);
  margin-bottom: 0.5rem;
}
.about-text p {
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--brown-deep);
  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(255, 255, 255, 0.96);
  border-top: 1px solid rgba(232,163,23,0.35);
  border-left: 1px solid rgba(232,163,23,0.35);
  border-right: 1px solid rgba(232,163,23,0.35);
  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(--orange-deep); }
.bn-item.active svg,
.bn-item:hover svg { color: var(--orange-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(40, 16, 4, 0.7);
  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: #FFF6E4;
  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(58,20,6,0.35);
  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(--orange-deep);
}
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(232,163,23,0.15); border: 1px solid var(--border);
  color: var(--brown-deep); 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: #4A2200; 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(--brown-deep); }

@media (min-width: 480px) {
  .hero { padding-top: 2rem; }
}
