:root {
  /* Dark theme (default) */
  --bg-primary: #0b1622;
  --bg-secondary: #1a2332;
  --bg-tertiary: #151f2e;
  --bg-quaternary: #32445b;
  --text-primary: #8596a5;
  --text-secondary: #a8b5c4;
  --text-overview: #728aa1;
  --text-title: 	#9fadbd;
  --border-color: #2a3b4d;
  --hover-bg: #2a3441;
  --special-color: #00bfff;
  --special-color-hover: #57d5ff;
}

[data-theme="light"] {
  --bg-primary: #e7f0f8;
  --bg-secondary: #b7e0f7;
  --bg-tertiary: #b7e0f7;
  --bg-quaternary: #ffffff;
  --text-primary: #0b5f97;
  --text-secondary: #09446b;
  --text-overview: #0b5f97;
  --text-title: #0b507e;
  --border-color: #DCECF8;
  --hover-bg: #cfe8f7;
  --special-color: #E846C4;
  --special-color-hover: #a82a8d;
}

[data-theme="brown"] {
  --bg-primary: #271c19;
  --bg-secondary: #55423d;
  --bg-tertiary: #55423d;
  --bg-quaternary: #af7f76;
  --text-primary: #faeee7;
  --text-secondary: #e2c7b7;
  --text-overview: #e2c7b7;
  --text-title: #faeee7;
  --border-color: #8f6d67;
  --hover-bg: #745b54;
  --special-color: #df5c38;
  --special-color-hover: #dd866e;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-title);
  margin: 0;
}

a {
  color: var(--special-color);
  text-decoration: none;
}

a:hover{
  color: var(--special-color-hover);
}


.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Add flex only to top-content */
.detail-container.top-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  margin-top: -300px; /* move up by 20px (adjust as needed) */
}


.right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: -150px;
  min-height: 13.5rem;
}

/* --- BANNER SECTION --- */
.banner-section {
  position: relative;
  height: 400px;
  width: 100%;
  background-size: cover;
  background-position: center 15%;
  background-repeat: no-repeat;
  margin-top: -60px;
  z-index: 0;
}

.banner-section.no-banner {
  height: 270px;
  background-color: var(--bg-tertiary);
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(180deg, rgba(6, 13, 34, 0) 40%, rgba(6, 13, 34, 0.6) 100%);
  z-index: 1;
}

.banner-section.no-banner .banner-overlay{
  background: none;
 
}

/* --- TOP SECTION (under banner) --- */
.top-colored-section {
  background-color: var(--bg-tertiary);
  padding: 1.5rem 1rem 1rem;
  position: relative;
  z-index: 2;
  min-height: 13rem;
}

.poster {
  width: 210px;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 4px;
  top: -110px;
  left: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  background: #ccc;
}

body[data-media-type="music"] .poster {
  width: 210px;
  height: 210px;
  object-fit: cover;
  object-position: 49.7% top;
}

.top-content {
  display: flex;
  gap: 2rem;
  padding-top: 140px;
  flex-wrap: wrap;
  align-items: flex-start; /* currently */
}

.text-info {
  flex: 1;
}

.text-info h1 {
  font-size: 1.5rem;
  margin: 0 0 0.7rem 0;
  color: var(--text-title);
}

.text-info p {
  margin: 0.4rem 0;
  line-height: 1.4;
}

