/* ==========================================================================
   REDTalk Fast-Track — Dark Sleek TikTok-Native Theme
   ========================================================================== */

:root {
  --bg: #09090b;
  --surface: #131317;
  --surface-2: #1b1b21;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-soft: #d4d4d8;

  --accent: #ff2442;
  --accent-hover: #ff3b56;
  --accent-soft: rgba(255, 36, 66, 0.14);
  --accent-border: rgba(255, 36, 66, 0.42);
  --accent-glow: rgba(255, 36, 66, 0.28);

  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.14);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Red Glows */
.bg-glow {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  filter: blur(110px);
}

.bg-glow-top {
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 36, 66, 0.24) 0%, rgba(255, 36, 66, 0) 70%);
}

.bg-glow-bottom {
  bottom: -180px;
  right: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 36, 66, 0.12) 0%, rgba(255, 36, 66, 0) 70%);
}

/* Main Container — Mobile-First Optimal Width */
.container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 4px 6px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: #ff6b80;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.25);
  }
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.brand-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2442 0%, #9b0f24 100%);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 14px rgba(255, 36, 66, 0.35);
}

.brand-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.brand-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.brand-name {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.15;
}

.verified-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-grid;
  place-items: center;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.hero-title {
  margin: 0 0 10px;
  font-family: "Outfit", sans-serif;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.hero-subtitle {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--text-soft);
  max-width: 440px;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.highlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-soft);
}

.highlight-chip strong {
  color: #ffffff;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.step-card-accent {
  border-color: rgba(255, 36, 66, 0.28);
  background: linear-gradient(180deg, rgba(255, 36, 66, 0.05) 0%, var(--surface) 45%);
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.step-number {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: #ff6b80;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
}

.step-title {
  margin: 0 0 3px;
  font-family: "Outfit", sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.step-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Suggested Amount Pills */
.amount-section {
  margin-bottom: 18px;
}

.amount-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-soft);
}

.priority-hint {
  font-size: 11.5px;
  color: #ff7a8d;
  font-weight: 600;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.amount-pill {
  position: relative;
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.amount-pill:hover {
  border-color: var(--border-strong);
}

.amount-pill:active {
  transform: scale(0.98);
}

.amount-pill.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.amount-pill-value {
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.amount-pill-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.amount-pill.is-active .amount-pill-tag {
  color: #ff8a9b;
}

.selected-amount-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.selected-amount-note strong {
  color: #fff;
}

/* QRIS High-Contrast Container */
.qris-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.merchant-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--success-soft);
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 12.5px;
  color: #bbf7d0;
}

.merchant-bar strong {
  color: #ffffff;
}

.merchant-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.qris-frame {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
}

.qris-image {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 10px;
  user-select: none;
  -webkit-touch-callout: default;
}

.qris-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.mobile-tip {
  margin: 2px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.mobile-tip strong {
  color: var(--text-soft);
}

/* Buttons */
.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.14s ease, background-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: #24242c;
}

/* Step 2 Confirmation Gate */
.gate-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-soft);
}

.input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 14px;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-muted);
  pointer-events: none;
}

.text-input {
  width: 100%;
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.text-input-prefixed {
  padding-left: 42px;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 16px;
}

.text-input::placeholder {
  color: #6b6b76;
  font-weight: 400;
}

.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.text-input.is-valid {
  border-color: rgba(34, 197, 94, 0.55);
}

.text-input.is-invalid {
  border-color: var(--accent);
}

.input-feedback {
  font-size: 11.5px;
  color: var(--text-muted);
}

.input-feedback.is-valid {
  color: #4ade80;
}

.input-feedback.is-error {
  color: #ff6b80;
}

.confirm-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.confirm-box:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.confirm-box.is-checked {
  background: rgba(34, 197, 94, 0.09);
  border-color: rgba(34, 197, 94, 0.5);
}

.confirm-box.shake {
  animation: shake 0.36s ease;
  border-color: var(--accent);
}

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

.confirm-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.confirm-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  display: grid;
  place-items: center;
  color: transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.confirm-input:checked + .confirm-check {
  background: var(--success);
  border-color: var(--success);
  color: #052e16;
}

.confirm-text {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.45;
}

.confirm-text strong {
  color: #fff;
}

.btn-cta {
  width: 100%;
  padding: 15px 18px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.btn-cta.btn-locked {
  background: #222229;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-cta.btn-unlocked {
  background: linear-gradient(135deg, #ff2442 0%, #e11d48 100%);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(255, 36, 66, 0.38);
  cursor: pointer;
}

.btn-cta.btn-unlocked:hover {
  filter: brightness(1.06);
}

.gate-hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Rules & Info Cards */
.section-heading {
  margin: 0 0 14px;
  font-family: "Outfit", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}

.rule-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 16px;
}

.rule-title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.rule-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  appearance: none;
  background: transparent;
  border: none;
  padding: 14px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
  color: #ff6b80;
}

.faq-body {
  display: none;
  padding: 0 14px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.faq-item.is-open .faq-body {
  display: block;
}

/* Footer */
.footer {
  text-align: center;
  padding: 10px 8px 4px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.footer p {
  margin: 3px 0;
}

.footer strong {
  color: var(--text-soft);
}

.footer-note {
  font-size: 11.5px;
  opacity: 0.75;
}

/* Modal */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-title {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.modal-close {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

.modal-qris-wrap {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px;
}

.modal-qris-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.modal-hint {
  margin: 12px 0 2px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 12px;
  background: #1f1f26;
  border: 1px solid var(--border-strong);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
