@font-face {
  font-family: "Bebas Neue";
  src: url("/fonts/bebas-neue-v16-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --steel: #2a2c30;
  --steel-2: #34373c;
  --steel-3: #3f434a;
  --photo-bg: #17181b;
  --line: #4b4f57;
  --ink: #efe9dc;
  --ink-dim: #cac4b5;
  --ash: #938e83;
  --smoke: #656259;
  --red: #c33a30;
  --red-deep: #8f241d;
  --navy: #3a5686;
  --radius-pill: 75px;
  --max-w: 640px;
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink-dim);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  line-height: 1.5;
}

body {
  background-color: var(--steel);
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0px, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 5px),
    radial-gradient(ellipse 1000px 520px at 50% -8%, rgba(255, 255, 255, 0.05), transparent 62%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.flag-bar {
  display: flex;
  height: 6px;
  width: 100%;
}
.flag-bar span { flex: 1; }
.flag-bar span:nth-child(1) { background: var(--navy); }
.flag-bar span:nth-child(2) { background: var(--ink); }
.flag-bar span:nth-child(3) { background: var(--red); }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--steel-2);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__brand .star { color: var(--red); font-size: 14px; }
.nav__brand span.accent { color: var(--red); }

.nav__links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  white-space: nowrap;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
}

.nav__links a.active,
.nav__links a:hover { color: var(--red); }

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 16px 80px;
}

main.main--wide { max-width: 820px; }

.page-header {
  padding: 20px 0 12px;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 42px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: var(--ink);
}

.page-header p {
  color: var(--ash);
  margin: 0;
  font-size: 15px;
}

/* History fact strip */

.history-strip {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  background: var(--steel-2);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ink-dim);
  margin: 0 0 20px;
  opacity: 1;
  transition: opacity 350ms ease;
}

.history-strip.is-fading { opacity: 0; }

.history-strip__label {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}

/* Photo stage (left/right cycling) — visual only, no controls live here */

.stage {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.stage-track {
  position: relative;
  flex: 1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  border: 1px solid var(--line);
  background: var(--photo-bg);
}

.stage-nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--steel-2);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-nav:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.stage-nav:disabled { opacity: 0.3; cursor: not-allowed; }

@keyframes slideOutLeft { to { transform: translateX(-115%); opacity: 0; } }
@keyframes slideOutRight { to { transform: translateX(115%); opacity: 0; } }
@keyframes slideInRight { from { transform: translateX(115%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft { from { transform: translateX(-115%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.anim-out-left { animation: slideOutLeft 240ms ease forwards; }
.anim-out-right { animation: slideOutRight 240ms ease forwards; }
.anim-in-right { animation: slideInRight 280ms ease forwards; }
.anim-in-left { animation: slideInLeft 280ms ease forwards; }

/* Slide — just the photo, nothing interactive lives here */

.slide {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--photo-bg);
}

.slide__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

/* Rate dock — a single persistent panel below the stage. It never slides;
   it just re-populates itself with whichever post is currently on screen. */

.rate-dock {
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  background: var(--steel-2);
  padding: 18px 20px;
  margin-top: -1px;
}

.rate-dock__weapon-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 6px;
}

.rate-dock__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rate-dock__poster {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.rate-dock__score {
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
}

.rate-dock__score .count {
  color: var(--ash);
  font-weight: 400;
  margin-left: 4px;
}

.rate-dock__caption {
  font-size: 14px;
  color: var(--ink-dim);
  margin: 0 0 12px;
}

.rate-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.rate-btn {
  padding: 8px 0;
  border: 1px solid var(--line);
  background: var(--steel-3);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

.rate-btn:hover { border-color: var(--red); }

.rate-btn.selected {
  background: var(--red);
  color: var(--ink);
  border-color: var(--red);
}

.comment-input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  margin-bottom: 12px;
  background: var(--steel-3);
  color: var(--ink);
}

.comment-input::placeholder { color: var(--ash); }

.rate-dock__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn--primary { background: var(--red); color: var(--ink); }
.btn--primary:hover:not(:disabled) { background: var(--red-deep); }
.btn--primary:disabled { background: var(--smoke); color: var(--steel); cursor: not-allowed; }
.btn--ghost { background: none; color: var(--ash); font-size: 12px; padding: 10px 4px; text-transform: none; letter-spacing: normal; }
.btn--ghost:hover { color: var(--ink); }

.btn--danger {
  background: none;
  color: var(--red);
  border: 1px solid var(--red);
}
.btn--danger:hover:not(:disabled) { background: var(--red); color: var(--ink); }
.btn--danger:disabled { opacity: 0.5; cursor: not-allowed; }

#delete-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.delete-hint {
  font-size: 12px;
  color: var(--ash);
  margin: 10px 0 0;
}

.rate-dock.rated .rate-row,
.rate-dock.rated .comment-input { opacity: 0.55; pointer-events: none; }

.rate-dock__thanks {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  display: none;
}

.rate-dock.rated .rate-dock__thanks { display: inline-block; }
.rate-dock.rated .rate-dock__actions .btn--primary { display: none; }
.rate-dock.empty { display: none; }

.end-card {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  border: 1px dashed var(--line);
  background: var(--steel-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.end-card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: var(--ink);
}

.end-card p { color: var(--ash); margin: 0 0 20px; font-size: 14px; }

/* Wall of Honor — top-rated posts, shown on the same page as the feed */

.wall {
  margin-top: 44px;
}

.wall__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 2px;
  color: var(--ink);
}

.wall__subheading {
  text-align: center;
  color: var(--ash);
  font-size: 13px;
  margin: 0 0 16px;
}

.wall__row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 10px;
}

.wall__tile {
  position: relative;
  flex: 0 0 138px;
  border: 1px solid var(--line);
  background: var(--steel-2);
}

.wall__tile-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--photo-bg);
}

.wall__tile-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

.wall__tile-body { padding: 8px 10px; }

.wall__tile-name {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--red);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall__tile-poster {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall__tile-score { font-size: 12px; font-weight: 700; color: var(--red); }

.wall__tile-icon {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 24, 27, 0.8);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--red);
}

