/* ============================================================
   OFFZONE Badge Archive — dark cyber theme
   ============================================================ */

:root {
  --bg: #0a0e14;
  --bg-panel: #10151f;
  --bg-card: #141b28;
  --border: #1f2a3d;
  --text: #d7e0ec;
  --text-dim: #7d8aa0;
  --neon: #00ff9c;
  --neon-dim: #00c878;
  --purple: #b26bff;
  --red: #ff5470;
  --amber: #ffb454;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter", system-ui, sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(178, 107, 255, 0.08), transparent 60%),
    radial-gradient(1000px 400px at 10% -10%, rgba(0, 255, 156, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--mono); letter-spacing: 0.02em; }

a { color: var(--neon); }
a:hover { color: var(--neon-dim); }

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

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 28px 0 20px;
  background: rgba(10, 14, 20, 0.85);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.35rem;
}

.logo-mark {
  color: var(--neon);
  text-shadow: 0 0 14px rgba(0, 255, 156, 0.7);
  font-size: 1.6rem;
}

.logo-text .dim { color: var(--text-dim); }

.tagline {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ---------- event tabs ---------- */

.event-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 22px;
  padding-bottom: 6px;
}

.tab-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tab-group-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  min-width: 88px;
}

.tab-btn {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color .15s, border-color .15s, box-shadow .15s;
}

.tab-btn:hover { color: var(--text); border-color: var(--neon-dim); }

.tab-btn.active {
  color: #04120c;
  background: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 18px rgba(0, 255, 156, 0.35);
}

/* ---------- badge section ---------- */

.badge-section {
  margin: 24px 0 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.badge-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 26px;
}

@media (max-width: 760px) {
  .badge-layout { grid-template-columns: 1fr; }
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--neon);
  margin: 0 0 4px;
}

.event-title { margin: 0 0 2px; font-size: 1.6rem; }
.event-meta { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 14px; }

.main-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #0c1119;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.gallery img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity .15s, border-color .15s;
}

.gallery img:hover, .gallery img.active { opacity: 1; border-color: var(--neon); }

model-viewer {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0c1119;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  --poster-color: transparent;
}

.model-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 6px;
  font-family: var(--mono);
}

/* ---------- addons ---------- */

.addons-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.addons-head h2 { margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all .15s;
}

.filter-btn:hover { color: var(--text); border-color: var(--text-dim); }
.filter-btn.active { color: var(--neon); border-color: var(--neon); background: rgba(0, 255, 156, 0.07); }

.filter-btn .count { opacity: 0.6; margin-left: 4px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--neon-dim);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.card-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0c1119;
}

.card-body { padding: 14px 16px 16px; }

.card-name {
  font-family: var(--mono);
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.card-company { color: var(--text-dim); font-size: 0.84rem; margin: 0 0 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* Категории — залитые плашки, чтобы не путаться с контурными чипами редкости */
.chip.cat-partner   { color: #062a33; background: #3ee6ff; border-color: #3ee6ff; }
.chip.cat-soldering { color: #141a23; background: #8a97a8; border-color: #8a97a8; }
.chip.cat-community { color: #24103d; background: #b26bff; border-color: #b26bff; }

.chip.rar-common    { color: #9fb0c3; }
.chip.rar-uncommon  { color: var(--neon);  border-color: rgba(0, 255, 156, 0.4); }
.chip.rar-rare      { color: #57b6ff;      border-color: rgba(87, 182, 255, 0.4); }
.chip.rar-epic      { color: var(--purple); border-color: rgba(178, 107, 255, 0.5); }
.chip.rar-legendary { color: var(--amber); border-color: rgba(255, 180, 84, 0.55); text-shadow: 0 0 8px rgba(255, 180, 84, 0.4); }
.chip.rar-unknown   { color: var(--text-dim); border-style: dashed; }

.empty-note {
  grid-column: 1 / -1;
  color: var(--text-dim);
  font-family: var(--mono);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
}

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.8);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] { display: none; }

.modal {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.modal-close:hover { color: var(--text); }

.modal-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 22px;
}

@media (max-width: 700px) {
  .modal-layout { grid-template-columns: 1fr; }
}

.modal h3 { margin: 0 0 4px; font-size: 1.3rem; }
.modal .company-line { color: var(--text-dim); margin: 0 0 12px; font-size: 0.9rem; }

.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.9rem;
}

.detail-table td {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.detail-table td:first-child {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 130px;
  padding-right: 12px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.stats-line {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--neon);
  margin: 0 0 10px;
}

/* ---------- zoom / lightbox ---------- */

.main-photo { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 4, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7);
}

.lightbox-hint {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  pointer-events: none;
}
