@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=Inter:wght@400;500;600;700&display=swap");

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #0d0320;
  font-family: "Inter", sans-serif;
  color: #fff;
}

.app-shell {
  width: min(100vw, 430px);
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.splash-screen {
  position: relative;
  width: min(100%, 390px);
  min-height: min(860px, 100vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 28px;
  overflow: hidden;
  background: 
    radial-gradient(ellipse 140% 65% at 50% -10%, #3a1a6e 0%, #1a0b3e 40%, #0d0320 70%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(92,47,180,0.3) 0%, transparent 70%);
}

/* ── Illustration ────────────────────────── */
.illus-wrap {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: -10px;
  margin-bottom: -50px;
  animation: popIn 0.9s cubic-bezier(0.175,0.885,0.32,1.275) both;
  z-index: 2;
}

/* Ambient glow behind illustration */
.illus-wrap::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 80%;
  background: 
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(245,166,35,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 60%, rgba(109,40,217,0.2) 0%, transparent 65%);
  filter: blur(30px);
  z-index: -1;
  pointer-events: none;
}

/* Edge fade effects for seamless blend */
.illus-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to bottom, transparent 50%, #0d0320 100%),
    linear-gradient(to right, #0d0320 0%, transparent 12%, transparent 88%, #0d0320 100%),
    linear-gradient(to top, rgba(13,3,32,0.4) 0%, transparent 30%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.illus-img {
  width: min(95%, 370px);
  height: auto;
  object-fit: contain;
  display: block;
  animation: floatIllus 3.5s ease-in-out 1s infinite;
  filter: drop-shadow(0 25px 50px rgba(0,0,0,0.5)) drop-shadow(0 10px 30px rgba(109,40,217,0.3));
  position: relative;
  z-index: 1;
}

/* ── Brand ───────────────────────────────── */
.brand-wrap {
  text-align: center;
  margin-top: 20px;
  position: relative;
  z-index: 5;
  animation: fadeUp 0.7s ease 0.3s both;
}

.brand-name {
  font-family: "Nunito", sans-serif;
  font-size: clamp(48px, 15vw, 64px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  text-shadow: 
    0 0 30px rgba(245,166,35,0.4),
    0 0 60px rgba(245,166,35,0.2),
    0 4px 20px rgba(0,0,0,0.5);
}

.white { color: #ffffff; }
.gold  { color: #f5a623; }

.brand-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 10px;
  color: #f5a623;
  font-size: 14px;
}

.brand-divider span {
  flex: 1;
  max-width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245,166,35,0.8), transparent);
}

.brand-divider span:last-child {
  background: linear-gradient(270deg, transparent, rgba(245,166,35,0.8), transparent);
}

.brand-sub {
  font-size: 17px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.brand-sub .highlight {
  color: #f5a623;
  font-weight: 600;
}

/* ── How it works ────────────────────────── */
.how-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: clamp(32px, 5vh, 48px);
  animation: fadeUp 0.7s ease 0.45s both;
  position: relative;
  z-index: 5;
}

.how-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  transition: transform 0.2s ease;
}

.how-item:hover {
  transform: translateY(-4px);
}

.how-icon {
  width: 72px; 
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  box-shadow: 
    0 12px 28px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.how-icon img { 
  width: 38px; 
  height: 38px; 
  object-fit: contain; 
}

.how-purple { 
  background: linear-gradient(145deg, #4c1d95, #7c3aed); 
}

.how-gold { 
  background: linear-gradient(145deg, #b45309, #f59e0b); 
}

.how-item strong { 
  font-size: 15px; 
  font-weight: 800; 
  color: #fff; 
}

.how-item span { 
  font-size: 12px; 
  color: rgba(255,255,255,0.55); 
  margin-top: -4px; 
}

.how-divider {
  width: 1px; 
  height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
  flex-shrink: 0;
}

/* ── Login ───────────────────────────────── */
.login-wrap {
  width: 100%;
  margin-top: auto;
  padding-top: 32px;
  animation: fadeUp 0.7s ease 0.6s both;
  position: relative;
  z-index: 5;
}

.login-status {
  min-height: 20px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
}

.login-status:empty { visibility: hidden; }
.login-status[data-tone="success"] { color: #6ee7b7; }
.login-status[data-tone="error"]   { color: #fca5a5; }

.google-btn {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: #1a1a2e;
  font-family: "Inter", sans-serif;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.4),
    0 2px 8px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.google-btn::before {
  content: "";
  position: absolute;
  top: 0; 
  left: -100%;
  width: 100%; 
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s ease;
}

.google-btn:hover::before {
  left: 100%;
}

.google-btn:hover { 
  transform: translateY(-3px); 
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3); 
}

.google-btn:active { 
  transform: translateY(-1px); 
}

.google-btn:disabled { 
  opacity: 0.6; 
  cursor: wait; 
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.secure-note div { 
  display: flex; 
  flex-direction: column; 
}

.secure-note strong { 
  font-size: 13px; 
  font-weight: 700; 
  color: rgba(255,255,255,0.75); 
}

.secure-note span { 
  font-size: 11px; 
  color: rgba(255,255,255,0.45); 
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 390px) {
  .app-shell { padding: 0; }
  .splash-screen { width: 100vw; min-height: 100vh; }
  .illus-img { width: min(95%, 320px); }
  .how-icon { width: 64px; height: 64px; }
  .how-icon img { width: 34px; height: 34px; }
}

@media (max-height: 700px) {
  .illus-img  { width: 260px; }
  .brand-name { font-size: 42px; }
  .how-icon   { width: 56px; height: 56px; border-radius: 16px; }
  .how-icon img { width: 30px; height: 30px; }
  .how-divider { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; }
}

/* ── Keyframes ───────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.7); }
  70%  { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes floatIllus {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-15px); }
}
