:root {
  --bg-primary: #fffaf3;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #fbbf24;
  --accent-color: #b45309;
  --surface-color: #fff7ed;
  --surface-hover: #ffedd5;

  --device-bg: #050816;
  --device-text: #f9fafb;
  --device-accent: #fbbf24;

  --font-sans: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont,
    sans-serif;
  --font-serif: "EB Garamond", Georgia, serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --transition-fast: 0.2s ease;
  --transition-med: 0.4s ease;
}

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

body {
  font-family: var(--font-sans);
  background: radial-gradient(
      circle at top left,
      rgba(251, 191, 36, 0.18),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(30, 64, 175, 0.12),
      transparent 55%
    ),
    var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app-wrapper {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem 5.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 3rem;
}

.hidden {
  display: none !important;
}

.app-header {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 25px -18px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: rgba(255, 255, 255, 0.5);
}

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

.promo-banner {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.08), rgba(251, 191, 36, 0.09));
  border: 1px solid rgba(251, 191, 36, 0.6);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.promo-pill {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #111827;
  color: #fef9c3;
}

.promo-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.promo-main {
  font-size: 0.9rem;
  font-weight: 600;
}

.promo-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #b45309, #f97316);
  -webkit-background-clip: text;
  color: transparent;
}

.logo-tagline {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 420px) {
  .brand {
    gap: 0.65rem;
  }
  .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}

.generate-btn {
  width: 100%;
  padding: 1.25rem;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, opacity var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.generate-btn:hover {
  opacity: 0.9;
}

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

.secondary-btn {
  padding: 0.75rem 1.25rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.secondary-btn:hover {
  background: var(--surface-color);
}

.secondary-btn.icon-only {
  width: 3rem;
  height: 3rem;
  padding: 0;
}

.dropdown-wrapper {
  position: relative;
  width: 100%;
}

.minimal-select {
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 1rem 3rem 1rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.minimal-select:focus {
  outline: none;
  border-color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--text-primary);
}

.dropdown-icon {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
}

.section-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.input-section {
  margin-bottom: 1.5rem;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hero-pill {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.7);
  background: rgba(255, 249, 196, 0.6);
  color: #92400e;
}

.hero-pill.secondary {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.8);
  color: #6b21a8;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-benefits {
  list-style: none;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hero-benefits li::before {
  content: "•";
  color: var(--accent-color);
  margin-right: 0.4rem;
}

.shuffle-album-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.iphone-mockup {
  position: relative;
  width: 320px;
  height: 690px;
  background: #000;
  border-radius: 40px;
  padding: 10px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

@media (min-width: 768px) {
  .iphone-mockup {
    width: 360px;
    height: 780px;
    border-radius: 44px;
    padding: 12px;
  }
}

.iphone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--device-bg);
  border-radius: 32px;
  overflow: hidden;
  color: var(--device-text);
  display: flex;
  flex-direction: column;
}

.wallpaper-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 20% 10%, rgba(251, 191, 36, 0.18), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(59, 130, 246, 0.12), transparent 60%),
    linear-gradient(180deg, #050816, #020617);
  transition: opacity 0.35s ease;
}

.wallpaper-bg.is-fading {
  opacity: 0.25;
}

.fade-element {
  transition: opacity 1s ease-in-out;
}

.fade-out {
  opacity: 0;
}

.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 20;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px 0;
  font-size: 13px;
  font-weight: 600;
  z-index: 10;
}

.status-icon {
  width: 16px;
  height: 10px;
}

.lock-screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
}

.time-widget {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

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

.shake {
  animation: shake 0.45s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .shake {
    animation: none;
  }
  .wallpaper-bg {
    transition: none;
  }
}

.date {
  font-size: 1rem;
  font-weight: 500;
}

.clock {
  font-size: 4.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -2px;
  margin-top: -5px;
}

.wallpaper-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.verse-container {
  width: 100%;
  text-align: center;
}

.verse-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.verse-ref {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--device-accent);
}

