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

:root {
  --purple: #6D28D9;
  --purple-light: #8B5CF6;
  --purple-dark: #4C1D95;
  --gold: #D97706;
  --gold-light: #F59E0B;
  --gold-pale: #FEF3C7;
  --white: #FFFFFF;
  --bg: #F8F7FF;
  --dark: #1F2937;
  --text: #374151;
  --muted: #6B7280;
  --border: #E5E7EB;
  --card-shadow: 0 8px 32px rgba(109,40,217,0.10);
  --card-shadow-hover: 0 16px 48px rgba(109,40,217,0.18);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(109,40,217,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(217,119,6,0.06) 0%, transparent 50%);
}

/* ===== NAVBAR ===== */
.navbar {
  background: #fff;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 12px rgba(109,40,217,0.07);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--purple);
  letter-spacing: -1px;
  text-decoration: none;
}
.logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--dark);
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--purple);
  color: #fff;
}

.nav-links .nav-user-tag {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--purple);
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 72px 24px 40px;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(109,40,217,0.3);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 16px;
  letter-spacing: -1.5px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--purple), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}
.stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--purple);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

/* ===== CARDS ===== */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--card-shadow);
  border: 1.5px solid var(--border);
  transition: box-shadow 0.3s;
}
.card:hover { box-shadow: var(--card-shadow-hover); }

.card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px dashed var(--border);
}

.creator-section {
  max-width: 700px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  color: var(--dark);
  background: #FAFAFA;
  transition: all 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--purple);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(109,40,217,0.08);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236D28D9' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 15px 28px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(109,40,217,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(109,40,217,0.4);
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
}
.btn-primary:active { transform: translateY(0); }

.btn-gold {
  display: inline-block;
  width: 100%;
  padding: 15px 28px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(217,119,6,0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217,119,6,0.4);
}

.btn-copy {
  padding: 10px 18px;
  background: var(--purple);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-copy:hover { background: var(--purple-dark); }

/* ===== RESULT BOX ===== */
.result-box {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #F3F0FF, #FEF9EC);
  border-radius: 14px;
  border: 2px solid rgba(109,40,217,0.15);
  animation: slideUp 0.4s ease;
}

.result-box h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 14px;
}

.link-display {
  display: flex;
  gap: 10px;
  align-items: center;
}

.link-display input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid rgba(109,40,217,0.2);
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  color: var(--purple-dark);
  background: #fff;
  font-weight: 600;
}

.result-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 12px;
  font-weight: 500;
}

/* ===== UNLOCK PAGE ===== */
.ad-container {
  display: flex;
  justify-content: center;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.unlock-section {
  max-width: 600px;
  margin: 40px auto 60px;
  padding: 0 24px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.lock-icon {
  font-size: 3.5rem;
  display: block;
  margin: 0 auto 16px;
  animation: lockBounce 2s ease-in-out infinite;
}

@keyframes lockBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-5deg); }
}

.unlock-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--dark);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.step-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  margin: 24px 0;
  border: 2px solid var(--border);
  box-shadow: var(--card-shadow);
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--purple);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 16px;
}

