body{
    font-family: 'Inter', sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}


header {
    background-color: #ffffff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}
header h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  color: #000;
  margin: 0;
  display: flex;
  align-items: center; /* center image & text vertically */
  gap: 0.4em;
}

header h1 img {
  height: 1.3em;          /* match Inter visually */
  display: block;
  object-fit: contain;    /* ensures clean scaling */
}

header .nav-button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

header .nav-button:hover {
    background-color: #0056b3;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
    align-items: center;
}

.search-bar input {
    width: 50%;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.content {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

.movie-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 15px;
}

.movie-card {
    position: relative;
    width: calc(25% - 15px);
    margin-bottom: 20px;
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    background-color: #f9f9f9;
    border: 1px solid #dddddd;
    transition: transform 0.3s ease;
}

.movie-card:hover {
    transform: scale(1.05);
}

.poster-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    background-color: #cccccc;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 10px;
    box-sizing: border-box;
    text-align: left;
    z-index: 2;
}

.title-overlay h2 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 525px;
    font-family: 'Inter', sans-serif;
    z-index: 3;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card button {
    background-color: #007bff;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    margin-top: auto;
    cursor: pointer;
    font-size: 0.8em;
    font-family: 'Inter', sans-serif;
}

.movie-card button:hover {
    background-color: #0056b3;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #ffffff;
    margin-top: 20px;
    border-top: 1px solid #dddddd;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-content {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    width: 80%;
    max-width: 800px;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 80vh; /* Set max height to 80% of the viewport height */
    overflow-y: auto; /* Make content scrollable if it exceeds the max-height */
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.overlay-header h2 {
    margin: 0;
    flex-grow: 1;
    font-family: 'Inter', sans-serif;
}


.close-button {
    background: none;
    border: none;
    color: #555555;
    font-size: 20px;
    cursor: pointer;
    margin-left: 15px;
}

.close-button:hover {
    color: #000000;
}

.episode-selector select,
#video-source-select,
#submit-episode,
#tmdb-button,
#toggle-episodes,
.blue-button,
#media-type-selection button {
    font-family: 'Inter', sans-serif;
}

.episode-selector select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #cccccc;
    font-size: 0.9em;
}

.source-selector {
    margin-top: 15px;
    text-align: center;
}

.source-selector > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.source-selector label {
    margin-right: 5px;
    font-weight: bold;
}

.source-selector select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#video-source-select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #cccccc;
    font-size: 0.9em;
}

#tv-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}

#episode-selection {
    display: none;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
}

#episode-selection.row {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.episode-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.episode-selector label {
    font-weight: bold;
    font-size: 0.9em;
    cursor: pointer;
}

.episode-selector input[type="number"] {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #cccccc;
    font-size: 0.9em;
    width: 60px;
}

#submit-episode {
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

#submit-episode:hover {
    background-color: #0056b3;
}



.overlay-content iframe {
    width: 100%;
    height: 350px;
    border: none;
    border-radius: 5px;
    margin: 15px 0;
}


.blue-button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.blue-button:hover {
    background-color: #0056b3;
}

.banner {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px auto;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 12px 12px;
    text-align: left;
}

.banner-title {
    font-size: 2.8rem;
    margin: 0;
    font-weight: bold;
}

.banner-subtitle {
    margin: 8px 0;
    font-size: 1rem;
    color: #444444;
}

.rating {
    font-weight: bold;
    color: #f5a623;
}
