/* Friday Jazz Happy Hour - Global Design System */

:root {
  --bg-color: #0b0d10;
  --card-bg: rgba(20, 24, 33, 0.75);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --accent-color: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --border-color: rgba(255, 255, 255, 0.06);
  
  --font-title: 'Besley', serif;
  --font-title-weight: 500;
  --font-body: 'Libre Franklin', sans-serif;
  --font-meta: 'Oswald', sans-serif;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  margin: 0;
  line-height: 1.6;
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0, transparent 55%),
    radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.08) 0, transparent 55%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

header {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 13, 16, 0.75);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-title);
  font-weight: var(--font-title-weight);
  font-size: 1.4rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links a {
  font-family: var(--font-meta);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

main {
  flex: 1;
  max-width: 1100px;
  width: calc(100% - 4rem);
  margin: 2.5rem auto;
  padding: 0 2rem;
}

footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: auto;
  background: rgba(8, 10, 12, 0.5);
}

/* ==========================================================================
   Consolidated UI Components
   ========================================================================== */

/* 1. Card Panel component (glassmorphism look) */
/* 1. Card Panel and Base Layout Grid Elements */
.card-panel,
.nav-card,
.live-stream-card,
.episode-card,
.title-slide-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-panel {
  padding: 1.5rem 2rem;
}

/* 2. Hero Banners */
.hero-banner {
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem 1rem;
}

.hero-banner-title {
  font-family: var(--font-title);
  font-weight: var(--font-title-weight);
  font-size: 3.5rem;
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.15em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.hero-banner-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.6;
}

/* 3. Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-meta);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0.85rem;
}

.badge--accent {
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--accent-hover);
}

.badge--success {
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.badge--gradient {
  background: var(--accent-gradient);
  color: white;
  font-weight: 600;
  border: none;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge--gradient:hover {
  transform: translateY(-2px);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.badge-style {
  background-color: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  text-transform: capitalize;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* 4. Form Controls */
.search-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 300px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.1rem;
  pointer-events: none;
}

