/* ==========================================================================
   DOLLAR TREE $100 GIFT CARD LANDING PAGE STYLES
   Modern, Clean, High-Converting Mobile-First CPA Design
   ========================================================================== */

:root {
  --dt-green: #00843D;
  --dt-green-hover: #006e33;
  --dt-green-dark: #005a2a;
  --dt-green-light: #eaf8f0;
  --dt-green-border: #a3e6be;
  
  --primary-accent: #10b981;
  --primary-accent-dark: #059669;
  
  --text-dark: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --bg-page: #f0f4f8;
  --bg-card: #ffffff;
  --border-card: #e2e8f0;
  
  --star-gold: #f59e0b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-green: 0 8px 24px -4px rgba(0, 132, 61, 0.5);
  --shadow-pulse: 0 0 0 0 rgba(0, 132, 61, 0.7);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 600px) {
  body {
    padding: 24px 16px;
    background: linear-gradient(135deg, #e2e8f0 0%, #edf2f7 50%, #e2e8f0 100%);
  }
}

/* App Wrapper & Centered Card */
.app-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.card-container {
  background: var(--bg-card);
  width: 100%;
  min-height: 100vh;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  .card-container {
    min-height: auto;
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    margin-bottom: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  }
}

/* Header Hero Image */
.header-hero {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #003618;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 440px) {
  .header-hero {
    height: 185px;
  }
}

/* Shrink hero image when step 2 is visible */
.header-hero.step2-active,
body.step2-active .header-hero {
  height: 100px !important;
  max-height: 100px !important;
  min-height: 100px !important;
}

.header-hero.step2-active .verified-badge,
body.step2-active .verified-badge {
  top: 8px !important;
  left: 10px !important;
  padding: 4px 10px !important;
  font-size: 10.5px !important;
  gap: 5px !important;
}

.header-hero.step2-active .reward-pill-tag,
body.step2-active .reward-pill-tag {
  top: 8px !important;
  right: 10px !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
}

.header-hero.step2-active .trophy-icon,
body.step2-active .trophy-icon {
  width: 12px !important;
  height: 12px !important;
}

@media (min-width: 440px) {
  .header-hero.step2-active,
  body.step2-active .header-hero {
    height: 115px !important;
    max-height: 115px !important;
    min-height: 115px !important;
  }
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

.card-container:hover .hero-image {
  transform: scale(1.02);
}

/* Verified Winner Pill Badge */
.verified-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #00843D 0%, #005a2a 100%);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(0, 132, 61, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: pulse-glow 2.5s infinite;
}

.reward-pill-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: #fbbf24;
  padding: 6px 10px;
  border-radius: 9999px;
  font-family: 'Outfit', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: 1px solid rgba(251, 191, 36, 0.35);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.trophy-icon {
  width: 14px;
  height: 14px;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(0, 132, 61, 0.45);
  }
  50% {
    box-shadow: 0 4px 22px rgba(16, 185, 129, 0.85);
  }
}

/* Steps System */
.step-view {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  flex: 1;
}

.step-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.step-content {
  padding: 12px 14px 16px;
}

@media (min-width: 440px) {
  .step-content {
    padding: 18px 20px 22px;
  }
}

/* Urgency Countdown Bar */
.countdown-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.timer-dot {
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: timer-pulse 1.2s infinite;
}

@keyframes timer-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Typography & Titles */
.congrats-header {
  text-align: center;
  margin-bottom: 12px;
}

.promo-tag {
  display: inline-block;
  background: var(--dt-green-light);
  color: var(--dt-green);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  letter-spacing: 0.08em;
  border: 1px solid var(--dt-green-border);
  margin-bottom: 8px;
}

.main-title {
  font-family: 'Outfit', sans-serif;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

@media (min-width: 440px) {
  .main-title {
    font-size: 24px;
  }
}

.highlight-green {
  color: var(--dt-green);
  font-weight: 800;
}

.subtitle {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 5px;
  padding: 0 4px;
}

/* Value Props Grid */
.value-highlight-box {
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px;
  margin-bottom: 10px;
}

.value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
}

.val-num {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--dt-green);
}

.val-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.value-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-card);
}

/* Trust Badges */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.badge-pill {
  background: var(--dt-green-light);
  border: 1px solid var(--dt-green-border);
  color: #065f46;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.2s ease;
}

.badge-pill:hover {
  transform: translateY(-1px);
}

