/* ---------- Design tokens ---------- */
:root {
  --red: #ff4d6d;
  --red-deep: #c2185b;
  --violet: #7c3aed;
  --violet-soft: #a78bfa;
  --blue: #3b82f6;
  --blue-soft: #60a5fa;
  --bg-1: #fff0f5;
  --bg-2: #f3e8ff;
  --bg-3: #eff6ff;
  --ink: #2b1c26;
  --muted: #7a5b68;
  --card: rgba(255, 255, 255, 0.82);
  --border: #ecd3e0;
  --shadow: 0 8px 30px rgba(124, 58, 237, 0.12), 0 2px 8px rgba(255, 77, 109, 0.08);
  --radius: 16px;
  --grad-brand: linear-gradient(120deg, var(--red) 0%, var(--violet) 55%, var(--blue) 100%);
}

* { box-sizing: border-box; }

body {
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(120deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-1));
  background-size: 300% 300%;
  animation: gradientDrift 18s ease infinite;
  position: relative;
  overflow-x: hidden;
}
h1, h2, .hero-title, #tagline, button { font-family: "Poppins", "Inter", sans-serif; }

@keyframes gradientDrift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Floating heart background ---------- */
#bg-hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.floating-heart {
  position: absolute;
  bottom: -10vh;
  font-size: 22px;
  opacity: 0.55;
  filter: drop-shadow(0 0 6px rgba(255, 77, 109, 0.35));
  animation-name: floatUp;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}
@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.6; }
  50%  { transform: translateY(-55vh) translateX(var(--drift, 20px)) rotate(180deg) scale(1); }
  100% { transform: translateY(-110vh) translateX(calc(var(--drift, 20px) * -1)) rotate(360deg) scale(0.7); opacity: 0; }
}

/* ---------- Layout ---------- */
#app { max-width: 760px; margin: 0 auto; padding: 24px; position: relative; z-index: 1; }

header#app-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; flex-wrap: wrap; gap: 10px;
  padding: 14px 20px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
#brand { display: flex; align-items: center; gap: 10px; }
#brand-mark svg { animation: brandPulse 3.2s ease-in-out infinite; }
@keyframes brandPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08) rotate(-4deg); }
}
h1 {
  margin: 0; font-size: 26px; font-weight: 800; letter-spacing: 0.5px;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto;
  animation: brandShine 6s linear infinite;
}
@keyframes brandShine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

#handshake {
  display: flex; align-items: center; gap: 2px; font-size: 22px; user-select: none;
}
.hand { display: inline-block; animation: handMeet 2.6s ease-in-out infinite; }
.hand-left { animation-delay: 0s; }
.hand-right { animation-delay: 0s; transform: scaleX(-1); animation-name: handMeetR; }
@keyframes handMeet {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  45%, 55% { transform: translateX(6px) rotate(-8deg); }
}
@keyframes handMeetR {
  0%, 100% { transform: scaleX(-1) translateX(0) rotate(0deg); }
  45%, 55% { transform: scaleX(-1) translateX(6px) rotate(-8deg); }
}
.hand-spark { font-size: 12px; animation: sparkPop 2.6s ease-in-out infinite; opacity: 0; }
@keyframes sparkPop {
  0%, 40%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1.3); }
  60% { opacity: 0; transform: scale(0.6); }
}

#header-couple { font-weight: 700; color: var(--red-deep); }
#tagline { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.3px; }

