/* Card preview image */
.map-img-container {
  width: 100%;
  height: 210px;
  background: #151C24;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}
.map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.map-img-container.no-img {
  color: #9CA3AF;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  justify-content: center;
  align-items: center;
  background: #23272f;
}

:root {
  --bg-main: #0B0F14;
  --bg-surface: #111827;
  --bg-card: #1F2937;
  --bg-card-rgb: 31, 41, 55;

  --text-primary: #E5E7EB;
  --text-secondary: #9CA3AF;

  --accent: #F97316;
  --accent-soft: #FB923C;
}

/* Text selection color */
::selection {
  background: var(--accent-soft);
  color: #fff;
}

/* Base */
body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Funnel Sans', 'Lexend', 'Segoe UI', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
}

/* Header */
header {
  background: linear-gradient(
    90deg,
    #0B0F14 0%,
    #111827 50%,
    #0B0F14 100%
  );
  padding: 3rem 1rem 2rem 1rem;
  text-align: center;
  border-bottom: 2px solid var(--accent);
}

h1 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
}

/* Filter layout */
#filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: flex-end;
}

/* Filter group wrapper */
.filter-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 120px;
}

/* Filter label */
.filter-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

/* Inputs + selects */
#filter-row input,
#filter-row select {
  width: 210px;
  height: 2.5rem;
  background: #151C24;
  border: 1px solid #2A3441;
  color: var(--text-primary);
  border-radius: 3px;
  padding: 0 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#filter-row input:focus,
#filter-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Filter input */
.filter-input {
  width: 210px;
  height: 2.5rem;
  background: #151C24;
  border: 1px solid #2A3441;
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-size: 1rem;
  margin: 0;
  display: block;
}

.filter-input:focus {
  border-color: var(--accent);
  outline: none;
}

/* Map list */
#map-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg-surface);
}

/* Cards */
.map-card {
  background: var(--bg-card);
  border-radius: 5px;
  border: 1px solid #2A3441;
  padding: 1.5rem;
  width: 320px;
  transition: all 0.25s ease;
  position: relative;
}

.map-card:hover {
  border-color: var(--accent);
}

/* Typography inside card */
.map-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-transform: lowercase;
}

.map-type {
  color: var(--accent);
  font-weight: 600;
}

.map-type > span {
  color: var(--text-primary);
  font-weight: 600;
}

.map-year {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.map-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.map-link:hover {
  opacity: 0.8;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-top: 1px solid #2A3441;
  margin-top: 2rem;
}

/* Image Modal Popup */
.img-modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-modal-backdrop {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(var(--bg-card-rgb), 0.85);
  z-index: 1;
}
.img-modal-content {
  position: relative;
  z-index: 2;
  background: #1F2937;
  border-radius: 12px;
  padding: 2rem 2.5rem 1.5rem 2.5rem;
  box-shadow: 0 8px 32px #000b;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 340px;
  min-height: 240px;
  max-width: 90vw;
  max-height: 90vh;
}
.img-modal-content img {
  max-width: 60vw;
  max-height: 60vh;
  border-radius: 3px;
  margin-bottom: 1rem;
  background: #151C24;
}
.img-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: none;
  border: none;
  color: #E5E7EB;
  font-size: 2rem;
  cursor: pointer;
  z-index: 3;
  transition: color 0.2s;
}
.img-modal-close:hover {
  color: var(--accent-soft);
}
.img-modal-prev, .img-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #151C24cc;
  border: none;
  color: #E5E7EB;
  font-size: 2rem;
  cursor: pointer;
  z-index: 3;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.img-modal-prev:hover, .img-modal-next:hover {
  background: var(--accent);
  color: #151C24;
}
.img-modal-prev { left: 0.5rem; }
.img-modal-next { right: 0.5rem; }
.img-modal-caption {
  color: #9CA3AF;
  font-size: 1rem;
  margin-top: 0.5rem;
  text-align: center;
}