/* ============================================================
   style.css — Global Stylesheet (Simple Blue Theme)
   ============================================================ */

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #1565C0;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background-color: #fff;
  color: #1a1a1a;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 0 #e0e0e0, 0 2px 8px rgba(0, 0, 0, 0.06);
}

header .header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
}

header .header-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

header .header-subtitle {
  font-size: 0.78rem;
  font-weight: 400;
  color: #666;
}

/* ── Main Content Area ── */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

/* ── White Card ── */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 480px;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0D47A1;
  margin-bottom: 0.4rem;
  text-align: center;
}

.card-subtitle {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-bottom: 1.8rem;
  line-height: 1.6;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: #e0e0e0;
  margin: 1.5rem 0;
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.4rem;
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: #333;
  background: #f9f9f9;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus {
  outline: none;
  border-color: #1565C0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
  background-color: #fff;
}

.form-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-select option {
  background: #fff;
  color: #333;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary {
  background: #1565C0;
  color: #fff;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: #0D47A1;
  box-shadow: 0 4px 16px rgba(13, 71, 161, 0.4);
}

.btn-primary:disabled {
  background: #90a4ae;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: transparent;
  color: #1565C0;
  border: 1.5px solid #1565C0;
}

.btn-outline:hover {
  background: #e3f0ff;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.btn-whatsapp:hover {
  background: #1da851;
}

.btn-instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
}

.btn-full {
  width: 100%;
}

/* ── Alert ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.8rem;
  display: none;
}

.alert-error {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #c62828;
}

.alert-info {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  color: #1565C0;
}

/* ── Countdown ── */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.countdown-box {
  background: #f0f4ff;
  border: 1.5px solid #c5cae9;
  border-radius: 10px;
  padding: 1rem 0.5rem;
  text-align: center;
}

.countdown-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1565C0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-lbl {
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}

.countdown-num.flip {
  animation: flipNum 0.25s ease;
}

@keyframes flipNum {
  0% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(0.1);
  }

  100% {
    transform: scaleY(1);
  }
}

/* ── Status Info ── */
.status-info {
  font-size: 0.82rem;
  color: #666;
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* ── Loading bar ── */
.loading-bar {
  height: 3px;
  background: linear-gradient(90deg, #1565C0, #42a5f5, #1565C0);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease infinite;
  border-radius: 999px;
  display: none;
  margin-top: 0.3rem;
}

.loading-bar.show {
  display: block;
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* ── Footer ── */
footer {
  background-color: #fff;
  color: #888;
  text-align: center;
  padding: 1rem 2rem;
  font-size: 0.78rem;
  border-top: 1px solid #e0e0e0;
}

/* ── Back Link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: #1565C0;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 1.2rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* Tombol header outline (di halaman result) */
.btn-header-outline {
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  color: #1565C0;
  border-color: #1565C0;
  background: transparent;
  border: 1.5px solid #1565C0;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: background 0.2s, color 0.2s;
}

.btn-header-outline:hover {
  background: #e3f0ff;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .card {
    padding: 1.8rem 1.2rem;
  }

  header {
    padding: 0.8rem 1rem;
  }

  .countdown-num {
    font-size: 1.7rem;
  }

  header .header-subtitle {
    display: none;
  }
}