.release-date {
  color: var(--text-overview);
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.overview-container {
  position: relative;
  max-width: 1000px;
}

.overview {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: 10px;
  color: var(--text-overview);
  max-height: 8.8rem;
  overflow: hidden;
  transition: max-height 0.3s ease;
  position: relative;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}



.overview.expanded {
  max-height: none;
}

.overview:hover{
  color: var(--text-secondary);
}



.read-more-btn {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(to top, var(--bg-tertiary) 60%, transparent);
  border: none;
  color: var(--text-primary);
  padding: 1rem 2rem 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.overview-container:hover .read-more-btn {
  opacity: 1;
  pointer-events: auto;
}

/* --- EDIT + FAVORITE --- */
.edit-favorite-wrapper {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.edit-card-btn,
#add-to-list-button,
#add-season-to-list-button {
  background-color: var(--button-primary);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.edit-card-btn:hover,
#add-to-list-button:hover,
#add-season-to-list-button:hover {
  background-color: var(--button-primary-hover);;
}

/* --- FAVORITE HEART --- */
.favorite-checkbox {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #bbb;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.favorite-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.favorite-checkbox .heart {
  width: 40px;
  height: 40px;
  display: inline-block;
  background: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" stroke="%23ffffff" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 21C12 21 7 16.5 5 12.5C3 8.5 5 5 8.5 5C10.5 5 12 7 12 7C12 7 13.5 5 15.5 5C19 5 21 8.5 19 12.5C17 16.5 12 21 12 21Z"/></svg>') no-repeat center center;
  background-size: contain;
  transition: background 0.3s ease;
}

.favorite-checkbox input[type="checkbox"]:checked + .heart {
  background: url('data:image/svg+xml;utf8,<svg fill="%23e0245e" stroke="%23e0245e" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 21C12 21 7 16.5 5 12.5C3 8.5 5 5 8.5 5C10.5 5 12 7 12 7C12 7 13.5 5 15.5 5C19 5 21 8.5 19 12.5C17 16.5 12 21 12 21Z"/></svg>') no-repeat center center;
  background-size: contain;
}

.favorite-checkbox .heart:hover {
  filter: drop-shadow(0 0 4px #fff) brightness(1.2);
  cursor: pointer;
}

.favorite-checkbox input[type="checkbox"]:checked + .heart:hover {
  filter: drop-shadow(0 0 6px #e0245e) brightness(1.1);
  cursor: pointer;
}

/* --- MAIN PAGE SECTION --- */
.main-colored-section {
  background-color: var(--bg-primary);
  padding: 0.5rem 1rem;
  min-height: calc(100vh - 600px);
}

/* --- SECTION LAYOUTS --- */
.cast-section, .seasons-section, .recommendations-section, .screenshots-section, .episodes-section {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.cast-list, .seasons-list, .recommendations-list, .screenshots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.cast-list{
  margin-top: 6px;
}

.cast-member, .season-card, .rec-card, .recommendation {
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 8px;
  width: 120px;
  text-align: center;
  text-decoration: none;
  color: var(--text-title);
  box-shadow: 0 1px 5px rgba(0,0,0,0.6);
  transition: transform 0.2s ease;
  display: block;
  position: relative;
}

.rec-card:hover, .recommendation:hover, .season-card:hover {
  transform: scale(1.05);
}

.cast-member[href]:hover {
  transform: scale(1.05);
}

.cast-member[href]:hover .actor-name{
  color: var(--text-title);
}
.cast-member[href]:hover .character-name {
  color: var(--text-overview);
}

.cast-member img, .season-card img, .rec-card img, .recommendation img {
  width: 120px;
  height: 180px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.actor-name, .character-name, .season-name, .episode-count, .air-date, .rec-title {
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.2;
}

.actor-name, .season-name{
  font-weight: 500;
}

.season-card:hover .season-name {
  color: var(--text-title); /* lock it to not be affected by a element hover */
}

.character-name, .episode-count, .air-date {
  color: var(--text-overview);
}

.rec-title {
  font-weight: bold;
  margin-top: 2px;
  color: var(--text-primary);
}

.recommendations-list a {
  text-decoration: none;
}

/* --- DOUBLE RECOMMENDATIONS LAYOUT --- */
.double-recs {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.double-recs .rec-block {
  flex: 1;
  min-width: 280px;
}

/* --- SCREENSHOTS --- */
.screenshots-list img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

/* Container for the inline search */
#person-search-container {
  margin-bottom: 1.5rem;
  max-width: 100%;
}

#person-search-input {
  width: 100%;
  max-width: 3.2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  box-shadow: inset 0 0 4px #0008;
  transition: box-shadow 0.3s ease;
}

#person-search-input::placeholder {
  color: var(--text-primary);
}

#person-search-input:focus {
  outline: none;
  max-width: 7rem;
}

#person-search-btn {
  margin-left: 0.5rem;
  background-color: none;
  background: none;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  color: white;
  cursor: default;
  transition: background-color 0.3s ease;
}

/* Search results container */
#person-search-results {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  max-width: 100%;
}

/* Each person card */
.person-card {
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 8px;
  width: 120px;
  text-align: center;
  text-decoration: none;
  color: var(--text-secondary);
  box-shadow: 0 1px 5px rgba(0,0,0,0.6);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.person-card:hover {
  transform: scale(1.05);
}


/* Person image */
.person-card img {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--bg-primary);
  background-color: var(--hover-bg);
  border-radius: 4px;
}

/* Person name */
.person-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 6px 4px 8px;
  flex-grow: 1;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Person favorite heart */
.person-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.person-card:hover .person-favorite {
  opacity: 1;
}

.person-favorite input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.person-favorite .heart {
  width: 35px;
  height: 35px;
  display: inline-block;
  background: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" stroke="%23ffffff" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 21C12 21 7 16.5 5 12.5C3 8.5 5 5 8.5 5C10.5 5 12 7 12 7C12 7 13.5 5 15.5 5C19 5 21 8.5 19 12.5C17 16.5 12 21 12 21Z"/></svg>') no-repeat center center;
  background-size: contain;
  transition: background 0.3s ease, transform 0.2s ease;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.8));
}