.badge-icon {
  font-size: 11px;
}

/* CTA Button & Gentle Motion Animation */
.cta-container {
  width: 100%;
  text-align: center;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(180deg, #009647 0%, #007034 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 13.5px 18px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-green);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Gentle subtle motion for CTA button */
.btn-gentle-motion {
  animation: gentle-motion 2.4s ease-in-out infinite;
}

@keyframes gentle-motion {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 20px -4px rgba(0, 132, 61, 0.45);
  }
  50% {
    transform: translateY(-3px) scale(1.018);
    box-shadow: 0 12px 26px -2px rgba(0, 132, 61, 0.7);
  }
}

.btn-primary:hover {
  animation-play-state: paused;
  background: linear-gradient(180deg, #00aa50 0%, #005a2a 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px -2px rgba(0, 132, 61, 0.75);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.99);
}

.arrow-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.btn-primary:hover .arrow-icon {
  transform: translateX(4px);
}

.cta-subtext {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 10px;
  font-weight: 500;
}

/* ================= STEP 2: INSTRUCTIONS & OFFERS ================= */

#step2 .step-content {
  padding: 12px 14px 18px;
}

.instructions-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  position: relative;
}

.instruction-badge {
  display: inline-block;
  background: var(--dt-green-light);
  color: var(--dt-green);
  font-family: 'Outfit', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.instructions-title {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.instructions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.instruction-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--dt-green);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(0, 132, 61, 0.4);
  margin-top: 1px;
}

.step-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: #0f172a;
  font-weight: 600;
}

.priority-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dt-green);
  margin-bottom: 10px;
  padding: 4px 6px;
}

/* Offers Feed List */
.offers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual Offer Card */
.offer-card {
  background: #ffffff;
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.offer-card:hover {
  border-color: var(--dt-green);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 132, 61, 0.15);
}

.offer-icon-box {
  width: 68px;
  height: 64px;
  min-width: 68px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 1px solid #edf2f7;
}

.offer-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.offer-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.offer-title {
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  unicode-bidi: plaintext;
}

.offer-subtitle {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  unicode-bidi: plaintext;
}

.offer-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.btn-complete {
  background: var(--dt-green);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.offer-card:hover .btn-complete {
  background: var(--dt-green-hover);
}

.offer-stars {
  color: var(--star-gold);
  font-size: 13px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

/* Skeleton Loading */
.offer-skeleton {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.skeleton-img {
  width: 68px;
  height: 64px;
  min-width: 68px;
  border-radius: 10px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-line.title {
  width: 80%;
  height: 14px;
}

.skeleton-line.sub {
  width: 50%;
  height: 10px;
}

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

/* Security Note */
.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  text-align: center;
}

/* ================= SITE FOOTER ================= */
.site-footer {
  padding: 22px 16px 26px;
  text-align: center;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  margin-top: auto;
}

.copyright-text {
  font-size: 11.5px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-weight: 500;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-link {
  font-size: 11.5px;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--dt-green);
}

.footer-link.contact-highlight {
  font-weight: 500;
  color: #64748b;
  cursor: default;
  pointer-events: none;
  opacity: 0.5;
}

/* ================= MODAL DIALOG ================= */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modal-pop 0.25s ease-out;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.modal-body h4 {
  color: var(--text-dark);
  font-size: 14.5px;
  margin-top: 14px;
  margin-bottom: 6px;
}

.modal-body p {
  margin-bottom: 10px;
}

/* ================= iOS / TikTok In-App Browser Popup ================= */
.ios-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: none;
}

.ios-popup-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.ios-popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #181d28;
  padding: 1.5rem;
  border-radius: 16px;
  border: 2px solid var(--dt-green);
  box-shadow: 0 0 30px rgba(0, 132, 61, 0.4);
  text-align: center;
  max-width: 90%;
  width: 360px;
  box-sizing: border-box;
  animation: iosPopAnim 0.3s ease-out;
}

@keyframes iosPopAnim {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.ios-gif-container {
  width: 100%;
  margin-bottom: 1rem;
}

.ios-instruction-gif {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
}

.ios-instruction-text {
  color: #f1faee;
}

.ios-instruction-text h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
}

.ios-instruction-text p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.ios-instruction-text strong {
  color: #ffffff;
}

.ios-popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
  z-index: 10;
}

.ios-popup-close:hover {
  color: #ffffff;
}

.ios-popup-dismiss-btn {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.ios-popup-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}
