/* Reset and base layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  background-color: #000;
  overflow: hidden;
  font-family: Arial, sans-serif;
  position: relative;
}

/* Fullscreen video */
video {
  width: 100vw;
  height: 100vh;
  display: block;
  background-color: #000;
  pointer-events: none;
  user-select: none;
}

/* Loader spinner */
#loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99;
}

.spinner {
  width: 80px;
  height: 80px;
  border: 8px solid #fff;
  border-top: 8px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Movie title (top-left corner) */
#movieOverlay {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 200;
  pointer-events: none;
}

/* Logo in top-right */
#logoOverlay {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 80px;
  height: auto;
  z-index: 10;
  pointer-events: none;
  border-radius: 8px;
}

/* Quality menu next to logo */
#qualityMenu {
  position: absolute;
  top: 20px;
  right: 110px; /* adjust spacing from logo */
  z-index: 11;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  color: white;
  font-size: 10px;
  font-weight: bold;
  min-width: 60px;
}

img {
  height: 50px;
}
/* The visible selected quality */
.quality-button {
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  background-color: transparent;
}

/* Dropdown list of quality options */
#qualityList {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

#qualityList li {
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#qualityList li.selected,
#qualityList li:hover {
  background-color: #444;
}

.hidden {
  display: none;
}

#movieTitle {
  white-space: nowrap;
}
#movieTable {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(20, 20, 20, 0.85); /* Fallback background */
  color: white;
  z-index: 15;
  padding: 6px 10px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

#movieTable table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* Ensures consistent column widths */
}

#movieTable th,
#movieTable td {
  padding: 6px 10px;
  font-size: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Avoid layout shift from font weight */
#movieSchedule tr {
  height: 20px; /* Lock row height */
}

/* Visual selection without layout shift */
#movieSchedule tr.selected {
  background-color: rgba(0, 191, 255, 0.2);
  color: #00bfff;
}

/* Lock row height to avoid layout shifts */
#movieSchedule tr {
  height: 20px;
}

/* Selected row styling without layout shift */
#movieSchedule tr.selected td:first-child {
  border-left: 4px solid #00bfff;
  padding-left: 12px; /* reduced to offset border width */
  color: #00bfff;
  font-weight: bold;
}

#movieSchedule tr.selected td:last-child {
  color: #00bfff;
  font-weight: bold;
}
