/* ============================================
   PETUALANGAN META ADS — SHARED STYLES
   ============================================ */
* { margin:0; padding:0; box-sizing:border-box; }
:root {
  --brown:#78350f; --brown-dark:#451a03;
  --yellow:#fcd34d; --orange:#f97316; --red:#ef4444;
  --green:#22c55e; --blue:#3b82f6; --purple:#8b5cf6;
  --sky:#bde0fe; --cream:#fef3c7;
  --ink:#2b2d42;
}
body {
  font-family:'Fredoka',system-ui,sans-serif;
  background: var(--sky);
  color: var(--ink);
  min-height:100vh;
}

/* ========= Site header ========= */
.site-header {
  background: linear-gradient(180deg,#fde68a,#fcd34d);
  border-bottom: 6px dashed var(--orange);
  padding: 18px 20px;
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:12px;
  position:sticky; top:0; z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.site-header h1 {
  font-family:'Baloo 2'; font-size: clamp(20px,3vw,30px);
  color:#c2410c; text-shadow: 2px 2px 0 #fff;
  display:flex; align-items:center; gap:8px;
}
.site-nav { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.site-nav a, .site-nav button {
  background:white; border: 3px solid var(--brown);
  padding: 6px 14px; border-radius: 999px;
  font-family:'Baloo 2'; font-weight:700; font-size:13px;
  color: var(--brown); text-decoration:none; cursor:pointer;
  box-shadow: 0 3px 0 var(--brown);
  transition: transform .1s;
}
.site-nav a:hover, .site-nav button:hover { transform: translateY(-2px); }
.site-nav .btn-primary { background: var(--orange); color:white; }
.site-nav .progress-badge {
  background:#22c55e; color:white;
  padding:6px 12px; border-radius:999px;
  font-family:'Baloo 2'; font-size:13px; font-weight:800;
  border:3px solid #14532d; box-shadow:0 3px 0 #14532d;
}

/* ========= Stage page layout ========= */
.stage-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px 120px;
}
.stage-hero {
  background:white;
  border: 5px solid var(--ink);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 10px 0 var(--ink), 0 15px 30px rgba(0,0,0,.15);
  text-align:center;
  margin-bottom: 24px;
  position:relative;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(252,211,77,.3) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(167,243,208,.4) 0%, transparent 40%);
}
.stage-hero .emoji-big { font-size: clamp(60px,10vw,100px); line-height:1; }
.stage-hero .stage-num {
  display:inline-block;
  background: var(--red); color:white;
  padding: 4px 16px; border-radius: 999px;
  font-family:'Baloo 2'; font-weight:800; font-size:14px;
  margin-bottom: 8px;
}
.stage-hero h1 {
  font-family:'Baloo 2'; font-size: clamp(26px,5vw,42px);
  color: var(--brown); margin: 6px 0;
}
.stage-hero .tagline { font-size: 16px; color:#4b5563; font-weight: 500; }

.card {
  background:white;
  border: 4px solid var(--ink);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 6px 0 var(--ink);
}
.card h2 {
  font-family:'Baloo 2';
  font-size: 22px;
  color: var(--brown);
  margin-bottom: 10px;
  display:flex; align-items:center; gap:8px;
}
.card h3 {
  font-family:'Baloo 2';
  font-size: 17px;
  color: #0f766e;
  margin: 14px 0 6px;
}
.card p { line-height:1.7; margin: 8px 0; font-size:15px; }
.card ul, .card ol { padding-left: 22px; line-height:1.7; font-size:15px; margin:8px 0; }
.card li { margin: 4px 0; }
.card .tip {
  background: #fef9c3;
  border-left: 5px solid #eab308;
  padding: 12px 16px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 14px;
}
.card .warn {
  background: #fee2e2;
  border-left: 5px solid var(--red);
  padding: 12px 16px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 14px;
  color:#7f1d1d;
}
.card .info {
  background: #dbeafe;
  border-left: 5px solid var(--blue);
  padding: 12px 16px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 14px;
  color:#1e3a8a;
}

/* Goal card */
.goal-card {
  background: linear-gradient(135deg, #fde047, #f97316);
  color: var(--brown-dark);
  border-radius: 22px;
  padding: 22px;
  border: 4px dashed var(--brown);
  margin-bottom: 20px;
}
.goal-card h2 { color: var(--brown-dark); }
.goal-card .kpi-list {
  display:grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr));
  gap:10px; margin-top: 12px;
}
.goal-card .kpi {
  background: rgba(255,255,255,.7);
  border: 2px solid var(--brown);
  border-radius: 14px;
  padding: 10px;
  text-align:center;
  font-weight:700;
}
.goal-card .kpi small { display:block; font-size: 11px; color: #78350f; font-weight:500;}
.goal-card .kpi b { font-size: 18px; display:block; color: var(--brown-dark); }

/* Checklist interaktif */
.checklist-box { }
.checklist-item {
  display:flex; align-items:flex-start; gap: 10px;
  padding: 12px;
  background: #fef3c7;
  border: 2px solid var(--yellow);
  border-radius: 12px;
  margin: 8px 0;
  cursor: pointer;
  transition: all .2s;
}
.checklist-item:hover { transform: translateX(4px); }
.checklist-item.done {
  background: #dcfce7;
  border-color: var(--green);
  text-decoration: line-through;
  opacity: 0.75;
}
.checklist-item input[type=checkbox] {
  width: 22px; height: 22px;
  accent-color: var(--green);
  margin-top: 2px;
}
.checklist-item .label { flex:1; font-size:14px; line-height:1.5; }

/* Quiz */
.quiz-q {
  background: #f8fafc;
  border: 3px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
}
.quiz-q .q {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 15px;
}
.quiz-q .opt {
  display:block;
  background:white;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 6px 0;
  cursor: pointer;
  font-size: 14px;
  transition: all .15s;
}
.quiz-q .opt:hover { background: #e0f2fe; }
.quiz-q .opt.correct { background: #bbf7d0; border-color: var(--green); }
.quiz-q .opt.wrong { background: #fecaca; border-color: var(--red); }
.quiz-q .explain {
  display:none; margin-top: 10px;
  background: #dbeafe; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; color:#1e3a8a;
}
.quiz-q.answered .explain { display:block; }

/* Progress bar */
.progress-bar {
  background: #e5e7eb;
  border-radius: 999px;
  height: 18px;
  overflow: hidden;
  border: 3px solid var(--ink);
  margin: 12px 0 6px;
}
.progress-bar .fill {
  background: linear-gradient(90deg, var(--green), #84cc16);
  height: 100%;
  transition: width .4s ease;
  border-radius: 999px;
}
.progress-text { font-size: 13px; color:#374151; font-weight:600; }

/* Action buttons */
.actions {
  display:flex; gap: 12px; flex-wrap:wrap;
  margin-top: 20px;
}
.btn {
  flex:1; min-width: 180px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 4px solid var(--ink);
  background: white;
  font-family:'Baloo 2'; font-weight: 800; font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .1s;
  text-align:center; text-decoration:none;
  display:flex; align-items:center; justify-content:center; gap:6px;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn-green { background: var(--green); color:white; }
.btn-blue { background: var(--blue); color:white; }
.btn-orange { background: var(--orange); color:white; }
.btn-red { background: var(--red); color:white; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* AI Tutor Widget */
.tutor-fab {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  border: 4px solid var(--ink);
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--ink), 0 10px 30px rgba(139,92,246,.4);
  z-index: 90;
  animation: fab-bounce 2s ease-in-out infinite;
}
@keyframes fab-bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
.tutor-panel {
  position: fixed;
  bottom: 100px; right: 20px;
  width: min(380px, calc(100vw - 40px));
  height: 520px;
  max-height: calc(100vh - 140px);
  background: white;
  border: 4px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,.3);
  z-index: 95;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.tutor-panel.open { display:flex; }
.tutor-panel .head {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: white;
  padding: 14px 16px;
  font-family:'Baloo 2'; font-weight: 800;
  display:flex; justify-content:space-between; align-items:center;
}
.tutor-panel .head small { display:block; font-size: 11px; opacity: .85; font-weight: 500; }
.tutor-panel .msgs {
  flex:1;
  padding: 14px;
  overflow-y: auto;
  background: #f9fafb;
}
.tutor-msg {
  padding: 10px 14px;
  border-radius: 14px;
  margin: 6px 0;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.tutor-msg.bot { background: #e0e7ff; color: #312e81; }
.tutor-msg.user { background: #8b5cf6; color:white; margin-left: auto; }
.tutor-input {
  display:flex; gap: 6px; padding: 10px;
  border-top: 2px solid #e5e7eb;
  background: white;
}
.tutor-input input {
  flex:1;
  padding: 10px 14px;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  font-family:'Fredoka'; font-size: 14px;
}
.tutor-input input:focus { outline: none; border-color: var(--purple); }
.tutor-input button {
  background: var(--purple); color:white;
  border:none; border-radius:999px;
  padding: 10px 18px; font-weight:700; cursor:pointer;
}

/* Modal share */
.share-modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display:none; align-items:center; justify-content:center;
  z-index: 100; padding: 20px;
}
.share-modal-bg.show { display: flex; }
.share-modal {
  background: white;
  max-width: 480px; width: 100%;
  border-radius: 24px;
  padding: 28px;
  border: 5px solid var(--ink);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
  animation: pop .3s;
}
@keyframes pop { 0%{transform:scale(.7);opacity:0} 100%{transform:scale(1);opacity:1} }
.share-modal h2 { font-family:'Baloo 2'; color: var(--brown); margin-bottom: 10px;}
.share-modal textarea {
  width: 100%; min-height: 140px;
  padding: 12px; border: 2px solid #cbd5e1; border-radius: 12px;
  font-family:'Fredoka'; font-size: 14px; margin: 10px 0;
}

@media (max-width: 720px) {
  .actions .btn { min-width: 100%; }
  .tutor-panel { bottom: 90px; right: 10px; left: 10px; width: auto; }
}
