:root {
  --black: #0a0a0a;
  --off-black: #141414;
  --dark: #1c1c1c;
  --mid: #2a2a2a;
  --border: #3a3a3a;
  --muted: #888;
  --text: #e8e4d9;
  --cream: #f0ead8;
  --yellow: #f5c518;
  --red: #cc2222;
}

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

body {
  background: var(--black);
  color: var(--text);
  font-family: 'Barlow Condensed', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(255,255,255,0.012) 2px, rgba(255,255,255,0.012) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* HEADER */
header { border-bottom: 3px solid var(--yellow); }
.header-inner { display: flex; align-items: stretch; }

.header-left {
  background: var(--yellow);
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
}
.header-left .the {
  font-family: 'Special Elite', serif;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--black);
  text-transform: uppercase;
}
.header-left h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 72px;
  line-height: 0.9;
  color: var(--black);
  letter-spacing: 2px;
}
.header-right {
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}
.header-right .tagline {
  font-family: 'Special Elite', serif;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 1px;
  font-style: italic;
}
.header-right .subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  color: var(--yellow);
  letter-spacing: 3px;
}
.stamp {
  align-self: flex-end;
  border: 3px solid var(--red);
  color: var(--red);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  padding: 4px 10px;
  transform: rotate(-2deg);
}

/* NAV */
nav {
  background: var(--off-black);
  border-bottom: 1px solid var(--border);
  display: flex;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav button {
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  padding: 14px 24px;
  transition: color 0.15s, background 0.15s;
}
nav button:hover { color: var(--text); background: var(--dark); }
nav button.active { color: var(--yellow); border-bottom: 2px solid var(--yellow); }
.count-badge {
  background: var(--yellow);
  color: var(--black);
  font-size: 12px;
  padding: 2px 8px;
  margin-left: 6px;
  font-family: 'Bebas Neue', sans-serif;
}

/* MAIN */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
  position: relative;
  z-index: 1;
}

.panel { display: none; }
.panel.active { display: block; }

.section-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--muted);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

/* GALLERY */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.loading-msg {
  font-family: 'Special Elite', serif;
  color: var(--muted);
  font-size: 16px;
  padding: 60px 0;
  text-align: center;
  letter-spacing: 1px;
}
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  grid-column: 1 / -1;
}
.empty-state .big {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  display: block;
  color: var(--border);
  margin-bottom: 12px;
}

/* PHOTO CARD */
.photo-card {
  background: var(--off-black);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s;
}
.photo-card:hover { border-color: var(--yellow); }
.photo-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
  background: var(--dark);
  cursor: pointer;
  transition: opacity 0.15s;
}
.photo-thumb:hover { opacity: 0.85; }
.card-body { padding: 14px 16px; }
.photo-caption {
  font-family: 'Special Elite', serif;
  font-size: 15px;
  color: var(--cream);
  margin-bottom: 6px;
  line-height: 1.4;
}
.photo-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.photo-meta .author { color: var(--yellow); }

/* COMMENTS */
.comments-section {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
}
.comment-list {
  margin-bottom: 10px;
  max-height: 160px;
  overflow-y: auto;
}
.comment-item {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}
.comment-item:last-child { border-bottom: none; }
.comment-author { color: var(--yellow); font-weight: 600; margin-right: 6px; }
.no-comments { font-size: 12px; color: var(--border); padding: 4px 0; }
.comment-form { display: flex; gap: 6px; }
.comment-form input {
  flex: 1;
  background: var(--dark);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.2s;
}
.comment-form input:focus { border-color: var(--yellow); }
.comment-form button {
  background: var(--mid);
  border: 1px solid var(--border);
  color: var(--yellow);
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 7px 14px;
  white-space: nowrap;
  transition: background 0.15s;
}
.comment-form button:hover { background: var(--border); }

/* UPLOAD */
.upload-zone {
  border: 2px dashed var(--border);
  background: var(--off-black);
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 24px;
  position: relative;
}
.upload-zone:hover, .upload-zone.dragging {
  border-color: var(--yellow);
  background: var(--dark);
}
.upload-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  color: var(--border);
  display: block;
  margin-bottom: 12px;
  pointer-events: none;
}
.upload-zone p { font-size: 16px; color: var(--muted); pointer-events: none; }
.upload-zone .hint { font-size: 13px; color: var(--border); margin-top: 6px; pointer-events: none; }

#preview-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
}
.preview-clear {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--red);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 5px 12px;
}
.upload-progress {
  display: none;
  height: 3px;
  background: var(--border);
  margin-bottom: 20px;
  overflow: hidden;
}
.upload-progress .bar {
  height: 100%;
  background: var(--yellow);
  width: 0%;
  transition: width 0.3s;
}

/* FORM */
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  background: var(--off-black);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus { border-color: var(--yellow); }
.form-row textarea { min-height: 90px; }

.btn-submit {
  background: var(--yellow);
  border: none;
  color: var(--black);
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 3px;
  padding: 14px 40px;
  width: 100%;
  transition: background 0.15s, transform 0.1s;
}
.btn-submit:hover { background: #ffd630; }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; transform: none; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--yellow);
  color: var(--black);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  padding: 12px 24px;
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* MODAL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }
.modal-inner { position: relative; max-width: 90vw; max-height: 90vh; }
.modal-inner img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  border: 1px solid var(--border);
}
.modal-close {
  position: absolute;
  top: -14px; right: -14px;
  background: var(--yellow);
  border: none;
  color: var(--black);
  cursor: pointer;
  font-size: 18px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
}

/* RESPONSIVE */
@media (max-width: 500px) {
  .header-left h1 { font-size: 52px; }
  .header-left { padding: 18px 20px; }
  .gallery-grid { grid-template-columns: 1fr; }
}
