/* ==========================================================================
   BISTRÔ DO CHEF · MURAL
   CSS das telas públicas do Brinde Surpresa
   (entrega · lista de premiados · envio de foto)
   ========================================================================== */

/* ---------------- BASE ---------------- */
.pagina-entrega,
.pagina-premiados,
.pagina-foto {
    min-height: 100vh;
    margin: 0;
    padding: 30px 18px 40px;
    background: var(--bege);
    color: var(--texto);
    font-family: 'Inter', sans-serif;
    background-image:
        radial-gradient(rgba(201, 162, 39, .06) 1px, transparent 1px),
        radial-gradient(rgba(123, 45, 38, .04) 1px, transparent 1px);
    background-size: 24px 24px, 36px 36px;
    background-position: 0 0, 12px 12px;
}

.entrega-wrap,
.premiados-wrap,
.foto-wrap {
    max-width: 760px;
    margin: 0 auto;
}

/* ---------------- CABEÇALHO ---------------- */
.entrega-header,
.premiados-header,
.foto-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.logo-entrega img,
.logo-premiados img,
.logo-foto img {
    height: 68px;
    width: auto;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .12));
}

.entrega-header h1,
.premiados-header h1,
.foto-header h1 {
    font-family: 'Caveat', cursive;
    font-size: 2.6rem;
    line-height: 1;
    color: var(--vinho);
    margin: 0;
}

.entrega-header p,
.premiados-header p,
.foto-header p {
    margin: 4px 0 0;
    font-size: .9rem;
    color: #8a7466;
}

/* ---------------- ALERTAS ---------------- */
.entrega-alerta {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: .95rem;
}
.entrega-alerta.ok {
    background: #e6f4e9;
    color: #1f6b3a;
    border-left: 4px solid #2e8b57;
}
.entrega-alerta.erro {
    background: #fbe9e7;
    color: #8a2a20;
    border-left: 4px solid #b41d1d;
}

/* ---------------- BUSCA ---------------- */
.entrega-busca {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}
.entrega-busca input {
    flex: 1;
    padding: 13px 15px;
    border: 1px solid #e5d9c4;
    border-radius: 5px;
    background: #fff;
    font-size: 1rem;
    font-family: inherit;
    min-width: 0;
}
.entrega-busca input:focus {
    outline: none;
    border-color: var(--dourado);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .15);
}
.entrega-busca button {
    padding: 0 24px;
    border: 0;
    border-radius: 5px;
    background: var(--vinho);
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
}
.entrega-busca button:hover { background: #5c1f1a; }

/* ---------------- CARD DO CLIENTE ---------------- */
.entrega-card {
    background: var(--papel);
    border-radius: 8px;
    padding: 28px 26px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, .12);
    border-top: 5px solid var(--dourado);
}

.entrega-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.selo {
    font-family: 'Caveat', cursive;
    font-size: 1.35rem;
    color: var(--dourado);
    font-weight: 700;
}

