:root {
  --bg-primary: #252525;
  --bg-secondary: #2e2e2e;
  --bg-card: #333333;
  --bg-card-hover: #3a3a3a;
  --bg-border: #404040;

  --text-primary: #efe9e2;
  --text-secondary: #c9b49f;
  --text-muted: #8a7e72;

  --accent: #e78528;
  --accent-hover: #eca14b;
  --accent-subtle: #74381a;

  --green: #b4b27e;
  --red: #e95248;

  --font-body: 'Inter', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--bg-border);
}

.header__title {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.header__subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.header__meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header__dates {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.header__count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--green);
  letter-spacing: 0.05em;
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.toolbar__search {
  flex: 1;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--bg-border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input::placeholder {
  color: var(--text-muted);
}

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

.toolbar__view-toggle {
  display: flex;
  gap: 0;
  background: var(--bg-secondary);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--bg-border);
}

.toggle-btn {
  padding: 0.5rem 1.2rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.toggle-btn:hover {
  color: var(--text-secondary);
}

.toggle-btn.active {
  background: var(--accent);
  color: #1a1a1a;
}

.share-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--bg-border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.share-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.share-btn.copied {
  background: var(--accent);
  color: #1a1a1a;
}

.toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* Timetable View */
.timetable-day {
  margin-bottom: 1.5rem;
}

.timetable-day.collapsed .timetable-day__table,
.timetable-day.collapsed .timetable-day__thead {
  display: none;
}

.timetable-day__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  user-select: none;
  padding: 0.25rem 0;
  transition: opacity 0.2s;
}

.timetable-day__header:hover {
  opacity: 0.8;
}

.timetable-day__toggle {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  display: inline-block;
  width: 1rem;
  text-align: center;
}

.timetable-day.collapsed .timetable-day__toggle {
  transform: rotate(-90deg);
}

.timetable-day__date {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.timetable-day__badge {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.timetable-day__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.timetable-day__table th,
.timetable-day__table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
}

.timetable-day__table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--bg-border);
}

.timetable-day__table td {
  font-size: 0.85rem;
  border-bottom: 1px solid var(--bg-border);
}

.timetable-day__table th:nth-child(1),
.timetable-day__table td:nth-child(1) {
  min-width: 180px;
}

.timetable-day__table th:nth-child(2),
.timetable-day__table td:nth-child(2) {
  width: 14%;
}

.timetable-day__table th:nth-child(3),
.timetable-day__table td:nth-child(3) {
  width: 100px;
}

.timetable-day__table th:nth-child(4),
.timetable-day__table td:nth-child(4) {
  width: 16%;
}

.timetable-day__table th:nth-child(5),
.timetable-day__table td:nth-child(5) {
  width: 24%;
}

/* Stars */
.cell-rating {
  text-align: center;
  user-select: none;
}

.star-icon {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color 0.15s, transform 0.15s;
}

.star-icon:hover {
  transform: scale(1.3);
}

.star-icon.on {
  color: var(--accent);
}

/* Sort arrows */
.sort-arrow {
  font-size: 0.75rem;
  margin-left: 0.3rem;
  opacity: 0.5;
}

th[data-sort] {
  cursor: pointer;
  user-select: none;
}

th[data-sort]:hover .sort-arrow {
  opacity: 1;
}

.timetable-day__table tr:last-child td {
  border-bottom: none;
}

.timetable-day__table tr:hover td {
  background: var(--bg-card-hover);
}

.artist-name {
  font-weight: 500;
  color: var(--text-primary);
}

.tbd {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.cell-source {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.cell-source:hover {
  opacity: 1;
}

.cell-source a {
  color: var(--accent);
  text-decoration: underline;
}

/* List View */
.list-table {
  width: 100%;
  border-collapse: collapse;
}

.list-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--bg-border);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
}

.list-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.list-table th[data-sort]:hover .sort-arrow {
  opacity: 1;
}

.list-table td:nth-child(2) {
  min-width: 180px;
}

.list-table td:nth-child(3) {
  width: 14%;
}

.list-table td:nth-child(4) {
  width: 100px;
  text-align: center;
}

.list-table td:nth-child(5) {
  white-space: nowrap;
}

.list-table td {
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--bg-border);
}

.list-table tr:last-child td {
  border-bottom: none;
}

.list-table tr:hover td {
  background: var(--bg-card-hover);
}

/* No results */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.no-results__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .header__title {
    font-size: 2rem;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar__actions {
    justify-content: center;
  }

  .toolbar__search {
    max-width: none;
  }

  .toolbar__view-toggle {
    justify-content: center;
  }

  .timetable-day__table th:nth-child(4),
  .timetable-day__table td:nth-child(4),
  .timetable-day__table th:nth-child(5),
  .timetable-day__table td:nth-child(5) {
    display: none;
  }

  .timetable-day__table th:nth-child(1),
  .timetable-day__table td:nth-child(1) {
    min-width: 100px;
  }

  .timetable-day__table th:nth-child(2),
  .timetable-day__table td:nth-child(2) {
    width: 80px;
  }

  .timetable-day__table th,
  .timetable-day__table td {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  .timetable-day__table .star-icon {
    font-size: 1rem;
  }

  .list-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
