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

:root {
  --primary: #dc2626;
  --primary-hover: #b91c1c;
  --primary-glow: rgba(220, 38, 38, 0.3);
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --bg: #0a0a0a;
  --surface: #171717;
  --surface2: #262626;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --border: #404040;
  --radius: 10px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===========================
   NAVBAR — mobile first
   =========================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 56px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar__logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.navbar__logo-text {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text);
  letter-spacing: 0.04em;
}

.navbar__logo-text em {
  font-style: normal;
  color: var(--primary);
}

/* Burger menu */
.navbar__burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.navbar__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

.navbar__burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.navbar__burger.active span:nth-child(2) { opacity: 0; }
.navbar__burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Nav links — mobile: slide-down panel */
.navbar__links {
  display: none;
  position: absolute;
  top: 56px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 12px 16px;
  gap: 4px;
}

.navbar__links.open { display: flex; }

.navbar__link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.navbar__link:hover,
.navbar__link:active { color: var(--text); background: var(--surface2); }
.navbar__link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===========================
   HERO — mobile first
   =========================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 20px 60px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(220, 38, 38, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #1a0000 50%, #0a0a0a 100%);
}

.hero__content {
  position: relative;
  text-align: center;
  width: 100%;
  max-width: 600px;
}

.hero__logo {
  width: 80px;
  height: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px var(--primary-glow));
}

.hero__edition {
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--primary);
  margin-bottom: 6px;
}

.hero__title {
  font-family: 'Oswald', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 0.9;
  color: var(--text);
  text-shadow: 0 0 40px var(--primary-glow);
}

.hero__subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--primary);
  margin-top: 2px;
}

.hero__date { margin-top: 16px; }

.hero__date-text {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text);
  padding: 6px 18px;
  border: 2px solid var(--primary);
  border-radius: 4px;
}

.hero__desc {
  max-width: 520px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.hero__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.hero__scroll {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===========================
   MAP SECTION — mobile first
   =========================== */
.map-section { padding-top: 0; }

.map-section__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--surface);
  border-top: 2px solid var(--primary);
  position: sticky;
  top: 56px;
  z-index: 500;
}

.map-section__header h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

#map {
  width: 100%;
  height: 55vh;
  z-index: 1;
}

.stats-bar {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stats-bar span { color: var(--text); font-weight: 600; }

/* ===========================
   MODAL — mobile first
   =========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 24px 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal__close {
  position: absolute;
  top: 8px; right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__close:hover { color: var(--text); }
.modal__close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.modal h2 {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.modal__sub { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px; }

/* ===========================
   PAGE LAYOUT — mobile first
   =========================== */
.page-body { padding-top: 56px; }

.page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 20px 16px;
}

.page-center--wide {
  align-items: flex-start;
  padding-top: 24px;
}

