* { box-sizing: border-box; }
body {
  font-family: Arial, sans-serif;
  font-weight: bold;
  background: #000;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 160vh;
  padding: 20px;
  color: white;
  transition: background-color 0.3s;
  text-align: center;
}

.form-container { margin-bottom: -5px; text-align: center; }

.form-container input {
  margin: 5px;
  padding: 10px;
  width: 200px;
  border: none;
  border-radius: 5px;
}

.form-container button {
  padding: 10px 20px;
  background: #1e90ff;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.search-container {
  margin: 20px 0 30px 0;
  text-align: center;
}

.search-container input {
  margin-bottom: 20px;
  text-align: center;
  border-radius: 5px;
  border: none;
  padding: 10px;
  width: 300px;
  font-size: 14px;
}

.pagination {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pagination button {
  margin: 0 10px;
  padding: 10px 20px;
  background: #1e90ff;
  color: white;
  border: none;
  border-radius: 2px;
  cursor: pointer;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 1000px;
}

.series-card {
  background: #bd1744;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.series-card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.episodes-list {
  margin-top: 20px;
  text-align: center;
}

.episode-btn {
  background: #444;
  color: white;
  padding: 10px 20px;
  margin: 5px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
}

.episode-btn:disabled {
  background: #777;
  cursor: not-allowed;
}

#player, #nativePlayer {
  width: 100%;
  max-width: 960px;
  height: 480px;
  margin-top: 20px;
  background-color: #000;
}

#nativePlayer { display: none; }

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s ease-in-out;
}

.overlay.visible {
  visibility: visible;
  opacity: 1;
}

.episode-btn-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
}

.episode-btn {
  background: #444;
  color: white;
  padding: 10px 20px;
  margin: 5px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
}

.episode-btn:disabled {
  background: #777;
  cursor: not-allowed;
}
