:root {
  --navy: #0b2b40;
  --navy-2: #123d57;
  --navy-3: #071d2c;
  --blue: #1d9bd7;
  --blue-soft: #e6f4fb;
  --gold: #f2b84b;
  --gold-soft: #fdf3df;
  --ink: #0f2433;
  --muted: #5d6f7c;
  --line: #e2e8ee;
  --bg: #f4f6f8;
  --card: #ffffff;
  --ok: #1f8a5b;
  --ok-soft: #e5f5ed;
  --warn: #9a6400;
  --danger: #c0392b;
  --danger-soft: #fdeceb;
  --radius: 20px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; }
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.logo { font-weight: 800; font-size: 28px; letter-spacing: -0.04em; color: #fff; line-height: 1; }
.logo span { color: var(--blue); }
.logo.dark { color: var(--navy); }
.muted { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- topo com fogos ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(29, 155, 215, .30), transparent 60%),
    radial-gradient(1200px 260px at 50% 100%, rgba(242, 184, 75, .22), transparent 70%),
    radial-gradient(700px 360px at 5% 100%, rgba(29, 155, 215, .16), transparent 60%),
    linear-gradient(180deg, #051522, var(--navy-3) 35%, var(--navy) 75%, var(--navy-2));
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* céu estrelado (camadas de pontinhos repetidos, piscando devagar) */
.stars, .stars::after {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 20px 30px, rgba(255,255,255,.95), transparent 70%),
    radial-gradient(1.2px 1.2px at 140px 80px, rgba(255,255,255,.8), transparent 70%),
    radial-gradient(2px 2px at 90px 160px, rgba(255,226,163,.95), transparent 70%),
    radial-gradient(1.2px 1.2px at 200px 210px, rgba(255,255,255,.7), transparent 70%),
    radial-gradient(1.6px 1.6px at 260px 50px, rgba(143,214,247,.9), transparent 70%),
    radial-gradient(1px 1px at 60px 110px, rgba(255,255,255,.6), transparent 70%),
    radial-gradient(1.4px 1.4px at 180px 140px, rgba(255,255,255,.75), transparent 70%),
    radial-gradient(1px 1px at 230px 250px, rgba(143,214,247,.6), transparent 70%);
  background-size: 300px 260px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 80%);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 80%);
}
.stars::after {
  content: ""; background-size: 410px 330px; background-position: 130px 70px;
  animation: twinkle 4.5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .25; } to { opacity: 1; } }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 170px; pointer-events: none; overflow: visible; }
