/* =========================================================
   MyRepublic Promo — myrep.silverhawk.web.id
   Brand colors: white, purple, blue
========================================================= */
:root {
  --purple: #7C3AED;
  --purple-dark: #6D28D9;
  --purple-light: #A78BFA;
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #60A5FA;
  --black: #1e1b4b;
  --dark: #312e81;
  --gray: #e2e8f0;
  --muted: #64748b;
  --white: #ffffff;
  --bg: #ffffff;
  --card: #f8fafc;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(124, 58, 237, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--black);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: 0.3s var(--ease);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--black);
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: white;
}
.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: 0.2s;
}
.nav-links a:hover { color: var(--purple); background: rgba(124,58,237,0.08); }
.btn-nav {
  background: linear-gradient(135deg, var(--purple), var(--blue)) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  padding: 10px 18px !important;
}
.btn-nav:hover { opacity: 0.92 !important; }

/* Google / Admin button */
.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--black);
  transition: 0.2s;
  cursor: pointer;
}
.auth-btn:hover { border-color: var(--purple); color: var(--purple); background: rgba(124,58,237,0.05); }
.auth-btn img, .auth-btn .g-icon {
  width: 18px; height: 18px;
}
.auth-btn.admin-mode {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
  border-color: transparent;
}
.auth-btn.admin-mode:hover { opacity: 0.92; }
.user-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}
.burger span {
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: 0.3s;
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #faf5ff 0%, #eff6ff 50%, #ffffff 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,0.1);
  color: var(--purple);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  border: 1px solid rgba(124,58,237,0.25);
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  color: var(--black);
}
.hero h1 span {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  transition: 0.25s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: var(--white);
  box-shadow: 0 8px 24px rgba(124,58,237,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124,58,237,0.4);
}
.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--black);
  background: var(--white);
}
.btn-outline:hover {
  border-color: var(--purple);
  background: rgba(124,58,237,0.06);
  color: var(--purple);
}
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.rocket-card {
  background: linear-gradient(160deg, #ffffff 0%, #faf5ff 45%, #ede9fe 100%);
  border: 1px solid rgba(124,58,237,0.18);
  border-radius: 24px;
  padding: 32px;
  width: 100%;
  max-width: 340px;
  box-shadow: var(--shadow);
  text-align: center;
}
.rocket-emoji { font-size: 64px; margin-bottom: 12px; }
.rocket-card h3 { font-size: 1.3rem; margin-bottom: 6px; color: var(--black); }
.rocket-card p { color: var(--muted); font-size: 0.9rem; }

/* ---------- BENEFITS ---------- */
.section {
  padding: 80px 20px;
  max-width: 1140px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--black);
}
.section-header p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.benefit-card {
  background: linear-gradient(160deg, #faf5ff 0%, #f5f3ff 50%, #eef2ff 100%);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: 0.3s var(--ease);
}
.benefit-card:hover {
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(124,58,237,0.14);
  background: linear-gradient(160deg, #f3e8ff 0%, #ede9fe 50%, #e0e7ff 100%);
}
.benefit-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(37,99,235,0.15));
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.benefit-card h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--black); }
.benefit-card p { color: var(--muted); font-size: 0.9rem; }