/* ===========================
   CARD — mobile first
   =========================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  width: 100%;
  max-width: 420px;
}

.card h2 {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}

.card--wide { max-width: 560px; }
.card--full { max-width: 1100px; }

/* ===========================
   FORMS — mobile first
   =========================== */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.form-group { margin-bottom: 12px; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px; /* prevents iOS zoom */
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-group input:disabled { opacity: 0.5; }

/* ===========================
   BUTTONS — mobile first
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--primary:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--outline:hover { border-color: var(--text-muted); background: var(--surface2); }

.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: var(--danger-hover); }
.btn--small { padding: 6px 12px; font-size: 0.8rem; }
.btn--full { width: 100%; }

.btn-row { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

/* ===========================
   FORM MESSAGE
   =========================== */
.form-message {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.form-message--success { background: #064e3b; color: #6ee7b7; }
.form-message--error { background: #7f1d1d; color: #fca5a5; }

/* ===========================
   ADMIN — mobile first
   =========================== */
.admin-page {
  padding: 64px 12px 24px;
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: hidden;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-header h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.admin-count {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Filters toolbar */
.admin-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-search {
  flex: 1;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  min-width: 0;
}

.admin-search:focus { border-color: var(--primary); }
.admin-search::placeholder { color: var(--text-muted); }

.admin-city-filter {
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  max-width: 140px;
  min-width: 0;
  -webkit-appearance: none;
}

.admin-results {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Mobile: compact list */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  min-width: 0;
}

.admin-row__info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.admin-row__name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-row__name small {
  font-weight: 400;
  color: var(--primary);
  margin-left: 4px;
}

.admin-row__sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-row__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.admin-row__actions .btn--small {
  padding: 4px 8px;
  font-size: 0.7rem;
}

/* Desktop: table (hidden on mobile) */
.admin-table-wrap {
  display: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.admin-table th, .admin-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table tr:hover { background: var(--surface2); }
.admin-table .actions { display: flex; gap: 6px; }

/* ===========================
   FOOTER
   =========================== */
.footer {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.1em;
}

.footer__credit {
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  color: var(--border);
}

.footer__credit a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__credit a:hover { color: var(--text); }

/* ===========================
   UTILITIES
   =========================== */
.hidden { display: none !important; }

/* ===========================
   LEAFLET POPUP
   =========================== */
.leaflet-popup-content-wrapper {
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.leaflet-popup-tip { background: var(--surface); }

.leaflet-popup-content {
  margin: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
}

.leaflet-popup-content h4 { font-size: 0.95rem; margin-bottom: 4px; }
.leaflet-popup-content ul { list-style: none; padding: 0; color: var(--text-muted); }

.popup-city-count {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 6px;
}

/* ===========================
   TABLET (min-width: 480px)
   =========================== */
@media (min-width: 480px) {
  .hero__logo { width: 130px; }
  .hero__title { font-size: 3.2rem; }
  .hero__subtitle { font-size: 1.6rem; }
  .hero__buttons { flex-direction: row; justify-content: center; }
  .form-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: var(--radius); padding: 32px; }
}

/* ===========================
   DESKTOP (min-width: 768px)
   =========================== */
@media (min-width: 768px) {
  .navbar {
    padding: 0 24px;
    height: 60px;
  }

  .navbar__burger { display: none; }

  .navbar__links {
    display: flex;
    position: static;
    background: none;
    border: none;
    flex-direction: row;
    padding: 0;
    gap: 6px;
  }

  .navbar__link {
    padding: 6px 14px;
    font-size: 0.875rem;
  }

  .navbar__logo-img { width: 38px; height: 38px; }
  .navbar__logo-text { font-size: 1.2rem; }

  .hero { padding: 0 24px; }
  .hero__logo { width: 180px; margin-bottom: 24px; }
  .hero__edition { font-size: 1.3rem; }
  .hero__title { font-size: 5rem; }
  .hero__subtitle { font-size: 2.5rem; }
  .hero__date-text { font-size: 1.3rem; padding: 8px 24px; }
  .hero__desc { font-size: 1.05rem; margin-top: 20px; }
  .hero__buttons { margin-top: 32px; gap: 16px; }

  .map-section__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    top: 60px;
  }

  .map-section__header h2 { font-size: 1.3rem; }
  .stats-bar { font-size: 0.875rem; }
  #map { height: 70vh; }

  .page-body { padding-top: 60px; }
  .page-center { min-height: calc(100vh - 60px); padding: 24px; }
  .card { padding: 32px; }

  .admin-page { padding: 76px 24px 24px; }
  .admin-list { display: none; }
  .admin-table-wrap { display: block; }
  .admin-filters { max-width: 500px; }
  .admin-city-filter { max-width: 200px; }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

/* ===========================
   LARGE DESKTOP (min-width: 1024px)
   =========================== */
@media (min-width: 1024px) {
  .hero__logo { width: 200px; }
  .hero__title { font-size: 6.5rem; }
  .hero__subtitle { font-size: 3rem; }
  .hero__edition { font-size: 1.5rem; }
}
