* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #111;
  color: #eee;
  min-height: 100vh;
}

.site-header {
  text-align: center;
  padding: 28px 16px 20px;
}

.brand {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}

.site-header h1 { font-size: 26px; font-weight: 600; }
.meta { color: #999; font-size: 13px; margin-top: 6px; }

.state {
  text-align: center;
  color: #aaa;
  padding: 48px 24px;
  font-size: 16px;
}

.code-form {
  max-width: 340px;
  margin: 40px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
}

.code-form input {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #1c1c1c;
  color: #eee;
  font-size: 16px;
  text-align: center;
}

.code-form button {
  padding: 12px;
  border-radius: 8px;
  border: none;
  background: #e91e63;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.error { color: #ff6b81; font-size: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  padding: 0 12px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.cell {
  position: relative;
  border: none;
  padding: 0;
  background: #1c1c1c;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
}

.cell img, .cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cell.highlight { outline: 3px solid #e91e63; }

.cell .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 28px;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
  pointer-events: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .93);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.lb-content { max-width: 92vw; max-height: 84vh; }
.lb-content img, .lb-content video {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 4px;
}

.lb-btn {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  padding: 12px 18px;
  opacity: .8;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

.lb-download {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #e91e63;
  color: #fff;
  text-decoration: none;
  padding: 10px 26px;
  border-radius: 999px;
  font-size: 15px;
}
