/* ===== Variables ===== */
:root {
  --bg-dark: #0a0a0f;
  --bg-card: #1a1a22;
  --bg-card-hover: #22222e;
  --accent: #a855f7;
  --accent-light: #c084fc;
  --accent-glow: rgba(168, 85, 247, 0.4);
  --text: #ffffff;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --border: #2d2d3a;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ===== Reset & Base ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* body::before gradient removed — replaced by global-bg photo */

/* ===== Global Blurred Background ===== */
.global-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.global-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  /* scale-110 prevents blur white-edge bleeding */
  transform: scale(1.12);
  filter: blur(22px);
  opacity: 0.45;
}

.global-bg-overlay {
  position: absolute;
  inset: 0;
  /* dark gradient: more opaque at bottom for readability */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.60) 0%,
    rgba(10, 10, 15, 0.78) 50%,
    rgba(10, 10, 15, 0.92) 100%
  );
}

/* ===== App Container ===== */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  /* centered on wide screens, full-width on mobile */
  max-width: 480px;
  margin: 0 auto;
}

/* On real mobile phones (narrow viewports) — completely edge-to-edge */
@media (max-width: 480px) {
  .app {
    max-width: 100%;
    margin: 0;
  }
}

/* ===== Steps ===== */
.step {
  display: none;
  min-height: 100vh;
  padding: 1.5rem;
  padding-top: 5rem; /* extra for progress bar */
  position: relative;
}

/* ===== Global Progress Bar ===== */
#quiz-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: none; /* shown only during quiz steps */
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  padding: 0.6rem 1rem 0.5rem;
  box-sizing: border-box;
}

#quiz-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

#quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
  border-radius: 99px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(168,85,247,0.7);
}

#quiz-progress-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  text-align: right;
  line-height: 1;
  transition: color 0.3s;
}

#quiz-progress-label .pct {
  color: #c084fc;
  font-size: 0.75rem;
}

/* Option card: smooth pulse after selection before auto-advance */
.option-card.selecting {
  animation: card-pulse 0.4s ease forwards;
}

@keyframes card-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.025); }
  100% { transform: scale(1); opacity: 0.85; }
}

/* Paywall step: no extra padding, overlay handles spacing */
.step.modal {
  padding: 0;
}

.step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Back Button ===== */
.back {
  position: fixed;
  /* sit just below the progress bar (~55px) with a little breathing room */
  top: 62px;
  left: 1rem;
  right: auto;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 999;
}

/* ===== Scrolling gallery (sağdan sola) ===== */
.scroll-gallery {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 1.5rem;
  overflow: hidden;
}

.scroll-track {
  display: flex;
  gap: 0.5rem;
  animation: scroll-left 25s linear infinite;
}