.status {
    font-size: .75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    letter-spacing: .3px;
}
.status-aprovado  { background: #e6f4e9; color: #1f6b3a; }
.status-entregue  { background: #e8eef7; color: #2c4d7a; }
.status-pendente  { background: #fdf3d8; color: #8a6d1a; }
.status-bloqueado { background: #fbe9e7; color: #8a2a20; }

.entrega-card h2 {
    font-family: 'Caveat', cursive;
    font-size: 2.2rem;
    color: var(--vinho);
    margin: 0 0 6px;
    line-height: 1.1;
}

.entrega-instrucao {
    font-size: .85rem;
    color: #8a7466;
    margin: 0 0 18px;
}

.entrega-dados {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 22px;
    margin: 0 0 18px;
    padding: 18px;
    background: rgba(232, 220, 200, .35);
    border-radius: 6px;
}
.entrega-dados dt {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #8a7466;
    font-weight: 700;
}
.entrega-dados dd {
    margin: 3px 0 0;
    font-size: 1rem;
    font-weight: 500;
    word-break: break-word;
}

.entrega-codigo {
    font-size: .72rem;
    color: #9c8b7d;
    word-break: break-all;
    margin: 0 0 18px;
}
.entrega-codigo span { font-family: monospace; }

.btn-confirmar {
    display: block;
    width: 100%;
    padding: 15px;
    border: 0;
    border-radius: 6px;
    background: #2e8b57;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s, transform .15s;
}
.btn-confirmar:hover { background: #247045; transform: translateY(-1px); }

.entrega-final {
    padding: 14px;
    text-align: center;
    background: #f1ece2;
    border-radius: 6px;
    font-size: .9rem;
    color: #6b5b4e;
    font-weight: 600;
}

.entrega-vazia {
    text-align: center;
    padding: 50px 20px;
    color: #8a7466;
}
.entrega-vazia .icone { font-size: 3rem; margin-bottom: 10px; }
.entrega-vazia p { line-height: 1.6; }

/* ---------------- RODAPÉ ---------------- */
.entrega-footer,
.premiados-footer,
.foto-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 26px;
    font-size: .85rem;
    color: #8a7466;
}
.entrega-footer a,
.premiados-footer a,
.foto-footer a {
    color: var(--vinho);
    text-decoration: none;
    font-weight: 600;
}
.entrega-footer a:hover,
.premiados-footer a:hover,
.foto-footer a:hover { text-decoration: underline; }

/* ==========================================================================
   LISTA DE PREMIADOS
   ========================================================================== */

.premiados-intro {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(247, 217, 76, .22);
    border-left: 5px solid var(--dourado);
    border-radius: 6px;
    padding: 18px 22px;
    margin-bottom: 26px;
    font-size: .92rem;
    line-height: 1.6;
    color: #f3dfb0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    backdrop-filter: blur(4px);
}
.premiados-intro strong { color: #f7d94c; }

.premiados-contador {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    color: var(--dourado);
    margin: 0 0 18px;
    text-align: center;
}

.grid-premiados {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
}

.card-premiado {
    background: var(--papel);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .1);
    text-align: center;
    padding-bottom: 14px;
    border-top: 4px solid var(--dourado);
    animation: premiadoEntrar .5s ease both;
}

@keyframes premiadoEntrar {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.premiado-foto {
    width: 72%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    margin: 16px auto 0;
    background: #eee6d6;
    border-radius: 50%;
    border: 4px solid #d4a017;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.premiado-foto-vazia {
    width: 72%;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px auto 0;
    font-size: 3.2rem;
    background: linear-gradient(160deg, #f5ede1, #e8dcc8);
    border-radius: 50%;
    border: 4px solid rgba(212,160,23,.45);
}

.card-premiado h3 {
    font-family: 'Caveat', cursive;
    font-size: 1.45rem;
    color: var(--vinho);
    margin: 10px 12px 0;
    line-height: 1.1;
}

.card-premiado small {
    display: block;
    margin-top: 4px;
    font-size: .68rem;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: #a08c7c;
}

.premiados-encerrada {
    background: rgba(255, 255, 255, .08);
    border-radius: 8px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
    border: 1px solid rgba(247, 217, 76, .22);
    border-top: 5px solid var(--dourado);
    backdrop-filter: blur(4px);
}
.premiados-encerrada .icone { font-size: 3.4rem; margin-bottom: 12px; }
.premiados-encerrada h2 {
    font-family: 'Caveat', cursive;
    font-size: 2.3rem;
    color: #f7d94c;
    margin: 0 0 8px;
}
.premiados-encerrada p { color: #f3dfb0; line-height: 1.6; }

/* Hero / troféu / faixa motivacional / música */
.premiados-hero { align-items: center; }
.premiados-hero-texto { text-align: center; flex: 1; }
.premiados-hero .logo-premiados { position: absolute; left: 0; top: 0; }
.premiados-header { position: relative; }

.trofeu-campeao {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}
.trofeu-campeao:focus, .trofeu-campeao *:focus { outline: none; }
.trofeu-icone {
  font-size: 5.2rem;
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(212, 160, 23, .45));
  animation: trofeu-flutuar 2.8s ease-in-out infinite;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}
.trofeu-brilho {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 120, .75) 0%, rgba(212, 160, 23, .18) 45%, rgba(212, 160, 23, 0) 72%);
  animation: trofeu-brilho 2.2s ease-in-out infinite;
}
@keyframes trofeu-flutuar {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.04); }
}
@keyframes trofeu-brilho {
  0%, 100% { transform: scale(.92); opacity: .7; }
  50% { transform: scale(1.12); opacity: 1; }
}

.faixa-motivacional {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(255, 255, 255, .08);
  color: #fff8e7;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 0 0 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  text-align: center;
  border: 1px solid rgba(247, 217, 76, .28);
  backdrop-filter: blur(4px);
}
.faixa-motivacional p { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.faixa-motivacional strong { font-family: 'Caveat', cursive; font-size: 2rem; font-weight: 700; letter-spacing: .5px; color: #f7d94c; }
.faixa-estrela { color: #f7d94c; font-size: 1.4rem; animation: estrela-piscar 1.8s ease-in-out infinite; }
.faixa-estrela:last-child { animation-delay: .9s; }
@keyframes estrela-piscar { 0%,100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.2); } }

.btn-musica-premiados {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #d4a017;
  background: rgba(61, 40, 23, .94);
  color: #fff8e7;
  padding: 12px 16px;
  border-radius: 999px;
  font: 600 .9rem/1 Inter, sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
.btn-musica-premiados:hover { transform: translateY(-2px); }
.btn-musica-premiados.tocando { background: rgba(123, 45, 38, .95); }
.btn-musica-icone { font-size: 1.1rem; }

.btn-voltar-topo {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border: 2px solid #d4a017;
  background: rgba(61, 40, 23, .94);
  color: #fff8e7;
  border-radius: 50%;
  font: 700 1.4rem/1 Inter, sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.btn-voltar-topo.visivel { opacity: 1; transform: translateY(0); pointer-events: auto; }
.btn-voltar-topo:hover { transform: translateY(-2px); background: rgba(123, 45, 38, .95); }

.confete-premiados {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}
#frase-motivacional, #frase-motivacional-sub {
  transition: opacity .35s ease;
}

@media (max-width: 640px) {
  .premiados-hero .logo-premiados { position: static; margin-bottom: 10px; }
  .premiados-header { display: flex; flex-direction: column; }
  .trofeu-campeao { width: 96px; height: 96px; }
  .trofeu-icone { font-size: 4.2rem; }
  .faixa-motivacional { flex-direction: column; gap: 6px; padding: 14px; }
  .faixa-motivacional strong { font-size: 1.7rem; }
  .btn-musica-premiados .btn-musica-texto { display: none; }
  .btn-musica-premiados { padding: 12px 14px; }
}

/* Palco THE BEST */
.palco-the-best {
  background:
    radial-gradient(ellipse at top, rgba(255, 215, 120, .12) 0%, rgba(0,0,0,0) 45%),
    radial-gradient(ellipse at center, #2a1020 0%, #120812 45%, #07040a 100%);
  color: #fff8e7;
  overflow-x: hidden;
}
.palco-luzes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 35% 55% at 20% -5%, rgba(247,217,76,.22), transparent 60%),
    radial-gradient(ellipse 35% 55% at 80% -5%, rgba(247,217,76,.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(180,29,29,.18), transparent 65%);
  animation: luzes-palco 6s ease-in-out infinite alternate;
}
@keyframes luzes-palco {
  from { opacity: .75; filter: hue-rotate(0deg); }
  to { opacity: 1; filter: hue-rotate(12deg); }
}
.palco-the-best .premiados-wrap { position: relative; z-index: 2; }
.palco-the-best .premiados-header h1,
.palco-the-best .premiados-header p,
.palco-the-best .premiados-contador { color: #fff8e7; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.palco-the-best .premiados-header p { color: #f3dfb0; }
.palco-the-best .premiados-footer a { color: #f7d94c; }

/* Globos espelhados */
.globo-espelhado {
  position: fixed;
  top: 8px;
  width: 88px;
  height: 88px;
  z-index: 3;
  pointer-events: none;
}
.globo-esq { left: 18px; }
.globo-dir { right: 18px; }
.globo-espelhado::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  width: 2px;
  height: 26px;
  background: rgba(255,255,255,.45);
}
.globo-espelhado span {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,.1) 18%, transparent 20%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 6px, rgba(160,160,160,.45) 6px 12px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.45) 0 6px, rgba(120,120,120,.5) 6px 12px);
  box-shadow: 0 0 18px rgba(247,217,76,.45), 0 0 40px rgba(247,217,76,.2);
  animation: girar-globo 5s linear infinite;
  position: relative;
}
.globo-espelhado span::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247,217,76,.18) 0%, rgba(247,217,76,0) 70%);
}
.globo-dir span { animation-duration: 4s; animation-direction: reverse; }
@keyframes girar-globo {
  from { transform: rotate(0deg); filter: brightness(1); }
  50% { filter: brightness(1.15); }
  to { transform: rotate(360deg); filter: brightness(1); }
}

