.stn2-show-episodes {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.stn2-episode {
  flex-basis: calc(33.33% - 1em);
  margin: 0.5em;
  background-color: #fff;
  border: 10px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.stn2-episode:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.stn2-episode-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.stn2-episode-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
}

.stn2-episode-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stn2-episode-title {
  margin-top: 10px;
  padding: 0.5em;
  text-align: center;
  font-weight: bold;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Existing pagination styles */
.stn2-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2em;
}

.stn2-pagination .page-numbers {
    margin: 0 0.5em;
    padding: 0.5em 1em;
    border: 1px solid #ddd;
    text-decoration: none;
}

.stn2-pagination .page-numbers.current {
    background-color: #007bff;
    color: #fff;
}

.stn2-season-selector {
    display: flex;
    justify-content: center;
    margin-top: 2em;
}

.stn2-season-selector form {
    display: flex;
    align-items: center;
}

.stn2-season-selector select {
    margin-right: 0.5em;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 1em;
}

.stn2-season-submit {
    padding: 0.5em 1em;
    border: 1px solid #ddd;
    background-color: #f7f7f7;
    color: #32373c;
    text-decoration: none;
    font-size: 1em;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stn2-season-submit:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Responsive design */
@media (max-width: 768px) {
  .stn2-episode {
    flex-basis: calc(50% - 1em);
  }
}

@media (max-width: 480px) {
  .stn2-episode {
    flex-basis: 100%;
  }
}

/* AJAX loading styles */
.stn2-episodes-content.loading {
  opacity: 0.6;
  position: relative;
  min-height: 150px;
  transition: opacity 0.3s ease;
}

.stn2-loading {
  text-align: center;
  padding: 30px;
  font-style: italic;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  padding: 15px 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

/* Animation for loading spinner */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.stn2-loading:before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
}

/* Additional responsive styles */
@media (max-width: 480px) {
  .stn2-season-selector form {
    flex-direction: column;
    gap: 10px;
  }
  
  .stn2-season-selector select {
    margin-right: 0;
    width: 100%;
  }
  
  .stn2-season-submit {
    width: 100%;
  }
}