@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Inter:wght@400;600;700;800;900&display=swap');

:root {
  --vermelho: #E62429;
  --vermelho-escuro: #A8161A;
  --azul: #0476C8;
  --azul-escuro: #0F2D74;
  --azul-noite: #0A1838;
  --preto: #0A0A0A;
  --branco: #FFFFFF;
  --amarelo: #FACC15;
  --cinza-escuro: #1E2235;
  --cinza: #2A2F45;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--azul-noite);
  color: var(--branco);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(circle at 20% 10%, rgba(230, 36, 41, 0.18) 0, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(4, 118, 200, 0.22) 0, transparent 45%),
    var(--azul-noite);
  background-attachment: fixed;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 100px;
}

.hero-img {
  width: 100%;
  border-radius: 16px;
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 3px var(--vermelho);
  margin-bottom: 20px;
}

.full-hero-body {
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--azul-noite);
}

.hero-full {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.hero-img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-buttons-overlay {
  position: absolute;
  bottom: 9%;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.hero-buttons-overlay .btn-overlay {
  position: relative;
  margin-bottom: 0;
  padding: 15px 14px;
  font-size: 16px;
  font-weight: 900;
  border: 3px solid #000;
  border-radius: 14px;
  letter-spacing: 0.6px;
  pointer-events: auto;
  text-transform: uppercase;
  color: white;
  text-shadow: 1px 2px 0 rgba(0,0,0,0.55);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  background-clip: padding-box;
}

.hero-buttons-overlay .btn-overlay::before {
  content: "";
  position: absolute;
  top: 3px; left: 8px; right: 8px;
  height: 35%;
  border-radius: 10px 10px 30px 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0));
  pointer-events: none;
}

.hero-buttons-overlay .btn-primary.btn-overlay {
  background: linear-gradient(180deg, #FF4D52 0%, #E62429 45%, #C01C20 100%);
  box-shadow:
    0 6px 0 #6B0E11,
    0 9px 16px rgba(0,0,0,0.55),
    inset 0 -4px 0 rgba(0,0,0,0.28);
}
.hero-buttons-overlay .btn-secondary.btn-overlay {
  background: linear-gradient(180deg, #3398E8 0%, #0476C8 45%, #035BA0 100%);
  box-shadow:
    0 6px 0 #082E5C,
    0 9px 16px rgba(0,0,0,0.55),
    inset 0 -4px 0 rgba(0,0,0,0.28);
}
.hero-buttons-overlay .btn-ghost.btn-overlay {
  background: linear-gradient(180deg, #2A2A2A 0%, #0F0F0F 45%, #000 100%);
  color: var(--amarelo);
  border-color: var(--amarelo);
  text-shadow: 1px 2px 0 rgba(0,0,0,0.7);
  box-shadow:
    0 6px 0 #000,
    0 9px 16px rgba(250,204,21,0.25),
    inset 0 -4px 0 rgba(0,0,0,0.4),
    inset 0 0 0 1px rgba(250,204,21,0.4);
}
.hero-buttons-overlay .btn-ghost.btn-overlay::before {
  background: linear-gradient(180deg, rgba(250,204,21,0.25), rgba(255,255,255,0));
}

.hero-buttons-overlay .btn-overlay:active {
  transform: translateY(4px);
}
.hero-buttons-overlay .btn-primary.btn-overlay:active {
  box-shadow: 0 2px 0 #6B0E11, 0 3px 6px rgba(0,0,0,0.5), inset 0 -2px 0 rgba(0,0,0,0.28);
}
.hero-buttons-overlay .btn-secondary.btn-overlay:active {
  box-shadow: 0 2px 0 #082E5C, 0 3px 6px rgba(0,0,0,0.5), inset 0 -2px 0 rgba(0,0,0,0.28);
}
.hero-buttons-overlay .btn-ghost.btn-overlay:active {
  box-shadow: 0 2px 0 #000, 0 3px 6px rgba(0,0,0,0.5), inset 0 -2px 0 rgba(0,0,0,0.4), inset 0 0 0 1px rgba(250,204,21,0.4);
}

@keyframes btnPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

.btn-pulse {
  animation: btnPulse 1.6s ease-in-out infinite;
}
.btn-pulse:active {
  animation: none;
}

.hero-buttons-overlay .btn-overlay .icon {
  font-size: 18px;
  margin-right: 8px;
}

.hero-footer {
  position: absolute;
  bottom: 2%;
  left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: white;
  margin: 0;
  padding: 0 12px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7), 0 0 6px rgba(0,0,0,0.5);
  pointer-events: none;
}

@media (max-width: 400px) {
  .hero-buttons-overlay .btn-overlay {
    padding: 11px 14px;
    font-size: 14px;
  }
}

@media (min-width: 600px) {
  .hero-full {
    max-width: 480px;
    margin: 0 auto;
  }
}

header.hero {
  text-align: center;
  padding: 16px 8px 20px;
}

.title-comic {
  font-family: 'Bangers', sans-serif;
  letter-spacing: 2px;
  line-height: 1;
}

header.hero h1 {
  margin: 0 0 8px;
  font-size: 42px;
  font-weight: 900;
  color: var(--vermelho);
  text-shadow: 3px 3px 0 var(--preto), -2px -2px 0 var(--branco);
  font-family: 'Bangers', sans-serif;
  letter-spacing: 2px;
}

header.hero h1 .blue {
  color: var(--azul);
  text-shadow: 3px 3px 0 var(--preto), -2px -2px 0 var(--branco);
  display: block;
}

header.hero p {
  margin: 0;
  font-size: 16px;
  color: var(--branco);
  opacity: 0.9;
  font-weight: 600;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 18px 24px;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  margin-bottom: 12px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  font-family: inherit;
  border: 3px solid var(--preto);
}

.btn:active { transform: translateY(2px); }

.btn-primary {
  background: var(--vermelho);
  color: var(--branco);
  box-shadow: 0 5px 0 var(--vermelho-escuro), 0 0 0 3px var(--preto);
}

.btn-primary:active { box-shadow: 0 2px 0 var(--vermelho-escuro), 0 0 0 3px var(--preto); }

.btn-secondary {
  background: var(--azul);
  color: var(--branco);
  box-shadow: 0 5px 0 var(--azul-escuro), 0 0 0 3px var(--preto);
}

.btn-secondary:active { box-shadow: 0 2px 0 var(--azul-escuro), 0 0 0 3px var(--preto); }

.btn-ghost {
  background: var(--preto);
  color: var(--amarelo);
  box-shadow: 0 5px 0 #000, 0 0 0 3px var(--amarelo);
  border-color: var(--amarelo);
}

.btn-ghost:active { box-shadow: 0 2px 0 #000, 0 0 0 3px var(--amarelo); }

.btn-danger {
  background: var(--vermelho);
  color: var(--branco);
  box-shadow: 0 4px 0 var(--vermelho-escuro);
  border: 2px solid var(--preto);
}

.icon { margin-right: 10px; font-size: 22px; }

.card {
  background: var(--cinza-escuro);
  border: 2px solid var(--azul-escuro);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  margin-bottom: 16px;
}

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--cinza);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--branco);
  background: var(--azul-noite);
}

