/* Global Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: white;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#blurBackdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(30px);
    transform: scale(1.05);
    /* avoid edges showing */
    z-index: 0;
}



/* Hero Banner */
#heroBanner {
    width: 110%;
    height: 75vh;
    background-color: #111;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
    transition: background-image 0.3s ease-in-out;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0));
}

/* Hero text overlay */
.hero-text {
    position: absolute;
    top: 20px;
    left: 150px;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Main container */
#content {
    width: 100%;
    padding: 20px;
    top: 50vh;
    margin-top: 20px;
    background-color: #121212ba;
    margin-left: 30px;
    position: absolute;
}

/* Section titles */
.section {
    margin-bottom: 40px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 1.8rem;
    margin: 10px 0;
    font-weight: bold;
    color: #e6e6e6;
}

/* Row for cards */
.row {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0;
    white-space: nowrap;
    width: 100%;
    position: relative;
    top: -50%;
}

.card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
}

/* Card styling */
.card {
    width: 250px;
    height: 150px;
    background-color: #333;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
    flex-shrink: 0;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.card-label {
    margin-top: 8px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #e6e6e6;
    width: 100%;
    /* match the card width */
    display: -webkit-box;
    /* flexbox for WebKit */
    line-clamp: 2;
    /* limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    /* allow wrapping */
    word-wrap: break-word;
    /* break long words if needed */
}

/* Hover effect */
.card:hover {
    transform: scale(1.05);
}

/* Search button (top-right) */
.search-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 5;
    width: 32px;   /* adjust to your icon’s natural size */
    height: 32px;
  }
  
  .search-button img {
    width: 100%;
    height: 100%;
    display: block;
  }
  
  .search-button:hover img {
    opacity: 0.8;
  }
  
  /* Overlay */
  .search-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    color: white;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
  
    /* Prevent the overlay itself from scrolling */
    overflow: hidden;
  }
  
  /* Search box */
  .search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
  }
  .search-box input {
    width: 300px;
    padding: 8px 12px;
    font-size: 1rem;
  }
  .search-box button {
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
  }
  .search-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
  }
  
  /* Results grid (reuse episodes grid style) */
  .search-results {
    display: grid;
    grid-gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    width: 90%;
    max-width: 1200px;
    padding: 0 20px;
    overflow-y: auto;
    flex: 1;
  }
  
  /* Card in search results */
  .search-card {
    display: flex;
    flex-direction: column;
    background: #333;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .search-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  .search-card .search-label {
    padding: 10px;
    color: #e6e6e6;
    font-weight: bold;
  }
  .search-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
  }
  