/* Canlı önizleme sayfası (temanın kendi stili) */
:root {
  --bg: #fff;
  --text: #0B0C10;
  --muted: #5d5d5d;
  --label: #a5a5a5;
  --primary: #0B0C10;
  --primary-hover: #16181e;
  --brand: #45A29E;
  --border: rgba(11, 12, 16, 0.18);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

.preview-app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  flex-shrink: 0;
}

.preview-text {
  min-width: 0;
  flex: 1;
}

.preview-label {
  margin: 0;
  font-size: 12px;
  color: var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.preview-title {
  margin: 4px 0 0;
  font-family: 'Stack Sans Headline', sans-serif;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.btn-back {
  border: 1px solid var(--border);
  border-radius: 44px;
  color: var(--text);
  background: transparent;
}

.btn-back:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--primary);
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-pulse {
  box-shadow: 0 0 0 0 rgba(11, 12, 16, 0.28);
  animation: pulseGlow 1.9s ease-in-out infinite;
}

.btn-pulse::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 70%;
  height: 100%;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  animation: offerShine 2.4s ease-in-out infinite;
  pointer-events: none;
}

.btn-offer {
  gap: 8px;
  padding: 0 18px;
}

.btn-offer-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex-shrink: 0;
  transform: translateY(0);
  animation: iconFloat 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(11, 12, 16, 0.28);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(11, 12, 16, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(11, 12, 16, 0);
  }
}

@keyframes offerShine {
  0% {
    left: -140%;
  }
  55%,
  100% {
    left: 165%;
  }
}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.preview-frame-wrap {
  flex: 1;
  min-height: 0;
}

.preview-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 768px) {
  .preview-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-actions {
    justify-content: flex-end;
    width: 100%;
  }

  .btn {
    height: 40px;
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-pulse {
    animation: none;
    transition: none;
  }
}
