:root {
  --bg: #0b0f14;
  --fg: #f2f5f7;
  --muted: #a8b3bd;
  --brand: #5da9e9;
  --card: #121923;
  --chip: #1a2430;
  --accent: #ffc75f;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.site-header { background: #0e1520; border-bottom: 1px solid #142133; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 16px; }
.logo { color: var(--fg); font-weight: 700; text-decoration: none; font-size: 20px; }
.header-search { flex: 1; max-width: 400px; margin: 0 16px; position: relative; }
.search-container { position: relative; }
.header-search input[type="text"] { 
    width: 100%; 
    background: #0f1824; 
    color: var(--fg); 
    border: 1px solid #1c2a3a; 
    border-radius: 6px; 
    padding: 8px 40px 8px 12px; 
    font-size: 14px;
    position: relative;
    z-index: 1;
}
.header-search input[type="text"]:focus { 
    outline: none; 
    border-color: var(--brand); 
    box-shadow: 0 0 0 2px rgba(93, 169, 233, 0.1);
}
.header-search input[type="text"]::placeholder { color: var(--muted); }
nav a { color: var(--muted); text-decoration: none; margin-left: 16px; transition: color 0.3s ease; }
nav a:hover { color: var(--fg); }
nav a.active { color: var(--brand); font-weight: 500; }

.site-footer { border-top: 1px solid #142133; color: var(--muted); padding: 24px 0; margin-top: 48px; font-size: 14px; }
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--fg); }

/* Social Sharing Section in Footer */
.social-share-section {
  margin-bottom: 8px;
  padding: 16px 0;
  border-bottom: 1px solid #1a2430;
}

.social-share-header {
  text-align: center;
  margin-bottom: 12px;
}

.social-share-title {
  color: var(--fg);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.social-share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--chip);
  color: var(--fg);
  border: 1px solid #283a50;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 120px;
  justify-content: center;
}