.scroll-track img {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.ai-generated-step .scroll-track img {
  border: 1px solid rgba(255,255,255,0.1);
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.scroll-bottom {
  margin-top: 1rem;
}

.scroll-track.scroll-right {
  animation: scroll-right 25s linear infinite;
}

@keyframes scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ===== Typography ===== */
.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  /* Back button: top 62px + height 36px = bottom at 98px. Title must start below. */
  padding-top: 3.5rem; /* ~56px — step padding-top (3.5rem=56px) + this = 112px total ✅ */
}

.accent {
  color: var(--accent);
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

/* ===== Landing Hero ===== */
.hero {
  text-align: center;
  padding: 2rem 0;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.showcase {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 2rem 0;
  overflow: hidden;
}

.frame {
  width: 28%;
  max-width: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame.play {
  position: relative;
}

.frame.play::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  color: white;
  font-size: 2.5rem;
}

.mantra {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-secondary {
  padding: 1rem 2rem;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-white {
  background: white;
  color: #111;
}

.btn-white-text {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.btn-next {
  margin-top: 2rem;
  width: 100%;
  justify-content: center;
}

/* ===== AI Generated Step (resimdeki gibi - Neural'dan sonra) ===== */
.step-content {
  max-width: 400px;
  margin: 0 auto;
}

.ai-generated-step .step-content {
  text-align: center;
}

.ai-badge {
  text-align: center;
  margin-bottom: 2rem;
}

.ai-icon-star {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  background: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 30px var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.ai-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
}

.ai-badge h2, .ai-title {
  font-size: 1.75rem;
  font-weight: 800;
}

.grid-showcase {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.grid-showcase img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
}

.ai-desc {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.ai-features {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.btn-start-transform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 2rem;
  background: white;
  color: #111;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.btn-start-transform:hover {
  background: #f3f4f6;
}

/* ===== Neural Networks Step (örnek resim ile aynı) ===== */
.neural-step {
  background: linear-gradient(180deg, rgba(30, 20, 50, 0.4) 0%, var(--bg-dark) 50%);
}

.neural-step .step-content {
  text-align: center;
}

.neural-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.15rem;
}

.neural-title.accent {
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 2rem;
}

.ai-chip-img {
  margin: 0 auto 2rem;
  max-width: 360px;
  border-radius: var(--radius);
  overflow: hidden;
}

.ai-chip-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.ai-chip {
  position: relative;
  background: linear-gradient(145deg, #1a1a24 0%, #0d0d12 100%);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  margin: 0 auto 2rem;
  max-width: 320px;
  overflow: hidden;
}

.ai-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, transparent 0%, rgba(96,165,250,0.03) 50%, transparent 100%),
    repeating-linear-gradient(0deg, transparent, transparent 8px, rgba(96,165,250,0.08) 8px, rgba(96,165,250,0.08) 9px);
  pointer-events: none;
}

.chip-circuit {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(45deg, transparent 40%, rgba(96,165,250,0.05) 50%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, rgba(96,165,250,0.05) 50%, transparent 60%);
  pointer-events: none;
}

.chip-visual {
  position: relative;
  font-size: 3.5rem;
  font-weight: 800;
  color: #60a5fa;
  text-shadow: 
    0 0 20px rgba(96, 165, 250, 0.8),
    0 0 40px rgba(96, 165, 250, 0.4);
  letter-spacing: 0.05em;
}

.neural-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1rem;
  color: var(--text);
}

.tech {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.hook {
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--text);
}

.btn-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 2rem;
  background: #e5e7eb;
  color: #111;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-continue:hover {
  background: #d1d5db;
}

/* ===== Compact step (ekrana sığsın) ===== */
.step-compact {
  padding: 1rem 1.5rem;
  padding-top: 3.5rem; /* match other steps so back button clears title */
}

.step-compact .section-title {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
  padding-top: 3.5rem; /* same as global section-title — back button clears at ~112px */
}

.step-compact .subtitle {
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.step-compact .options-list {
  gap: 0.4rem;
}

.step-compact .option-card {
  padding: 0.5rem 0.75rem;
  gap: 0.75rem;
}

.step-compact .option-card img {
  width: 44px;
  height: 44px;
}

.step-compact .option-card strong {
  font-size: 0.85rem;
}

.step-compact .option-card span {
  font-size: 0.7rem;
}

.step-compact .option-card .radio {
  width: 20px;
  height: 20px;
}

.step-compact .btn-next {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
}

/* ===== Options List (Radio cards) ===== */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.option-card:hover {
  background: var(--bg-card-hover);
}

.option-card.selected {
  border-color: var(--accent);
  background: rgba(168, 85, 247, 0.1);
}

.option-card img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.option-card > div {
  flex: 1;
}

.option-card strong {
  font-size: 0.95rem;
  display: block;
}

.option-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.option-card .radio {
  width: 24px;
  height: 24px;
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: white;
  transition: all 0.2s;
}

.option-card.selected .radio {
  border-color: var(--accent);
  background: var(--accent);
  font-size: 0.9rem;
  font-weight: bold;
}

.option-card.selected .radio::before {
  content: '✔';
}

/* ===== Digital Scan ===== */
.instructions {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.scan-upload {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.scan-single {
  grid-template-columns: 1fr;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.scan-single .upload-area {
  aspect-ratio: 1;
}

.upload-box {
  text-align: center;
}

.upload-label {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.upload-area {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.upload-area.has-image {
  border-style: solid;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.upload-area.has-image .upload-placeholder {
  display: none;
}

.upload-icon {
  font-size: 2rem;
}

.upload-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.upload-area.has-image .upload-preview {
  display: block;
}

.upload-area .check {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  background: #22c55e;
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.upload-area.has-image .check {
  display: flex;
}

.security-message {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* ===== Configure Output ===== */
.style-section, .pigment-section {
  margin-bottom: 1.5rem;
}

.field-label {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.optional-tag {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: lowercase;
  margin-left: 0.25rem;
}

/* Color swatches */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
  flex-shrink: 0;
}

.swatch:hover {
  transform: scale(1.12);
  border-color: rgba(255,255,255,0.5);
}

.swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--accent, #a259ff);
  transform: scale(1.18);
}

.swatch.selected::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  pointer-events: none;
}

.style-cards {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.style-card {
  flex: 0 0 100px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.style-card:hover {
  border-color: var(--border);
}

.style-card.selected {
  border-color: var(--accent);
  position: relative;
}

.style-card.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.style-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.style-card span {
  display: block;
  font-size: 0.7rem;
  padding: 0.5rem;
  font-weight: 600;
}

input[type="text"] {
  width: 100%;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
}

input[type="text"]::placeholder {
  color: var(--text-subtle);
}

#pigment {
  border-color: var(--accent);
}

/* ===== Processing ===== */
.processing {
  text-align: center;
}

.accent-text {
  color: var(--accent) !important;
}

.processing-area {
  background: #000;
  border-radius: var(--radius);
  padding: 4rem 2rem;
  margin-top: 2rem;
}

.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-text {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.processing-time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Results ===== */
.success-banner {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.results-container {
  min-height: 280px;
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.results-container img {
  max-height: 300px;
  border-radius: var(--radius);
  object-fit: contain;
}

.result-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.result-actions .btn-primary {
  flex: 1;
}

.credits {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ===== Synthesize Animation ===== */
.synthesize-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}

.synth-circle {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 1.5rem;
}

.synth-ring {
  width: 100%;
  height: 100%;
}

#synth-progress-ring {
  transition: stroke-dashoffset 0.3s ease;
}

.synth-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.synth-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 1.5rem;
}

.synth-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.synth-step {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  opacity: 0.3;
  transition: opacity 0.5s ease;
}

.synth-step.active {
  opacity: 1;
  color: var(--text);
}

/* ===== Save Code Section ===== */
.save-code-section {
  padding: 1.25rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  text-align: center;
  margin-top: 0.5rem;
}

.save-code-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-light);
}

.save-code-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
}

.save-code-value {
  flex: 1;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--text);
  padding: 0.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  user-select: all;
  cursor: pointer;
}

.copy-code-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-code-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-code-btn.copied {
  color: #22c55e;
  border-color: #22c55e;
}

.save-code-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tag-extra {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== Premium Modal ===== */
.premium-content {
  background: transparent; /* global-bg zaten var */
  padding: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  position: relative;
  overflow: hidden;
  /* border-radius removed — full-screen feel */
}

/* paywall-blur-placeholder — hidden, global-bg handles the blur now */
.paywall-blur-placeholder,
.paywall-blur-placeholder-img,
.paywall-blur-overlay {
  display: none;
}

.paywall-blurred-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(16px) brightness(0.7);
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

.paywall-content-overlay {
  position: relative;
  z-index: 2;
  background: transparent;
  padding: 1.5rem 1.25rem;
  /* no border-radius — full-screen feel */
}

.paywall-scroll-area {
  padding-bottom: 1rem;
}

.paywall-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.paywall-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.premium-banner {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.close-banner {
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
}

.premium-content h2 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.limited {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Compact countdown inside premium card */
.countdown {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.countdown p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.countdown-numbers {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.countdown-numbers span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.countdown-numbers span span {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

/* Compact countdown (inline, small) */
.countdown-compact {
  padding: 0;
  margin: 0;
  background: none;
}

.countdown-compact .countdown-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.5rem;
}

.countdown-inline {
  display: inline-flex;
  gap: 0.35rem;
}

.countdown-inline span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.countdown-inline span span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.premium-offer-with-countdown .premium-offer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.premium-offer-with-countdown .countdown-compact {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.premium-offer {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--accent);
  padding: 1.5rem;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.premium-offer .price {
  text-align: right;
}

.premium-offer del {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.premium-offer strong.accent {
  display: block;
  font-size: 1.5rem;
}

/* ===== Paywall Preview Teaser ===== */
.paywall-preview-teaser {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.paywall-preview-teaser:hover {
  transform: scale(1.015);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
}

.paywall-preview-teaser:active {
  transform: scale(0.98);
}

.paywall-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.05);
  filter: blur(12px);
  opacity: 0.85;
}

.paywall-preview-lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  gap: 0.35rem;
}

.paywall-preview-lock-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.paywall-preview-lock-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}

.paywall-preview-lock-sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
}

/* Sticky CTA: desktop normal flow */
.paywall-cta-sticky {
  margin-top: 0.5rem;
}

.paywall-cta-sticky .btn-primary.full {
  margin-bottom: 0.5rem;
}

.paywall-cta-sticky .ssl {
  margin-bottom: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.tags span {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.save-code-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-primary.full {
  width: 100%;
  justify-content: center;
  margin-bottom: 1rem;
}

.social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(168, 85, 247, 0.1);
  border-radius: var(--radius-sm);
}

.social-proof .stars {
  font-size: 1rem;
  line-height: 1;
}

.social-proof .proof-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.ssl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-align: center;
}

.redeem-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.returning-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  font-weight: 500;
}

.redeem-row {
  display: flex;
  gap: 0.5rem;
}

.redeem-row input {
  flex: 1;
}

.btn-redeem {
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ===== Paywall: Mobile sticky CTA + compact layout ===== */
@media (max-width: 768px) {
  .paywall-wrapper .paywall-content-overlay {
    padding: 1.25rem 1rem;
    padding-bottom: 0;
  }

  .paywall-wrapper .paywall-scroll-area {
    /* padding-bottom: sticky CTA height + safe area */
    padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
  }

  .paywall-wrapper .premium-banner {
    margin-bottom: 1rem;
  }

  .paywall-wrapper .paywall-title {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
  }

  .paywall-wrapper .paywall-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .paywall-wrapper .limited {
    margin-bottom: 0.75rem;
  }

  .paywall-wrapper .premium-offer {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .paywall-wrapper .premium-offer-with-countdown .countdown-compact {
    padding-bottom: 0.4rem;
    margin-bottom: 0.4rem;
  }

  .paywall-wrapper .tags {
    margin: 0.5rem 0;
  }

  .paywall-wrapper .social-proof {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  .paywall-wrapper .redeem-label {
    margin-bottom: 0.4rem;
  }

  /* Sticky bottom CTA on mobile */
  .paywall-wrapper .paywall-cta-sticky {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 50;
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    margin-top: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }

  .paywall-wrapper .paywall-cta-sticky .btn-primary.full {
    margin-bottom: 0.4rem;
  }

  .paywall-wrapper .paywall-cta-sticky .ssl {
    font-size: 0.7rem;
    margin-bottom: 0;
  }
}

.spinner-sm {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
  animation: spin 0.8s linear infinite;
}

/* ===== Site Footer (Contact) — fixed bottom, always visible ===== */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 0.45rem 1rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  background: rgba(5, 5, 10, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 200;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.28);
}

.site-footer .footer-email {
  color: rgba(168,85,247,0.75);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.72rem;
  transition: color 0.2s;
}

.site-footer .footer-email:hover {
  color: #c084fc;
}

.site-footer .footer-sub {
  display: none; /* keep it compact on mobile */
}

/* Hide contact footer on paywall (has its own sticky CTA) */
body.on-paywall .site-footer {
  display: none;
}

/* Add bottom padding to steps so footer doesn't overlap content */
.step {
  padding-bottom: 3.5rem;
}