/* ---------- Hero (login screen) ---------- */
.hero { position: relative; padding-bottom: 4px; }
.hero::before {
  content: ""; position: absolute; top: -60px; right: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255, 77, 109, 0.18), transparent 70%);
  border-radius: 50%; z-index: -1;
}
.hero::after {
  content: ""; position: absolute; bottom: -40px; left: -60px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 70%);
  border-radius: 50%; z-index: -1;
}
.hero-badge {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--violet);
  background: linear-gradient(90deg, rgba(255,77,109,0.12), rgba(124,58,237,0.12), rgba(59,130,246,0.12));
  padding: 6px 12px; border-radius: 999px; margin-bottom: 10px;
  animation: badgeFloat 4s ease-in-out infinite;
}
@keyframes badgeFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.hero-title {
  font-size: 26px; font-weight: 800; line-height: 1.25; margin: 4px 0 10px;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Screens / cards ---------- */
.hidden { display: none !important; }
.screen {
  background: var(--card);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  animation: screenIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  margin-top: 22px;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block;
}
h2:first-child { margin-top: 0; }

input, textarea, select {
  width: 100%; padding: 11px 12px; margin: 8px 0;
  border: 1.5px solid var(--border); border-radius: 12px; font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
textarea { min-height: 80px; }

button {
  background: var(--grad-brand);
  background-size: 200% auto;
  color: white; border: none; padding: 11px 18px;
  border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600; margin: 6px 0;
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-position 0.4s ease;
}
button:hover { background-position: right center; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124, 58, 237, 0.32); }
button:active { transform: translateY(0) scale(0.98); }

/* ---------- Tabs ---------- */
#tabs {
  margin-bottom: 22px;
  position: relative;
  display: flex; gap: 6px; flex-wrap: wrap;
  background: var(--card);
  padding: 8px; border-radius: 16px;
  box-shadow: var(--shadow);
}
.tab-btn {
  background: transparent; color: var(--violet); border: none; box-shadow: none;
  padding: 10px 16px; font-weight: 700; position: relative; z-index: 2;
  display: flex; align-items: center; gap: 6px;
}
.tab-btn:hover { transform: translateY(-1px); box-shadow: none; background-position: 0; }
.tab-btn.active { color: #fff; }
.tab-ico { font-size: 16px; }
#tab-indicator {
  position: absolute; top: 8px; left: 8px; height: calc(100% - 16px);
  background: var(--grad-brand);
  border-radius: 10px;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.tab-panel { animation: tabIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes tabIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- Cards / misc ---------- */
.card {
  background: linear-gradient(135deg, #fff, var(--bg-1));
  border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin: 10px 0; font-size: 14px;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.08);
}
.partner-card {
  border: 1.5px solid var(--border); border-radius: 16px; padding: 16px; margin: 12px 0;
  background: linear-gradient(160deg, #fff, var(--bg-2));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.partner-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(59, 130, 246, 0.15); }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--red-deep); font-size: 13px; font-weight: 600; }
.proof-card { border: 1.5px solid var(--border); border-radius: 16px; padding: 14px; margin: 12px 0; background: #fff; }
.proof-card .msg { font-size: 13px; padding: 3px 0; border-bottom: 1px dashed var(--border); }
a { color: var(--violet); font-weight: 600; }
label { display: block; font-size: 13px; font-weight: 700; margin-top: 12px; color: var(--red-deep); }

/* ---------- M-LIK doll mascot ---------- */
#mlik-doll {
  position: fixed; bottom: 18px; right: 18px; z-index: 50;
  cursor: pointer; user-select: none;
  animation: dollBob 3.4s ease-in-out infinite;
  transition: filter 0.3s ease;
}
#mlik-doll::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  background: var(--grad-brand); opacity: 0.35; filter: blur(14px); z-index: -1;
  animation: auraPulse 2.6s ease-in-out infinite;
}
@keyframes auraPulse { 0%, 100% { transform: scale(0.9); opacity: 0.25; } 50% { transform: scale(1.12); opacity: 0.45; } }
@keyframes dollBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
#mlik-doll.doll-click { animation: dollPop 0.5s ease; }
@keyframes dollPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.25) rotate(-8deg); }
  70% { transform: scale(0.92) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}
#mlik-doll.doll-talk #doll-mouth { animation: dollTalk 0.35s ease-in-out infinite; }
@keyframes dollTalk {
  0%, 100% { d: path("M46 86 Q60 96 74 86"); }
}
.eye { transition: transform 0.12s ease-out; }
.eye-glint { pointer-events: none; }
.cheek { transition: opacity 0.3s ease; }
#doll-bubble {
  position: absolute; bottom: 100%; right: 0; margin-bottom: 10px;
  background: #fff; color: var(--ink); font-size: 12px; font-weight: 600;
  padding: 8px 12px; border-radius: 12px; white-space: nowrap;
  box-shadow: var(--shadow);
  animation: bubbleIn 0.25s ease;
}
#doll-bubble::after {
  content: ""; position: absolute; top: 100%; right: 16px;
  border: 6px solid transparent; border-top-color: #fff;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 520px) {
  #mlik-doll svg { width: 62px; height: 72px; }
  h1 { font-size: 21px; }
  #handshake { font-size: 18px; }
}