.form-input,
.form-select {
  padding: 0.85rem 1.2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-input {
  width: 100%;
}

.form-select {
  cursor: pointer;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-box-wrapper .form-input {
  padding-left: 2.8rem;
}

.filters-wrapper {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 5. Tables */

/* A. Simple Table (Episodes & Songs) */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.simple-table th {
  font-family: var(--font-meta);
  text-align: left;
  color: var(--accent-hover);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.simple-table td {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  color: var(--accent-hover);
}

.simple-table tr:last-child td {
  border-bottom: none;
}

.simple-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.015);
}

.simple-table td a,
.simple-table td a:visited {
  color: var(--accent-hover);
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.simple-table td a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* B. Card Row Table (Rotation lists) */
.songs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.songs-table th {
  font-family: var(--font-meta);
  text-align: left;
  color: var(--accent-hover);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1.5rem;
  border: none;
  vertical-align: middle;
  white-space: nowrap;
}

.songs-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.songs-table th.sortable:hover {
  color: var(--text-primary);
}

.songs-table th.active-sort {
  color: var(--accent-hover);
}

.song-row {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.song-row td {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.3rem 1.5rem;
  color: var(--accent-hover);
  transition: all 0.2s ease;
}

.song-row td:first-child {
  border-left: 1px solid var(--border-color);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.song-row td:last-child {
  border-right: 1px solid var(--border-color);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.song-row:hover td {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--accent-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.song-row:hover {
  transform: translateY(-2px);
}

.song-title-link,
.song-title-link:visited {
  color: var(--accent-hover);
  text-decoration: none;
  transition: color 0.15s ease;
}

.song-title-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* 6. Sorting and Lists Utilities */
.songs-table-container {
  overflow-x: auto;
  margin-bottom: 5rem;
}

.sort-icon {
  font-size: 0.75rem;
  margin-left: 4px;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.badge-count {
  color: var(--accent-hover);
  font-size: 0.9rem;
}

.ready-stars {
  color: #fbbf24;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.star-empty {
  color: rgba(255, 255, 255, 0.12);
}

/* 7. Responsive Video Embeds */
.responsive-video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  margin: 2rem 0;
}

.responsive-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 8. Homepage Dashboard Styles */
.dashboard-hero {
  text-align: center;
  margin: 3rem auto 3.5rem auto;
  padding: 3rem 1.5rem;
  max-width: 800px;
}

.dashboard-subtitle {
  color: var(--text-secondary);
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 400;
}

.navigation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.nav-card {
  padding: 2.2rem;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.nav-card,
.episode-card,
.nav-pill {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-card:hover,
.episode-card:hover,
.nav-pill:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.18);
}

.nav-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.nav-card-icon {
  font-size: 2.2rem;
  margin: 0;
  line-height: 1;
  display: inline-block;
}

.nav-card-stat {
  font-family: var(--font-title);
  font-size: 2.6rem;
  font-weight: var(--font-title-weight);
  line-height: 1;
  background: linear-gradient(135deg, #ffffff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-card-title {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: var(--font-title-weight);
  margin: 0 0 0.8rem 0;
  line-height: 1.25;
}

.nav-card-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
  flex-grow: 1;
}

.nav-card-action {
  color: var(--accent-hover);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s ease;
}

.nav-card:hover .nav-card-action {
  gap: 0.5rem;
}

.live-stream-card {
  padding: 2rem;
  margin: 0 auto 3.5rem auto;
  max-width: 700px;
  text-align: center;
}

.live-stream-header {
  font-family: var(--font-title);
  font-weight: var(--font-title-weight);
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.live-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.live-stream-card .responsive-video-container {
  margin: 0;
}

@media (max-width: 800px) {
  .navigation-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  
  .hero-banner-title {
    font-size: 2.8rem;
  }
}

/* 9. Episodes Grid Styles */
.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.grid-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: var(--font-title-weight);
  margin: 0;
}

.episodes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.year-heading {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: var(--font-title-weight);
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.6rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.year-heading:first-of-type {
  margin-top: 1.5rem;
}

.episode-card {
  padding: 1.6rem;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.episode-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.25) 0%, rgba(6, 8, 12, 0.6) 100%);
  z-index: 1;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.episode-card:hover::before {
  opacity: 0.25;
}

.episode-card > * {
  position: relative;
  z-index: 2;
}

.card-top {
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: var(--font-title-weight);
  margin: 0 0 0.4rem 0;
  line-height: 1.25;
}

.card-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.card-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.8rem;
}

/* 10. Episode Card Body details & modifiers */
.episode-card-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  line-height: 1.4;
  flex: 1;
}

.episode-card-body-item {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.badge-style--rerun {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* 11. Individual Episode & Song Page Styles */
.episode-header,
.song-header {
  margin-bottom: 2.5rem;
}

.episode-title,
.song-title {
  font-family: var(--font-title);
  font-weight: var(--font-title-weight);
  font-size: 2.8rem;
  margin: 0 0 0.75rem 0;
  line-height: 1.1;
}

.episode-meta,
.song-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

/* Episode Header Navigation Row */
.episode-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.8rem 0;
  width: 100%;
}

.nav-pill {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  min-width: 140px;
  flex: 1;
  box-sizing: border-box;
}

.prev-pill {
  align-items: flex-start;
}

.next-pill {
  align-items: flex-end;
  text-align: right;
}

.pill-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pill-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent-hover);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.nav-pill-placeholder {
  min-width: 140px;
  flex: 1;
}

.watch-stream-pill {
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  border-radius: 12px;
  text-align: center;
  white-space: nowrap;
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 46px;
  box-sizing: border-box;
}

.title-slide-container {
  margin-bottom: 2.5rem;
  overflow: hidden;
  max-width: 100%;
}

.title-slide-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