/* Neon THE BEST */
.the-best-neon {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  letter-spacing: .12em;
  color: #fff6cc;
  text-shadow:
    0 0 8px rgba(255,246,204,.9),
    0 0 18px rgba(247,217,76,.8),
    0 0 36px rgba(212,160,23,.7),
    0 0 64px rgba(180,29,29,.45);
  margin-bottom: -10px;
  animation: neon-piscar 2.8s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes neon-piscar {
  0%, 18%, 22%, 60%, 100% { opacity: 1; filter: brightness(1); }
  19%, 21% { opacity: .75; filter: brightness(.85); }
  61% { opacity: .92; filter: brightness(1.1); }
}

/* Holofotes cruzando */
.holofotes { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.holofote {
  position: absolute;
  top: -10%;
  width: 180px;
  height: 120vh;
  background: linear-gradient(to bottom, rgba(255,245,200,.22), rgba(255,245,200,0));
  transform-origin: top center;
  filter: blur(2px);
}
.holofote.h1 { left: 15%; animation: holofote-a 7s ease-in-out infinite alternate; }
.holofote.h2 { right: 15%; animation: holofote-b 8s ease-in-out infinite alternate; background: linear-gradient(to bottom, rgba(247,217,76,.18), rgba(247,217,76,0)); }
@keyframes holofote-a { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes holofote-b { from { transform: rotate(18deg); } to { transform: rotate(-18deg); } }

@media (max-width: 640px) {
  .globo-espelhado { width: 56px; height: 56px; top: 6px; }
  .globo-espelhado span { width: 56px; height: 56px; }
  .globo-esq { left: 8px; }
  .globo-dir { right: 8px; }
  .holofote { width: 110px; opacity: .7; }
  .the-best-neon { font-size: 2.3rem; margin-bottom: -4px; }
}

/* Aguarda interação do usuário para iniciar animações/show */
.aguardando-interacao .trofeu-icone,
.aguardando-interacao .trofeu-brilho,
.aguardando-interacao .faixa-estrela,
.aguardando-interacao .palco-luzes,
.aguardando-interacao .globo-espelhado span,
.aguardando-interacao .holofote,
.aguardando-interacao .the-best-neon {
  animation-play-state: paused !important;
}

/* ==========================================================================
   ENVIO DE FOTO
   ========================================================================== */

.foto-card {
    background: var(--papel);
    border-radius: 8px;
    padding: 28px 26px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, .12);
    border-top: 5px solid var(--dourado);
}

.foto-card h2 {
    font-family: 'Caveat', cursive;
    font-size: 2.1rem;
    color: var(--vinho);
    margin: 0 0 8px;
}

.foto-card > p {
    font-size: .9rem;
    color: #6b5b4e;
    line-height: 1.6;
}

.foto-atual {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: rgba(232, 220, 200, .35);
    border-radius: 6px;
    margin: 18px 0;
}
.foto-atual img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.foto-atual .sem-foto {
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #e8dcc8;
    border-radius: 6px;
}
.foto-atual .sem-foto-animada {
    animation: foto-triste 1.8s ease-in-out infinite;
    transform-origin: center bottom;
}
@keyframes foto-triste {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(2px) rotate(-4deg); }
    75% { transform: translateY(2px) rotate(4deg); }
}
.foto-atual .info { font-size: .85rem; color: #6b5b4e; }

.foto-input-escondido {
    display: none !important;
}
.foto-camera-btn {
    display: block;
    width: 100%;
    margin: 0 0 12px;
    padding: 14px;
    border: 0;
    border-radius: 6px;
    background: var(--vinho);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: background .2s;
    -webkit-tap-highlight-color: transparent;
}
.foto-camera-btn:hover { background: #5c1f1a; }
.foto-camera-btn:active { transform: scale(.99); }
.foto-nome-arquivo {
    display: block;
    text-align: center;
    font-size: .82rem;
    color: #8a7466;
    margin-bottom: 4px;
    word-break: break-word;
}

.foto-form button {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    border: 0;
    border-radius: 6px;
    background: var(--vinho);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s;
}
.foto-form button:hover { background: #5c1f1a; }

.foto-aviso {
    margin-top: 16px;
    font-size: .8rem;
    color: #8a7466;
    line-height: 1.5;
}

.foto-erro {
    background: var(--papel);
    border-radius: 8px;
    padding: 40px 26px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
    border-top: 5px solid var(--b41d1d, #b41d1d);
}
.foto-erro .icone { font-size: 3rem; margin-bottom: 10px; }
.foto-erro h2 {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: var(--vinho);
    margin: 0 0 8px;
}

/* ---------------- RESPONSIVO ---------------- */
@media (max-width: 560px) {
    .pagina-entrega, .pagina-premiados, .pagina-foto { padding: 20px 12px 30px; }
    .entrega-header h1, .premiados-header h1, .foto-header h1 { font-size: 2.1rem; }
    .logo-entrega img, .logo-premiados img, .logo-foto img { height: 52px; }
    .entrega-card, .foto-card { padding: 22px 18px; }
    .entrega-dados { grid-template-columns: 1fr; }
    .grid-premiados { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
    .entrega-busca { flex-direction: column; }
    .entrega-busca button { padding: 13px; }
}
