:root {
  --bg: #0f172a;
  --card: #0b1224;
  --text: #e5e7eb;
  --muted: rgba(229, 231, 235, 0.75);
  --primary: #1a2b4a;
  --accent: #c9a84c;
  --ring: rgba(201, 168, 76, 0.45);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 18px 55px rgba(0, 0, 0, 0.45);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  padding-bottom: var(--footer-height, 74px);
  background: radial-gradient(900px 600px at 20% 0%, rgba(201, 168, 76, 0.12), transparent 60%),
    radial-gradient(900px 600px at 80% 0%, rgba(26, 43, 74, 0.55), transparent 55%),
    linear-gradient(180deg, #060b16 0%, #050913 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

.site-header {
  background: linear-gradient(180deg, rgba(26, 43, 74, 0.75), rgba(26, 43, 74, 0.2));
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  padding: 28px 0 18px;
}

.title {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 28px;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.filters {
  margin: 20px 0 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: var(--radius);
  background: rgba(11, 18, 36, 0.6);
  backdrop-filter: blur(8px);
}

@media (min-width: 640px) {
  .filters {
    grid-template-columns: 1fr 1fr;
  }
}

.label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
}

.select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(229, 231, 235, 0.18);
  background: rgba(6, 11, 22, 0.65);
  color: var(--text);
  outline: none;
}

.select:focus {
  border-color: rgba(201, 168, 76, 0.55);
  box-shadow: 0 0 0 4px var(--ring);
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 14px;
}

.count {
  color: var(--muted);
  font-size: 14px;
}

.empty {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px dashed rgba(201, 168, 76, 0.3);
  background: rgba(11, 18, 36, 0.5);
  color: rgba(229, 231, 235, 0.85);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 2px 0 24px;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  border-radius: var(--radius);
  border: 1px solid rgba(229, 231, 235, 0.12);
  background: linear-gradient(180deg, rgba(11, 18, 36, 0.78), rgba(11, 18, 36, 0.6));
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateZ(0);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(201, 168, 76, 0.32);
}

.name {
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
  line-height: 1.25;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(26, 43, 74, 0.6);
}

.row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(229, 231, 235, 0.92);
  font-size: 14px;
  line-height: 1.45;
}

.k {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
}

.v {
  color: rgba(229, 231, 235, 0.92);
  overflow-wrap: anywhere;
}

.link {
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 76, 0.45);
  text-underline-offset: 3px;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid rgba(229, 231, 235, 0.12);
  background: rgba(5, 9, 19, 0.92);
  backdrop-filter: blur(10px);
  color: rgba(229, 231, 235, 0.82);
  font-size: 12px;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.footer-text {
  display: inline-block;
}

.footer-inner {
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: center;
}

.footer-link {
  color: rgba(201, 168, 76, 0.98);
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 76, 0.5);
  text-underline-offset: 3px;
}

@media (min-width: 640px) {
  :root {
    --footer-height: 64px;
  }
}

@media (prefers-color-scheme: dark) {
  .site-footer {
    background: rgba(5, 9, 19, 0.92);
    color: rgba(229, 231, 235, 0.86);
    border-top-color: rgba(229, 231, 235, 0.12);
  }
}

.map-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.map-btn {
  appearance: none;
  border: 1px solid rgba(201, 168, 76, 0.35);
  background: rgba(6, 11, 22, 0.55);
  color: rgba(229, 231, 235, 0.92);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.map-btn:hover {
  border-color: rgba(201, 168, 76, 0.6);
  background: rgba(26, 43, 74, 0.65);
  transform: translateY(-1px);
}

.map-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
}

.map-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.12);
  background: rgba(6, 11, 22, 0.35);
}

.map-wrap[hidden] {
  display: none;
}

.map-embed {
  width: 100%;
  height: min(46vw, 260px);
  border: 0;
  display: block;
}

@media (min-width: 720px) {
  .map-embed {
    height: 220px;
  }
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(700px 500px at 50% 20%, rgba(201, 168, 76, 0.14), transparent 60%),
    rgba(5, 9, 19, 0.92);
  backdrop-filter: blur(10px);
}

.loading[hidden] {
  display: none;
}

.loading-card {
  width: min(420px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(201, 168, 76, 0.22);
  background: linear-gradient(180deg, rgba(11, 18, 36, 0.85), rgba(11, 18, 36, 0.66));
  box-shadow: var(--shadow-hover);
  padding: 18px 18px 16px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.loading-logo {
  width: 190px;
  height: auto;
  transform-origin: 50% 50%;
  animation: loading-float 1.2s ease-in-out infinite;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.loading-text {
  color: rgba(229, 231, 235, 0.9);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid rgba(229, 231, 235, 0.22);
  border-top-color: rgba(201, 168, 76, 0.95);
  animation: loading-spin 0.85s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loading-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
