:root {
  --bg: #0f0f12;
  --bg-soft: #17171c;
  --fg: #f4f2ee;
  --muted: #9a9aa2;
  --accent: #ff5b8a;
  --accent-soft: #ff5b8a22;
  --border: #26262d;
  --radius: 14px;
}

* { box-sizing: border-box; }

/* `[hidden]` must beat author `display: flex/grid` rules. Without this,
   any `.foo { display: flex }` selector on an element that also has the
   `hidden` attribute leaves it visible (same specificity, author wins). */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --------------------------------------------------------- */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}

.sidebar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  padding: 0.25rem 0.5rem;
  color: var(--fg);
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-link.disabled {
  color: var(--muted);
  opacity: 0.6;
  /* Still clickable — they navigate to /coming-soon — but visually
     subdued so the user knows it's not a real feature yet. */
}

.nav-link.disabled:hover {
  background: rgba(255, 255, 255, 0.025);
  opacity: 0.75;
}

.nav-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--border);
  color: var(--muted);
}

/* --- Page content (everything to the right of the sidebar) ----------- */
.page-content {
  flex: 1;
  min-width: 0; /* prevent grid items from blowing out the layout */
}

@media (max-width: 768px) {
  body { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .nav-link { padding: 0.45rem 0.65rem; }
}

header {
  padding: 2.5rem 1.5rem 1rem;
  max-width: 960px;
  margin: 0 auto;
}

h1 {
  font-size: 2.25rem;
  margin: 0;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--muted);
  margin: 0.25rem 0 0;
}

#search-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

#search-form {
  display: flex;
  gap: 0.5rem;
}

#search-input {
  flex: 1;
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 1rem;
}

#search-input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

button {
  padding: 0.85rem 1.25rem;
  background: var(--accent);
  color: #0f0f12;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

button:hover { filter: brightness(1.1); }

.muted { color: var(--muted); font-size: 0.9rem; }

#results {
  max-width: 960px;
  margin: 1rem auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.band-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.band-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.band-name {
  margin: 0;
  font-size: 1.15rem;
}

.band-score {
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
}

.band-summary {
  margin: 0;
  color: #dedbd5;
  font-size: 0.95rem;
}

.band-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.band-tags li {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.band-shows {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}

.band-shows li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}

.show-venue {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.show-venue:hover { text-decoration: underline; }

.show-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* --- Coming-soon page ----------------------------------------------- */
.coming-soon {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: left;
}

.cs-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.coming-soon h1 {
  font-size: 2.5rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.cs-blurb {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 2rem;
  max-width: 48ch;
}

.cs-back {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.cs-back:hover { text-decoration: underline; }

/* --- Sidebar unread count ------------------------------------------ */
.nav-badge-count {
  background: var(--accent);
  color: #fff;
  margin-left: 0.4rem;
}

/* --- External venue link (the small "↗" next to a venue name) ------ */
.show-venue-ext {
  color: var(--muted);
  text-decoration: none;
  margin-left: 0.15rem;
  font-size: 0.85em;
}
.show-venue-ext:hover { color: var(--accent); }

/* --- Summary toggle (more / less) ---------------------------------- */
.summary-toggle {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.summary-toggle:hover { text-decoration: underline; }

/* --- Search dropdown ----------------------------------------------- */
.search-type {
  background: var(--bg-soft);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.search-type:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

/* --- Profile page extras ------------------------------------------- */
.fav-bands-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fav-band-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  background: var(--bg-soft);
}

.fav-band-item a,
.fav-band-item span {
  color: var(--fg);
  text-decoration: none;
}

.fav-band-suggest {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  max-height: 240px;
  overflow-y: auto;
}

.fav-band-suggest li {
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.fav-band-suggest li:last-child {
  border-bottom: none;
}

.fav-band-suggest li:hover {
  background: var(--accent-soft);
}

.user-result h2 a:hover {
  color: var(--accent) !important;
}

/* --- Shared with you (inbox) ---------------------------------------- */
#shared-section {
  margin: 1rem 0 1.5rem;
}

.section-title {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  color: var(--fg);
}

.shared-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shared-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  padding: 0.75rem 1rem;
}

.shared-row.unread {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.shared-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.shared-title {
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
}

.shared-title:hover {
  color: var(--accent);
}

.shared-meta {
  font-size: 0.8rem;
}

.shared-note {
  margin-top: 0.25rem;
  font-style: italic;
  color: var(--fg);
  font-size: 0.9rem;
}

.share-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.share-actions button[type="submit"] {
  flex: 1;
}

#share-form textarea {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

#share-form textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

/* --- Top bar (signed-in banner) ------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.85rem;
  color: var(--muted);
}

.topbar-status {
  flex: 1;
}

.topbar-status.signed-in {
  color: var(--fg);
  font-weight: 500;
}

.topbar-signout,
.topbar-signin {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.topbar-signout:hover,
.topbar-signin:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

/* --- Account panel (sidebar) ---------------------------------------- */
.account-panel {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.account-summary {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0.5rem;
}

.account-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.account-role {
  font-size: 0.75rem;
  color: var(--muted);
}

.account-actions {
  margin-top: 0.25rem;
}

.nav-link-button {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: var(--fg);
}

.auth-buttons {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  flex: 1;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
}

/* --- Show row inside band card -------------------------------------- */
.show-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.show-row-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  flex: 1;
  min-width: 0;
}

.show-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.btn-vote, .btn-share {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
}

.btn-vote:hover, .btn-share:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-vote.voted {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-vote .vote-icon { font-size: 0.7rem; line-height: 1; }
.btn-vote .vote-count { font-variant-numeric: tabular-nums; }

/* --- Auth modal ----------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(420px, 100%);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

.btn-close:hover { color: var(--fg); }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-form input,
.auth-form select {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.auth-form button[type="submit"] {
  margin-top: 0.25rem;
}

.form-error {
  color: #ff8080;
  font-size: 0.85rem;
  margin: 0;
  min-height: 1.2em;
}

.form-switch {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  text-align: center;
}

.form-switch a {
  color: var(--accent);
}

/* --- Toast ---------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  z-index: 60;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

/* --- Generic page layouts (post/my-shows/show permalink) ------------ */
.page-section {
  max-width: 720px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.page-section h1 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.simple-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.simple-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.simple-form input {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.simple-form input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.show-detail-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.show-detail-card .detail-band {
  font-size: 1.5rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.show-detail-card .detail-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.show-detail-card .detail-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
}

.my-show-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.my-show-card .upvoter-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