.person-favorite input[type="checkbox"]:checked + .heart {
  opacity: 1;
}

.person-card:hover .person-favorite input[type="checkbox"]:checked + .heart {
  opacity: 1;
}

.person-favorite input[type="checkbox"]:checked + .heart {
  background: url('data:image/svg+xml;utf8,<svg fill="%23e0245e" stroke="%23e0245e" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 21C12 21 7 16.5 5 12.5C3 8.5 5 5 8.5 5C10.5 5 12 7 12 7C12 7 13.5 5 15.5 5C19 5 21 8.5 19 12.5C17 16.5 12 21 12 21Z"/></svg>') no-repeat center center;
  background-size: contain;
}

.person-favorite .heart:hover {
  filter: drop-shadow(0 0 4px #fff) brightness(1.2);
  transform: scale(1.1);
  cursor: pointer;
}

.person-favorite input[type="checkbox"]:checked + .heart:hover {
  filter: drop-shadow(0 0 6px #e0245e) brightness(1.1);
  cursor: pointer;
}

/* Cast member favorite heart */
.cast-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.cast-member:hover .cast-favorite {
  opacity: 1;
}

.cast-favorite input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cast-favorite .heart {
  width: 35px;
  height: 35px;
  display: inline-block;
  background: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" stroke="%23ffffff" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 21C12 21 7 16.5 5 12.5C3 8.5 5 5 8.5 5C10.5 5 12 7 12 7C12 7 13.5 5 15.5 5C19 5 21 8.5 19 12.5C17 16.5 12 21 12 21Z"/></svg>') no-repeat center center;
  background-size: contain;
  transition: background 0.3s ease, transform 0.2s ease;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.8));
}

.cast-favorite input[type="checkbox"]:checked + .heart {
  background: url('data:image/svg+xml;utf8,<svg fill="%23e0245e" stroke="%23e0245e" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 21C12 21 7 16.5 5 12.5C3 8.5 5 5 8.5 5C10.5 5 12 7 12 7C12 7 13.5 5 15.5 5C19 5 21 8.5 19 12.5C17 16.5 12 21 12 21Z"/></svg>') no-repeat center center;
  background-size: contain;
  opacity: 1;
}

.cast-favorite .heart:hover {
  filter: drop-shadow(0 0 4px #fff) brightness(1.2);
  transform: scale(1.1);
  cursor: pointer;
}

.cast-favorite input[type="checkbox"]:checked + .heart:hover {
  filter: drop-shadow(0 0 6px #e0245e) brightness(1.1);
  cursor: pointer;
}

.cast-favorite input[type="checkbox"]:checked + .heart {
  opacity: 1;
}

.cast-member:hover .cast-favorite input[type="checkbox"]:checked + .heart {
  opacity: 1;
}


.screenshot-rotator {
  position: relative;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 1rem 1rem 1rem;
}

.screenshot-rotator img#screenshot-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  max-height: 41rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.rotator-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 3.5rem;           /* bigger arrows */
  line-height: 1;
  width: 50px;                /* bigger clickable area */
  height: 70px;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  z-index: 2;
  opacity: 0.75;
  padding-bottom: 10px;
}

.rotator-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  opacity: 1;
}

