@import url('style.css');

/* ======================================
   Episodes Page Layout
   ====================================== */
body.episodes-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

body.episodes-page .wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 0.2em;
}

/* ======================================
   Hero Nav Shrink on Scroll
   ====================================== */
.hero-nav.shrink {
  padding: 0.4em 0;
  background: rgba(30, 61, 89, 0.95);
}

.hero-nav.shrink ul {
  font-size: 0.85em;
}

.hero-content.shrink h1 {
  font-size: 1.8em;
}

.hero-content.shrink p {
  font-size: 1em;
}

.hero-content.shrink .watch-btn {
  transform: scale(0.95);
  font-size: 0.9em;
}

/* ======================================
   Season Select Dropdown Styling
   ====================================== */
.season-select-container {
  padding: 0.25em 0.5em;
  display: flex;
  align-items: center;
  gap: 1em;
  background: #fafafa;
  border-bottom: 2px solid #dce3ea;
}

.season-select-container label {
  font-weight: 600;
  color: #1e3d59;
}

#season-select {
  padding: 0.4em 0.6em;
  font-size: 1em;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #ffffff;
  color: #333;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

#season-select:hover,
#season-select:focus {
  border-color: #1e3d59;
  outline: none;
}

/* ======================================
   Scrollable Episode Container
   ====================================== */
.episode-scroll-container {
  height: 60vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 1em 0.5em;
  border-top: 2px solid #dce3ea;
  border-bottom: 2px solid #dce3ea;
  box-shadow: inset 0 6px 6px -6px rgba(0,0,0,0.1),
              inset 0 -6px 6px -6px rgba(0,0,0,0.1);
}

/* ======================================
   Episode Grid & Cards
   ====================================== */
.episode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
}

.episode-card {
  flex: 1 1 calc(50% - 1em);
  max-height: 70%;
  min-height: 240px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  position: relative;
  color: #ffffff;
}

/* Overlay for readability */
.episode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 0;
}

.episode-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Episode Info Text */
.episode-info {
  flex: 1;
  padding: 1em;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.episode-info h3 {
  margin-top: 0;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.episode-info p {
  font-size: 0.9em;
  color: #f0f0f0;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.7);
}

/* ======================================
   Fade-In Animation
   ====================================== */
.episode-card.fade-in {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ======================================
   Sentinel (for Lazy Loading)
   ====================================== */
#sentinel {
  width: 100%;
  height: 20px;
}

/* ======================================
   Custom Scrollbar
   ====================================== */
.episode-scroll-container::-webkit-scrollbar {
  width: 10px;
}

.episode-scroll-container::-webkit-scrollbar-track {
  background: #f4f7fa;
}

.episode-scroll-container::-webkit-scrollbar-thumb {
  background: #dce3ea;
  border-radius: 10px;
}

.episode-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #c4cbd3;
}

/* ======================================
   Responsive Adjustments (Mobile)
   ====================================== */
@media (max-width: 600px) {
  .episode-scroll-container {
    height: auto;
    padding: 1em;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .episode-grid {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 1.5em;
    overflow: visible;
  }

  .episode-card {
    flex: 1 1 100%;
    width: 100%;
    max-height: none;
    min-height: 240px;
  }

  .episode-info h3 {
    font-size: 1.1em;
  }

  .episode-info p {
    font-size: 0.85em;
  }
}