.wall__tile-icon svg { width: 22px; height: 22px; }

.wall__empty { color: var(--ash); font-size: 13px; text-align: center; padding: 12px 0; }

/* Read-only post summary card — used on the private "your post" view only.
   The homepage feed uses .slide / .rate-dock instead. */

.card {
  border: 1px solid var(--line);
  background: var(--steel-2);
  margin-bottom: 12px;
}

.card__image-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--photo-bg);
  overflow: hidden;
}

.card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--photo-bg);
}

.card__body { padding: 16px; }

.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card__poster { font-weight: 700; font-size: 14px; color: var(--ink); }

.card__score {
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
}

.card__score .count { color: var(--ash); font-weight: 400; margin-left: 4px; }

.card__caption { font-size: 14px; color: var(--ink-dim); margin: 0; }
.admin-feedback__message { margin-top: 8px; white-space: pre-wrap; }

.empty-state, .loading, .error-state {
  text-align: center;
  color: var(--ash);
  padding: 60px 16px;
  font-size: 15px;
}

/* Chat */

.chat {
  border: 1px solid var(--line);
  background: var(--steel-2);
  display: flex;
  flex-direction: column;
}

.chat__log {
  height: 480px;
  overflow-y: auto;
  padding: 16px 20px;
}

.chat__message {
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.chat__message--mine { border-left-color: var(--red); }

.chat__message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.chat__message-name { font-size: 13px; font-weight: 700; color: var(--red); }
.chat__message-time { font-size: 11px; color: var(--smoke); }

.chat__message-text {
  margin: 0;
  font-size: 14px;
  color: var(--ink-dim);
  overflow-wrap: break-word;
}

.chat__form {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.chat__form input[type="text"] {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--steel-3);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.chat__form input[type="text"]::placeholder { color: var(--ash); }

.chat__error {
  padding: 0 20px 14px;
  font-size: 12px;
  color: var(--red);
  min-height: 1em;
}

/* Upload form */

.form {
  border: 1px solid var(--line);
  background: var(--steel-2);
  padding: 24px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

.field .hint {
  font-size: 12px;
  color: var(--ash);
  font-weight: 400;
  display: block;
  margin-top: 4px;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--steel-3);
  color: var(--ink);
}

.field input[type="text"]::placeholder,
.field textarea::placeholder { color: var(--ash); }

.field input[type="file"] {
  font-size: 13px;
  color: var(--ink-dim);
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

.checkbox-field input { margin-top: 3px; }
.checkbox-field label { font-weight: 400; margin: 0; }

.preview {
  margin-top: 12px;
  max-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  display: none;
}

.preview.visible { display: block; }

.preview img { width: 100%; object-fit: contain; }

.form-message {
  font-size: 14px;
  margin-top: 14px;
  padding: 12px;
  display: none;
}

.form-message.success { display: block; background: #24301f; border: 1px solid #4a6b3f; color: #cfe3c6; }
.form-message.error { display: block; background: #35201e; border: 1px solid #7a3c36; color: #f0cfc9; }

.claim-box {
  margin-top: 10px;
  padding: 10px;
  background: var(--steel-3);
  border: 1px dashed var(--ash);
  font-size: 13px;
  word-break: break-all;
  color: var(--ink-dim);
}

.claim-box-link {
  margin-top: 10px;
  display: inline-block;
}

/* About page */

.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 32px 0 10px;
  color: var(--ink);
}

.prose p {
  font-size: 15px;
  color: var(--ink-dim);
  margin: 0 0 14px;
}

.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; font-size: 15px; color: var(--ink-dim); }

.comments-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}

.rating-row {
  margin-bottom: 12px;
}

.rating-date {
  font-size: 12px;
  color: var(--smoke);
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px;
  text-align: center;
  font-size: 12px;
  background: var(--photo-bg);
  color: var(--ash);
}

footer a { color: var(--ink-dim); }

@media (max-width: 560px) {
  .stage-nav { display: none; }
}

@media (max-width: 480px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }
  .nav__brand { font-size: 22px; }
  .nav__links { flex-wrap: wrap; row-gap: 10px; gap: 10px 16px; }
}
