/* =============================================================
   AvaliaJá — Página de avaliação (premium & interativa)
   ============================================================= */

:root {
  --cor: #ea580c;
  --cor-esc: #c2410c;
  --ouro: #fbbf24;
  --ouro-esc: #f59e0b;
  --tinta: #0f0a19;
  --suave: #6b7280;
  --linha: #eceef2;
  --card: rgba(255, 255, 255, 0.96);
  --humor: #cbd5e1;            /* cor da aura, muda com a nota (via JS) */
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--tinta);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; overflow: hidden;
  background: #0b1020;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

/* ---- Fundo mesh animado ---- */
.fundo {
  position: fixed; inset: -25%; z-index: -2;
  background:
    radial-gradient(40% 50% at 18% 12%, var(--cor) 0%, transparent 55%),
    radial-gradient(45% 55% at 85% 18%, #7c3aed 0%, transparent 52%),
    radial-gradient(50% 60% at 80% 92%, #2563eb 0%, transparent 55%),
    radial-gradient(45% 50% at 12% 88%, var(--ouro-esc) 0%, transparent 52%);
  filter: blur(70px) saturate(1.15); opacity: .9;
  animation: flutua 18s ease-in-out infinite alternate;
}
@keyframes flutua {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.12) translate(-3%, 2%); }
  100% { transform: scale(1.06) translate(2%, -2%); }
}

/* ---- Cartão ---- */
.card {
  position: relative;
  background: var(--card);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  width: 100%; max-width: 420px;
  border-radius: 30px;
  padding: 26px 30px 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 40px 80px -28px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.9);
  text-align: center; overflow: hidden;
  animation: entra .6s cubic-bezier(.16, 1, .3, 1);
}
.card::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 70%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(234,88,12,.5), transparent);
}
@keyframes entra {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Cabeçalho do restaurante (compacto) ---- */
.topo-rest {
  display: flex; align-items: center; gap: 11px;
  justify-content: center; margin-bottom: 18px;
}
.logo, .logo-fallback {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px -6px rgba(234,88,12,.4);
}
.logo { object-fit: cover; }
.logo-fallback {
  background: linear-gradient(145deg, var(--cor), var(--cor-esc));
  color: #fff; font-size: 21px; font-weight: 800;
}
.rest-nome { font-weight: 800; font-size: 17px; letter-spacing: -.3px; }

/* ---- Palco do rosto reativo ---- */
.palco-rosto {
  position: relative;
  height: 150px;
  display: flex; align-items: center; justify-content: center;
  margin: 4px 0 6px;
}
.aura {
  position: absolute; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, var(--humor) 0%, transparent 68%);
  opacity: .55; filter: blur(8px);
  transition: background .35s ease, transform .35s ease, opacity .35s ease;
  animation: pulsar 3.2s ease-in-out infinite;
}
@keyframes pulsar {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.rosto {
  position: relative; z-index: 1;
  font-size: 76px; line-height: 1;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
  will-change: transform;
}
.rosto.troca { animation: trocaRosto .4s ease; }
@keyframes trocaRosto {
  0% { transform: scale(.6) rotate(-8deg); }
  60% { transform: scale(1.18) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ---- Tipografia ---- */
h1 {
  font-size: 23px; font-weight: 800; letter-spacing: -0.6px;
  line-height: 1.2; margin-bottom: 6px;
}
.sub {
  color: var(--suave); font-size: 15px; line-height: 1.5;
  margin-bottom: 26px; max-width: 320px; margin-left: auto; margin-right: auto;
}
.dica {
  color: var(--suave); font-size: 14.5px; font-weight: 700;
  min-height: 22px; margin-bottom: 14px;
  transition: color .3s;
}

/* ---- Estrelas interativas ---- */
.estrelas {
  display: flex; justify-content: center; gap: 6px;
  padding: 10px 8px 4px;
  touch-action: none;            /* permite arrastar pra avaliar */
  cursor: pointer;
}
.estrela {
  font-size: 46px; line-height: 1;
  color: #e3e6ec;
  transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), color .16s, text-shadow .16s;
  user-select: none;
}
.estrela.ativa {
  color: var(--ouro);
  text-shadow: 0 5px 18px rgba(251, 191, 36, 0.6);
}
.estrela.salta { animation: salta .4s ease; }
@keyframes salta {
  0% { transform: scale(1); }
  50% { transform: scale(1.4) translateY(-4px); }
  100% { transform: scale(1); }
}

/* ---- Telas ---- */
.tela { display: none; }
.tela.ativa { display: block; animation: fade .45s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Botões ---- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%;
  background: linear-gradient(145deg, var(--cor), var(--cor-esc));
  color: #fff; border: none; border-radius: 15px;
  padding: 16px; font-size: 16px; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none; margin-top: 16px;
  box-shadow: 0 14px 28px -10px rgba(234, 88, 12, 0.55);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -12px rgba(234, 88, 12, 0.65); }
.btn:active { transform: translateY(0) scale(.99); }
.btn.google {
  background: #fff; color: #1f2328;
  border: 1.5px solid var(--linha);
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.22);
}
.btn.google:hover { box-shadow: 0 16px 30px -12px rgba(0,0,0,.28); }
.g-logo { width: 19px; height: 19px; flex-shrink: 0; }

/* ---- Campo de texto ---- */
textarea {
  width: 100%; min-height: 116px;
  border: 2px solid var(--linha); border-radius: 16px;
  padding: 15px; font-size: 15px; font-family: inherit; resize: none;
  background: #fafbfc; transition: border-color .2s, background .2s;
}
textarea:focus { outline: none; border-color: var(--cor); background: #fff; }

/* ---- Telas de resultado ---- */
.emoji-grande {
  font-size: 64px; margin: 8px 0; display: inline-block;
  animation: bounce .7s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes bounce {
  0% { transform: scale(0) rotate(-15deg); }
  60% { transform: scale(1.2) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}
.selo-google {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--linha);
  padding: 8px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #5f6368;
  margin-bottom: 20px; box-shadow: 0 6px 16px -8px rgba(0,0,0,.12);
}

/* ---- Rodapé ---- */
.rodape {
  margin-top: 24px; font-size: 11px; font-weight: 700;
  letter-spacing: .5px; color: #c2c6d2; text-transform: uppercase;
}

/* ---- Convite pro clube (nas telas finais) ---- */
.clube-cta {
  display: inline-block;
  margin-top: 16px;
  color: var(--cor);
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
}
.clube-cta:hover { text-decoration: underline; }

/* ---- Confete ---- */
#confete { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