.btn-platform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 13px;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-platform:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* ===== TIMER ===== */
.timer-container {
  text-align: center;
  padding: 28px;
  background: linear-gradient(135deg, #F3F0FF, #fff);
  border-radius: 16px;
  border: 2px dashed var(--purple-light);
  margin: 20px 0;
  animation: slideUp 0.3s ease;
}

.timer-ring {
  width: 90px;
  height: 90px;
  border: 5px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 1s linear infinite;
  position: relative;
}

.timer-ring span {
  font-size: 2rem;
  font-weight: 900;
  color: var(--purple);
  animation: none;
  position: absolute;
  /* Stop the number from spinning */
  animation: counterSpin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes counterSpin { to { transform: rotate(-360deg); } }

.timer-container p {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

/* ===== REVEAL BOX ===== */
.reveal-box {
  text-align: center;
  padding: 32px;
  background: linear-gradient(135deg, #ECFDF5, #FEF9EC);
  border-radius: 16px;
  border: 2px solid #A7F3D0;
  animation: slideUp 0.4s ease;
}

.reveal-box h3 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #065F46;
  margin-bottom: 20px;
}

.reveal-box .btn-gold { max-width: 280px; }

.views-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-pale);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-top: 16px;
  border: 1.5px solid rgba(217,119,6,0.2);
}

/* ===== ERROR PAGE ===== */
.error-box {
  text-align: center;
  padding: 60px 24px;
}
.error-box .error-icon { font-size: 4rem; margin-bottom: 16px; }
.error-box h2 { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.error-box p { color: var(--muted); margin-top: 8px; }

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: slideUp 0.5s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 24px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hamburger { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #fff;
    padding: 8px 24px;
    gap: 4px;
    margin-left: 0 !important;
    width: 100%;
  }
  .nav-links.open { display: flex; }
  /* Make the navbar a wrapping container on mobile so both menus stack below logo */
  .nav-container { flex-wrap: wrap; height: auto; min-height: 68px; padding: 12px 24px; }
  #navLinks { padding-top: 16px; border-top: 2px solid var(--border); margin-top: 12px; }
  #authNav.open { padding-bottom: 16px; border-bottom: 2px solid var(--border); }
  .nav-links .nav-user-tag { max-width: 100%; }
  .nav-links a { padding: 12px 16px; }

  .hero { padding: 48px 24px 32px; }
  .card { padding: 24px; }
  .link-display { flex-direction: column; }
  .link-display input { font-size: 0.72rem; }
  .btn-copy { width: 100%; }

  .ad-container { padding: 12px 8px; }
  .ad-container iframe,
  .ad-container > * { max-width: 100% !important; }
}

/* ========================================
   MULTI-TASK SYSTEM — NEW STYLES
   ======================================== */

/* ── Unlock Header ── */
.unlock-header {
  text-align: center;
  margin-bottom: 24px;
}

.main-lock-wrap {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(109,40,217,0.3);
  animation: lockBounce 2s ease-in-out infinite;
}

.main-lock-wrap.is-open {
  background: linear-gradient(135deg, #059669, #34D399);
  box-shadow: 0 8px 24px rgba(5,150,105,0.3);
  animation: none;
}

.main-lock-svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
}

.unlock-sub {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}

/* ── Progress Bar ── */
.progress-wrap {
  background: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-count {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--purple);
}

.progress-track {
  background: #F3F4F6;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0%;
}

/* ── Tasks List ── */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

/* ── Task Card Base ── */
.task-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Active task */
.task-card.task-active {
  border-color: var(--purple-light);
  box-shadow: 0 0 0 4px rgba(109,40,217,0.08), 0 4px 20px rgba(109,40,217,0.12);
}

/* Completed task */
.task-card.task-done {
  background: linear-gradient(135deg, #F0FDF4, #ECFDF5);
  border-color: #A7F3D0;
}

/* Locked task */
.task-card.task-locked {
  opacity: 0.55;
  background: #FAFAFA;
}

/* ── Task Card Top Row ── */
.task-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ── Task Badge (step number circle) ── */
.task-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-active {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  box-shadow: 0 4px 12px rgba(109,40,217,0.3);
}

.badge-done {
  background: #DCFCE7;
}

.badge-locked {
  background: #F3F4F6;
}

.step-num-text {
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
}

/* ── SVG Icons ── */
.svg-check {
  width: 28px;
  height: 28px;
  display: block;
}

.svg-lock {
  width: 18px;
  height: 18px;
  stroke: #9CA3AF;
}

/* ── Task Info ── */
.task-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.task-platform-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
}

.task-step-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Done Tag (right side checkmark) ── */
.done-tag {
  display: flex;
  align-items: center;
}

.done-tag .svg-check {
  width: 24px;
  height: 24px;
}

/* ── Task Action (platform button area) ── */
.task-action {
  margin-top: 14px;
}

/* ── Locked Message ── */
.locked-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #9CA3AF;
}

.locked-msg .svg-lock {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Inline Timer ── */
.inline-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 0 8px;
  animation: slideUp 0.3s ease;
}

.timer-ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  width: 80px;
  height: 80px;
  position: absolute;
  top: 0;
  left: 0;
}

.timer-arc {
  transition: stroke-dashoffset 0.9s linear;
}

.timer-num {
  position: relative;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--purple);
  z-index: 1;
  line-height: 1;
}

.timer-verify-text {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

/* ── Final Unlock Button ── */
.btn-final-unlock {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   CREATOR FORM — MULTI-TASK STYLES
   ======================================== */

/* Timer duration select */
.timer-select-wrap select {
  max-width: 200px;
}

/* Tasks section label + divider */
.tasks-section-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  display: block;
}

/* Task item container */
.task-item {
  background: #FAFAFA;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.task-item:hover {
  border-color: var(--purple-light);
}

/* Task item header */
.task-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.task-item-num {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-item-btns {
  display: flex;
  gap: 4px;
}

.task-move-btn, .task-remove-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--muted);
}

.task-move-btn:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.task-move-btn:hover svg { stroke: #fff; }

.task-remove-btn:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #DC2626;
}

.task-remove-btn:hover svg { stroke: #DC2626; }

/* Task field rows */
.task-item-row {
  margin-bottom: 10px;
}

.task-item-row:last-child {
  margin-bottom: 0;
}

.task-field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.task-platform-select,
.task-url-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  color: var(--dark);
  background: #fff;
  outline: none;
  transition: all 0.2s;
}

.task-platform-select:focus,
.task-url-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.08);
}

.task-platform-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236D28D9' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Add Task button */
.btn-add-task {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--purple);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  border: 2px dashed var(--purple-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.2px;
}

.btn-add-task:hover {
  background: rgba(109,40,217,0.05);
  border-color: var(--purple);
}

/* Tasks list divider in creator */
#taskList {
  margin-bottom: 10px;
}

/* Tasks counter badge */
.task-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(109,40,217,0.08);
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-left: 8px;
}

/* Verification spinner */
@keyframes zySpin { to { transform: rotate(360deg); } }
.zy-step-icon { display:inline-block; width:18px; text-align:center; }

