/* ==============================
   기본 (html/body)
   ============================== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  background-color: #ffffff;
  color: #000000;
  -webkit-font-smoothing: antialiased;
}

/* ==============================
   상단 검은 바: 제목 왼쪽, 버튼 오른쪽
   ============================== */
#top-bar {
  background-color: #000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  box-sizing: border-box;
  gap: 12px;
}

/* 제목 왼쪽 정렬 */
.top-left h1,
.header-left h1 {
  color: #ffffff;
  margin: 0;
  font-size: 1.1rem;
}

/* 버튼 그룹 (오른쪽) */
.top-right,
.header-right {
  display: flex;
  gap: 8px;
}

.top-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.12s, transform 0.08s;
}
.top-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.03); }
.top-btn.active { background: #ff7f50; color: #fff; border-color: transparent; }

/* ==============================
   컨테이너 (좌우)
   ============================== */
#container {
  display: flex;
  height: calc(100vh - 56px);
  box-sizing: border-box;
}

/* ==============================
   좌측 패널
   ============================== */
#left-panel {
  width: 300px;
  background-color: #f0f0f0;
  border-right: 2px solid #cccccc;
  box-sizing: border-box;
  overflow-y: auto;
  height: calc(100vh - 56px);
  padding: 8px;
}

#left-panel ul { list-style: none; margin:0; padding:0; }

#left-panel li,
#left-panel li.map-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  margin: 10px 0;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  transition: background 0.18s, transform 0.08s, box-shadow 0.12s;
  cursor: default;
  min-width: 0;
}

#left-panel li .rank,
#left-panel li.map-item .rank,
#left-panel li > span:first-child {
  width: 48px;
  flex: 0 0 48px;
  font-weight: 700;
  color: #333;
  text-align: left;
  white-space: nowrap;
}

#left-panel li .mname,
#left-panel li .name,
#left-panel li.map-item .mname,
#left-panel li > span:nth-child(2) {
  flex: 1 1 auto;
  cursor: pointer;
  color: #111;
  user-select: none;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

#left-panel li:hover,
#left-panel li.map-item:hover {
  background: #f0f7ff;
  transform: translateX(2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

#left-panel li.active,
#left-panel li.map-item.active {
  background: linear-gradient(90deg, #fff7f0, #fff0e6);
  border-color: rgba(255,127,80,0.25);
  box-shadow: 0 6px 16px rgba(255,127,80,0.08);
}

#left-panel li .mname:hover,
#left-panel li .name:hover,
#left-panel li.map-item .mname:hover {
  color: #ff7f50;
}

#left-panel li.log-item {
  padding: 10px;
  margin: 8px 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
}
#left-panel li.log-item .log-date { font-size:12px; color:#666; margin-bottom:6px; }
#left-panel li.log-item .log-summary { font-size:14px; color:#111; }

.hidden { display: none; }

/* ==============================
   LEFT LIST 구분 라벨
   ============================== */
#left-panel li.separator {
  background: #ececec;
  color: #555;
  font-weight: 700;
  text-align: center;
  cursor: default;
  box-shadow: none;
  border: none;
  padding: 6px 10px;
  margin: 10px 0 4px 0;
  border-radius: 6px;
}

/* ==============================
   우측 패널
   ============================== */
#right-panel {
  flex: 1;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  height: calc(100vh - 56px);
}

#map-details h2 { margin:0 0 8px 0; font-size:2rem; color:#ff7f50; }
#map-details .tag { font-weight:bold; font-size:16px; display:inline-block; width:120px; }
#map-details .value { font-weight:normal; font-size:14px; display:inline-block; margin-left:10px; white-space:pre-wrap; }

#change-log {
  width: 100%;
  box-sizing: border-box;
  max-width: 900px;
  margin: 6px auto 0 auto;
  padding: 6px 8px 12px 8px;
}

.change-log-entry {
  display: grid;
  grid-template-columns: 28.57% 71.43%;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  background: #ffffff;
}

.change-log-entry .log-date { font-weight: 700; color:#222; white-space: nowrap; }
.change-log-entry .log-detail { color:#111; white-space: pre-wrap; word-break: break-word; }
.change-log-entry:hover { background: #fbfbfb; }

.change-log-title { text-align: center; font-weight: 700; font-size: 1.6rem; margin: 8px 0 14px 0; color: #111; }
.log-table-wrap { width: 100%; box-sizing: border-box; overflow-x: auto; }
#change-log-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; color: #111; border-radius: 8px; overflow: hidden; }
#change-log-table thead { background: #f3f3f3; }
#change-log-table th, #change-log-table td { padding: 10px 12px; border-bottom: 1px solid #e6e6e6; vertical-align: top; word-break: break-word; }
#change-log-table tbody tr:hover { background: #f9f9f9; }
#change-log-table td:first-child, #change-log-table th:first-child { font-weight: 600; color: #333; }

#map-video { position: relative; width: 100%; max-width: 400px; aspect-ratio: 16 / 9; margin: 15px 0; border-radius: 8px; overflow: hidden; }
#map-video iframe, #map-video video { width: 100%; height: 100%; border: none; display: block; }

@media (max-width: 768px) {
  #container { height: calc(100vh - 56px); display: flex; flex-direction: row; }
  #left-panel { flex: 0 0 35%; min-width: 140px; height: calc(100vh - 56px); overflow-y: auto; }
  #right-panel { flex: 1; padding: 12px; height: calc(100vh - 56px); overflow-y: auto; }
  #map-video { max-width: 100%; aspect-ratio: 16/9; }
  .change-log-entry { display: block; padding: 10px 8px; }
  .change-log-entry .log-date { display: block; font-weight: 700; margin-bottom: 6px; }
  .change-log-entry .log-detail { display: block; margin-left: 0; }
}
#search-box {
  width: 100%;
  padding: 8px 10px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 14px;
}
