/* Layout Reset & General */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #000;
  color: #fff;
}
main {
  padding-top: 60px;   /* Account for fixed header */
  padding-bottom: 60px; /* Account for fixed footer */
}
/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1003;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.logo img {
  height: 32px;
  margin-right: 10px;
}
.logo span {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
}
.site-nav a {
  margin-left: 15px;
  text-decoration: none;
  color: #ddd;
  font-weight: 500;
}
.site-nav a:hover {
  color: #fff;
}

/* Footer */
.site-footer {
  background: #111;
  color: #888;
  text-align: center;
  font-size: 14px;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 1000;
}
/* Channel Search */
.channel-search-container {
  padding: 10px 20px;
  background: #111;
  position: sticky;
  top: 60px; /* Just below fixed header */
  z-index: 1001;
}
#channel-search {
  width: 100%;
  padding: 10px 14px;
  font-size: 16px;
  border-radius: 6px;
  border: none;
  outline: none;
  background: #222;
  color: #fff;
}
#channel-search::placeholder {
  color: #aaa;
}

/* Channel Grid */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding: 20px;
}
.channel {
  background: #111;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s;
}
.channel:hover {
  background: #222;
}
.channel img {
  width: 100%;
  max-height: 100px;
  object-fit: contain;
}
.channel-name {
  margin-top: 8px;
  font-size: 16px;
  font-weight: bold;
}

/* Player Overlay */
#player-container {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
}
video {
  width: 100%;
  height: 100%;
  background: #000;
}
#back-button {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  z-index: 10000;
  border-radius: 4px;
}

/* Play Overlay Icon */
#video-overlay-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  z-index: 10001;
}
#video-overlay-icon img {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 8px black);
}
#video-overlay-icon.show {
  opacity: 1;
  animation: fadeOut 1s forwards;
}
@keyframes fadeOut {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

/* Hide some video controls */
video::-webkit-media-controls-timeline,
video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display,
video::-webkit-media-controls-playback-rate-button {
  display: none;
}
