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

/* ── Login overlay ── */

#login-overlay {
  position: fixed;
  inset: 0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

#login-overlay[hidden] { display: none; }

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 44px 40px;
  width: 340px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.login-card h1 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.login-subtitle {
  color: #888;
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.login-card input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.15s;
}

.login-card input[type="password"]:focus { border-color: #1a1a1a; }

.login-card button {
  width: 100%;
  padding: 10px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.login-card button:hover { background: #333; }

#login-error {
  color: #c0392b;
  font-size: 0.84rem;
  margin-top: 10px;
}

#login-error[hidden] { display: none; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  min-height: 100vh;
}

/* ── Header ── */

header {
  background: #fff;
  border-bottom: 1px solid #e4e4e4;
  padding: 24px 32px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

h1 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

/* ── Year tabs ── */

nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

nav::-webkit-scrollbar { display: none; }

.tab {
  padding: 9px 18px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  color: #777;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 4px 4px 0 0;
}

.tab:hover {
  color: #1a1a1a;
  background: #f5f5f5;
}

.tab.active {
  color: #1a1a1a;
  font-weight: 500;
  border-bottom-color: #1a1a1a;
}

/* ── Main content ── */

main {
  padding: 32px;
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Video grid ── */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.video-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.2s;
}

.video-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
}

.video-info {
  padding: 12px 16px 14px;
}

.video-title {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
}

.video-description {
  font-size: 0.82rem;
  color: #777;
  margin-top: 3px;
  line-height: 1.4;
}

/* ── Empty state ── */

.empty-state {
  text-align: center;
  padding: 100px 20px;
  color: #aaa;
  font-size: 0.95rem;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  header { padding: 16px 16px 0; }
  main   { padding: 20px 16px; }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
