@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;700;800;900&family=Fredoka+One&display=swap');

:root {
  --bg-main: #FAFAFA;
  --yellow: #FFDE59;
  --orange: #FF5722;
  --blue: #38BDF8;
  --purple: #A855F7;
  --pink: #FF66A1;
  --green: #10B981;
  --navy: #1E1E2F;
  --white: #FFFFFF;
  --border-main: 3px solid var(--navy);
  --shadow-solid: 5px 5px 0px var(--navy);
  --shadow-hover: 2px 2px 0px var(--navy);
  --shadow-sm: 3px 3px 0px var(--navy);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg-main);
  background-image: radial-gradient(#E5E5E5 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--navy);
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, .logo, .stat-num, .price-amount {
  font-family: 'Fredoka One', cursive;
  color: var(--navy);
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; font-weight: 800; font-size: 1rem; font-family: 'Nunito', sans-serif;
  border-radius: 50px; text-decoration: none; cursor: pointer;
  border: var(--border-main);
  box-shadow: var(--shadow-solid);
  transition: all 0.15s ease-in-out;
}
.btn:hover { transform: translate(3px, 3px); box-shadow: var(--shadow-hover); }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--navy); }
.btn-green { background: var(--green); color: var(--white); }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-purple { background: var(--purple); color: var(--white); }
.btn-full { width: 100%; }
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

/* CARDS */
.card {
  background: var(--white); border: var(--border-main);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-solid);
}

/* NAVBAR */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 5%; background: var(--white);
  border-bottom: var(--border-main);
}
nav.scrolled { box-shadow: var(--shadow-solid); }
.logo { font-size: 1.7rem; display: flex; align-items: center; gap: 8px; font-family: 'Fredoka One', cursive; }
.logo span { color: var(--orange); }

.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { font-weight: 800; color: var(--navy); text-decoration: none; transition: 0.2s; }
.nav-links a:hover { color: var(--orange); }
.nav-cta {
  background: var(--yellow); padding: 10px 22px; border-radius: 50px;
  border: 2px solid var(--navy); box-shadow: var(--shadow-sm);
}

/* FORMS */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 800; font-size: 0.95rem; margin-bottom: 8px; }
.form-input, .form-select {
  width: 100%; padding: 14px 18px; font-size: 1rem; font-family: 'Nunito', sans-serif; font-weight: 700;
  border: var(--border-main); border-radius: 12px; background: var(--white);
  outline: none; transition: box-shadow 0.2s;
}
.form-input:focus, .form-select:focus { box-shadow: var(--shadow-solid); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* SECTION TAGS */
.section-tag {
  display: inline-block; background: var(--white); color: var(--navy);
  font-size: 0.85rem; font-weight: 800; padding: 6px 16px; border: 2px solid var(--navy);
  border-radius: 50px; margin-bottom: 16px; text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 12px; }
.section-desc { font-size: 1.05rem; font-weight: 700; line-height: 1.7; opacity: 0.85; }
.text-center { text-align: center; }

/* PAGE WRAPPER */
.page-wrap { padding-top: 80px; min-height: 100vh; }
.container { max-width: 900px; margin: 0 auto; padding: 40px 5%; }
.container-sm { max-width: 560px; margin: 0 auto; padding: 40px 5%; }

/* STEP INDICATOR */
.step-indicator {
  display: flex; align-items: center; gap: 0; margin-bottom: 40px; justify-content: center;
}
.step {
  display: flex; align-items: center; gap: 0;
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--navy);
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-family: 'Fredoka One', cursive;
  font-size: 1.1rem; background: var(--white); transition: all 0.3s;
}
.step.active .step-num { background: var(--orange); color: white; }
.step.done .step-num { background: var(--green); color: white; }
.step-line { width: 60px; height: 3px; background: #E5E5E5; border: none; }
.step.done + .step .step-line, .step.done ~ .step-line { background: var(--green); }
.step-label { font-size: 0.7rem; font-weight: 800; text-align: center; margin-top: 6px; text-transform: uppercase; }

/* QUIZ */
.quiz-card {
  background: var(--white); border: var(--border-main); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow-solid); margin-bottom: 24px;
}
.quiz-progress { margin-bottom: 28px; }
.progress-label { display: flex; justify-content: space-between; font-weight: 800; font-size: 0.85rem; margin-bottom: 8px; }
.progress-bar { background: #E5E5E5; border-radius: 50px; height: 12px; border: 2px solid var(--navy); overflow: hidden; }
.progress-fill { height: 100%; background: var(--orange); transition: width 0.4s ease; border-right: 2px solid var(--navy); }

.quiz-question { font-size: 1.2rem; font-weight: 800; line-height: 1.5; margin-bottom: 28px; font-family: 'Fredoka One', cursive; }
.quiz-options { display: flex; flex-direction: column; gap: 14px; }
.quiz-option {
  padding: 18px 22px; border: var(--border-main); border-radius: 12px; cursor: pointer;
  font-weight: 800; font-size: 1rem; background: var(--white); transition: all 0.15s;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 3px 3px 0 var(--navy);
}
.quiz-option:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--navy); background: #FFF9E6; }
.quiz-option.selected { background: var(--yellow); border-color: var(--navy); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--navy); }
.quiz-option .opt-letter {
  width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: white;
  display: flex; align-items: center; justify-content: center; font-family: 'Fredoka One', cursive; font-size: 1rem; flex-shrink: 0;
}
.quiz-option.selected .opt-letter { background: var(--orange); }

