/* styles.css */
:root {
  --gap: 22px;
  --radius: 14px;
  --shadow: 0 8px 22px rgba(0,0,0,0.12);
}

body {
    margin: 0;
    padding: 22px;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #111;
    visibility: visible;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto 12px auto;
}

.chip.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

h1 {
  margin: 0;
  font-size: 26px;
}

.sub {
  font-size: 14px;
  opacity: 0.75;
  text-align: right;
}

.controls {
  max-width: 1400px;
  margin: 0 auto 12px auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background 120ms ease, border-color 120ms ease;
}

.chip:hover {
  background: #f0f0f0;
  border-color: #ccc;
}

.hint {
  font-size: 13px;
  opacity: 0.75;
}

.map-wrap {
  max-width: 1400px;
  margin: 0 auto 18px auto;
}

#map {
  width: 100%;
  height: 420px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
  overflow: hidden;
}

.section-head {
  max-width: 1400px;
  margin: 0 auto 10px auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
}

.section-sub {
  font-size: 13px;
  opacity: 0.75;
  text-align: right;
}

/* Grid */
.grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: var(--gap);
}

.camera-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.camera-card:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 28px rgba(0,0,0,0.15);
}

.thumb {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
  background: #e9e9e9;
}

.camera-info {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  background: #fafafa;
  font-size: 14px;
  border-top: 1px solid #eee;
  gap: 12px;
}

.camera-name {
  font-weight: 600;
}

.camera-meta {
  opacity: 0.75;
  white-space: nowrap;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modal-backdrop.open {
  display: flex;
}

.modal-content {
  width: 100%;
  height: 100%;
  max-width: 1600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-toolbar {
  display: flex;
  justify-content: space-between;
  color: #fff;
  gap: 12px;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.btn:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.modal-image-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #111;
}

/* Numbered pins (small circle) */
.cam-pin {
  background: transparent;
  border: none;
}

.cam-pin-inner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);

  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-align: center;

  user-select: none;
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 620px) {
  body {
    padding: 14px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .thumb {
    height: 300px;
  }
}

.basis-pin-inner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #A40026;
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.4);
  position: relative;
}

.basis-pin-inner::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(17,17,17,0.25);
}

.basis-pin {
  background: transparent !important;
  border: none !important;
}
