/* Spanish Town Photo Roulette — flamingo theme: pink, black, gray, white */
:root {
  --bg: #0e0e10;
  --bg-card: #1a1a1d;
  --bg-inset: #131316;
  --pink: #ff6fa5;
  --pink-hot: #ff3d81;
  --pink-soft: #ffb3cf;
  --text: #f7f7f8;
  --text-dim: #9b9ba1;
  --danger: #ff3d81;
  --border: rgba(255, 111, 165, 0.28);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -100px, #2b141f 0%, var(--bg) 60%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 {
  font-size: 1.7rem;
  text-align: center;
  margin: 12px 0 4px;
  color: var(--pink);
  text-shadow: 0 2px 14px rgba(255, 111, 165, 0.35);
}

.tagline {
  text-align: center;
  color: var(--text-dim);
  margin: 0 0 24px;
}

/* --- Logo --- */
.logo-h1 { margin: 0; text-shadow: none; }
.logo-hero {
  display: block;
  width: min(320px, 82vw);
  margin: 8px auto 10px;
  border-radius: 50%;
  filter: drop-shadow(0 6px 24px rgba(255, 111, 165, 0.25));
}
.logo-small {
  display: block;
  width: 104px;
  margin: 0 auto 10px;
  border-radius: 50%;
}
a .logo-small { cursor: pointer; }

/* --- Spin animation: the logo becomes the wheel --- */
.spin-wheel {
  display: block;
  width: min(220px, 60vw);
  margin: 0 auto;
  border-radius: 50%;
}
.spin-wheel.spinning {
  animation: wheel-spin 1.7s cubic-bezier(0.15, 0.72, 0.12, 1) both;
}
@keyframes wheel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(1440deg); } /* four decelerating turns */
}
@media (prefers-reduced-motion: reduce) {
  .spin-wheel.spinning { animation: none; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}

.center { text-align: center; }

label { display: block; margin-bottom: 6px; color: var(--text-dim); font-size: 0.95rem; }

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
  border-radius: 10px;
  border: 1px solid #3a3a40;
  background: var(--bg-inset);
  color: var(--text);
}

input:focus { outline: 2px solid var(--pink); border-color: transparent; }

.btn {
  display: inline-block;
  width: 100%;
  padding: 15px 20px;
  margin-top: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: #121214;
  background: linear-gradient(135deg, var(--pink-soft), var(--pink));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; }

.btn-secondary {
  background: transparent;
  color: var(--pink);
  border: 2px solid var(--pink);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid #3a3a40;
  font-weight: 500;
  font-size: 0.95rem;
  width: auto;
  padding: 8px 14px;
}

.btn-danger {
  background: transparent;
  color: var(--pink-hot);
  border: 1px solid var(--pink-hot);
  font-weight: 600;
  font-size: 0.9rem;
  width: auto;
  padding: 8px 14px;
}

.btn-spin {
  background: linear-gradient(135deg, var(--pink), var(--pink-hot));
  color: #fff;
  font-size: 1.3rem;
  padding: 18px;
}

.hidden { display: none !important; }

.msg { margin: 12px 0 0; text-align: center; }
.msg.error { color: var(--pink-hot); }
.msg.success { color: var(--pink-soft); }

.stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 4px 0 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.stats b { color: var(--pink); font-size: 1.2rem; }

.photo-frame {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-inset);
  border: 1px solid #2c2c31;
}
.photo-frame img { display: block; width: 100%; height: auto; }

#preview { max-height: 45vh; object-fit: contain; }

.history {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
}
.history img,
.history .placeholder {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.history .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-inset);
  color: var(--text-dim);
  font-size: 0.6rem;
  text-align: center;
  padding: 4px;
}
.history img { cursor: pointer; }

/* --- Lightbox: tap a past win to view it large + report it --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lightbox-inner {
  max-width: 480px;
  width: 100%;
  text-align: center;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.footnote { color: var(--text-dim); font-size: 0.85rem; text-align: center; margin-top: 20px; }
a { color: var(--pink); }

/* --- Admin --- */
.flag-banner {
  background: rgba(255, 61, 129, 0.12);
  border: 1px solid var(--pink-hot);
  color: var(--pink-hot);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 16px 0;
  font-weight: 700;
  text-align: center;
}
.flag-banner.clear {
  background: rgba(247, 247, 248, 0.06);
  border-color: #3a3a40;
  color: var(--text-dim);
}

.tabs { display: flex; gap: 8px; margin: 12px 0; }
.tabs button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #3a3a40;
  background: var(--bg-inset);
  color: var(--text-dim);
  font-weight: 600;
  cursor: pointer;
}
.tabs button.active { background: var(--pink); color: #121214; border-color: var(--pink); }

.admin-card { padding: 12px; }
.admin-card .photo-frame { margin-bottom: 10px; }
.admin-meta { font-size: 0.85rem; color: var(--text-dim); word-break: break-all; }
.admin-meta b { color: var(--text); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.active { background: rgba(247, 247, 248, 0.12); color: #fff; }
.badge.approved { background: rgba(255, 179, 207, 0.16); color: var(--pink-soft); }
.badge.flagged { background: rgba(255, 61, 129, 0.2); color: var(--pink-hot); }
.badge.blocked { background: var(--pink-hot); color: #fff; }
