:root {
  --bg: #f4f7f4;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-alt: #ebf1eb;
  --text: #1a261f;
  --text-muted: #526358;
  --primary: #2e7d32;
  --border: #d7e1d7;
  --shadow-sm: 0 2px 10px rgba(20, 34, 24, 0.08);
  --shadow-md: 0 10px 28px rgba(20, 34, 24, 0.14);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.38);
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans TC", "Noto Sans KR", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  background-color: #16291c;
  background-image:
    linear-gradient(180deg, rgba(244, 247, 244, 0.9) 0%, rgba(244, 247, 244, 0.93) 100%),
    url("https://drive.google.com/thumbnail?id=1tfhTyJR6iEyB7QqzF-70Arn9qKRySluB&sz=w1600");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2e7d32, #66bb6a);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--primary);
}

.lang-switcher {
  display: inline-flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-btn:hover {
  color: var(--primary);
}

.lang-btn.active {
  background: var(--primary);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  min-height: 410px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: #14281b;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(14, 38, 22, 0.88) 18%, rgba(14, 38, 22, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.hero p {
  max-width: 660px;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  padding: 0.55rem 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.stat-pill strong {
  font-size: 1.2rem;
  display: block;
  line-height: 1.2;
}

.stat-pill span {
  font-size: 0.8rem;
  opacity: 0.88;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-primary {
  background: #43a047;
  color: #fff;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.94rem;
}

.btn-primary:hover {
  background: #2e7d32;
  transform: translateY(-1px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.plan-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.copy-pos-btn {
  border: 1px solid var(--primary);
  background: #e8f5e9;
  color: var(--primary);
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

/* Interactive Campus Map */
.map-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 1.35rem;
  align-items: start;
}

.map-board {
  position: relative;
  background: #1a2d1f;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: background 0.25s ease;
}

.map-board.plan-mode {
  background: #f4f7f4;
}

.map-bg-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.25s ease;
}

.map-board.plan-mode .map-bg-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.map-plan-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  background: #f4f7f4;
}

.map-plan-overlay.visible {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
}

.map-schematic {
  position: absolute;
  inset: 0;
  z-index: 2;
}

@keyframes glowDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 108, 0, 0.75), 0 0 8px rgba(239, 108, 0, 0.8);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(239, 108, 0, 0), 0 0 14px rgba(239, 108, 0, 0.9);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 108, 0, 0), 0 0 8px rgba(239, 108, 0, 0.8);
  }
}

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 50%;
  background: #ef6c00;
  border: 2px solid #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.9;
  animation: glowDotPulse 2s infinite;
  transition: opacity 0.2s ease, transform 0.18s ease, background 0.18s ease;
  z-index: 3;
}

.hotspot-pulse {
  display: none;
}

.hotspot-label {
  display: none;
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  background: #ef6c00;
  color: #fff;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  border: 1.5px solid #fff;
  pointer-events: none;
}

.hotspot.active {
  opacity: 1;
  background: #ef6c00;
  transform: translate(-50%, -50%) scale(1.22);
  z-index: 6;
}

.hotspot.active .hotspot-label {
  display: inline-block;
  background: #ef6c00;
}

.hotspot:hover,
.hotspot:focus-visible,
.hotspot.dragging-mode {
  opacity: 1;
  background: #ef6c00;
  transform: translate(-50%, -50%) scale(1.25);
  z-index: 12;
}

.hotspot.dragging-mode {
  cursor: grab;
  animation: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 4px 12px rgba(0, 0, 0, 0.35);
}

.hotspot.dragging-mode:active {
  cursor: grabbing;
}

.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label,
.hotspot.dragging-mode .hotspot-label {
  display: inline-block;
  background: #ef6c00;
}

.map-sidebar {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.zone-preview-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.zone-preview-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
}

.zone-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.zone-mini-grid img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-alt);
  cursor: pointer;
}

.hint-box {
  background: #eef6ee;
  border: 1px solid #c8e6c9;
  color: #1b5e20;
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  font-size: 0.84rem;
  line-height: 1.5;
}

/* Gallery & Toolbar */
.synced-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.toolbar {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.zone-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tab-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.search-input,
.type-select {
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
}

.search-input {
  flex: 1;
  min-width: 220px;
}

.search-input:focus,
.type-select:focus {
  border-color: var(--primary);
}

.results-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 1.15rem;
}

.media-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-alt);
  overflow: hidden;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.media-card:hover .thumb-wrap img {
  transform: scale(1.04);
}

.badge-type {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: rgba(20, 28, 24, 0.72);
}

.badge-type.video {
  background: rgba(216, 67, 21, 0.88);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
}

.play-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #d84315;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.card-body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-title {
  font-size: 0.93rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 18, 15, 0.86);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 18px;
  width: min(960px, 100%);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-title {
  font-weight: 700;
  font-size: 1rem;
}

.modal-close {
  border: none;
  background: var(--surface-alt);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-media {
  background: #0d120f;
  display: grid;
  place-items: center;
  min-height: 360px;
  max-height: 70vh;
}

.modal-media img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.modal-media iframe {
  width: 100%;
  height: 65vh;
  border: none;
}

.modal-footer {
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 960px) {
  .map-layout {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
