/* ========================================================
   LANDING PAGE STYLES - CHUẨN GIAO DIỆN & TƯƠNG THÍCH ĐA THIẾT BỊ
   ======================================================== */

:root {
  --primary-blue: #1a68e5;
  --primary-dark: #1251b8;
  --text-dark: #111e38;
  --text-slate: #1e293b;
  --text-muted: #64748b;
  --green-ok: #10b981;
  --green-bg: #dcfce7;
  --alert-bg: #ecfdf5;
  --alert-border: #bbf7d0;
  --alert-text: #047857;
  --border-light: #edf2f7;
  --bg-page: #eef5fc;
  --card-radius: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #eef5fc 0%, #f6fafe 50%, #eaf1fa 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  color: var(--text-slate);
}

/* ================== CANVAS CÁNH HOA RƠI ================== */
#petalCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ================== WRAPPER VÀ CARD ================== */
.landing-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
}

.card-container {
  width: 100%;
  max-width: 450px;
  background: #ffffff;
  border-radius: var(--card-radius);
  padding: 34px 30px;
  box-shadow: 
    0 20px 48px -10px rgba(26, 104, 229, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.03);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: cardFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================== HEADER ================== */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.status-badge {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-blue);
  letter-spacing: 0.5px;
}

.percentage-badge {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-blue);
}

/* ================== TIÊU ĐỀ & MÔ TẢ ================== */
.main-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 12px;
}

.subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

/* ================== THANH TIẾN TRÌNH ================== */
.progress-track {
  width: 100%;
  height: 4.5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 22px;
}

.progress-fill {
  width: 100%;
  height: 100%;
  background: var(--primary-blue);
  border-radius: 999px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================== DANH SÁCH BƯỚC CHECK ================== */
.checklist-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1.5px solid var(--border-light);
  border-radius: 18px;
  background: #ffffff;
  transition: all 0.25s ease;
}

.check-item:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.check-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.indicator-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dot-inner {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-ok);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-slate);
}

.item-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.check-status {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green-ok);
  flex-shrink: 0;
  margin-left: 8px;
}

/* ================== HỘP THÔNG BÁO ƯU ĐÃI SẴN SÀNG ================== */
.alert-ready {
  background: var(--alert-bg);
  border: 1px solid var(--alert-border);
  border-radius: 14px;
  padding: 13px 16px;
  color: var(--alert-text);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

/* ================== XÁC MINH ROBOT (reCAPTCHA) ================== */
.recaptcha-wrapper {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recaptcha-inner {
  width: 100%;
  max-width: 310px;
  height: 74px;
  background: #f9f9f9;
  border: 1px solid #d3d3d3;
  border-radius: 4px;
  padding: 8px 12px;
  box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.recaptcha-inner:hover {
  border-color: #b8b8b8;
}

.recaptcha-inner.verified {
  cursor: default;
}

.recaptcha-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Checkbox vuông */
.captcha-checkbox {
  width: 28px;
  height: 28px;
  background-color: #fff;
  border-radius: 2.5px;
  border: 2px solid #c1c1c1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.recaptcha-inner:hover .captcha-checkbox {
  border-color: #b2b2b2;
}

/* Spinner quay Google reCAPTCHA */
.captcha-spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid #e0e0e0;
  border-top-color: #4285f4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Dấu tích xanh khi hoàn tất */
.captcha-checkmark {
  display: none;
  width: 32px;
  height: 32px;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

/* Trạng thái loading của checkbox */
.recaptcha-inner.loading .captcha-checkbox {
  border-color: transparent;
}
.recaptcha-inner.loading .captcha-spinner {
  display: block;
}

/* Trạng thái đã xác minh thành công */
.recaptcha-inner.verified .captcha-checkbox {
  border-color: transparent;
  background: transparent;
}
.recaptcha-inner.verified .captcha-spinner {
  display: none;
}
.recaptcha-inner.verified .captcha-checkmark {
  display: block;
  animation: checkDraw 0.4s ease forwards;
}

@keyframes checkDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.captcha-label {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #282828;
}

.recaptcha-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.recaptcha-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.recaptcha-brand {
  font-family: 'Roboto', sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: #555555;
  letter-spacing: -0.2px;
}

.recaptcha-terms {
  font-family: 'Roboto', sans-serif;
  font-size: 8px;
  color: #555555;
  margin-top: 2px;
}

.recaptcha-terms a {
  color: #555555;
  text-decoration: none;
}

.recaptcha-terms a:hover {
  text-decoration: underline;
}

/* Lỗi chưa xác minh robot */
.captcha-error-msg {
  display: none;
  font-size: 12px;
  color: #ef4444;
  font-weight: 600;
  margin-top: 8px;
  text-align: center;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.recaptcha-inner.shake-effect {
  animation: shake 0.4s ease-in-out;
  border-color: #ef4444;
}

/* ================== NÚT CTA NHẬN ƯU ĐÃI ================== */
.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(180deg, #1f6fed 0%, #155bd5 100%);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(27, 104, 227, 0.35);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cta-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: lightSweep 3.5s infinite;
}

@keyframes lightSweep {
  0% { left: -60%; }
  35% { left: 140%; }
  100% { left: 140%; }
}

.cta-button:hover {
  background: linear-gradient(180deg, #2b77f2 0%, #1a62dd 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(27, 104, 227, 0.45);
}

.cta-button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(27, 104, 227, 0.3);
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.cta-button:hover .btn-arrow {
  transform: translateX(4px);
}

/* ================== RESPONSIVE (MOBILE & DESKTOP) ================== */
@media (max-width: 480px) {
  .landing-wrapper {
    padding: 16px 12px;
  }

  .card-container {
    padding: 26px 20px;
    border-radius: 24px;
  }

  .main-title {
    font-size: 19px;
  }

  .subtitle {
    font-size: 12.5px;
    margin-bottom: 18px;
  }

  .check-item {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .item-title {
    font-size: 13.5px;
  }

  .item-desc {
    font-size: 11.5px;
  }

  .alert-ready {
    font-size: 12.5px;
    padding: 11px 12px;
  }

  .cta-button {
    font-size: 15px;
    padding: 15px 16px;
  }
}

@media (max-width: 360px) {
  .card-container {
    padding: 20px 14px;
  }
  
  .main-title {
    font-size: 17.5px;
  }

  .cta-button {
    font-size: 14px;
  }
}
