
body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  margin: 0; padding: 0;
}
header, footer {
  background: #222; color: #fff; padding: 1em; text-align: center;
}
main { padding: 2em; max-width: 800px; margin: auto; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
h1 { color: #c00; }
button, input[type=submit] {
  background: #c00; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer;
}
button:hover, input[type=submit]:hover { background: #900; }
a { color: #c00; text-decoration: none; }
a:hover { text-decoration: underline; }

.masonry {
  column-count: 1;
  column-gap: 1rem;
  padding: 1rem 0;
}
@media (min-width: 480px)  { .masonry { column-count: 2; } }
@media (min-width: 768px)  { .masonry { column-count: 3; } }
@media (min-width: 1024px) { .masonry { column-count: 4; } }

.card {
  break-inside: avoid;
  margin-bottom: 0;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform .1s ease, box-shadow .1s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); }

.card img {
  width: 100%;
  height: auto;
  display: block;
}
.toolbar {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: .5rem 0;
}
.toolbar form { display: flex; gap: .5rem; align-items: center; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* adjustable size */
  column-gap: .5rem;
  row-gap: .25rem;
  padding: .5rem 0;
}

.gallery-grid .card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform .1s ease, box-shadow .1s ease;
}

.gallery-grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.gallery-grid .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Poster thumbnail (on page) */
#poster-wrap img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  cursor: zoom-in;
}

/* Modal base */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.6);
}
.modal-content {
  position: relative;
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  margin: 5vh auto;
  background: #fff;
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.modal-close {
  position: absolute; top: 8px; right: 8px;
  background: #222; color: #fff; border: 0; border-radius: 999px;
  width: 32px; height: 32px; cursor: pointer;
}
#poster-stage, #tile-stage { padding: 0; }

/* SVG fills modal content, responsive */
#poster-stage svg {
  display: block; width: 100%; height: auto;
}

/* Hover highlight for hotspots */
svg rect.hotspot {
  fill: transparent; stroke: rgba(255,255,255,.5); stroke-width: 2;
}
svg rect.hotspot:hover {
  fill: rgba(0,0,0,.08);
}

/* Tile detail content */
.tile-detail {
  display: grid; grid-template-columns: 1fr 320px; gap: 1rem;
  padding: 1rem;
}
@media (max-width: 900px) {
  .tile-detail { grid-template-columns: 1fr; }
}
.tile-detail .imgbox img {
  width: 100%; height: auto; border-radius: 8px; display: block;
}
.controls { display: grid; gap: .75rem; align-content: start; }
.stars { display: flex; gap: .25rem; }
.star {
  font-size: 28px; line-height: 1; cursor: pointer;
  color: #bbb;
}
.star.active { color: #f5b400; }
.message-box textarea {
  width: 100%; min-height: 100px; resize: vertical; padding: .5rem;
  border-radius: 6px; border: 1px solid #ccc;
}
.message-box button { margin-top: .5rem; }

/* lock/tease overlay */
.locked {
  position: relative;
  overflow: hidden;
}
.locked img {
  filter: blur(2px) saturate(.8);
}
.locked::after {
  content: "Become a club member for more functions";
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-weight: 600; text-align:center; padding: 0 1rem;
  pointer-events: none;
}

/* brief click feedback */
.tease {
  animation: teasePulse .6s ease;
}
@keyframes teasePulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.995); }
  100% { transform: scale(1); }
}
