:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: #9a9a9a;
  --line: #262626;
  --surface: #0e0e0e;
  --surface-2: #161616;
  --accent: #ffffff;
  --danger: #ff5a5a;
  --ok: #57d38c;
  --radius: 14px;
  --maxw: 720px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  color-scheme: dark;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
}

* { box-sizing: border-box; }

html, body, #app {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
p { line-height: 1.6; color: #dcdcdc; }

/* ---------- Layout ---------- */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }

.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 20px 96px;
  flex: 1;
  animation: fade 0.35s ease;
}
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.page-title { font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 0 0 6px; text-transform: uppercase; }
.page-subtitle { color: var(--muted); margin: 0 0 28px; font-size: 0.95rem; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  font-size: 0.9rem;
}
.topbar .brand img { height: 30px; width: auto; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  background: transparent; color: var(--muted); border: 0;
  padding: 6px 11px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
}
.lang-switch button.active { background: var(--fg); color: var(--bg); }

/* ---------- Icon button ---------- */
.icon-btn {
  background: transparent; border: 1px solid var(--line); color: var(--fg);
  border-radius: 10px; width: 40px; height: 40px;
  display: grid; place-items: center; font-size: 1rem; text-decoration: none;
}

/* ---------- Home ---------- */
.home { position: relative; min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end; }
.home-hero { position: absolute; inset: 0; background-size: cover; background-position: center 20%; background-repeat: no-repeat; }
.home-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.9) 100%);
}
.home-inner {
  position: relative; z-index: 2;
  padding: 0 22px calc(40px + env(safe-area-inset-bottom));
  width: 100%; max-width: var(--maxw); margin: 0 auto;
}
.home-logo-corner { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 16px; z-index: 3; }
.home-logo-corner img { height: 96px; width: auto; }
.home-name { font-size: clamp(2.4rem, 11vw, 4rem); text-transform: uppercase; margin: 0 0 4px; }
.home-tagline { color: var(--muted); margin: 0 0 26px; font-size: 1rem; }
.home-menu { display: grid; gap: 10px; }
.home-menu a {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); background: rgba(20,20,20,0.6); backdrop-filter: blur(6px);
  padding: 16px 18px; border-radius: var(--radius);
  font-size: 1.1rem; font-weight: 600; letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.1s;
}
.home-menu a:hover { background: rgba(40,40,40,0.8); }
.home-menu a:active { transform: scale(0.99); }
.home-menu a .chev { color: var(--muted); }

/* ---------- Cards / lists ---------- */
.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.gig { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; }
.gig-date { text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.gig-date .d { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.gig-date .m { font-size: 0.7rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.1em; }
.gig-date .y { font-size: 0.7rem; color: var(--muted); }
.gig-body h3 { margin: 0 0 4px; font-size: 1.1rem; }
.gig-meta { color: var(--muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; }
.gig-note { font-size: 0.9rem; color: #cfcfcf; margin: 0; }

.badge {
  display: inline-block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.badge.past { opacity: 0.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg);
  border-radius: 12px; padding: 13px 18px; font-weight: 700; font-size: 0.95rem;
  width: 100%; transition: opacity 0.15s; text-decoration: none;
}
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { width: auto; padding: 8px 14px; font-size: 0.85rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg);
  border-radius: 10px; padding: 13px 14px; font-size: 1rem; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fg); }
.field textarea { min-height: 90px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-error { color: var(--danger); font-size: 0.9rem; margin: 4px 0 0; }
.form-ok { color: var(--ok); font-size: 0.95rem; }

/* ---------- Song list ---------- */
.song-list { list-style: none; margin: 0; padding: 0; }
.song-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.song-list .song-title { font-weight: 600; }
.song-list .song-artist { color: var(--muted); font-size: 0.85rem; }

.section-label {
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem;
  color: var(--muted); margin: 30px 0 10px;
}

/* ---------- Video links ---------- */
.video-grid { display: grid; gap: 12px; }
.video-link {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface);
}
.video-thumb {
  width: 56px; height: 56px; border-radius: 10px; background: var(--surface-2);
  display: grid; place-items: center; font-size: 1.4rem; flex: none;
}

/* ---------- Contact ---------- */
.contact-item { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.contact-item .ci-icon { font-size: 1.2rem; width: 28px; text-align: center; }
.contact-item .ci-label { font-size: 0.75rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
.contact-item .ci-value { font-size: 1.02rem; }

/* ---------- Toast / popup ---------- */
.toast-wrap {
  position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); left: 14px;
  z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  pointer-events: auto; margin-left: auto; max-width: 380px; width: 100%;
  border: 1px solid var(--line); background: #101010; border-radius: var(--radius);
  padding: 14px 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.6); animation: toastIn 0.28s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.toast .toast-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px;
}
.toast .toast-title { font-weight: 700; font-size: 1.05rem; }
.toast .toast-sub { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.toast .toast-close { background: none; border: 0; color: var(--muted); font-size: 1.1rem; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-tabs button {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 8px 15px; font-size: 0.85rem; font-weight: 600;
}
.admin-tabs button.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.admin-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; background: var(--surface);
}
.admin-row .ar-main { min-width: 0; }
.admin-row .ar-title { font-weight: 600; }
.admin-row .ar-sub { color: var(--muted); font-size: 0.85rem; }
.admin-row-actions { display: flex; gap: 6px; flex: none; }

.pill-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--fg); color: var(--bg); border-radius: 999px; font-size: 0.72rem; font-weight: 800;
}

.empty { text-align: center; color: var(--muted); padding: 40px 0; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  z-index: 120; display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.modal {
  background: #0c0c0c; border: 1px solid var(--line); border-radius: 18px 18px 0 0;
  width: 100%; max-width: var(--maxw); padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  animation: sheetIn 0.28s ease; max-height: 90dvh; overflow-y: auto;
}
@keyframes sheetIn {
  from { transform: translateY(100%); }
  to { transform: none; }
}
.modal h3 { margin: 0 0 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

@media (min-width: 560px) {
  .modal-backdrop { align-items: center; }
  .modal { border-radius: 18px; }
}

/* On larger screens, present the home as a centered app-width column. */
@media (min-width: 600px) {
  .home { max-width: 640px; margin-inline: auto; }
}

/* ---------- Misc ---------- */
.stack { display: grid; gap: 10px; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.link { text-decoration: underline; color: var(--fg); }
.muted { color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }

/* Blazor error UI */
#blazor-error-ui {
  background: #1a1a1a; color: #fff; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
  display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
