:root {
  color-scheme: dark;
  --bg: #111214;
  --bg-raised: #1a1b1e;
  --text: #e8e6e3;
  --text-dim: #9a9691;
  --accent: #e2b13c;
  --border: #2c2d30;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

header.site-header .site-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.support-link {
  font-size: 0.85rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.lang-switch {
  font-size: 0.85rem;
  white-space: nowrap;
}

.lang-switch a {
  color: var(--text-dim);
  margin-left: 0.5rem;
}

.lang-switch a.active {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  pointer-events: none;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.8rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }

.meta {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.band-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.band-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.band-list a { font-size: 1.2rem; font-weight: 600; }

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.gallery figure {
  margin: 0;
  max-width: 14rem;
}

.gallery img {
  max-width: 100%;
  border-radius: 4px;
  display: block;
}

.gallery figcaption {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}


.member-list, .release-list {
  list-style: none;
  padding: 0;
}

.member-list li, .release-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.bio p {
  margin: 0 0 1rem;
}

.bio-more summary {
  cursor: pointer;
  color: var(--accent);
  margin: 0.5rem 0 1rem;
  list-style: none;
}

.bio-more summary::-webkit-details-marker {
  display: none;
}

body.lang-en .bio-more summary::before {
  content: "Read more ↓";
}

body.lang-en .bio-more[open] summary::before {
  content: "Show less ↑";
}

body.lang-ru .bio-more summary::before {
  content: "Читать дальше ↓";
}

body.lang-ru .bio-more[open] summary::before {
  content: "Свернуть ↑";
}

.autoplay-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  cursor: pointer;
}

table.tracklist {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table.tracklist td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.tracklist td.track-position {
  color: var(--text-dim);
  width: 2rem;
}

table.tracklist td.track-duration {
  color: var(--text-dim);
  text-align: right;
  width: 3rem;
}

table.tracklist audio {
  height: 2rem;
  max-width: 12rem;
}

.license {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 2rem;
}

.gallery-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery-item:hover figcaption {
  color: var(--accent);
}

.propose-edit {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.propose-edit a {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
}

.propose-edit a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.lightbox:target {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 92vh;
  pointer-events: none;
}

.lightbox-figure img,
.lightbox-figure video,
.lightbox-caption {
  pointer-events: auto;
}

.lightbox img,
.lightbox video {
  position: relative;
  max-width: 92vw;
  max-height: calc(92vh - 4rem);
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 1;
  min-height: 0;
}

.lightbox-figure:not(:has(.lightbox-caption)) img,
.lightbox-figure:not(:has(.lightbox-caption)) video {
  max-height: 92vh;
}

.lightbox video {
  background: #000;
}

.lightbox-caption {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  margin-top: 0.6rem;
  max-width: min(92vw, 42rem);
  padding: 0 0.5rem;
  word-break: break-word;
  flex-shrink: 0;
}

.video-thumb-wrap {
  position: relative;
  width: 14rem;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.video-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.video-play-badge::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.55rem 0 0.55rem 0.95rem;
  border-color: transparent transparent transparent #fff;
  margin-left: 0.2rem;
  transition: border-color 0.15s ease;
}

.video-item:hover .video-play-badge,
.video-item:focus-visible .video-play-badge {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(0, 0, 0, 0.85);
  border-color: var(--accent);
}

.video-item:hover .video-play-badge::after,
.video-item:focus-visible .video-play-badge::after {
  border-color: transparent transparent transparent var(--accent);
}

.view-all {
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: var(--text);
  font-size: 2.2rem;
  line-height: 1;
  z-index: 2;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  z-index: 2;
  padding: 0.75rem;
  opacity: 0.75;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}

.support-content h1 { font-size: 1.6rem; }
.support-content h2 { font-size: 1.15rem; }

.support-content pre.mermaid {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  text-align: center;
}

.support-content code {
  background: var(--bg-raised);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

/* Admin Dashboard (GitHub issue #34) */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Admin Tabs (GitHub issue #35) */
.admin-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.admin-tab {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: var(--text-dim);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
}

.admin-tab:hover {
  color: var(--text);
  text-decoration: none;
  border-bottom-color: var(--border);
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.admin-header h1 {
  margin: 0;
}

.button-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.period-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.period-btn {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
}

.period-btn:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.period-btn.active {
  background: var(--accent);
  color: #111214;
  border-color: var(--accent);
  font-weight: 600;
}

.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.admin-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-section {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
}

.admin-section h2 {
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  font-size: 1.15rem;
}

.admin-section h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.95rem;
}

.stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stat-item {
  margin-bottom: 0.75rem;
}

.stat-item:last-child {
  margin-bottom: 0;
}

.stat-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  gap: 0.5rem;
}

.stat-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-item-count {
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.stat-bar-bg {
  background: var(--border);
  height: 6px;
  border-radius: 3px;
  margin-top: 0.3rem;
  overflow: hidden;
}

.stat-bar {
  background: var(--accent);
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.admin-table th,
.admin-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th.num,
.admin-table td.num {
  text-align: right;
}

.meta-stats-row {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}

.meta-stat-box {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 0.85rem;
}

.recent-activity-section {
  margin-top: 2rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  display: inline-block;
  letter-spacing: 0.03em;
}

.badge-pageview {
  background: #1b2d42;
  color: #7bb8f0;
}

.badge-track_play {
  background: #183b22;
  color: #72e08e;
}

.badge-video_play {
  background: #3d2c14;
  color: #f5b958;
}

/* Role badges and user management (GitHub issue #35) */
.badge-role-admin {
  background: #3b1822;
  color: #ff758f;
  border: 1px solid rgba(255, 117, 143, 0.2);
}

.badge-role-approver {
  background: #183b22;
  color: #72e08e;
  border: 1px solid rgba(114, 224, 142, 0.2);
}

.badge-role-stats {
  background: #1b2d42;
  color: #7bb8f0;
  border: 1px solid rgba(123, 184, 240, 0.2);
}

.badge-status-active {
  background: #14331e;
  color: #52c41a;
}

.badge-status-inactive {
  background: #2a2b30;
  color: #8c8c8c;
}

.badge-meta {
  background: #232429;
  color: var(--accent);
  border: 1px solid var(--border);
  font-size: 0.65rem;
  margin-top: 0.25rem;
}

.user-role-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.user-name {
  font-size: 0.95rem;
}

.user-email {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.user-inactive {
  opacity: 0.6;
}

.users-table td {
  vertical-align: middle;
  padding: 0.75rem 0.5rem;
}

.role-checkboxes-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent);
}

.user-roles-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  flex-wrap: wrap;
}

.button-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.button-danger {
  color: #ff758f;
  border-color: rgba(255, 117, 143, 0.4);
}

.button-danger:hover {
  border-color: #ff758f;
  color: #fff;
  background: #4a1c26;
}

.add-user-form {
  margin: 0;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row .field {
  flex: 1;
  min-width: 220px;
}

.table-responsive {
  overflow-x: auto;
}

/* Internet Archive outage notification banner & inline indicators */
.archive-outage-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #3b180d;
  color: #ffd8a8;
  border-bottom: 2px solid #ff922b;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.archive-outage-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.archive-outage-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.archive-outage-text {
  flex: 1;
}

.archive-outage-text strong {
  color: #fff;
  display: block;
  margin-bottom: 0.15rem;
}

.archive-outage-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.outage-retry-btn {
  background: #ff922b;
  color: #1a1a1a;
  border: none;
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.outage-retry-btn:hover:not(:disabled) {
  background: #ffa94d;
  color: #000;
}

.outage-retry-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.outage-dismiss-btn {
  background: transparent;
  border: none;
  color: #ffd8a8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border-radius: 3px;
  opacity: 0.8;
}

.outage-dismiss-btn:hover {
  opacity: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

@keyframes archive-outage-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.archive-outage-shake {
  animation: archive-outage-shake 0.4s ease;
}

/* Inline media failure notice */
.media-outage-row {
  background: rgba(255, 146, 43, 0.08);
}

.media-outage-row audio {
  opacity: 0.6;
}

figure.media-outage-state {
  position: relative;
  min-height: 80px;
  background: rgba(255, 146, 43, 0.05);
  border: 1px dashed rgba(255, 146, 43, 0.4);
  border-radius: 4px;
}

figure.media-outage-state img {
  opacity: 0.3;
}

.media-outage-notice {
  display: inline-block;
  color: #ff922b;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 146, 43, 0.15);
  border: 1px solid rgba(255, 146, 43, 0.4);
  border-radius: 3px;
  padding: 0.15rem 0.4rem;
  margin-top: 0.25rem;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .archive-outage-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }
  .archive-outage-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
  }
}

.stat-card-warning {
  border-color: rgba(255, 146, 43, 0.5);
  background: rgba(255, 146, 43, 0.08);
}

.stat-card-warning .stat-value {
  color: #ff922b;
}
