* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  background-color: #111;
  color: #fff;
  font-family: sans-serif;
  height: 100%;
  width: 100%;
}

#app {
  max-width: 1280px;
  max-height: 99vh;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#video-container {
  width: 100%;
  max-height: 75vh;
  aspect-ratio: 16 / 9;
  background: #000;
  margin-top: 15px;
  position: relative;
}

.video-js {
  width: 100% !important;
  height: 100% !important;
}

.video-js :focus {
  outline: 0 !important;
  box-shadow: none !important;
}

#channel-dropdown {
  position: relative;
  max-width: 300px;
  width: 100%;
  user-select: none;
}

#channel-dropdown .selected {
  padding: 10px 14px;
  cursor: pointer;
  background: #222;
  border-radius: 6px;
  font-size: 1rem;
  color: #fff;
}

#channel-dropdown .options {
  position: absolute;
  bottom: 100%;
  margin-bottom: 6px;
  top: auto;
  background: #222;
  border-radius: 6px;
  width: 100%;
  list-style: none;
  padding: 0;
  z-index: 20;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateY(0);
  scrollbar-width: thin;
  scrollbar-color: #555 #1e1e1e;
}

#channel-dropdown .options.drop-up {
  bottom: 100%;
  margin-bottom: 6px;
  top: auto;
}

#channel-dropdown .options.drop-down {
  top: 100%;
  margin-top: 6px;
  bottom: auto;
}

#channel-dropdown .options.show {
  opacity: 1;
  display: block;
}

#channel-dropdown .options li {
  padding: 10px 14px;
  cursor: pointer;
}

#channel-dropdown .options li.active,
#channel-dropdown .options li:hover {
  background-color: #444;
}

#channel-dropdown .options::-webkit-scrollbar {
  width: 6px;
}

#channel-dropdown .options::-webkit-scrollbar-track {
  background: #1e1e1e;
}

#channel-dropdown .options::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 4px;
}

#schedule {
  background: #1e1e1e;
  padding: 10px;
  border-radius: 10px;
  width: 100%;
  overflow-x: auto;
}

#program-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #555 #1e1e1e;
}

#program-track::-webkit-scrollbar {
  height: 6px;
}

#program-track::-webkit-scrollbar-track {
  background: #1e1e1e;
}

#program-track::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 4px;
}

.program {
  min-width: 150px;
  background: #333;
  border-radius: 8px;
  padding: 10px;
  flex-shrink: 0;
  text-align: center;
}

.program.current {
  background: #ff5252;
  font-weight: 700;
  transform: scale(1.05);
}

.program-time {
  font-size: 0.85em;
  color: #ccc;
}

.program-title {
  font-size: 0.95em;
  margin-top: 5px;
}

.overlay,
.program {
  text-align: center;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 15;
  cursor: pointer;
  padding: 10px;
  border-radius: 4px;
  color: #fff;
}

.overlay.hidden,
#z-overlay {
  display: none;
}

#z-overlay,
#channel-input-overlay {
  font-size: clamp(1.2rem, 3vw, 2.4rem);
  font-weight: 700;
  pointer-events: none;
  z-index: 10;
  position: absolute;
  color: #fff;
}

#z-overlay {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 10px 20px;
  border-radius: 12px;
  transition: opacity 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#channel-input-overlay {
  top: 10px;
  right: 20px;
  opacity: 0;
  transition: opacity 0.2s;
  text-shadow: 0 0 5px #000;
}

.vjs-live-display {
  display: none !important;
}

@media (max-width: 600px) {
  .program {
    min-width: 120px;
  }

  #channel-dropdown .selected {
    font-size: 0.9rem;
  }
}