input[type="text"]:focus, input[type="password"]:focus {
  outline: none;
  border-color: var(--vermelho);
}

label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--branco);
  opacity: 0.85;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 540px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.photo-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: var(--cinza);
  cursor: pointer;
  border: 2px solid var(--vermelho);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-tile .like-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(10, 10, 10, 0.85);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--vermelho);
}

.photo-tile .uploader {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--vermelho);
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--preto);
  text-transform: uppercase;
}

.rank-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--amarelo);
  color: var(--preto);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  font-size: 18px;
  border: 2px solid var(--preto);
  font-family: 'Bangers', sans-serif;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 16px;
}

.modal.open { display: flex; }

.modal img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 14px;
  object-fit: contain;
  border: 3px solid var(--vermelho);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.like-btn {
  background: var(--branco);
  color: var(--vermelho);
  border: 3px solid var(--preto);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--vermelho-escuro);
}

.like-btn.liked {
  background: var(--vermelho);
  color: white;
}

.close-btn {
  background: var(--azul-escuro);
  color: white;
  border: 2px solid var(--azul);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.empty {
  text-align: center;
  padding: 60px 20px;
  opacity: 0.7;
  color: var(--branco);
}

.empty .emoji { font-size: 64px; margin-bottom: 12px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--vermelho);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
  border: 2px solid var(--preto);
}

.toast.show { opacity: 1; }

.upload-progress {
  background: var(--cinza);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-top: 12px;
}

.upload-progress-bar {
  background: linear-gradient(90deg, var(--vermelho), var(--azul));
  height: 100%;
  width: 0;
  transition: width 0.2s;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--amarelo);
  text-decoration: none;
  font-weight: 800;
  margin-bottom: 16px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tabs {
  display: flex;
  background: var(--cinza-escuro);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
  border: 2px solid var(--vermelho);
}

.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  color: var(--branco);
  text-decoration: none;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tab.active {
  background: var(--vermelho);
  opacity: 1;
  color: var(--branco);
}

.stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 12px 0 20px;
  font-size: 14px;
  color: var(--branco);
  font-weight: 700;
}

.stats span { display: inline-flex; align-items: center; gap: 6px; }

.bottom-fab {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(230, 36, 41, 0.6), 0 5px 0 var(--vermelho-escuro), 0 0 0 3px var(--preto);
}

.admin-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.admin-row {
  display: flex;
  gap: 12px;
  background: var(--cinza-escuro);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--cinza);
  align-items: center;
}

.admin-row img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--vermelho);
}

.admin-row .info {
  flex: 1;
  min-width: 0;
}

.admin-row .info b { font-size: 14px; }

.admin-row .info small {
  display: block;
  opacity: 0.7;
  font-size: 12px;
}

.del-btn {
  background: var(--vermelho);
  color: white;
  border: 2px solid var(--preto);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--vermelho-escuro);
}

.del-btn:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--vermelho-escuro); }
