:root {
  --main: #5d5eb7;
  --accent: #0072c2;
  --warning: #c21c1c;
  --success: #00c896;
  --text: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-subtle: rgba(255, 255, 255, 0.6);
  --surface: #3c3d7a;
  --surface-dark: #2b2c5e;
  --surface-light: #4b4d97;
  --shadow: 0 0.875rem 1.875rem rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: linear-gradient(135deg, var(--surface-dark), var(--surface));
  color: var(--text);
  min-height: 100vh;
}

html {
  font-size: 16px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  background: var(--surface-light);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left h1 {
  margin: 0 0 0.625rem 0;
  font-size: 1.5rem;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-button {
  border: none;
  background: var(--main);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.nav-button:hover {
  background: #6f70c9;
}

.album-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.checkbox input {
  accent-color: var(--accent);
}

.ghost-button,
.primary-button {
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.primary-button {
  background: var(--accent);
  border: none;
}

.page-content {
  padding: 1.75rem 2.5rem 3rem;
}

.album-info {
  margin-bottom: 1.75rem;
}

.album-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  background: var(--surface-light);
  padding: 1.25rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.album-meta h2 {
  margin: 0.375rem 0 0 0;
  font-size: 1.25rem;
}

.catalogue {
  margin: 0.375rem 0 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.label {
  margin: 0;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.0625rem;
  color: var(--text-subtle);
}

.covers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.cover-card {
  position: relative;
  background: var(--surface);
  border-radius: 1rem;
  padding: 0.75rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 0.125rem solid transparent;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-height: 17.5rem;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0.75rem;
  object-fit: contain;
  max-height: 20rem;
  background: #1f2046;
}

.cover-card.warning {
  border-color: var(--warning);
  box-shadow: 0 0 0 0.125rem rgba(255, 30, 0, 0.6);
}

.cover-card.chosen {
  border-color: var(--success);
  box-shadow: 0 0 0 0.125rem rgba(0, 200, 150, 0.4);
}

.cover-number {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.8);
  padding: 0.25rem 0.5rem;
  border-radius: 62.4375rem;
  font-size: 1rem;
}

.zoom-button {
  position: absolute;
  bottom: 0.625rem;
  right: 0.625rem;
  border: none;
  background: rgba(0, 0, 0, 0.8);
  color: var(--text);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.cover-details {
  font-size: 1rem;
  color: var(--text-muted);
}

.relative-path {
  margin: 0 0 0.375rem 0;
  word-break: break-word;
}

.dimensions {
  margin: 0;
  color: var(--text-subtle);
}

.new-card {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.new-cover-body p {
  margin: 0;
  font-size: 1.375rem;
}

.new-cover-body span {
  font-size: 1rem;
  color: var(--text-muted);
}

.empty-state {
  background: var(--surface-light);
  border-radius: 1rem;
  padding: 1.875rem;
  box-shadow: var(--shadow);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: var(--surface-light);
  border-radius: 1.125rem;
  padding: 1.5rem;
  max-width: 45rem;
  width: 90%;
  box-shadow: var(--shadow);
  position: relative;
}

.modal-content img {
  width: 100%;
  border-radius: 0.75rem;
  max-height: 32.5rem;
  object-fit: contain;
  background: #1f2046;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 56.25rem) {
  .covers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .page-content {
    padding: 1.25rem;
  }

  .covers-grid {
    grid-template-columns: 1fr;
  }
}