.share-btn:hover {
  background: #1f2d3a;
  color: var(--fg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(93, 169, 233, 0.3);
}

.share-btn:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Individual platform button colors and hover effects */
.share-btn-whatsapp:hover {
  background: #25d3661a;
  border-color: #25d366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.share-btn-whatsapp svg {
  color: #25d366;
}

.share-btn-facebook:hover {
  background: #1877f21a;
  border-color: #1877f2;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.share-btn-facebook svg {
  color: #1877f2;
}

.share-btn-wechat:hover {
  background: #09b83e1a;
  border-color: #09b83e;
  box-shadow: 0 4px 12px rgba(9, 184, 62, 0.3);
}

.share-btn-wechat svg {
  color: #09b83e;
}
/* Style for the figure container */
figure {
  margin: 0; /* Adjust as needed */
  padding: 0;
}

/* Style for the caption text */
figcaption {
  margin-top: 10px; /* Adds space between the image and the caption */
  font-size: 0.9em;  /* Makes the caption text slightly smaller */
  color: #666;       /* Makes the text a light gray */
  text-align: center; /* Centers the caption */
}


main.container { padding: 20px 0 40px; }

h1, h2, h3 { margin: 12px 0; }
a { color: var(--brand); }
a:hover { color: #9cd3ff; }

.filters { background: var(--card); border: 1px solid #1c2a3a; padding: 12px; border-radius: 8px; margin: 12px 0 20px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
label { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
input[type="date"], select, input[type="text"], input[type="email"], textarea { background: #0f1824; color: var(--fg); border: 1px solid #1c2a3a; border-radius: 6px; padding: 8px; }
button { background: var(--brand); color: #03121f; border: 0; padding: 10px 14px; border-radius: 8px; cursor: pointer; }
button:hover { background: #76b8f0; }
.btn-secondary { display: inline-block; background: transparent; color: var(--brand); border: 1px solid var(--brand); padding: 8px 12px; border-radius: 8px; text-decoration: none; }
.btn-secondary:hover { background: #11263a; color: #9cd3ff; }

.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.news-item { display: grid; grid-template-columns: 100px 1fr; gap: 12px; background: var(--card); border: 1px solid #1c2a3a; border-radius: 10px; padding: 10px; }
.thumb { display: block; width: 100px; height: 140px; background: #0f1824; border-radius: 8px; overflow: hidden; }
.thumb img, .post-hero, .hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 12px; }

.meta { display: flex; flex-direction: column; gap: 6px; }
.show-title, .news-title { margin: 0; }
.meta-line { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.badges { background: var(--chip); color: var(--fg); border: 1px solid #283a50; border-radius: 999px; padding: 4px 8px; font-size: 12px; }
.airtime, .episode-name { color: var(--muted); font-size: 14px; }

.show-details .show-hero { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.show-details .hero-img { border-radius: 10px; height: 420px; object-fit: cover; }
.summary { color: var(--fg); }
.next-air { font-size: 16px; background: #122133; border: 1px solid #1f3350; padding: 8px 10px; border-radius: 8px; display: inline-block; }

.post { background: var(--card); border: 1px solid #1c2a3a; border-radius: 10px; padding: 16px; }
.post-meta { color: var(--muted); display: flex; gap: 8px; align-items: center; }
.post-hero { width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }
.post-body { line-height: 1.6; color: var(--fg); white-space: pre-wrap; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 64px; width: auto; display: block; }
.brand-text { font-weight: 700; font-size: 1.2rem; }

/* Accessible-visually-hidden utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.brand-logo {
  height: 56px;          /* or 64px */
  width: auto;
  display: block;
  transform: scale(1.4); /* try 1.6–2.2 */
  transform-origin: left center;
}
/* 4-per-row schedule grid with compact cards and 4px gap */
.schedule-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;                               /* requested 4px gap */
  grid-template-columns: repeat(4, 210px);/* 4 columns */
  justify-content: start;                 /* keep only the 4px gap; no extra spacing */
}
.schedule-card {
  width: 210px;                           /* match column width */
  background: var(--card);
  border: 1px solid #1c2a3a;
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.schedule-card .show-title { font-size: 15px; line-height: 1.2; }
.schedule-card .meta-line,
.schedule-card .airtime,
.schedule-card .episode-name { font-size: 12px; }
.schedule-card .badges { padding: 3px 6px; font-size: 11px; }

/* Posters: portrait 3:4 like the earlier version */
.poster-wide {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #0f1824;
  border-radius: 8px;
  overflow: hidden;
}
.poster-wide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-trailers {
  margin-top: 2rem;
}

.show-trailer {
  margin-bottom: 2rem;
}

.show-trailer h2 {
  margin-bottom: 0.5rem;
}

/* Responsive YouTube embed */
.video-container {
  max-width: 560px;        /* control how big it looks; make this smaller if you want */
  width: 100%;
  margin: 1rem auto;       /* center in the article */
  aspect-ratio: 16 / 9;    /* force 16:9 shape */
  background: #000;
  overflow: hidden;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.meta-under { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }


.show-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.show-number {
  font-weight: 600;
  margin-right: 4px;
}

.show-name {
  font-weight: 600;
}

.show-heading a.show-name {
  text-decoration: none;
}

.show-heading a.show-name:hover {
  text-decoration: underline;
}

.show-platform {
  color: var(--muted);
  font-size: 0.9rem;
}

.show-desc,
.show-perfect {
  margin: 4px 0;
  font-size: 0.95rem;
}
/* Enhanced Search Bar Styles */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-container {
  position: relative;
  width: 100%;
}

#search-input {
  width: 100%; 
  background: #0f1824; 
  color: var(--fg); 
  border: 1px solid #1c2a3a; 
  border-radius: 6px; 
  padding: 8px 12px; 
  font-size: 14px;
  padding-right: 40px;
}

#search-input:focus { 
  outline: none; 
  border-color: var(--brand); 
  box-shadow: 0 0 0 2px rgba(93, 169, 233, 0.1);
}

#search-input::placeholder { color: var(--muted); }

/* Search Loading State */
.search-loading {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 20;
}

.search-loading.show {
  opacity: 1;
  visibility: visible;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--chip);
  border-top: 2px solid var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Search Suggestions Dropdown */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid #1c2a3a;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 4px;
  width: 100%;
}

.search-suggestions.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-suggestions::-webkit-scrollbar {
  width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
  background: var(--bg);
}

.search-suggestions::-webkit-scrollbar-thumb {
  background: #2a4058;
  border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
  background: #3a5a7a;
}

/* Individual Suggestion Items */
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #1a2430;
  text-decoration: none;
  color: var(--fg);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
  background: var(--chip);
  transform: translateX(4px);
}

.suggestion-item:focus {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

/* No Results State */
.suggestion-no-results {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

/* Suggestion Poster - Enhanced for cross-platform compatibility */
.suggestion-poster {
  width: 40px;
  height: 56px;
  background: #0f1824;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.suggestion-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0f1824;
  /* Ensure images load immediately on all platforms */
  fetchpriority: high;
  decoding: async;
}

.suggestion-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7a8f;
  font-size: 16px;
  background: #0f1824;
}

/* Fallback for failed image loads */
.suggestion-poster img[src=""] {
  display: none;
}

/* Suggestion Content */
.suggestion-content {
  flex: 1;
  min-width: 0;
}

.suggestion-title {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px 0;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.suggestion-network {
  background: var(--chip);
  color: var(--fg);
  border: 1px solid #283a50;
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.suggestion-status {
  white-space: nowrap;
}

/* Keyboard Navigation Indicators */
.suggestion-item.highlighted {
  background: var(--brand);
  color: #03121f;
}

.suggestion-item.highlighted .suggestion-title {
  color: #03121f;
}

.suggestion-item.highlighted .suggestion-meta {
  color: rgba(3, 18, 31, 0.8);
}

.suggestion-item.highlighted .suggestion-network {
  background: rgba(3, 18, 31, 0.2);
  color: #03121f;
  border-color: rgba(3, 18, 31, 0.3);
}

/* Search Error State */
.search-error {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 4px;
  padding: 4px 8px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 4px;
}

/* Responsive adjustments for suggestions */
@media (max-width: 768px) {
  .suggestion-item {
    padding: 10px;
    /* Improve touch targets */
    min-height: 44px;
    touch-action: manipulation;
  }
  
  .suggestion-poster {
    width: 35px;
    height: 49px;
  }
  
  .suggestion-title {
    font-size: 13px;
  }
  
  .suggestion-meta {
    font-size: 11px;
  }
  
  /* Enhanced mobile image handling */
  .suggestion-poster {
    width: 35px !important;
    height: 49px !important;
    min-width: 35px !important;
    min-height: 49px !important;
  }
  
  .suggestion-poster img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    loading: eager !important;
    fetchpriority: high !important;
    background: #0f1824 !important;
  }
  
  .suggestion-poster-placeholder {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #0f1824 !important;
    color: var(--muted) !important;
    font-size: 16px !important;
  }
}

.search-button {
  background: var(--brand);
  color: #03121f;
  border: 0;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  background: #76b8f0;
  transform: translateY(-1px);
}



/* Seasons/Episodes Section Styles */
.seasons-container {
  margin: 20px 0;
}

.season-item {
  background: var(--card);
  border: 1px solid #1c2a3a;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.season-item:hover {
  border-color: #2a4058;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.season-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--card) 0%, #142030 100%);
  transition: all 0.3s ease;
}

.season-header:hover {
  background: linear-gradient(135deg, #142030 0%, #1a2d42 100%);
}

.season-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}

.season-toggle {
  color: var(--muted);
  font-size: 18px;
  transition: transform 0.3s ease;
}

.season-item.active .season-toggle {
  transform: rotate(180deg);
}

.episodes-list {
  display: none;
  padding: 16px;
  border-top: 1px solid #1c2a3a;
  background: var(--card);
}

.season-item.active .episodes-list {
  display: block;
  animation: fadeIn 0.3s ease;
}

.episode-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #0f1824;
  border: 1px solid #1c2a3a;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.episode-item:hover {
  background: #142030;
  border-color: #2a4058;
  transform: translateX(4px);
}

.episode-number {
  background: var(--chip);
  color: var(--fg);
  border: 1px solid #283a50;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  min-width: 32px;
  text-align: center;
}

.episode-info {
  flex: 1;
}

.episode-title {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.episode-details {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* Rating Display Styles */
.rating-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent);
  color: #1a1a1a;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.rating-badge:hover {
  background: #ffd994;
  transform: scale(1.05);
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.star {
  color: var(--accent);
  font-size: 14px;
}

.star.empty {
  color: #4a4a4a;
}

.rating-score {
  background: var(--chip);
  color: var(--fg);
  border: 1px solid #283a50;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 600;
  min-width: 32px;
  text-align: center;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Enhanced Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border-color: #2a4058;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
  .schedule-grid { 
    grid-template-columns: repeat(3, 1fr); 
    gap: 6px; 
    justify-content: center;
  }
  .schedule-card {
    width: 100%;
    max-width: 210px;
    margin: 0 auto;
  }
}

@media (max-width: 1000px) {
  .schedule-grid { 
    grid-template-columns: repeat(2, 210px); 
    gap: 6px; 
    justify-content: center; 
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .header-search {
    order: 3;
    flex-basis: 100%;
    margin: 8px 0 0 0;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .header-search {
    order: 0;
    margin: 0;
  }
  

  
  .season-header {
    padding: 12px;
  }
  
  .episode-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .episode-details {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .schedule-grid { 
    grid-template-columns: 210px; 
    gap: 8px; 
    justify-content: center; 
  }
  .schedule-card {
    max-width: none;
    width: 100%;
  }
  .news-item { grid-template-columns: 80px 1fr; }
  .thumb { width: 80px; height: 112px; }
  .show-details .show-hero { grid-template-columns: 1fr; }
  .show-details .hero-img { height: 300px; }
  
  /* Mobile responsive styles for footer social sharing */
  .social-share-buttons {
    gap: 8px;
  }
  
  .share-btn {
    min-width: 100px;
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .share-btn span {
    display: none;
  }
  
  .share-btn svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .header-search {
    flex-direction: column;
  }
  
  .search-button {
    align-self: flex-end;
    margin-top: 4px;
  }
  

  
  .rating-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .schedule-grid {
    grid-template-columns: 1fr;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
button:focus-visible,
.share-btn:focus-visible,
.header-search input[type="text"]:focus-visible,
.season-header:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Enhanced transitions for all interactive elements */
button,
.share-btn,
.season-item,
.episode-item,
.rating-badge,
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Enhanced focus indicators for keyboard navigation */
.season-header[tabindex]:focus {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #2a4058;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a5a7a;
}  
  .show-title-with-rating {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .seasons-section {
    padding: 16px;
    margin-top: 20px;
  }
  
  .episode-item {
    grid-template-columns: 50px 1fr;
    gap: 8px;
    padding: 10px 12px;
  }
  
  .episode-number {
    font-size: 12px;
    padding: 6px 2px;
  }
  
  .episode-title {
    font-size: 14px;
  }
  
  .episode-summary {
    font-size: 12px;
  }

/* ====================================
   SEARCH FUNCTIONALITY STYLES
   ==================================== */

/* Auto-suggestion Dropdown */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid #1c2a3a;
  border-radius: 8px;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.search-suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #1a2430;
  transition: all 0.2s ease;
}

.search-suggestion:last-child {
  border-bottom: none;
}

.search-suggestion:hover,
.search-suggestion.highlighted {
  background: #142030;
  border-left: 3px solid var(--brand);
}

.search-suggestion-content {
  flex: 1;
  min-width: 0;
}

.search-suggestion-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestion-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestion-icon {
  width: 16px;
  height: 16px;
  color: var(--brand);
  flex-shrink: 0;
}

.search-no-results {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Search Results Page Layout */
.search-results-page {
  padding: 20px 0;
}

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.search-results-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}

.search-results-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.search-results-count {
  background: var(--chip);
  color: var(--fg);
  border: 1px solid #283a50;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
}

/* Sort and Filter Options */
.search-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--card);
  border: 1px solid #1c2a3a;
  border-radius: 8px;
  flex-wrap: wrap;
}

.search-sort,
.search-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-sort label,
.search-filter label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.search-sort select,
.search-filter select {
  background: #0f1824;
  color: var(--fg);
  border: 1px solid #1c2a3a;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-sort select:hover,
.search-filter select:hover {
  border-color: #2a4058;
}

.search-sort select:focus,
.search-filter select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(93, 169, 233, 0.1);
}

/* Search Result Cards */
.search-results-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.search-result-card {
  background: var(--card);
  border: 1px solid #1c2a3a;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.search-result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(93, 169, 233, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.search-result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: #2a4058;
}

.search-result-card:hover::before {
  opacity: 1;
}

.search-result-card:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.search-result-poster {
  width: 80px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f1824;
  position: relative;
}

.search-result-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.search-result-card:hover .search-result-poster img {
  transform: scale(1.05);
}

.search-result-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.search-result-description {
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0;
}

.search-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.search-result-tag {
  background: var(--chip);
  color: var(--fg);
  border: 1px solid #283a50;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.search-result-tag:hover {
  background: #223044;
  border-color: #3a5270;
}

/* Enhanced Search Loading States */
.search-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.search-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #1c2a3a;
  border-top: 2px solid var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.search-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 20, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

/* Pagination Styling */
.search-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 32px 0;
  flex-wrap: wrap;
}

.pagination-btn {
  background: var(--card);
  color: var(--fg);
  border: 1px solid #1c2a3a;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background: #142030;
  border-color: #2a4058;
  color: var(--fg);
}

.pagination-btn.active {
  background: var(--brand);
  color: #03121f;
  border-color: var(--brand);
  font-weight: 600;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-ellipsis {
  color: var(--muted);
  padding: 8px 4px;
  font-size: 14px;
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  color: var(--muted);
  opacity: 0.6;
}

.breadcrumb-link {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-link:hover {
  color: #9cd3ff;
  text-decoration: underline;
}

.breadcrumb-current {
  color: var(--fg);
  font-weight: 500;
}

/* Keyboard Navigation Enhancements */
.search-suggestion[tabindex]:focus,
.search-result-card:focus,
.pagination-btn:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  position: relative;
  z-index: 1;
}

.search-suggestion[tabindex]:focus-visible,
.search-result-card:focus-visible,
.pagination-btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(93, 169, 233, 0.2);
}

/* Search Result Highlighting */
.search-highlight {
  background: rgba(255, 199, 95, 0.3);
  color: var(--fg);
  padding: 1px 2px;
  border-radius: 3px;
  font-weight: 500;
}

/* No Results State */
.search-no-results-state {
  text-align: center;
  padding: 64px 16px;
  color: var(--muted);
}

.search-no-results-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.search-no-results-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 8px 0;
}

.search-no-results-message {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.search-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.search-suggestion-item {
  color: var(--brand);
  text-decoration: none;
  font-size: 14px;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.search-suggestion-item:hover {
  background: #142030;
  color: #9cd3ff;
  text-decoration: underline;
}

/* Advanced Search Toggle */
.advanced-search-toggle {
  background: none;
  border: none;
  color: var(--brand);
  text-decoration: underline;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.advanced-search-toggle:hover {
  color: #9cd3ff;
}

.advanced-search-panel {
  background: var(--card);
  border: 1px solid #1c2a3a;
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
  display: none;
}

.advanced-search-panel.active {
  display: block;
  animation: fadeInDown 0.3s ease;
}

.advanced-search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.advanced-search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.advanced-search-field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.advanced-search-field input,
.advanced-search-field select {
  background: #0f1824;
  color: var(--fg);
  border: 1px solid #1c2a3a;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}

.advanced-search-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Mobile-Optimized Search Interface */
@media (max-width: 768px) {
  .search-results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .search-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .search-sort,
  .search-filter {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .search-results-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .search-result-card {
    padding: 12px;
    gap: 12px;
  }
  
  .search-result-poster {
    width: 60px;
    height: 90px;
  }
  
  .search-result-title {
    font-size: 15px;
  }
  
  .breadcrumb {
    font-size: 13px;
  }
  
  .advanced-search-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .advanced-search-actions {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .search-results-title {
    font-size: 20px;
  }
  
  .search-suggestions {
    max-height: 200px;
  }
  
  .search-suggestion {
    padding: 10px 12px;
  }
  
  .search-pagination {
    gap: 4px;
  }
  
  .pagination-btn {
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* Enhanced Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-card {
  animation: slideInUp 0.3s ease;
}

/* Search Result Types */
.search-result-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--chip);
  color: var(--fg);
  border: 1px solid #283a50;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-result-type.show { border-color: #5da9e9; }
.search-result-type.episode { border-color: #ffc75f; }
.search-result-type.platform { border-color: #4ade80; }

/* Search Filters Panel */
.search-filters-panel {
  background: var(--card);
  border: 1px solid #1c2a3a;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 4px 0;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tag {
  background: #0f1824;
  color: var(--fg);
  border: 1px solid #1c2a3a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-tag:hover {
  border-color: #2a4058;
  background: #142030;
}

.filter-tag.active {
  background: var(--brand);
  color: #03121f;
  border-color: var(--brand);
}

/* Quick Actions in Search Results */
.search-result-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-result-card:hover .search-result-actions {
  opacity: 1;
}

.search-action-btn {
  background: rgba(18, 25, 35, 0.9);
  border: 1px solid #1c2a3a;
  color: var(--fg);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.search-action-btn:hover {
  background: var(--card);
  border-color: var(--brand);
  color: var(--brand);
}
/* Header Search Form Styles */
.header-search-form {
    flex: 1;
    max-width: 400px;
    margin: 0 16px;
}

.header-search {
    position: relative;
    display: flex;
}

.search-container {
    position: relative;
    flex: 1;
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand);
    color: #03121f;
    border: 0;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.search-button:hover {
    background: #76b8f0;
    transform: translateY(-1px);
}

.search-button svg {
    width: 16px;
    height: 16px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 8px;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--brand);
}

.breadcrumb li[aria-current="page"] {
    color: var(--fg);
    font-weight: 500;
}

/* Enhanced Search Styles */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border: 1px solid #1c2a3a;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-suggestions.show {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.suggestion-item {
    padding: 12px;
    border-bottom: 1px solid #1c2a3a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.3s ease;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: #1a2430;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-poster {
    width: 40px;
    height: 60px;
    flex-shrink: 0;
    background: #0f1824;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggestion-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-poster-placeholder {
    font-size: 16px;
    color: var(--muted);
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px 0;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.suggestion-network {
    color: var(--brand);
}

.suggestion-status {
    color: var(--muted);
}

.suggestion-no-results {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-style: italic;
}

.search-loading {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.search-loading.show {
    display: block;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #1c2a3a;
    border-top: 2px solid var(--brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 12px;
    }
    
    .header-search-form {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 0;
    }
    
    nav {
        order: 2;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 20px;
    }
    
    nav a {
        margin: 0;
    }
}
