@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  --bg: #121113;
  --panel: #19181b;
  --line: #2c2a2e;
  --ink: #f2f0ea;
  --ink-dim: #8f8b90;
  --accent: #fc2525;
  --accent-ink: #121113;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------------- Header ---------------- */
.header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.band-name {
  margin: 0;
  line-height: 0; /* 이미지 아래 여백 제거 */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.band-logo {
  display: block;
  height: clamp(28px, 6vw, 44px); /* 화면 크기에 따라 자동으로 크기 조절 */
  width: auto;
  max-width: 100%;
}

.year-nav {
  display: flex;
  gap: 4px;
}

.year-tab {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.year-tab:hover {
  color: var(--ink);
  border-color: var(--ink-dim);
}

.year-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------------- Layout ---------------- */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: none; /* JS로 전환, 첫 화면은 캘린더 */
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 800px) {
  .main {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Concert list column (search + blocks) ---------------- */
.concert-list-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  border-radius: 10px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input::placeholder {
  color: var(--ink-dim);
}

.search-input:focus {
  border-color: var(--accent);
}

.search-empty {
  color: var(--ink-dim);
  font-size: 13px;
  padding: 20px 4px;
}

/* ---------------- Concert list (blocks) ---------------- */
.concert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.concert-block {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.concert-block:hover {
  border-color: var(--ink-dim);
}

.concert-block.selected {
  border-color: var(--accent);
  background: #201f16;
}

.concert-block .date {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.concert-block .title {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0 2px;
}

.concert-block .venue {
  font-size: 13px;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.concert-block .count {
  display: inline-block;
  font-size: 11px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}

/* ---------------- Setlist view (right panel) ---------------- */
.setlist-view {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 28px 26px;
  position: sticky;
  top: 100px;
}

.setlist-view .sv-date {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.setlist-view .sv-title {
  font-size: 21px;
  font-weight: 800;
  margin: 6px 0 4px;
  line-height: 1.3;
}

.setlist-view .sv-venue {
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sv-photo-link {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sv-photo-link:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.setlist-view .sv-count {
  font-size: 12px;
  color: var(--ink-dim);
  margin-left: 6px;
}

.song-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.song-row:last-child {
  border-bottom: none;
}

.song-no {
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 700;
  width: 22px;
  flex-shrink: 0;
}

.song-name {
  font-size: 16px;
  font-weight: 600;
  flex-grow: 1;
}

.song-tag {
  color: var(--accent);
  font-weight: 700;
}

.song-gap {
  font-size: 12px;
  color: var(--ink-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.stat-highlight {
  color: var(--accent);
  font-weight: 700;
}

.song-divider {
  display: inline-block;
  margin: 0 7px;
  color: var(--line);
}

@media (max-width: 480px) {
  .song-row {
    flex-wrap: wrap;
  }
  .song-gap {
    white-space: normal;
    margin-left: 36px; /* 번호 칸 너비만큼 들여쓰기 */
  }
}

/* ---------------- Calendar view ---------------- */
.calendar-view {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: none; /* JS로 전환 */
  flex-direction: column;
  gap: 20px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.calendar-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  min-width: 120px;
  text-align: center;
  letter-spacing: 0.5px;
}

.cal-arrow {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.cal-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-weekday {
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 700;
  padding-bottom: 6px;
}

.cal-cell {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.cal-cell.empty {
  border: none;
  background: transparent;
}

.cal-daynum {
  font-size: 11px;
  color: var(--ink-dim);
  font-weight: 700;
}

.cal-event {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cal-event-concert {
  background: var(--accent);
  color: var(--accent-ink);
}

.cal-event-concert:hover {
  opacity: 0.85;
}

.cal-event-schedule {
  background: none;
  border: 1px solid var(--ink-dim);
  color: var(--ink-dim);
}

.cal-event-schedule:hover {
  border-color: var(--ink);
  color: var(--ink);
}

@media (max-width: 700px) {
  .cal-cell {
    min-height: 64px;
    padding: 4px;
  }
  .cal-event {
    font-size: 9.5px;
    padding: 2px 4px;
  }
  .cal-weekday {
    font-size: 10px;
  }
}

/* ---------------- Schedule modal ---------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

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

.modal-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 26px;
  max-width: 360px;
  width: 100%;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-date {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin: 6px 0 10px;
}

.modal-memo {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.5;
  white-space: pre-line;
}

/* ---------------- Footer ---------------- */
.footer {
  text-align: center;
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 24px;
  border-top: 1px solid var(--line);
}