/* ---------- PACKAGES ---------- */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.pkg-card {
  background: linear-gradient(165deg, #ffffff 0%, #faf5ff 40%, #f5f3ff 100%);
  border: 1px solid rgba(124,58,237,0.14);
  border-radius: 20px;
  padding: 28px 24px;
  position: relative;
  transition: 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}
.pkg-card:hover {
  border-color: rgba(124,58,237,0.45);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  background: linear-gradient(165deg, #faf5ff 0%, #f3e8ff 50%, #ede9fe 100%);
}
.pkg-card.popular {
  border-color: var(--purple);
  background: linear-gradient(165deg, #f5f3ff 0%, #ede9fe 40%, #e0e7ff 100%);
  box-shadow: 0 0 0 1px var(--purple), var(--shadow);
}
.pkg-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pkg-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.pkg-speed {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--black);
}
.pkg-price {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.pkg-period {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.pkg-features {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
}
.pkg-features li {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pkg-features li::before {
  content: '✓';
  color: var(--purple);
  font-weight: 700;
}
.btn-pkg {
  width: 100%;
  padding: 13px;
  background: rgba(124,58,237,0.08);
  color: var(--purple);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 12px;
  font-weight: 600;
  transition: 0.25s;
}
.btn-pkg:hover, .pkg-card.popular .btn-pkg {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
  border-color: transparent;
}

/* ---------- ORDER FORM ---------- */
.order-section {
  background: linear-gradient(180deg, transparent, rgba(124,58,237,0.04));
}
.order-card {
  background: linear-gradient(165deg, #ffffff 0%, #faf5ff 50%, #f5f3ff 100%);
  border: 1px solid rgba(124,58,237,0.16);
  border-radius: 24px;
  padding: 36px 32px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--black);
  font-size: 1rem;
  transition: 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.btn-wa {
  background: #25D366;
  color: white;
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.25s;
}
.btn-wa:hover {
  background: #1da851;
  transform: translateY(-2px);
}
.form-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 12px;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 20px 24px;
  text-align: center;
  background: var(--card);
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
}
.footer p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.footer a {
  color: var(--purple);
  font-weight: 600;
}
.footer a:hover { text-decoration: underline; }
.powered {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.7;
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--black);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transition: 0.35s var(--ease);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-visual { order: -1; }
  .rocket-card { max-width: 280px; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .burger { display: flex; }
}

/* ---------- SPEED TEST ---------- */
.speedtest-card {
  background: linear-gradient(165deg, #ffffff 0%, #faf5ff 40%, #eef2ff 100%);
  border: 1px solid rgba(124,58,237,0.16);
  border-radius: 24px;
  padding: 36px 28px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.speedtest-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.speedtest-gauge {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(124,58,237,0.12), transparent 70%),
              conic-gradient(from 0deg, var(--purple), var(--blue), var(--purple));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 40px rgba(124,58,237,0.2);
}
.speedtest-gauge::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--white);
}
.speedtest-value, .speedtest-unit, .speedtest-label { position: relative; z-index: 1; }
.speedtest-value { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--black); }
.speedtest-unit { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.speedtest-label { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }
.speedtest-metrics { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.st-metric { text-align: center; }
.st-metric-label {
  display: block; font-size: 0.75rem; color: var(--muted);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}
.st-metric-val { font-size: 1.15rem; font-weight: 700; color: var(--black); }
.speedtest-btn {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white; font-weight: 700; padding: 14px 36px;
  border-radius: 12px; border: none; cursor: pointer; font-size: 1rem;
  transition: 0.25s; box-shadow: 0 8px 24px rgba(124,58,237,0.3);
}
.speedtest-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124,58,237,0.4); }
.speedtest-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.speedtest-progress { width: 100%; max-width: 320px; text-align: center; }
.st-bar {
  height: 6px; background: var(--gray); border-radius: 999px;
  overflow: hidden; margin-bottom: 8px;
}
.st-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  border-radius: 999px; transition: width 0.3s ease;
}
#stProgressText { font-size: 0.8rem; color: var(--muted); }

/* ---------- FLOATING WA ---------- */
.float-wa {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.45);
  transition: 0.25s var(--ease);
  animation: pulse-wa 2.5s infinite;
}
.float-wa:hover { transform: scale(1.08); box-shadow: 0 8px 32px rgba(37,211,102,0.55); }
@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 6px 24px rgba(37,211,102,0.45); }
  50% { box-shadow: 0 6px 24px rgba(37,211,102,0.45), 0 0 0 12px rgba(37,211,102,0.15); }
}

/* ---------- FLOATING STATS ---------- */
.float-stats {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.78rem;
  color: rgba(100,116,139,0.55);
  box-shadow: 0 4px 16px rgba(124,58,237,0.06);
  min-width: 130px;
  line-height: 1.6;
  opacity: 0.45;
  transition: opacity 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: default;
}
.float-stats:hover {
  opacity: 1;
  background: rgba(255,255,255,0.95);
  color: var(--muted);
  border-color: rgba(124,58,237,0.22);
  box-shadow: 0 8px 28px rgba(124,58,237,0.14);
}
.fs-online {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; color: inherit; margin-bottom: 4px;
}
.float-stats:hover .fs-online { color: var(--black); }
.fs-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: blink 1.5s infinite;
  opacity: 0.6;
}
.float-stats:hover .fs-dot { opacity: 1; }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.fs-row strong { color: rgba(124,58,237,0.55); font-weight: 700; }
.float-stats:hover .fs-row strong { color: var(--purple); }

@media (max-width: 480px) {
  .float-stats { font-size: 0.7rem; padding: 10px 12px; bottom: 90px; left: 12px; }
  .float-wa { bottom: 16px; right: 16px; width: 50px; height: 50px; }
}

/* ---------- FLOATING AUTO-SCROLL TOGGLE ---------- */
.float-autoscroll {
  position: fixed;
  bottom: 100px;
  left: 24px;
  z-index: 91;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(124,58,237,0.15);
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(100,116,139,0.55);
  cursor: pointer;
  opacity: 0.45;
  box-shadow: 0 4px 16px rgba(124,58,237,0.06);
  transition: opacity 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.float-autoscroll:hover {
  opacity: 1;
  background: rgba(255,255,255,0.95);
  color: var(--muted);
  border-color: rgba(124,58,237,0.25);
  box-shadow: 0 8px 24px rgba(124,58,237,0.12);
}
.float-autoscroll.active {
  opacity: 0.85;
  background: linear-gradient(135deg, rgba(124,58,237,0.9), rgba(37,99,235,0.9));
  color: #fff;
  border-color: transparent;
}
.float-autoscroll.active:hover {
  opacity: 1;
}
.ast-icon { font-size: 0.95rem; line-height: 1; }

@media (max-width: 480px) {
  .float-autoscroll {
    bottom: 160px;
    left: 12px;
    padding: 7px 12px;
    font-size: 0.7rem;
  }
}