.rotator-btn.left {
  left: 2rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.rotator-btn.right {
  right: 2rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.delete-screenshot-btn {
  position: absolute;
  top: 0.5rem;
  right: 1.5rem;
  color: rgb(243, 243, 243);
  border: none;
  border-radius: 50%;
  font-size: 60px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  background:none;
}

.delete-screenshot-btn:hover{
  color:white;
}

.screenshot-rotator:hover .delete-screenshot-btn {
  opacity: 1;
}

.screenshots-background{
  background: var(--bg-secondary);
  max-width: 80rem;
  border-radius: 6px;
  margin-left: auto;
  margin-right: auto;
}

.screenshots-list {
  display: flex;
  flex-wrap: wrap;           /* allow multiple rows */
  gap: 8px;
  max-height: calc((5.4rem * 2) + 1rem); /* 2 rows tall (adjust 150px to your thumbnail height) */
  overflow-y: auto;          /* vertical scroll when exceeding 2 rows */
  overflow-x: hidden;        /* disable horizontal scroll */
  padding: 0 1rem 1rem 1rem;
  margin-left: 0.4rem;
  scrollbar-width: none; 
  -ms-overflow-style: none;
}

.screenshots-list::-webkit-scrollbar {
  display: none;
}

.screenshots-list img {
  max-width: 154px;
  height: auto;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0.7;
  transition: opacity 0.3s ease, border 0.3s ease;
  flex-shrink: 0;
  border: 2px solid transparent;
  max-height: 5.4rem;
}

.screenshots-list img:hover,
.screenshots-list img.active-thumbnail {
  opacity: 1;
  border-color: var(--text-secondary); /* or your accent color */
}

.screenshots-header-buttons{
  display: flex;
  align-items: center;
  gap: 1em;
}

.screenshots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em; /* space between title and buttons */
  flex-wrap: wrap; /* if screen is narrow, forms wrap below */
  margin-bottom: 1em;
}

.screenshots-header h2 {
  margin: 0;
  font-size: 1.5rem;
  white-space: nowrap;
  color: var(--text-title);
}

.cast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cast-header h2 {
  color: var(--text-title);
  margin: 0;
}

.cast-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.load-more-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-overview);
  padding: 0.4em 1em;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.load-more-btn:hover {
  background-color: var(--hover-bg);
  color: var(--text-title);
}

.search-container {
  position: relative;
}

.search-toggle {
  background: none;
  border: none;
  color: var(--text-overview);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-toggle:hover {
  color: var(--text-title);
}

.search-input {
  width: 200px;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1rem;
}

.search-input.hidden {
  display: none;
}

.search-input:focus {
  outline: none;
  border-color: var(--special-color);
}

.recommendations-section h2{
  color: var(--text-title);
  margin-top: 0px;
  margin-bottom: 12px;
}

.seasons-section h2{
  color: var(--text-title);
}

.episodes-section h2{
  color: var(--text-title);
}

/* --- EPISODES SECTION --- */
.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.episode-card {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 12px;
  gap: 15px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.6);
  transition: background-color 0.2s ease;
}



.episode-image-container {
  position: relative;
  width: 160px;
  height: 90px;
  flex-shrink: 0;
  cursor: pointer;
}

.episode-card img {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.expand-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 4px;
}

.episode-image-container:hover .expand-overlay {
  opacity: 1;
}

.expand-icon {
  color: white;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
}

.image-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.image-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.image-modal-close {
  position: absolute;
  right: 0;
  background: none;
  color: white;
  border: none;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-close:hover {
  color: rgb(192, 191, 191);
}

.episode-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.episode-info h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-title);
  font-weight: 600;
}

.episode-overview {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-overview);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  cursor: pointer;
  transition: color 0.3s ease;
}

.episode-overview:hover {
  color: var(--text-secondary);
}

.episode-overview-container {
  position: relative;
}

.episode-read-more-btn {
  position: absolute;
  bottom: -1.4rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.episode-overview-container:hover .episode-read-more-btn {
  opacity: 1;
  pointer-events: auto;
}

.episode-read-more-btn:hover {
  background: var(--hover-bg);
}

.episode-air-date {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-overview);
  margin-top: auto;
}



.inline-form {
  margin: 0;  /* remove default form margin */
}

.inline-form button {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-overview);
  padding: 0.4em 1em;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.inline-form button:hover {
  background-color: var(--hover-bg);
  color: var(--text-title);
}

.change-banner-btn {
  position: absolute;
  top: 22rem;
  right: 1rem;
  padding: 7px 12px;
  background: var(--bg-tertiary);
  color: var(--text-overview);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  z-index: 10;
  transition: all 0.2s ease;
}

.change-banner-btn:hover {
  background: var(--hover-bg);
  color: var(--text-title);
}