.customization-section {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.form-row-tight {
  gap: 0.75rem;
}

.device-picker {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.segmented {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.15rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.7);
  border: 1px solid rgba(251, 191, 36, 0.5);
}

.segmented-btn {
  position: relative;
  border: none;
  background: transparent;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
    box-shadow var(--transition-fast), transform 0.1s ease;
}

.segmented-btn.is-active {
  background: linear-gradient(135deg, #b45309, #f97316);
  color: #fef9c3;
  box-shadow: 0 7px 15px -8px rgba(180, 83, 9, 0.9);
  transform: translateY(-1px);
}

.segmented-btn:is(:hover, :focus-visible) {
  outline: none;
  color: var(--text-primary);
}

.segmented-btn.is-active:is(:hover, :focus-visible) {
  filter: brightness(1.02);
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.steps-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  row-gap: 0.2rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.step-title {
  font-weight: 600;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.install-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.install-note a {
  color: var(--accent-color);
  text-decoration: none;
}

.install-note a:hover {
  text-decoration: underline;
}

/* Success-page instruction tabs (matches reference layout) */
.tabs-container {
  margin-top: 1rem;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
}

.tabs-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f9fafb;
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
}

.tab-btn {
  padding: 0.8rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.tab-btn.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: inset 0 -2px 0 0 var(--text-primary);
}

.tab-content {
  display: none;
  padding: 1.25rem 1.5rem;
}

.tab-content.active {
  display: block;
}

.step-list {
  margin-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.step-list li {
  margin: 0.45rem 0;
}

.step-list strong {
  color: var(--text-primary);
}

.step-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.9em;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 0.1rem 0.35rem;
  border-radius: 8px;
}

.checkout-btn {
  margin-top: 1rem;
  background: linear-gradient(135deg, #b45309, #f97316);
}

#view-success {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.success-header {
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #e8f5e9;
  color: #4caf50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.success-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.success-header p {
  color: var(--text-secondary);
}

.url-delivery-box {
  background: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.url-delivery-box label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.url-bar {
  display: flex;
  gap: 0.5rem;
}

.url-input {
  flex: 1;
  min-width: 0;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--surface-color);
}

.installation-guide {
  margin-top: 1rem;
}

.installation-guide h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.guide-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: center;
}

.app-footer p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.sticky-offer-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.97);
  color: #f9fafb;
  border-top: 1px solid rgba(251, 191, 36, 0.6);
  backdrop-filter: blur(16px);
}

.sticky-offer-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0.75rem 1rem env(safe-area-inset-bottom, 0.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sticky-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sticky-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.sticky-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.sticky-price-current {
  font-size: 1rem;
  font-weight: 700;
  color: #facc15;
}

.sticky-price-original {
  font-size: 0.8rem;
  color: rgba(156, 163, 175, 0.85);
  text-decoration: line-through;
}

.sticky-cta-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sticky-timer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.sticky-timer-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(209, 213, 219, 0.85);
}

.sticky-timer-value {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.2);
  border: 1px solid rgba(45, 212, 191, 0.7);
  color: #bef264;
}

.sticky-buy-btn {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #1f2937;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 25px -12px rgba(248, 181, 0, 0.9);
  transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sticky-buy-btn:hover {
  filter: brightness(1.02);
  box-shadow: 0 12px 30px -15px rgba(248, 181, 0, 0.95);
}

.sticky-buy-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 6px 16px -10px rgba(248, 181, 0, 0.85);
}

@media (max-width: 639px) {
  .sticky-offer-content {
    padding-inline: 1.1rem;
  }

  .sticky-title {
    font-size: 0.85rem;
  }

  .sticky-price-current {
    font-size: 0.95rem;
  }

  .sticky-timer-value {
    font-size: 0.9rem;
  }
}

@media (min-width: 768px) {
  .promo-banner {
    margin-top: 1.5rem;
  }
}
