* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #0a0a0c;
  --surface: #101013;
  --border: #232327;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --red: #e11d48;
  --green: #16a34a;
  --green-hover: #15803d;
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }

.page { max-width: 480px; margin: 0 auto; padding: 40px 20px 24px; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- perfil ---------- */
.profile { text-align: center; margin-bottom: 28px; }
.avatar-wrap {
  width: 140px; height: 140px; margin: 0 auto 20px;
  border-radius: 50%; padding: 4px; background: #1b1b1f;
}
.avatar-wrap img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.profile h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.bio { font-size: 17px; color: #d4d4d8; }

/* ---------- card do produto ---------- */
.product-cards { display: grid; gap: 14px; }
.product-card {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--red); border-radius: 18px; padding: 14px;
  text-align: left; transition: transform .12s ease, filter .12s ease;
  box-shadow: 0 8px 30px rgba(225, 29, 72, .22);
}
.product-card:hover { filter: brightness(1.06); }
.product-card:active { transform: scale(.985); }
.thumb {
  width: 88px; height: 88px; flex: 0 0 88px; border-radius: 12px;
  background:
    var(--product-cover, linear-gradient(transparent, transparent)),
    radial-gradient(60px 50px at 25% 30%, #e8c9a8 0%, transparent 70%),
    radial-gradient(70px 60px at 75% 65%, #b98d6f 0%, transparent 70%),
    radial-gradient(50px 60px at 60% 20%, #d9d2c5 0%, transparent 70%),
    linear-gradient(135deg, #c9b39b, #8f7460);
  background-size: cover; background-position: center;
  filter: saturate(.9);
}
.product-card .info { min-width: 0; }
.product-card .title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.prices { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.prices .old { font-size: 15px; color: rgba(255,255,255,.75); text-decoration: line-through; }
.prices .new { font-size: 20px; font-weight: 800; }

/* ---------- conteúdo liberado ---------- */
.content { margin-top: 32px; }
.content h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.muted { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.content-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; text-align: left; transition: border-color .12s ease;
}
.content-card:hover { border-color: #3f3f46; }
.content-thumb {
  aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(80px 60px at 30% 35%, rgba(244,63,94,.35) 0%, transparent 70%),
    radial-gradient(90px 70px at 70% 70%, rgba(124,58,237,.3) 0%, transparent 70%),
    #17171a;
  color: rgba(255,255,255,.85);
}
.content-thumb.empty { opacity: .55; }
.content-title { font-size: 14px; font-weight: 700; padding: 10px 12px 2px; }
.content-sub { font-size: 12px; color: var(--muted); padding: 0 12px 12px; }

/* ---------- rodapé ---------- */
.footer { margin-top: auto; padding-top: 48px; text-align: center; color: #71717a; font-size: 14px; }
.footer a { color: #a1a1aa; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- modal ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.65); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
  background: #0e0e11; border-radius: 24px 24px 0 0;
  padding: 18px 20px calc(24px + env(safe-area-inset-bottom));
  animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) {
  .backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; }
}
.sheet-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.mini-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.sheet-handle { font-size: 17px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.close {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
  background: #232327; color: #e4e4e7;
  display: flex; align-items: center; justify-content: center;
}
.close:hover { background: #2e2e33; }

.kicker { color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: .18em; margin-bottom: 8px; }
.m-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }

.preview {
  position: relative; aspect-ratio: 4/3; border-radius: 16px; overflow: hidden;
  margin-bottom: 20px; background: #141416;
}
.preview-blur {
  position: absolute; inset: -20px;
  background:
    var(--product-cover, linear-gradient(transparent, transparent)),
    radial-gradient(140px 110px at 25% 30%, #e8c9a8 0%, transparent 70%),
    radial-gradient(160px 130px at 75% 60%, #b98d6f 0%, transparent 70%),
    radial-gradient(120px 120px at 55% 20%, #d9d2c5 0%, transparent 70%),
    radial-gradient(100px 90px at 40% 80%, #caa27e 0%, transparent 70%),
    linear-gradient(135deg, #c9b39b, #8f7460);
  background-size: cover; background-position: center;
  filter: blur(18px) saturate(.9);
}
.preview-blur.sharp-preview {
  inset: 0;
  filter: saturate(.98);
}
.lock-pill {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  background: rgba(18,18,20,.85); border-radius: 999px; padding: 10px 16px;
  font-size: 14px; font-weight: 600;
}

.big-price { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.desc { color: var(--muted); font-size: 16px; line-height: 1.5; margin-bottom: 20px; }
.fine { color: #9ca3af; font-size: 14px; line-height: 1.5; text-align: center; margin-top: 14px; }

.btn-green {
  width: 100%; background: var(--green); color: #fff;
  font-size: 17px; font-weight: 700; border-radius: 999px; padding: 16px 20px;
  transition: background .12s ease, transform .12s ease;
}
.btn-green:hover { background: var(--green-hover); }
.btn-green:active { transform: scale(.99); }
.btn-green:disabled { opacity: .6; cursor: default; }

.btn-dark {
  width: 100%; background: #1c1c20; border: 1px solid var(--border); color: var(--text);
  font-size: 15px; font-weight: 600; border-radius: 12px; padding: 13px 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px;
}
.btn-dark:hover { background: #232328; }

.btn-ghost { width: 100%; padding: 13px; color: var(--muted); font-weight: 600; margin-top: 8px; }
.btn-ghost:hover { color: var(--text); }

/* ---------- etapa pix ---------- */
.qr-card {
  background: #fff; border-radius: 16px; padding: 14px;
  width: fit-content; margin: 0 auto 16px;
}
.qr-card img { width: 240px; height: 240px; }
.code-box {
  background: #141416; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; color: #d4d4d8; word-break: break-all;
  max-height: 88px; overflow-y: auto; user-select: all;
}
.status-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 16px; font-size: 15px; font-weight: 600; color: #fbbf24;
}
.status-row[data-state="expired"], .status-row[data-state="failed"] { color: #f87171; }
.status-row[data-state="expired"] .spinner, .status-row[data-state="failed"] .spinner { display: none; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(251,191,36,.25); border-top-color: #fbbf24;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sucesso ---------- */
.success { text-align: center; padding: 12px 0 4px; }
.check-circle {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  background: rgba(22,163,74,.15); color: #4ade80;
  display: flex; align-items: center; justify-content: center;
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- player ---------- */
.player { position: relative; width: min(920px, 94vw); }
.player video { width: 100%; max-height: 80vh; border-radius: 14px; background: #000; }
.player-close { position: absolute; top: -52px; right: 0; }
#playerBackdrop { align-items: center; }

/* ---------- age gate ---------- */
.age-gate {
  position: fixed; inset: 0; z-index: 100; background: rgba(5,5,7,.96);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.age-card {
  max-width: 380px; width: 100%; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px 24px;
}
.age-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  background: rgba(225,29,72,.15); color: var(--red);
  font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center;
}
.age-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.age-card p { color: var(--muted); font-size: 15px; line-height: 1.55; margin-bottom: 22px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 200; background: #27272a; color: var(--text);
  border: 1px solid #3f3f46; border-radius: 999px; padding: 11px 20px;
  font-size: 14px; font-weight: 600; max-width: 90vw; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: slideUp .18s ease;
}

/* ---------- entrega Google Drive ---------- */
.drive-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 28px 22px; text-align: center; margin-top: 4px;
}
.drive-icon { display: flex; justify-content: center; margin-bottom: 14px; }
.drive-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.drive-note { color: var(--muted); font-size: 15px; line-height: 1.5; margin-bottom: 20px; }
.drive-btn { display: block; text-decoration: none; text-align: center; }
.drive-btn.disabled { opacity: .6; pointer-events: none; }
.drive-hint { color: #71717a; font-size: 13px; margin-top: 14px; line-height: 1.5; }
