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

:root {
  --bg: #F6F7FC;
  --surface: #FFFFFF;
  --ink: #1B1D2E;
  --muted: #83869E;
  --blue: #1E58FF;
  --purple: #7A6CFF;
  --cyan: #00B8D9;
  --green: #16A34A;
  --grad: linear-gradient(135deg, var(--blue), var(--purple) 55%, var(--cyan));
  --line: #E8E9F5;
}

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 92px;
  -webkit-font-smoothing: antialiased;
}

.page.hidden { display: none; }

.topbar { padding: 20px 20px 4px; }
.brand {
  font-size: 14px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title {
  padding: 10px 20px 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--ink);
}
.subtitle {
  padding: 8px 20px 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.task-list {
  padding: 4px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-card {
  background: var(--surface);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(30, 88, 255, 0.06);
}
.task-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: var(--grad);
}
.task-card.locked img {
  filter: grayscale(70%);
  opacity: .85;
}
.task-card-body { padding: 16px 18px 18px; }
.task-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.task-card-label {
  font-size: 12px;
  color: var(--purple);
  font-weight: 700;
}
.task-card.locked .task-card-label { color: var(--muted); }
.lock-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--line);
  padding: 5px 10px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.done-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  background: rgba(22, 163, 74, 0.1);
  padding: 5px 10px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.task-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.task-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}
.task-card.locked .task-card-title { color: var(--muted); }
.task-card-payout {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  padding: 5px 12px;
  border-radius: 100px;
  white-space: nowrap;
}
.task-card.locked .task-card-payout {
  background: var(--line);
  color: var(--muted);
}
.task-card-desc {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
}
.task-card-meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.task-card-btn {
  margin-top: 14px;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(122, 108, 255, .28);
}
.task-card-btn:active { opacity: .85; }
.task-card-btn.disabled {
  background: var(--line);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}
.task-card-btn.done-btn {
  background: rgba(22, 163, 74, 0.1);
  color: var(--green);
  box-shadow: none;
  cursor: default;
}

.bottom-nav {
  position: fixed;
  bottom: 14px;
  left: 20px;
  right: 20px;
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 10px 8px;
  box-shadow: 0 12px 30px rgba(30, 30, 60, .12);
}
.nav-btn {
  flex: 1;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
  cursor: pointer;
}
.nav-btn.active { color: var(--purple); }
.nav-icon { font-size: 18px; }

.profile-content { padding: 8px 20px; }
.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.profile-row span:first-child { color: var(--muted); }
.profile-row span:last-child { font-weight: 700; color: var(--ink); }

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  transition: opacity .4s ease;
}
.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: var(--grad);
  filter: blur(70px);
  opacity: .35;
  animation: glow-pulse 2.6s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { transform: scale(1); opacity: .3; }
  50% { transform: scale(1.15); opacity: .45; }
}
.loading-card {
  position: relative;
  overflow: hidden;
  width: 200px;
  padding: 36px 20px 28px;
  border-radius: 28px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(30,88,255,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.loading-shimmer {
  position: absolute;
  top: 0;
  left: -160%;
  width: 160%;
  height: 100%;
  background: linear-gradient(75deg, transparent 42%, rgba(255,255,255,0.75) 50%, transparent 58%);
  animation: shimmer-sweep 1.8s ease-in-out infinite;
}
@keyframes shimmer-sweep {
  0% { left: -160%; }
  100% { left: 160%; }
}
.loading-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(122,108,255,0.35);
}
.loading-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.welcome-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 20px 32px;
  overflow: hidden;
}
.welcome-glow {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--grad);
  filter: blur(80px);
  opacity: .3;
  z-index: 0;
}
.welcome-icon {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 12px 28px rgba(122, 108, 255, .35);
}
.welcome-wrap .brand { position: relative; }
.welcome-title {
  position: relative;
  margin-top: 10px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.welcome-sub {
  position: relative;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.welcome-btn {
  position: relative;
  margin-top: 26px;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(122,108,255,.3);
}

.survey-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0;
  font-size: 13px;
  font-weight: 700;
}
.survey-back {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
}
.survey-counter-text { color: var(--muted); }
.survey-progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  margin: 14px 20px 24px;
  overflow: hidden;
}
.survey-progress-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 4px;
  transition: width .3s ease;
  width: 0%;
}
.survey-card {
  margin: 0 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 20px;
}
.survey-question {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}
.survey-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}
.survey-option.selected {
  border-color: var(--purple);
  background: rgba(122,108,255,0.06);
}
.survey-option .check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}
.survey-option.selected .check {
  border-color: var(--purple);
  background: var(--purple);
}

.survey-input {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink);
  margin-bottom: 6px;
}
.survey-error {
  color: #E0384F;
  font-size: 12px;
  font-weight: 600;
  min-height: 16px;
  margin-bottom: 10px;
}
.survey-continue-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.profile-redo-btn {
  margin-top: 4px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--purple);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.reviews-btn {
  display: block;
  margin: 4px 20px 20px;
  padding: 14px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(122, 108, 255, .25);
}
.reviews-btn.hidden { display: none; }

.faq-section {
  padding: 8px 20px 20px;
}
.faq-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: .04em;
}
.faq-title {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 16px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}
.faq-chevron {
  flex-shrink: 0;
  transition: transform .2s ease;
  color: var(--muted);
  font-size: 12px;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  padding: 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.faq-item.open .faq-answer {
  padding: 0 18px 16px;
}

.topbar-greet {
  padding: 20px 20px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.app-logo-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.ref-section {
  padding: 4px 20px 20px;
}
.ref-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}
.ref-stat-icon { font-size: 16px; }
.ref-share-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  font-family: inherit;
}
.ref-link {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  padding: 10px 4px;
  margin-bottom: 14px;
}
.ref-promo-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.ref-rewards-text {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}