:root {
  color-scheme: dark;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #1e420f;
  color: #f4f5f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #1e420f;
}

.top-bar {
  padding: 1.75rem clamp(1.25rem, 5vw, 3.5rem);
  background-color: #1e420f;
  border-bottom: 1px solid rgba(216, 162, 115, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-bar h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 3rem);
  text-transform: none;
  letter-spacing: normal;
}
.site-logo {
  max-height: 64px;
  width: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-bar p {
  margin: 0.5rem 0 0;
  opacity: 0.7;
  text-transform: none;
  letter-spacing: normal;
}

.layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 1.5rem 3rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.season-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.season-tab {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(216, 162, 115, 0.25);
  background: rgba(216, 162, 115, 0.18);
  color: inherit;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
  font-size: 0.8rem;
}

.season-tab:hover,
.season-tab:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(216, 162, 115, 0.55);
  outline: none;
}

.season-tab.is-active {
  background-color: rgba(165, 110, 62, 0.9);
  border-color: rgba(216, 162, 115, 0.6);
}

.season-tab[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.season-tab[disabled]:hover,
.season-tab[disabled]:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  transform: none;
  box-shadow: none;
}

.player {
  max-width: 1000px;
  margin: 0 auto;
  background-color: rgba(30, 66, 15, 0.75);
  border: 1px solid rgba(216, 162, 115, 0.18);
  border-radius: 24px;
  padding: 1.5rem;
  display: grid;
  gap: 1.25rem;
}

.player .plyr {
  border-radius: 16px;
  overflow: hidden;
  background: black;
}

.details {
  display: grid;
  gap: 0.75rem;
}

#video-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

#video-description {
  margin: 0;
  line-height: 1.6;
  opacity: 0.82;
}

.download {
  color: #f4f5f6;
  text-decoration: none;
  border: 1px solid rgba(216, 162, 115, 0.4);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  width: fit-content;
  background-color: rgba(165, 110, 62, 0.25);
}

.download:hover {
  border-color: rgba(216, 162, 115, 0.65);
  background-color: rgba(165, 110, 62, 0.45);
  transform: translateY(-1px);
}

.library {
  display: block;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.shelf {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  max-width: 960px;
  margin-inline: auto;
}

.card {
  margin: 0;
}

.card-button {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  color: inherit;
  text-align: left;
  background: rgba(216, 162, 115, 0.14);
  transform-origin: center;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.card-button:hover,
.card-button[aria-pressed="true"] {
  transform: translateY(-6px) scale(1.015);
  box-shadow: none
}

.card-thumb {
  position: absolute;
  inset: 0;
  display: block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: none;
  transition: transform 180ms ease;
  z-index: 0;
}

.card-button:hover .card-thumb,
.card-button[aria-pressed="true"] .card-thumb {
  transform: scale(1.02);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  gap: 0.35rem;
  pointer-events: none;
  z-index: 1;
}

.card-title {
  font-size: 0.9rem;
  text-transform: none;
}

.card-meta {
  font-size: 0.75rem;
  opacity: 0.78;
}

.card-button:focus-visible {
  outline: 3px solid rgba(216, 162, 115, 0.85);
  outline-offset: 3px;
}

.shelf .empty,
.shelf .error {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  padding: 2rem;
  background: rgba(30, 66, 15, 0.85);
  border-radius: 16px;
  min-width: 280px;
  text-align: center;
}

.footer {
  text-align: center;
  padding: 1.5rem;
  opacity: 0.75;
  font-size: 0.875rem;
  border-top: 1px solid rgba(216, 162, 115, 0.3);
  background-color: #1e420f;
}

@media (max-width: 900px) {
  .shelf {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    max-width: none;
  }
}

@media (max-width: 600px) {
  .layout {
    padding-top: 1.5rem;
  }

  .player {
    padding: 1.1rem;
    border-radius: 18px;
  }

  .card-button {
    border-radius: 14px;
  }

  .shelf {
    grid-template-columns: 1fr;
  }
}
