:root {
  --bg: #0b0d11;
  --surface: #161920;
  --surface-2: #1e222b;
  --text: #f2f3f5;
  --text-dim: #9aa1ad;
  --accent: #4fd1c5;
  --accent-strong: #7ee8de;
  --accent-ink: #052421;
  --border: #262b35;
  --radius-lg: 16px;
  --radius: 10px;
  --shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.55);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

header.site-header {
  padding: 22px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  background: rgba(11, 13, 17, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10;
}

header.site-header .header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

header.site-header .site-logo {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

header.site-header h1 {
  font-size: 18px;
  margin: 0;
  line-height: 1.25;
}

header.site-header h1 a {
  color: var(--text);
}

header.site-header .subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 2px;
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 32px 64px;
}

.page-heading h2 {
  font-size: 26px;
  margin: 0 0 4px;
}

.page-heading .meta {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 24px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.event-card .cover {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center 85%;
}

.event-card .info {
  padding: 16px 18px;
}

.event-card .info h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--text);
}

.event-card .info .meta {
  color: var(--text-dim);
  font-size: 13px;
}

.empty-state {
  color: var(--text-dim);
  padding: 60px 0;
  text-align: center;
  font-size: 15px;
}

/* Download-all button */
a.button-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 999px;
  margin-bottom: 28px;
  transition: background 0.15s ease;
}

a.button-primary:hover {
  background: var(--accent-strong);
}

/* Photo grid — CSS multi-column masonry. Deliberately NOT a forced
   square crop: cropping a portrait photo to a square would clip the
   bottom-right corner, which is exactly where the watermark sits. */
.photo-grid {
  column-width: 280px;
  column-gap: 14px;
}

.photo-grid .photo-tile {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  break-inside: avoid;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.photo-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.photo-grid img.thumb {
  width: 100%;
  height: auto;
  display: block;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 9, 0.94);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox-overlay img {
  max-width: 92vw;
  max-height: 74vh;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.lightbox-counter {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 16px;
  letter-spacing: 0.03em;
}

.lightbox-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.lightbox-controls button,
.lightbox-controls a.button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lightbox-controls button:hover {
  border-color: var(--accent);
}

.lightbox-controls a.button {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

.lightbox-controls a.button:hover {
  background: var(--accent-strong);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 30px;
  line-height: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--text);
}

/* Sponsors */
.sponsor-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: center;
  padding: 32px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.sponsor-strip .sponsor-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.3);
}

.sponsor-strip img {
  height: 28px;
  max-width: 140px;
  width: auto;
  display: block;
  object-fit: contain;
}

.sponsor-strip .sponsor-label {
  width: 100%;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* Admin upload page */
.upload-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upload-form label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}

.upload-form input[type="text"],
.upload-form input[type="password"],
.upload-form input[type="date"] {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.upload-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 20px;
  text-align: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-size: 14px;
}

.dropzone:hover {
  border-color: var(--text-dim);
}

.dropzone.dragover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(79, 209, 197, 0.06);
}

.upload-form button[type="submit"] {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 13px;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
  transition: background 0.15s ease;
}

.upload-form button[type="submit"]:hover:not([disabled]) {
  background: var(--accent-strong);
}

.upload-form button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.progress-list {
  max-height: 240px;
  overflow-y: auto;
  font-size: 13px;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface);
}

.progress-bar-outer {
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
  height: 8px;
}

.progress-bar-inner {
  background: var(--accent);
  height: 100%;
  width: 0%;
  transition: width 0.2s ease;
}