/* RESULT PAGE */
.result-preview {
  position: relative; overflow: hidden; border-radius: var(--radius);
}
.result-content { padding: 32px; }
.result-blur {
  position: absolute; bottom: 0; left: 0; right: 0; height: 280px;
  background: linear-gradient(to bottom, transparent 0%, rgba(250,250,250,0.8) 30%, rgba(250,250,250,0.98) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 32px; gap: 16px;
}
.result-blur h3 { font-size: 1.3rem; text-align: center; }
.result-blur p { font-size: 0.95rem; font-weight: 700; text-align: center; opacity: 0.8; max-width: 340px; }

/* PROFILE BARS */
.profile-bars { display: flex; flex-direction: column; gap: 20px; margin: 24px 0; }
.bar-row { }
.bar-label { display: flex; justify-content: space-between; font-size: 0.95rem; font-weight: 800; margin-bottom: 8px; }
.bar-track { background: #E5E5E5; border-radius: 50px; height: 16px; border: 2px solid var(--navy); overflow: hidden; }
.bar-fill { height: 100%; transition: width 1s ease; border-right: 2px solid var(--navy); }

/* --- PERBAIKAN WARNA DIMENSI (Sesuai SenTIFiQ) --- */
.bar-sq { background: var(--orange); } /* Sensing = Oranye */
.bar-tq { background: var(--blue); }   /* Thinking = Biru */
.bar-fq { background: var(--green); }  /* Feeling = Hijau */
.bar-iq { background: var(--yellow); } /* Intuiting = Kuning */
/* ------------------------------------------------- */

/* BADGE */
.result-badge {
  background: var(--yellow); border: var(--border-main); border-radius: var(--radius);
  padding: 20px 28px; text-align: center; box-shadow: var(--shadow-sm); margin: 20px 0;
  display: inline-block; width: 100%;
}
.badge-icon { font-size: 3rem; display: block; margin-bottom: 8px; }
.badge-type { font-family: 'Fredoka One', cursive; font-size: 1.6rem; }
.badge-desc { font-size: 0.9rem; font-weight: 700; opacity: 0.8; margin-top: 4px; }

/* PAYMENT CARD */
.payment-card {
  background: var(--navy); border: var(--border-main); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-solid); text-align: center; margin: 24px 0;
}
.payment-card h3 { color: var(--yellow); font-size: 1.4rem; margin-bottom: 8px; }
.payment-card p { color: rgba(255,255,255,0.8); font-size: 0.95rem; font-weight: 700; margin-bottom: 20px; }
.payment-price { font-family: 'Fredoka One', cursive; font-size: 2.5rem; color: var(--yellow); display: block; margin: 12px 0; }
.payment-list { list-style: none; margin: 16px 0 24px; display: flex; flex-direction: column; gap: 10px; }
.payment-list li { color: white; font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 8px; text-align: left; }
.payment-list li::before { content: '✓'; background: var(--green); border: 2px solid white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 900; flex-shrink: 0; }

/* UNLOCKED RESULT */
.unlock-section { display: none; }
.unlock-section.visible { display: block; }
.lock-section { display: block; }
.lock-section.hidden { display: none; }

/* WA BUTTON */
.wa-btn {
  background: #25D366; color: white; border-color: #128C7E;
  box-shadow: 5px 5px 0 #128C7E;
}
.wa-btn:hover { box-shadow: 2px 2px 0 #128C7E; }

/* CERTIFICATE */
.cert-preview {
  background: var(--white); border: var(--border-main); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-solid); text-align: center; margin: 20px 0;
}
.cert-preview .cert-id { 
  font-family: 'Fredoka One', cursive; background: var(--navy); color: var(--yellow); 
  display: inline-block; padding: 6px 20px; border-radius: 50px; font-size: 0.9rem; margin-bottom: 12px;
}

/* GOOGLE LOGIN */
.login-wrap {
  display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px;
}
.login-card {
  background: var(--white); border: var(--border-main); border-radius: var(--radius);
  padding: 48px 40px; box-shadow: var(--shadow-solid); max-width: 460px; width: 100%; text-align: center;
}
.login-logo { font-size: 2.5rem; font-family: 'Fredoka One', cursive; margin-bottom: 8px; }
.login-logo span { color: var(--orange); }
.login-sub { font-size: 1rem; font-weight: 700; opacity: 0.7; margin-bottom: 36px; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%;
  padding: 16px 24px; border: var(--border-main); border-radius: 12px; background: white;
  font-weight: 800; font-size: 1rem; cursor: pointer; box-shadow: var(--shadow-solid);
  transition: all 0.15s; font-family: 'Nunito', sans-serif;
}
.google-btn:hover { transform: translate(3px, 3px); box-shadow: var(--shadow-hover); }
.google-btn img { width: 24px; }

/* ALERTS */
.alert {
  padding: 14px 18px; border: var(--border-main); border-radius: 10px; font-weight: 800;
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.alert-success { background: #DCFCE7; }
.alert-error { background: #FEE2E2; }
.alert-info { background: #E0F2FE; }

/* VERIFY PAGE */
.verify-result {
  background: var(--white); border: var(--border-main); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-solid); margin-top: 24px;
}

/* CONFETTI ANIMATION */
@keyframes confettiDrop {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.confetti-piece {
  position: fixed; width: 10px; height: 10px; animation: confettiDrop 3s ease-in forwards;
  z-index: 9999;
}

/* DIMENSION DETAIL CARDS */
.dim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.dim-card { border: 2px solid var(--navy); border-radius: 12px; padding: 16px; box-shadow: var(--shadow-sm); }

/* --- PERBAIKAN WARNA KARTU DIMENSI (Sesuai SenTIFiQ) --- */
.dim-card.sq { background: #FFEDD5; } /* Oranye muda (Sensing) */
.dim-card.tq { background: #E0F2FE; } /* Biru muda (Thinking) */
.dim-card.fq { background: #DCFCE7; } /* Hijau muda (Feeling) */
.dim-card.iq { background: #FEF9C3; } /* Kuning muda (Intuiting) */
/* ------------------------------------------------------- */

.dim-icon { font-size: 1.8rem; margin-bottom: 8px; }
.dim-title { font-family: 'Fredoka One', cursive; font-size: 1.1rem; }
.dim-score { font-size: 1.5rem; font-family: 'Fredoka One', cursive; color: var(--orange); }
.dim-desc { font-size: 0.85rem; font-weight: 700; margin-top: 4px; line-height: 1.5; opacity: 0.85; }

/* RECOMMENDATION CARDS */
.reco-cards { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.reco-card {
  background: var(--white); border: var(--border-main); border-radius: 10px; padding: 14px 18px;
  box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 14px;
}
.reco-emoji { font-size: 1.8rem; }
.reco-text h4 { font-size: 0.95rem; font-family: 'Fredoka One', cursive; }
.reco-text p { font-size: 0.8rem; font-weight: 700; opacity: 0.7; margin-top: 2px; }

/* LOADING */
.loading { text-align: center; padding: 60px 20px; }
.spinner {
  width: 48px; height: 48px; border: 5px solid #E5E5E5;
  border-top-color: var(--orange); border-radius: 50%; animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* HIDDEN */
.hidden { display: none !important; }

/* MOBILE */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .dim-grid { grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px; }
  .step-line { width: 32px; }
  .container { padding: 28px 4%; }
}