.hz-dot { stroke: #ffe2a3; stroke-width: 7; }
.hz-dot-live { stroke-width: 9; filter: drop-shadow(0 0 6px #f2b84b); animation: hzPulse 2.4s ease-in-out infinite; }
@keyframes hzPulse { 50% { stroke-width: 13; opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .hz-dot-live { animation: none; } }
.hero-body::before {
  /* sombra suave atrás do texto para manter a leitura sobre os fogos */
  content: ""; position: absolute; inset: -40px -80px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(5, 21, 34, .55), transparent);
}
.hero-body { position: relative; z-index: 0; }
.hero-inner { position: relative; max-width: 1160px; margin: 0 auto; padding: 32px 24px 150px; }
.hero-body { text-align: center; max-width: 760px; margin: 72px auto 0; }
.eyebrow {
  display: inline-block; margin: 0 0 22px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(242, 184, 75, .4); background: rgba(7, 29, 44, .5);
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 60px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 20px; font-weight: 700;
  white-space: pre-line; text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.lead { font-size: clamp(16px, 1.6vw, 19px); color: rgba(255, 255, 255, .86); margin: 0 auto 36px; max-width: 60ch; white-space: pre-line; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px; border-radius: 14px;
  background: var(--gold); color: var(--navy); font-weight: 700; font-size: 17px; text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(242, 184, 75, .7); transition: transform .15s, filter .15s;
}
.cta svg { width: 22px; height: 22px; }
.cta:hover { transform: translateY(-2px); filter: brightness(1.05); }
.cta-ghost {
  display: inline-flex; align-items: center; padding: 16px 24px; border-radius: 14px; color: #fff; text-decoration: none;
  font-weight: 600; border: 1.5px solid rgba(255, 255, 255, .3); background: rgba(7, 29, 44, .35);
}
.cta-ghost:hover { background: rgba(255, 255, 255, .08); }

/* ---------- envio ---------- */
.page { max-width: 1160px; margin: 0 auto; padding: 0 20px 48px; }
.upload {
  position: relative; margin-top: -48px; background: var(--card); border-radius: 24px; padding: 36px 40px 40px;
  box-shadow: 0 1px 2px rgba(11, 43, 64, .06), 0 24px 60px -30px rgba(11, 43, 64, .4);
  scroll-margin-top: 20px;
}
.upload-head { text-align: center; margin-bottom: 8px; }
.upload-head h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.02em; color: var(--navy); }
.notice { margin: 20px 0 0; padding: 12px 16px; border-radius: 12px; font-size: 14px; border: 1px solid; }
.notice.error { background: var(--danger-soft); border-color: #f3c1bc; color: #8e2a20; }
.notice.ok { background: var(--ok-soft); border-color: #b9e2cd; color: #17603f; }
.notice.info { background: var(--blue-soft); border-color: #bfe2f3; color: #0c5a80; }
form { margin-top: 24px; display: grid; gap: 22px; }

.pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pick-btn {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  padding: 26px 12px; border-radius: 18px; border: 1.5px solid var(--line); background: #fafcfd;
  color: var(--navy); cursor: pointer; transition: .15s;
}
.pick-btn strong { font-size: 16px; margin-top: 6px; }
.pick-btn small { font-size: 13px; color: var(--muted); }
.pick-btn:hover { border-color: var(--blue); background: var(--blue-soft); transform: translateY(-2px); }
.pick-btn.primary { border-color: var(--navy); background: var(--navy); color: #fff; }
.pick-btn.primary small { color: rgba(255, 255, 255, .7); }
.pick-btn.primary:hover { background: var(--navy-2); }
.pick-btn svg { width: 32px; height: 32px; }
.pick-btn:has(input:disabled) { opacity: .45; pointer-events: none; }
.pick-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.details { display: grid; gap: 18px; padding-top: 22px; border-top: 1px solid var(--line); animation: rise .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.details-grid .wide { grid-column: 1 / -1; }
.field .req { color: var(--danger); }
.field-note { font-weight: 400; font-size: 12px; color: var(--muted); }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--navy); }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; font-weight: 400;
  background: #fff; transition: border-color .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); }

.previews { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.previews li { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #e9eef2; }
.previews img, .previews video { width: 100%; height: 100%; object-fit: cover; }
.previews .rm {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(11, 43, 64, .8); color: #fff; font-size: 16px; line-height: 1; display: grid; place-items: center;
}
.previews .tag { position: absolute; left: 4px; bottom: 4px; font-size: 11px; background: rgba(0, 0, 0, .6); color: #fff; padding: 1px 6px; border-radius: 6px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }

.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--gold)); transition: width .2s; }

.send {
  border: 0; border-radius: 14px; padding: 16px; font-size: 16px; font-weight: 700;
  background: var(--gold); color: var(--navy); transition: .15s;
}
.send:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.send:disabled { background: #e7ebef; color: #9aa8b3; cursor: not-allowed; }
.hint { font-size: 13px; color: var(--muted); margin: -6px 0 0; text-align: center; }
.hint.admin-hint { color: var(--warn); background: var(--gold-soft); padding: 8px 12px; border-radius: 10px; margin: 0; }

/* ---------- meus envios ---------- */
.section { margin-top: 48px; scroll-margin-top: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; color: var(--navy); }
.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mine-item { background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.mine-item .media { aspect-ratio: 4/3; background: #e9eef2; }
.mine-item .media img, .mine-item .media video { width: 100%; height: 100%; object-fit: cover; }
.mine-item .row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; gap: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.chip.pending { background: var(--gold-soft); color: var(--warn); }
.chip.approved { background: var(--ok-soft); color: var(--ok); }
.chip.rejected { background: var(--danger-soft); color: var(--danger); }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 4px; }
.link-btn:hover { color: var(--danger); }

/* ---------- álbum ---------- */
.grid { columns: 4 240px; column-gap: 14px; }
.tile {
  break-inside: avoid; margin: 0 0 14px; background: #fff; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); cursor: zoom-in; position: relative; display: block; width: 100%; padding: 0; text-align: left;
}
.tile img, .tile video { width: 100%; height: auto; background: #e9eef2; }
.tile .cap { padding: 10px 12px 12px; font-size: 14px; }
.tile .cap p { margin: 0 0 2px; }
.tile .cap small { color: var(--muted); }
.play {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(11, 43, 64, .75); display: grid; place-items: center;
}
.play::after { content: ""; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.empty {
  text-align: center; padding: 48px 20px; border: 1.5px dashed #cfd9e1; border-radius: var(--radius); color: var(--muted); background: #fff;
}

.foot { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot .logo { font-size: 22px; }
.foot p { margin: 0; color: var(--muted); font-size: 13px; }
.foot a { color: var(--muted); }

.dl-all {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; text-decoration: none;
  background: #fff; border: 1.5px solid var(--line); color: var(--navy); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.dl-all svg { width: 18px; height: 18px; }
.dl-all:hover { border-color: var(--blue); background: var(--blue-soft); }
.tile-wrap { position: relative; break-inside: avoid; margin: 0 0 14px; }
.tile-wrap .tile { margin: 0; }
.tile-dl {
  position: absolute; left: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .94); color: var(--navy); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); transition: transform .15s;
}
.tile-dl svg { width: 18px; height: 18px; }
.tile-dl:hover { transform: scale(1.08); background: var(--gold); }

/* ---------- lightbox ---------- */
.lb-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.lb-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 0; background: var(--gold); color: var(--navy);
}
.lb-btn svg { width: 18px; height: 18px; }
.lb-btn.danger { background: rgba(255, 255, 255, .12); color: #ffb4ab; border: 1px solid rgba(255, 180, 171, .4); }
.lightbox {
  position: fixed; inset: 0; background: rgba(6, 20, 30, .92); z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
}
.lightbox img, .lightbox video { max-height: 80vh; max-width: 100%; border-radius: 12px; }
.lightbox .meta { color: #fff; margin-top: 14px; text-align: center; }
.lightbox .meta small { opacity: .7; }
.lightbox .close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 22px;
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff;
  padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .hero-inner { padding: 22px 20px 110px; }
  .skyline { height: 110px; }
  .hero-body { margin-top: 44px; }
  .logo { font-size: 24px; }
  .eyebrow { font-size: 11px; letter-spacing: .08em; }
  .cta, .cta-ghost { width: 100%; justify-content: center; }
  .page { padding: 0 14px 40px; }
  .upload { padding: 26px 18px 24px; border-radius: 20px; }
  .upload-head h2 { font-size: 21px; }
  .pick { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pick-btn { padding: 18px 8px; }
  .pick-btn.primary { grid-column: span 2; flex-direction: row; gap: 12px; padding: 20px; }
  .pick-btn.primary strong { margin-top: 0; font-size: 17px; }
  .pick-btn.primary small { display: none; }
  .details-grid { grid-template-columns: 1fr; }
  .grid { columns: 2 140px; column-gap: 10px; }
  .tile-wrap { margin-bottom: 10px; }
  .dl-all { padding: 9px 12px; }
  .foot { justify-content: center; text-align: center; }
}
