:root {
  --teal: #047885;
  --teal-deep: #035a64;
  --slate: #595757;
  --slate-soft: #6f6d6b;
  --ink: #1c1c1c;
  --paper: #f3f6f7;
  --paper-2: #e7eef0;
  --white: #ffffff;
  --danger: #b42318;
  --shadow: 0 18px 40px rgba(4, 120, 133, 0.12);
  --radius: 14px;
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(4, 120, 133, 0.16), transparent 42%),
    radial-gradient(circle at bottom right, rgba(89, 87, 87, 0.12), transparent 40%),
    linear-gradient(160deg, #f7fbfc 0%, #eef3f4 45%, #e5ecee 100%);
}

[hidden] {
  display: none !important;
}

.brand-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate);
}

.brand-title {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  color: var(--teal);
}

.brand-title--header {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.brand-sub {
  margin: 0.4rem 0 0;
  color: var(--slate-soft);
}

.school-mark,
.header-mark {
  display: block;
  width: 96px;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.header-mark {
  width: 64px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-panel {
  width: min(100%, 420px);
  padding: 2rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(4, 120, 133, 0.15);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-panel .school-mark {
  margin: 0 auto 1rem;
}

.login-form {
  margin-top: 1.5rem;
  text-align: left;
}

.login-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--slate);
}

.login-form input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid #c9d5d8;
  border-radius: 10px;
  font: inherit;
  margin-bottom: 0.9rem;
  background: var(--white);
}

.login-form button,
.btn-primary {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  background: var(--teal);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.login-form button:hover,
.btn-primary:hover {
  background: var(--teal-deep);
}

.form-error {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-size: 0.95rem;
}

.app-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 1.25rem 1.25rem 0.5rem;
}

.header-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-main {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0.5rem 1.25rem 2rem;
  flex: 1;
}

.player-section {
  margin-top: 0.75rem;
}

.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #041518;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.player-meta h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.2;
}

.meta-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
}

.skip-controls {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-ghost {
  border: 1px solid rgba(89, 87, 87, 0.35);
  background: rgba(255, 255, 255, 0.7);
  color: var(--slate);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.archive-section,
.years-section {
  margin-top: 2.5rem;
}

.section-heading h3,
.years-section h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 1.8rem;
  color: var(--slate);
}

.section-sub {
  margin: 0.25rem 0 0;
  color: var(--slate-soft);
}

.thumbnail-gallery {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 720px) {
  .thumbnail-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .thumbnail-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery-loader,
.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  color: var(--slate-soft);
}

.thumb-card {
  display: flex;
  flex-direction: column;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.thumb-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: var(--paper-2);
  outline: 3px solid transparent;
  outline-offset: 2px;
  transition: transform 0.2s ease, outline-color 0.2s ease;
}

.thumb-card:hover img,
.thumb-card.active img {
  transform: translateY(-2px);
  outline-color: var(--teal);
}

.thumb-card .thumb-title {
  margin: 0.55rem 0 0;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.thumb-card .thumb-date {
  margin: 0.2rem 0 0;
  color: var(--slate-soft);
  font-size: 0.82rem;
}

.year-links {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.year-link {
  border: 1px solid rgba(4, 120, 133, 0.25);
  background: rgba(255, 255, 255, 0.75);
  color: var(--teal-deep);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.year-link.active,
.year-link:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.site-footer {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  color: var(--slate-soft);
  border-top: 1px solid rgba(89, 87, 87, 0.15);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .player-meta {
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
