/* ==========================================================================
   Button × MomentScience — Choose Your Reward
   ========================================================================== */

:root {
  --btn-purple:       #5B45F5;
  --btn-purple-dark:  #4835E8;
  --btn-purple-light: #EEF0FF;
  --btn-purple-glow:  rgba(91,69,245,0.25);

  --bg-white:         #FFFFFF;
  --border-gray:      #EBEBEB;
  --text-dark:        #1A1A1A;
  --text-mid:         #555;
  --text-light:       #999;

  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-ease:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body, .demo-body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  background: #0D0D0D;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* --------------------------------------------------------------------------
   Desktop layout
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .demo-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 2rem;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #0D0D0D 100%);
    overflow: hidden;
  }
}

/* Desktop label */
.desktop-label {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  pointer-events: none;
  user-select: none;
}
@media (min-width: 768px) { .desktop-label { display: flex; } }

.desktop-label-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.desktop-label-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* --------------------------------------------------------------------------
   iPhone frame
   -------------------------------------------------------------------------- */
.iphone-frame {
  position: relative;
  width: 393px;
  height: 852px;
  background: #1c1c1e;
  border-radius: 3.5rem;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 4px 16px rgba(0,0,0,0.6),
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(0,0,0,0.8);
  flex-shrink: 0;
}

/* Mobile: full screen, no bezel */
@media (max-width: 767px) {
  .iphone-frame {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  background: #000;
  border-radius: 20px;
  z-index: 200;
}
@media (max-width: 767px) { .dynamic-island { display: none; } }

/* Screen content */
.screen-content {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Screens
   -------------------------------------------------------------------------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  transition: opacity 0.28s var(--transition-ease), transform 0.28s var(--transition-ease);
}

.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Screen — Choose Your Reward (full white page, matching MS hosted SDK)
   -------------------------------------------------------------------------- */
#screen-offer {
  background: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#screen-offer::-webkit-scrollbar { display: none; }

.offer-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 36px;
  min-height: 100%;
}

/* Partner logo */
.offer-partner-logo {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  margin-top: 8px;
  line-height: 1;
}
.offer-logo-b    { color: var(--btn-purple); }
.offer-logo-rest { color: var(--text-dark); }

/* Heading */
.offer-screen-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.offer-screen-subhead {
  font-size: 14px;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
  padding: 0 8px;
}

/* Offer slide cards */
.offer-slides-wrap {
  width: 100%;
  position: relative;
}

.offer-slide-card {
  display: none;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  padding: 28px 20px 24px;
  width: 100%;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.offer-slide-card.active { display: flex; }

.offer-slide-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 14px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.offer-slide-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.offer-slide-adv {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 8px;
}
.offer-slide-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.3;
}
.offer-slide-desc {
  font-size: 14px;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.55;
}

/* Claim CTA */
.btn-claim-offer {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  background: var(--btn-purple);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  text-align: center;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 4px 14px var(--btn-purple-glow);
}
.btn-claim-offer:active { opacity: 0.85; transform: scale(0.98); }

.btn-no-thanks-inline {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-mid);
  padding: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Powered by */
.offer-powered-by {
  font-size: 11px;
  color: #c0c0c0;
  letter-spacing: 0.02em;
  margin-top: 14px;
}
.offer-powered-by strong { font-weight: 600; }

/* Dots row */
.offer-dots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
}

.offer-dots { display: flex; align-items: center; gap: 7px; }

.offer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d0d0d0;
  transition: all 0.2s;
  cursor: pointer;
}
.offer-dot.active {
  background: #888;
  width: 8px;
  border-radius: 50%;
}

/* Footer skip link */
.btn-no-thanks-footer {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-light);
  padding: 4px;
}

/* --------------------------------------------------------------------------
   Landscape guard
   -------------------------------------------------------------------------- */
.landscape-guard {
  display: none;
  position: fixed;
  inset: 0;
  background: #0D0D0D;
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
}
@media (max-width: 767px) and (orientation: landscape) {
  .landscape-guard { display: flex; }
}
.landscape-icon { font-size: 48px; }
.landscape-text { font-size: 16px; color: rgba(255,255,255,0.6); }
