body {
  font-family: sans-serif;
  padding: 20px;
}

#search-bar {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: left;
}

/* Sortable headers */
th[data-key] {
  vertical-align: middle;
  background-color: #f0f0f0;
  cursor: pointer;
  user-select: none;
}

/* Unsortable headers */
th:not([data-key]) {
  vertical-align: middle;
  background-color: #f0f0f0;
  cursor: default;
  user-select: none;
}

/* Hover only on sortable headers */
th[data-key]:hover {
  background-color: #e0e0e0;
}

/* Sort arrow */
.arrow {
  margin-left: 6px;
  font-size: 14px;
  color: #333;
  display: inline-block;
  width: 16px;
}

/* Hide arrows unless actively sorted 
th:not(.sorted) .arrow {
  visibility: hidden;
}*/

#pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

#pagination-buttons,
#rows-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#pagination-buttons button {
  padding: 6px 12px;
  font-size: 14px;
}

#rows-selector label {
  font-weight: bold;
}

#rows-selector select {
  padding: 6px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

#controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

#controls label {
  font-weight: bold;
  margin-right: 0.5rem;
}

#controls select,
#controls input {
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  min-width: 150px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 150px;
}

.actor-preview,
.actor-full {
  display: block;
  line-height: 1.4;
}

.expand-link,
.collapse-link {
  color: #0077cc;
  cursor: pointer;
  margin-left: 6px;
  font-weight: 500;
  font-size: 0.9em;
}

.expand-link:hover,
.collapse-link:hover {
  text-decoration: underline;
}

.review-pending {
  color: #999;
  font-style: italic;
}

a.review-link {
  color: green;
  font-weight: bold;
  text-decoration: none;
}
a.review-link:hover {
  text-decoration: underline;
}

td:nth-child(7), td:nth-child(8) {
  white-space: normal;
  word-break: break-word;
  max-width: 40ch;
}

thead th {
  position: sticky;
  top: 0;
  background-color: #fff; /* or match your table background */
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* optional polish */
}


/* Mobile-friendly column hiding */
@media (max-width: 768px) {
  /* Hide Actor column */
  #movie-table th:nth-child(7),
  #movie-table td:nth-child(7) {
    display: none;
  }

  /* Hide Director column */
  #movie-table th:nth-child(8),
  #movie-table td:nth-child(8) {
    display: none;
  }

  /* Hide Writer column */
  #movie-table th:nth-child(9),
  #movie-table td:nth-child(9) {
    display: none;
  }

  /* Hide Production column */
  #movie-table th:nth-child(10),
  #movie-table td:nth-child(10) {
    display: none;
  }

  
}