.change-cover-btn {
  position: absolute;
  top: 24rem;
  right: 1rem;
  padding: 7px 12px;
  background: var(--bg-tertiary);
  color: var(--text-overview);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  z-index: 10;
  transition: all 0.2s ease;
}

.change-cover-btn:hover {
  background: var(--hover-bg);
  color: var(--text-title);
}

.refresh-btn {
  position: absolute;
  top: 26rem;
  right: 1rem;
  padding: 7px 12px;
  background: var(--bg-tertiary);
  color: var(--text-overview);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  z-index: 10;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: var(--hover-bg);
  color: var(--text-title);
}

.label {
  font-weight: 500; /* medium */
}

.more-info-btn {
  background-color: none;
  background: none;
  border: none;
  color: var(--text-overview);
  text-decoration: underline;
  cursor: pointer;
  font: inherit; /* Inherit font styling from surrounding text */
  padding: 0;    /* Remove default padding */
}

.more-info-btn:hover,
.more-info-btn:focus {
  background: none;
  text-decoration: underline;
  color: var(--text-secondary); /* Keep the same color on hover/focus */
  outline: none;
}

.trailer-grid {
  display: grid;
  grid-template-columns: 1fr; /* single column by default */
}

#trailer-container h2, .seasons-section h2 {
  margin-top: 0.5rem;
  margin-bottom: 0.7rem;
}

.trailer-grid iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: none;
  margin-bottom: 1rem;
}

/* Music section controls */
.music-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.music-section h2 {
  color: var(--text-title);
  margin: 0;
}

.music-controls {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.music-control-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-overview);
  padding: 0.4em 1em;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.music-control-btn:hover {
  background-color: var(--hover-bg);
  color: var(--text-title);
}

.music-control-btn input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.music-add-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.music-add-form input {
  flex: 1;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1rem;
}

.music-add-form button {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-overview);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.music-add-form button:hover {
  background-color: var(--hover-bg);
  color: var(--text-title);
}

.music-video-wrapper {
  position: relative;
}

.music-delete-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.music-video-wrapper:hover .music-delete-btn {
  opacity: 1;
}

.music-delete-btn:hover {
  background: rgba(255, 0, 0, 0.8);
}

.relation-list {
  display: inline; /* keeps items on the same line */
}

.relation-item {
  position: relative;
  display: inline-block;
}

.relation-hover-img-container {
  position: absolute;
  left: 100%;
  top: -5rem;
  width: 125px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: none;
  z-index: 10;
  pointer-events: none;
}

.relation-hover-img-container img {
  width: 100%;
  display: block;
}

.relation-hover-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2px 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.7rem;
  text-align: center;
}

.relation-item:hover .relation-hover-img-container {
  display: block;
}

.season-navigation {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.nav-btn {
  color: var(--text-overview);
  padding: 0.4rem 0.8rem;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--text-secondary);
}

@media (orientation: portrait) {
  .change-banner-btn{
    top: 50rem;
    left: 4rem;
    right: auto;
    transform: scale(2);
  }
  .change-cover-btn{
    top: 55rem;
    left: 3.5rem;
    right: auto;
    transform: scale(2);
  }
  .refresh-btn{
    top: 60rem;
    left: 3rem;
    right: auto;
    transform: scale(2);
  }

  .left-column{
    margin-top: -14rem;
  }

  .edit-favorite-wrapper{
    transform: scale(1.8);
  }

  .text-info h1 {
    font-size: 3rem;
  }
  .release-date{
    font-size: 2rem;
  }

  .more-info-btn{
    font-size: 2rem;
  }

  .top-colored-section{
    min-height: 42rem;
    margin-top: 7rem;
  }

  /* Only remove margin if there’s a banner that is NOT empty */
  .banner-section:not(.no-banner) ~ .top-colored-section {
    margin-top: 0;
  }
  body {
    background-color: var(--bg-tertiary);
  }
  .text-info p{
    font-size: 2rem;
  }
  #extra-info-container{
    font-size: 2rem;
  }

  .modal{
    transform: scale(2) !important;
    margin-right: 30rem;
    width: auto !important;
    top: 30% !important;
    left: 28% !important;
  }

  .modal-body form {
    padding-left: 6rem!important;
    padding-right: 6rem!important;
    padding-top: 2rem!important;
  }

  .modal-actions-top{
    right: 1rem !important;
  }

}