:root {
  --accent-color: #e0245e;
  --bg: #030712;
  --fg: #f5f5f7;
  --muted: #a1a1aa;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.page {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg);
}

/* The photo is shown WHOLE, never cropped — width:100%/height:auto keeps
   its exact natural aspect ratio. The fade to black at the bottom is a
   CSS gradient overlay (matching how the reference funnel actually does
   it — verified on their live DOM), not dead space baked into the photo
   file: a flat black margin inside the file reads as an obvious,
   disproportionate gap, while a gradient overlay blends tightly no matter
   what the photo's own crop looks like. */
.media-frame {
  position: relative;
  width: 100%;
  line-height: 0;
  background: #17171b;
}

.media-frame img {
  display: block;
  width: 100%;
  height: auto;
  /* Hidden until real media actually loads (see app.js) — a missing/broken
     photo must never render as a broken-image icon; the block's own dark
     background shows through instead until then. */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* The video (when present) overlays the photo it sits on top of, rather
   than stacking below it in normal flow — same natural-ratio treatment. */
.media-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-frame img.is-ready,
.media-frame video.is-ready {
  opacity: 1;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(3,7,18,0) 70%, var(--bg) 100%);
}

.content {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 12px 24px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.creator-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.badges {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  color: #fff;
}

.badge-online {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-online .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(34, 197, 94);
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse 1.6s infinite;
}

.badge-city {
  background: rgba(255, 255, 255, 0.08);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.cta-button {
  margin-top: 4px;
  display: block;
  width: 100%;
  text-align: center;
  background: #ffffff;
  color: #111827;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 20px;
  border-radius: 12px;
  text-decoration: none;
}

.manual-fallback-link[hidden] {
  display: none;
}

.manual-fallback-link {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
}
