@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');


body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: Montserrat, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

.login-modal-content {
  max-width: 320px !important;
}

.container {
  overflow-y: hidden;
  width: 100%;
  max-width: 100%; /* Ensure container doesn't exceed viewport width */
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  gap: 1rem;
  box-sizing: border-box;
  padding-top: 7rem;
  position: relative;
  margin: 0 auto; /* Center the container */
}

.header,
.update-card,
.update-info,
.dropdown-content,
.theme-btn,
.info-box,
.expanded-info,
.slide-content {
    transition: all 0.3s ease;
}

a {
  all: unset;
  cursor: pointer;
}

.header-right .search-bar input {
  width: 200px !important;
  box-sizing: border-box !important;
  transition: width 0.3s ease;
}

.header-right .search-bar input:focus,
.header-right .search-bar input:not(:placeholder-shown),
.header-right .search-bar.has-results input {
  width: 300px !important;
  box-sizing: border-box !important;
}


/* Add these styles for the new elements */
.anime-details {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.detail-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.detail-item .info-box {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* SUB styling */
.detail-item .info-box:first-child {
  background: rgba(255, 140, 0, 0.2);
  border: 1px solid rgba(255, 140, 0, 0.8);
}

/* DUB styling */
.detail-item .info-box:last-child {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.8);
}

@media screen and (max-width: 1224px) {
  .anime-details {
      gap: 1rem;
      margin-top: 0.75rem;
      margin-bottom: 1rem;
      flex-wrap: wrap;
  }

  .detail-item {
      font-size: 0.8rem;
  }
}

/* Add these styles to maintain consistent icon appearance */
.detail-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.detail-item svg path {
  stroke: currentColor;
}

/* Adjust spacing for better alignment */
.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* overrides */

.footer {
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.updates-swiper .swiper-wrapper#recently-uploaded {
  overflow-y: hidden;
}

.hidden {
    display: none;
}


.dropdown-content.active {
    display: block;
}

@media screen and (max-width: 768px) {
  .header-content h2 {
    font-size: 1.2rem !important;
  }
  .view-more-button {
    font-size: 0.7rem !important;
  }
}


/* SWIPER */

.swiper {
    width: 100%;
    height: 100%;
}


.fullscreen-swiper-container {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  height: 100vh;
  /* Ensure it's above the fixed width container */
  z-index: 1;
  /* Make sure it's aligned with the top of the page */
  margin-top: -7rem; /* Adjust based on your header height */
  /* Ensure it stays aligned when zooming */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.fullscreen-swiper {
  overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.fullscreen-swiper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.thumbnail-swiper {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 2560px;
    height: 17vh;  /* Reduced from 20vh */
    z-index: 2;
    padding: 50px 50px;
    overflow: hidden;
}


.thumbnail-swiper .swiper-slide {
    border-radius: 8px;
    filter: brightness(0.4);
    transition: all 0.3s ease;
    transform: scale(0.8);  /* Reduced from 0.9 */
    height: calc(17vh - 40px);  /* Adjusted for new height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-swiper .swiper-wrapper {
    overflow: visible; /* Allow overflow for glow effect */
}

.thumbnail-swiper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;  /* Added rounded corners */
}

.thumbnail-swiper .swiper-slide-active {
    border-radius: 8px;
    filter: brightness(1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
    transform: scale(1.2);  /* Reduced from 1.2 */
}

.thumbnail-swiper .swiper-slide img {
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-swiper .swiper-slide-active img {
    border: 2px solid #fff;
    border-radius: 8px;  /* Added rounded corners */
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  z-index: 1;
}

.card-link:hover {
  cursor: pointer;
}

.info-button {
  z-index: 2;
  position: relative;
}

.expanded-info {
  z-index: 2;
  position: relative;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(205, 205, 205, 0.5);
    border: #ffffff 1px solid;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

.swiper-pagination-bullet-active {
    background: #ffffff;
    opacity: 1;
    width: 15px;
    height: 15px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.read-more {
  display: none !important;
}



/* Keep existing navigation styles */
.updates-header .swiper-navigation {
  display: flex;
  gap: 100px;
}

.updates-header .swiper-navigation .swiper-button-prev,
.updates-header .swiper-navigation .swiper-button-next {
  position: relative;
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
}

.header-content {
  display: flex;
  align-items: baseline; /* Already correct */
  gap: 1rem;
  line-height: normal; /* Add this to normalize line height */
}

.header-content h2 {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1; /* Ensure this is consistent */
  padding: 0; /* Reset any padding */
}



.view-more-button {
  padding: 8px 16px;
  margin: 0 5px;
  border: none;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: baseline;
  line-height: normal;
  transform: translateY(-2px); /* Changed from margin-top to transform */
}

.view-more-button:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.view-more-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.view-more-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.view-more-button:hover::after {
  width: 80%;
}

.slide-content {
  position: absolute;
  bottom: 35%; /* Keep this as you need it */
  left: 10%;
  right: 0;
  color: white;
  z-index: 2;
  max-width: 1400px; /* Fixed maximum width */
  width: 90%; /* Use percentage of container */
  box-sizing: border-box;

}

.slide-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* Set to 3 lines */
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.3;
  max-width: 80%;
}

.slide-content p {
  position: relative;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5; /* Set to 5 lines */
  line-clamp: 5;
  overflow: hidden;
  line-height: 1.5;
  max-width: 80%;
}



/* Hide fullscreen swiper navigation buttons */
.fullscreen-swiper .swiper-button-next,
.fullscreen-swiper .swiper-button-prev {
    display: none;
}

.slide-content p.expanded {
  -webkit-line-clamp: 10; /* Max 10 lines when expanded */
  line-clamp: 10;
  margin-bottom: 1rem;
}

.read-more {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transform-origin: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-more::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.2) 50%,
      rgba(255, 255, 255, 0.1) 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-more:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.read-more:hover::after {
  transform: translateX(100%);
}

.read-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-more.expanded svg {
  transform: rotate(180deg);
}

@media screen and (max-width: 768px) {
  .read-more {
      font-size: 0.8rem;
      padding: 6px 12px;
  }

  .slide-content p {
      max-width: 100%;
      font-size: 0.9rem;
      line-height: 1.4;
  }
}

.watch-button {
  padding: 16px 32px;  /* Increased padding */
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: white;
  border-radius: 8px;  /* Slightly increased radius */
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
  font-size: 1.1rem;  /* Increased font size */
  font-weight: 500;   /* Made text slightly bolder */
  letter-spacing: 0.5px;  /* Added letter spacing */
}

.watch-button:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%) rotate(45deg) translateY(100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.watch-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 
      0 0 20px rgba(255, 255, 255, 0.2),
      0 0 40px rgba(255, 255, 255, 0.1);
  border-color: white;
}

.watch-button:hover:before {
  transform: translate(-50%, -50%) rotate(45deg) translateY(0);
}

.watch-button:active {
  transform: translateY(-1px);
}

@media screen and (max-width: 768px) {
  .watch-button {
      padding: 14px 28px;  /* Still bigger than original but suitable for mobile */
      font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .watch-button {
      padding: 12px 240px;
      font-size: 0.95rem;
  }
}



.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap; /* Allow wrapping if needed */
}

.info {
  padding: 0 !important;
  width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info svg {
  transition: all 0.3s ease;
}

.info.active svg {
  fill: currentColor;
}

.bookmark-button {
  padding: 0 !important;
  width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bookmark-button svg {
  transition: all 0.3s ease;
}

.expanded-content h2 {
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.bookmark-button.active svg {
  fill: currentColor;
}

.fullscreen-swiper .swiper-slide {
  opacity: 0;
  transition: opacity 0.8s ease;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Add this to clip content */
}

.fullscreen-swiper .swiper-slide-active {
  opacity: 1;
}

.fullscreen-swiper .swiper-slide img {
  filter: brightness(0.5);
  width: 100%;
  height: 100%;
  object-fit: cover; /* Keep aspect ratio */
  object-position: center; /* Center the image */
  position: absolute;
  top: 0;
  left: 0;
}

.watch-button:hover {
    background: white;
    color: black;
}

/* NEW BOOKMARK CARDS */

.bookmark-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
  text-decoration: none;
  color: #fff;
  box-sizing: border-box; /* Add this */
  transition: transform 0.3s ease !important;
  cursor: pointer; /* Show pointer on hover */
}


.bookmark-card.info-active {
  transform: none !important; /* Prevent the hover transform when info is active */
}

.bookmark-card:hover {
    transform: translateY(40px) !important;
}

.bookmark-card__image {
  border-radius: 8px;
  position: relative;
  width: 100%;
  padding-top: 140%; /* Maintain aspect ratio */
  height: 0; /* Reset height */
}

.bookmark-card__image img {
  border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bookmark-card__overlay {
  border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 30%);
}

.bookmark-card__progress {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.bookmark-card__badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge--sub {
    background: #ff6b6b;
}

.badge--dub {
    background: #4ecdc4;
}

.bookmark-card__content {
  border-radius: 8px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.85);
  padding: 12px;
  z-index: 3;
  transition: transform 0.3s ease; /* Add transition here instead */
  box-sizing: border-box;
}


.bookmark-card__title {
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3; /* Standardize line height */
  height: 2.6em; /* Force consistent height for 2 lines */
  min-height: 2.6em; /* Ensure minimum height even with short titles */
}

.bookmark-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.775rem;
  color: rgba(255, 255, 255, 0.7);
  flex-wrap: wrap;
}

.bookmark-card__dot {
    font-size: 0.5rem;
}

.bookmark-card__dot:last-of-type {
    margin-right: 4px;
}

.bookmark-card__status {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto; /* Push status to the right */
}



/* Grid layout */
#bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
}

@media (max-width: 768px) {
    #bookmarks-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
        padding: 15px;
    }
}

.bookmark-card__hover-info {
  border-radius: 8px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%; /* Change from 90% to 100% */
  height: 0;
  background: rgba(0, 0, 0, 0.95);
  padding-left: 12px;
  padding-right: 12px;
  transition: height 0.3s ease;
  overflow: hidden;
  z-index: 1;
  box-sizing: border-box; /* Add this */
  
}

@media (min-width: 768px) {
  .bookmark-card:hover .bookmark-card__hover-info {
    height: 100%;
    overflow: hidden;
  }
}

.bookmark-card__description {
  border-radius: 8px;
  font-size: 0.7rem;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bookmark-card__info-item {
  font-size: 0.7rem;
  color: #ccc;
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.bookmark-card__info-item strong {
  color: white; /* Make labels more visible */
  min-width: fit-content; /* Prevent label from wrapping */
}

/* Optional: if you want all values to align */
.bookmark-card__info-item span:last-child {
  color: rgb(168, 168, 168); /* Differentiate the value color */
}


.bookmark-card__plus-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.85);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: background 0.2s ease;
}

.bookmark-card__plus-btn:hover {
    background: rgba(0, 0, 0, 0.95);
}

.bookmark-card__status-dropdown {
  position: absolute;
  top: 40px;
  right: 8px;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 8px;
  min-width: 120px;
  z-index: 5;
  display: none;
  transform-origin: top right;
}

.bookmark-card__status-dropdown.show {
    display: block;
}

.bookmark-card__status-option {
    padding: 8px 16px;
    color: #fff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bookmark-card__status-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.bookmark-card__status-option-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.bookmark-card__info-btn {
    position: absolute;
    top: 8px;
    right: 44px; /* Position next to plus button */
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.85);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    font-style: italic;
    font-family: serif;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: background 0.2s ease;
}

.bookmark-card__info-btn:hover {
    background: rgba(0, 0, 0, 0.95);
}

/* Show info button on mobile */
@media (max-width: 768px) {
    .bookmark-card__info-btn {
        display: flex;
    }
    
    .bookmark-card__hover-info {
        height: 0;
        transition: height 0.3s ease;
    }
    
    .bookmark-card__hover-info.show {
      height: 100%;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important; /* for smooth scrolling on iOS */
      padding-bottom: 40px; /* Add extra padding at bottom for better scroll experience */
  }
  
  /* Make scrollbar less intrusive on mobile */
  .bookmark-card__hover-info::-webkit-scrollbar {
      width: 4px;
  }
  
  .bookmark-card__hover-info::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
  }
}

@media (max-width: 768px) {
  .bookmark-card__badges {
      display: flex;
      flex-direction: column;
      gap: 4px;
      align-items: flex-start;
  }
  
  .badge {
      margin-bottom: 2px; /* Add some spacing between stacked badges */
  }

}

@media (max-width: 768px) {
  /* Existing code remains */
  .bookmark-card__badges {
      display: flex;
      flex-direction: column;
      gap: 4px;
      align-items: flex-start;
  }
  
  .badge {
      margin-bottom: 2px; /* Add some spacing between stacked badges */
  }
  
  /* New code for mobile optimization */
  .bookmark-card__title {
    font-size: 0.8rem; /* Smaller title font */
    margin-bottom: 4px; /* Less bottom margin */
    -webkit-line-clamp: 1; /* Limit to 1 line on mobile */
    height: 1.3em; /* Adjust height for single line on mobile */
    min-height: 1.3em; /* Ensure minimum height on mobile */
}
  
  .bookmark-card__meta {
      font-size: 0.7rem; /* Smaller metadata text */
      gap: 4px; /* Less gap between items */
  }
  
  .bookmark-card__content {
      padding: 8px; /* Smaller padding for content container */
  }
  
  .bookmark-card__plus-btn, 
  .bookmark-card__info-btn {
      width: 20px; /* Smaller button size */
      height: 20px; /* Smaller button size */
  }
  
  .bookmark-card__info-btn {
      right: 36px; /* Adjust position relative to plus button */
  }
  
  /* Adjust hover info for better mobile experience */
  .bookmark-card__description {
      font-size: 0.75rem;
      line-height: 1.3;
  }
  
  .bookmark-card__info-item {
      font-size: 0.7rem;
      margin-bottom: 0.3rem;
  }
}

/* Even smaller screens */
@media (max-width: 480px) {
  .bookmark-card__title {
    font-size: 0.75rem;
    height: 1.3em; /* Maintain consistent height */
    min-height: 1.3em;
}
  
  .bookmark-card__meta {
      font-size: 0.65rem;
      gap: 3px;
  }
  
  .bookmark-card__content {
      padding: 6px;
  }
  
  .badge {
      font-size: 0.65rem;
      padding: 1px 4px;
  }
}

/* bookmark done */

.fullscreen-swiper-container .slide-content h2,
.fullscreen-swiper-container .slide-content p,
.fullscreen-swiper-container .genre-tags,
.fullscreen-swiper-container .detail-item{
  pointer-events: none;
}

.fullscreen-swiper .swiper-slide::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(
    to top,
    var(--blend-color) 0%,
    rgba(18, 18, 18, 0.9) 20%,
    rgba(18, 18, 18, 0.6) 40%,
    rgba(18, 18, 18, 0.2) 70%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none; /* Ensure it doesn't block interactions */
}

.continue-empty-message {
  text-align: center;
  font-size: 1rem;
  padding: 2rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.continue-empty-message svg {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

.continue-empty-message p {
  margin: 0;
  opacity: 0.7;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .continue-empty-message {
      font-size: 0.9rem;
      padding: 1.5rem;
  }
  
  .continue-empty-message svg {
      width: 36px;
      height: 36px;
  }
}

/* add to buttons */
.update-card {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 40px;
  right: 10px;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 180px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transform: translateY(-5px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.dropdown-menu.active {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.dropdown-item {
  width: 80%;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  border-radius: 8px;
}

.dropdown-item:before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
    padding-left: 16px;
}

.dropdown-item:hover:before {
  opacity: 1;
}

@media (max-width: 768px) {
  .dropdown-menu {
    min-width: 160px;
    padding: 4px 0;
  }

  .dropdown-item {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}



.plus-button {
  position: absolute;
  top: 8px;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background-color 0.2s;
}

.plus-button:hover {
  background: rgba(0, 0, 0, 0.9);
}

@media (min-width: 1225px) {
  .plus-button {
    right: 10px; /* Position on far right for desktop */
  }
}

/* Mobile styles (below 1224px) */
@media (max-width: 1224px) {
  .plus-button {
    right: 40px; /* Keep original position on mobile */
  }
}


/* TOP RATED SECTION AND LATEST UPDATE */

.page-container {
  width: 2560px; /* Choose your preferred width */
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

.categories-container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 2rem;
  padding: 2rem;
  background-color: var(--bg-primary);
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.latest-updates {
  position: relative;
  border-radius: 10px;
  padding-bottom: 1.5rem;
  padding-right: 1.5rem;
  /* height: 55rem; */
  overflow: hidden;
}

.updates-swiper .swiper-wrapper {
  display: flex;
  align-items: stretch; /* Ensure equal height */
  padding: 10px 0; /* Add padding to accommodate hover animation */
}

@media screen and (max-width: 768px) {

  
  .update-card {
      width: 160px;
      height: 240px;
  }

  .update-card img {
      height: 180px;
  }
}

@media screen and (max-width: 480px) {
  .updates-swiper .swiper-wrapper {
    height: 70% !important;
  }
  .swiper-grid-column > .swiper-wrapper {
      row-gap: 8px !important;
  }
  
  .update-card {
      width: 140px;
      height: 200px;
  }

  .update-card img {
      height: 150px;
  }
}

.info-button:hover {
  opacity: 1;
}



.update-info {
  padding: 0.5rem; /* Reduced from 0.5rem */
  text-align: center;
}

.update-info h3 {
  margin: 0.25rem 0; /* Reduced from 0.5rem */
  font-size: 0.9rem; /* Reduced from 1rem */
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-boxes {
  display: flex;
  gap: 3px; /* Reduced from 5px */
}

.continue-swiper {
  width: 100%;
  height: 0; /* Add this */
  opacity: 0; /* Add this */
  transition: height 0.3s ease, opacity 0.3s ease; /* Add this */
  visibility: hidden; /* Add this */
}

.continue-cards.expanded .continue-swiper {
  height: auto; /* Add this */
  opacity: 1; /* Add this */
  visibility: visible; /* Add this */
}

.continue-swiper .swiper-wrapper {
  width: 100%;
  visibility: hidden; /* Add this */
  opacity: 0; /* Add this */
  transition: visibility 0.3s ease, opacity 0.3s ease; /* Add this */
}

.continue-swiper .swiper-wrapper.empty {
  justify-content: center;
  visibility: visible;
  opacity: 1;
}

.continue-cards.expanded .swiper-wrapper {
  visibility: visible; /* Add this */
  opacity: 1; /* Add this */
}

.continue-swiper .swiper-slide {
  width: auto;
  height: auto;
}

.continue-swiper .swiper-button-next,
.continue-swiper .swiper-button-prev {
  width: 35px;
  height: 35px;
  background: var(--bg-secondary);
  border-radius: 50%;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.continue-swiper .swiper-button-next:hover,
.continue-swiper .swiper-button-prev:hover {
  background: rgba(255, 255, 255, 0.2);
}

.continue-swiper .swiper-button-next::after,
.continue-swiper .swiper-button-prev::after {
  font-size: 1.2rem;
  font-weight: bold;
}

.continue-cards {
  position: relative;
  padding: 10px 0; /* Reduced padding to match updates-swiper */
}



.info-box {
  padding: 2px 6px; /* Reduced from 4px 8px */
  border-radius: 4px;
  font-size: 0.7rem; /* Reduced from 0.8rem */
  background: var(--accent-color);
  color: var(--text-primary);
}


.info-box:nth-child(1) {
  background: rgba(255, 140, 0, 0.2);
  border: 1px solid rgba(255, 140, 0, 0.8);
}

/* DUB styling */
.info-box:nth-child(2) {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.8);
}

/* Year styling - keep original */
.info-box:nth-child(3) {
  background: rgba(255, 255, 255, 0.1);
}

.updates-swiper {
  position: relative;
  width: 100%;
  padding: 10px 0;
  overflow: visible; /* Allow hover effects to show */
}

/* Replace the existing swiper button styles with these */

.updates-swiper {
  position: relative;
  width: 100%;
  height: auto !important;
  /* padding: 50px 5px 50px; /* Added right padding to accommodate buttons */ 
  overflow: hidden;
}

.updates-swiper .swiper-button-next,
.updates-swiper .swiper-button-prev {
  width: 35px;
  height: 35px;
  background: var(--bg-secondary);
  border-radius: 50%;
  color: var(--text-primary);
  transition: all 0.3s ease;
  right: 10px !important; /* Force both buttons to right side */
  left: auto !important; /* Remove left positioning */
}

.updates-swiper .swiper-button-next:hover,
.updates-swiper .swiper-button-prev:hover {
  background: rgba(255, 255, 255, 0.2);
}

.updates-swiper .swiper-button-next::after,
.updates-swiper .swiper-button-prev::after {
  font-size: 1.2rem;
  font-weight: bold;
}

/* Position adjustments for vertical layout */
.updates-swiper .swiper-button-prev {
  top: calc(50% - 45px) !important; /* Position above center */
}

.updates-swiper .swiper-button-next {
  top: calc(50% + 10px) !important; /* Position below center */
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .updates-swiper {
      padding-right: 5px; /* Reset padding on mobile */
  }
  
  .updates-swiper .swiper-button-next,
  .updates-swiper .swiper-button-prev {
      display: none !important; /* Hide buttons on mobile */
  }
}


/* Mobile styles */
@media screen and (max-width: 480px) {

  .updates-swiper .swiper-slide {
    justify-self: center; /* Center each slide */
  }
}

/* Even smaller screens */
@media screen and (max-width: 360px) {

  .update-card {
    height: 140px !important;
  }

  .update-card img {
    height: 80px !important;
  }
}

.updatesheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.updatesheader .swiper-navigation .swiper-button-prev,
.updatesheader .swiper-navigation .swiper-button-next {
    position: relative;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
}

.updatesheader .swiper-navigation .swiper-button-prev:hover,
.updatesheader .swiper-navigation .swiper-button-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.updatesheader .swiper-navigation {
    display: flex;
    gap: 100px;
}

.update-card {
  width: 200px !important; /* Reduced from 230px */
  height: 320px !important; /* Reduced from 360px */
}

.update-card img {
  height: 255px !important; /* Reduced from 280px */
}

.update-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer; /* Show pointer on hover */
}

.update-card:hover {
  transform: translateY(-5px);
}

.update-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.info-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  z-index: 2;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  display: flex;           /* Add these flex properties */
  align-items: center;     /* to center the content */
  justify-content: center; /* in both directions */
  padding: 0;             /* Remove any default padding */
  line-height: 1;         /* Reset line height */
  transform: translate(0, 0); /* Force GPU rendering */
  -webkit-transform: translate3d(0, 0, 0); /* iOS specific */
}

/* Add specific iOS/Safari fixes */
@supports (-webkit-touch-callout: none) {
  .info-button {
      transform: translate3d(0, 0, 0);
      backface-visibility: hidden;
  }
}

.info-button:hover {
opacity: 1;
}

.expanded-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70%;
  background: var(--bg-secondary);
  border-radius: 8px;
  z-index: 10;
  transform-origin: bottom;
  opacity: 0;
  visibility: hidden;
  display: block; /* Change from 'none' to 'block' */
  transition: all 0.3s ease;
  transform: translateY(10px);
}

.expanded-content {
  padding: 15px;
  height: 100%;
  overflow-y: auto;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none; 
}

.expanded-info.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@keyframes slideUp {
  from {
    transform: translateY(calc(30% - 60px)); /* Height of info box */
    opacity: 0;
  }
  to {
      transform: translateY(0);
      opacity: 1;
  }
}

.expanded-content .info-boxes {
  margin-bottom: 15px;
}



.expanded-content::-webkit-scrollbar {
  display: none;
}


.expanded-info h2 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.3;
  max-height: 3.1em; /* Fallback for non-webkit browsers: ~ 2 lines + margin */
}

.expanded-info .synopsis {
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-size: 0.75rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;  /* Limit to 6 lines */
  line-clamp: 5;
  overflow: hidden;
  line-height: 1.5;
}

.expanded-info .additional-info {
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.8;
  padding-bottom: 1rem;
}

.expanded-info .close-button {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}


.update-card:hover {
  transform: translateY(-5px);
}

.side-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 2;
  color: var(--text-primary) !important;
}

.section-title:hover {
  color: var(--episode-container) !important;
  filter: brightness(1.2);
}

.side-navigation h2.section-title {
  color: var(--text-primary) !important;
}

.side-navigation h2.section-title:hover {
  color: var(--episode-container) !important;
  filter: brightness(1.2);
}

.section-title-side {
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 5px;
}

.section-title-side:hover {
  opacity: 1;
  color: var(--episode-container);
  filter: brightness(1.1);
}

.prev-title {
  margin-right: auto;
}

.next-title {
  margin-left: auto;
}

/* Hide arrows if you prefer to use only the text navigation */
.side-navigation .nav-arrow,
.prev-section,
.next-section,
button.nav-arrow {
  display: none !important;
}

.schedule.section {
  display: none;
}

.schedule.section.active {
  display: block;
  overflow: hidden;
}

.schedule-container .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.schedule-container .expand-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  color: var(--text-primary);
}

.schedule-container .expand-button svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.schedule-content {
  max-height: 500px !important; /* Set a max height for the content */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) transparent;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: auto; /* Allow natural height */
  align-items: center;
  -webkit-overflow-scrolling: touch;
}

.schedule-content::-webkit-scrollbar {
  width: 6px;
}

.schedule-content::-webkit-scrollbar-track {
  background: transparent;
}

.schedule-content::-webkit-scrollbar-thumb {
  background-color: var(--text-secondary);
  border-radius: 6px;
  opacity: 0.5;
}

/* Show scrollbar on hover */
.schedule-content:hover::-webkit-scrollbar-thumb {
  opacity: 1;
}

.schedule-content.collapsed {
  max-height: 0;
}

.schedule-container.expanded .expand-button svg {
  transform: rotate(180deg);
}

/* Side Content Container */
.side-content {
  position: relative;
  height: 100%;
  margin-right: 1rem;
  background: var(--bg-secondary);
  border-radius: 10px;
  min-height: 500px;
  max-height: 900px;
  padding: 0; /* Remove default padding */
}

/* Navigation Header */
.side-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  transition: none !important;
}

.nav-arrow {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Sections Container */
.sections-container {
  position: relative;
  height: calc(100% - 60px); /* Subtract navigation height */
  overflow: hidden;
}

.section {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.section.active {
  opacity: 1;
  visibility: visible;
}

/* Trending List Styles */
.trending-list {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: calc(100% - 60px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.trending-item {
  display: flex;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.6rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.trending-image-container {
  position: relative;
  width: 80px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trending-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
  transition: filter 0.3s ease;
  display: block;
}

.trending-item:hover .trending-image {
  filter: brightness(1);
}

.trending-number-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.trending-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.trending-title {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-height: 2.6em;
  margin-bottom: 0.25rem;
  width: 100%;
}

.trending-description {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
}

.trending-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Scrollbar Styling - Always Visible */
.trending-list::-webkit-scrollbar {
  width: 8px;
}

.trending-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.trending-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3); /* Made it more visible */
  border-radius: 4px;
  transition: background 0.3s ease;
}

/* Brighter scrollbar on hover */
.trending-list {
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) rgba(0, 0, 0, 0.2);
}

.trending-list:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5); /* Brighter on hover */
}

.trending-list:hover {
  scrollbar-color: var(--text-primary) rgba(0, 0, 0, 0.2);
}

/* Mobile Responsive Styles for Trending/Upcoming Cards */
@media (max-width: 768px) {
  .trending-list {
    gap: 0.5rem;
    padding: 0.4rem;
  }
  
  .trending-item {
    gap: 0.6rem;
    padding: 0.5rem;
    border-radius: 8px;
  }
  
  .trending-image-container {
    width: 70px;
    height: 45px;
    border-radius: 5px;
  }
  
  .trending-number-overlay {
    font-size: 1.1rem;
  }
  
  .trending-title {
    font-size: 0.8rem;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  
  .trending-description {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .trending-list {
    gap: 0.4rem;
    padding: 0.3rem;
  }
  
  .trending-item {
    gap: 0.5rem;
    padding: 0.4rem;
    border-radius: 6px;
  }
  
  .trending-image-container {
    width: 60px;
    height: 40px;
    border-radius: 4px;
  }
  
  .trending-number-overlay {
    font-size: 1rem;
  }
  
  .trending-title {
    font-size: 0.75rem;
    line-height: 1.2;
    max-height: 2.4em;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  
  .trending-description {
    font-size: 0.65rem;
  }
  
  .trending-item:hover {
    transform: translateY(-1px);
  }
}

/* NEW REDESIGNED SECTIONS */

/* Compact Trending Grid */
.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  padding: 0.5rem;
  height: calc(100% - 60px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) rgba(0, 0, 0, 0.2);
}

.premium-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.3s ease;
  cursor: pointer;
  height: 145px;
}

.premium-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.premium-card-image {
  width: 100%;
  height: 90px;
  object-fit: cover;
  transition: all 0.3s ease;
  filter: brightness(0.85);
}

.premium-card:hover .premium-card-image {
  filter: brightness(1);
}

.premium-card-content {
  padding: 0.6rem;
  position: relative;
}

.premium-card-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(45deg, #ff6b6b, #ee5a52);
  color: white;
  padding: 3px 7px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.7rem;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
  z-index: 3;
}

.premium-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
}

.premium-card-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.premium-card-episodes {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.premium-card-episodes svg {
  width: 11px;
  height: 11px;
}

/* New Schedule Design */
.schedule-modern-wrapper {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.schedule-controls {
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.schedule-date-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.date-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.current-date-display {
  text-align: center;
  min-width: 140px;
}

.date-day {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.date-full {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.schedule-quick-days-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-days-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.quick-days-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--accent-color, #4facfe);
}

.quick-days-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.quick-days-nav-btn:disabled:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.schedule-quick-days {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  scroll-behavior: smooth;
  padding: 0.25rem 0;
}

.schedule-quick-days::-webkit-scrollbar {
  display: none;
}

.quick-day-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.quick-day-btn.active {
  background: var(--accent-color, #4facfe);
  color: white;
  border-color: var(--accent-color, #4facfe);
}

.quick-day-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.schedule-episodes-container {
  padding-bottom: 2rem;
  height: auto;
  min-height: 200px;
  max-height: 50vh;
  overflow-y: auto;
  border-radius: 8px;
  flex: 1;
}

.schedule-episodes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.schedule-episode-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.schedule-episode-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.schedule-episode-time {
  background: var(--accent-color, #4facfe);
  color: white;
  padding: 0.4rem 0.7rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 65px;
  text-align: center;
}

.schedule-episode-info {
  flex: 1;
  min-width: 0;
}

.schedule-episode-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.schedule-episode-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.schedule-episode-number {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-weight: 500;
}

/* Text selection color fix */
.schedule-episode-title::selection,
.schedule-episode-details::selection,
.date-day::selection,
.date-full::selection,
.quick-day-btn::selection {
  background: var(--accent-color, #4facfe);
  color: white;
}

.schedule-episode-title::-moz-selection,
.schedule-episode-details::-moz-selection,
.date-day::-moz-selection,
.date-full::-moz-selection,
.quick-day-btn::-moz-selection {
  background: var(--accent-color, #4facfe);
  color: white;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .premium-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.6rem;
    padding: 0.4rem;
  }
  
  .premium-card {
    height: 125px;
    border-radius: 8px;
  }
  
  .premium-card-image {
    height: 75px;
  }
  
  .premium-card-content {
    padding: 0.45rem;
  }
  
  .premium-card-title {
    font-size: 0.75rem;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    margin-bottom: 0.25rem;
  }
  
  .premium-card-rank {
    padding: 2px 5px;
    font-size: 0.65rem;
    top: 5px;
    left: 5px;
  }
  
  .premium-card-meta {
    font-size: 0.7rem;
  }
  
  .schedule-controls {
    margin-bottom: 0.75rem;
  }
  
  .schedule-date-selector {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .schedule-quick-days-wrapper {
    gap: 0.3rem;
  }
  
  .quick-days-nav-btn {
    min-width: 28px;
    height: 28px;
    padding: 0.3rem;
  }
  
  .schedule-quick-days {
    gap: 0.4rem;
    padding: 0.25rem;
  }
  
  .quick-day-btn {
    min-width: 70px; /* Ensure minimum touch target size */
  }
  
  .quick-day-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .schedule-episodes-container {
    min-height: 150px;
    max-height: 40vh;
  }
  
  .schedule-episode-item {
    padding: 0.6rem;
    gap: 0.6rem;
  }
  
  .schedule-episode-time {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    min-width: 55px;
  }
  
  .schedule-episode-title {
    font-size: 0.85rem;
  }
  
  .schedule-episode-details {
    font-size: 0.75rem;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .premium-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.35rem;
  }
  
  .premium-card {
    height: 115px;
    border-radius: 6px;
  }
  
  .premium-card-image {
    height: 70px;
  }
  
  .premium-card-content {
    padding: 0.4rem;
  }
  
  .premium-card-title {
    font-size: 0.7rem;
    line-height: 1.2;
  }
  
  .premium-card-meta {
    font-size: 0.65rem;
    gap: 0.2rem;
  }
  
  .premium-card-rank {
    padding: 2px 4px;
    font-size: 0.6rem;
    border-radius: 8px;
  }
  
  .premium-card-episodes svg {
    width: 10px;
    height: 10px;
  }
}
  
  .schedule-date-selector {
    gap: 0.5rem;
    padding: 0.4rem;
  }
  
  .current-date-display {
    min-width: 120px;
  }
  
  .date-day {
    font-size: 1rem;
  }
  
  .date-full {
    font-size: 0.8rem;
  }
  
  .schedule-quick-days {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .schedule-episode-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .schedule-episode-time {
    align-self: flex-start;
  }


/* Performance optimizations - remove expensive effects */
* {
  will-change: auto;
}

.premium-card,
.schedule-episode-item,
.date-nav-btn,
.quick-day-btn {
  transform: translateZ(0); /* Force hardware acceleration */
}

/* Reduced motion for better performance */
@media (prefers-reduced-motion: reduce) {
  .premium-card,
  .schedule-episode-item,
  .date-nav-btn,
  .quick-day-btn {
    transition: none;
  }
}

/* Error message styling */
.error-message {
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar improvements for new sections */
.premium-grid::-webkit-scrollbar,
.schedule-grid::-webkit-scrollbar,
.upcoming-showcase::-webkit-scrollbar {
  width: 6px;
}

.premium-grid::-webkit-scrollbar-track,
.schedule-grid::-webkit-scrollbar-track,
.upcoming-showcase::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.premium-grid::-webkit-scrollbar-thumb,
.schedule-grid::-webkit-scrollbar-thumb,
.upcoming-showcase::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.premium-grid:hover::-webkit-scrollbar-thumb,
.schedule-grid:hover::-webkit-scrollbar-thumb,
.upcoming-showcase:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.6);
}



/* Continue Watching Section */
.continue-watching {
  overflow: hidden;
  background-color: var(--bg-primary);
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 2rem;
  box-sizing: border-box;
}

.section-header {
  padding: 2rem 0;
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  cursor: pointer; /* Add cursor pointer to indicate clickable */
  transition: all 0.3s ease;
}

.section-header h2 {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-header h2::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-primary);
  border-bottom: 2px solid var(--text-primary);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  display: inline-block;
  margin-left: 8px;
}

/* Rotate arrow when expanded */
.section-header.expanded h2::after {
  transform: rotate(-135deg);
}

.expand-button {
  display: none;
}

.expand-button svg {
  transition: transform 0.3s ease;
}

.expand-button.expanded svg {
  transform: rotate(180deg);
}

.continue-cards {
  margin-top: 1rem;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
  overflow: hidden;
}

.continue-cards > div {
  min-height: 0; /* Add this */
  overflow: hidden;
}

.continue-cards.expanded .cards-wrapper {
  opacity: 1; /* Show when expanded */
}

.continue-cards.expanded {
  grid-template-rows: 1fr;
}

.cards-wrapper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  padding: 0.5rem;
  margin: 0; /* Reset any margins */
    opacity: 0; /* Hide initially */
    transition: opacity 0.3s ease; /* Smooth fade in */
}

.expanded-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70%;
  background: var(--bg-secondary);
  border-radius: 8px;
  z-index: 10;
  transform-origin: bottom;
  opacity: 0;
  visibility: hidden;
  display: block; /* Change from 'none' to 'block' */
  transition: all 0.3s ease;
  transform: translateY(10px);
}

@media (min-width: 1224px) {
  .continue-card{
    margin: 1rem;
  }
}

.continue-card {
  height: 230px; /* Add fixed height */
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
  padding: 0.5rem;
}

/* Announcement Banner */
.announcement-banner {
  background-color: var(--bg-secondary);
  border-radius: 10px;
  padding: 0.75rem 2rem;
  margin: 1rem auto;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 85%;
  box-sizing: border-box;
}

.announcement-banner p {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.announcement-banner a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.announcement-banner a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .announcement-banner {
    padding: 0.5rem 1.5rem;
    margin: 0.5rem auto;
  }

  .announcement-banner p {
    font-size: 0.8rem;
  }
}

.continue-card:hover {
  transform: translateY(-5px);
}

.continue-card .card-image img {
  transition: translateY(5px);
}


.continue-cards {
  position: relative;
  padding: 0 40px;
  margin-top: 1rem;
}

.continue-swiper {
  width: 100%;
  height: 100%;
}

.continue-swiper .swiper-wrapper {
  width: 100%;
}

.continue-swiper .swiper-slide {
  width: auto;
  height: auto;
}

/* Continue watching hover effects */
.continue-card .card-image {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.continue-card .card-image img {
  transition: transform 0.3s ease;
}

/* Play button overlay */
.continue-card .card-image::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 40px;
  height: 40px;
  background: var(--bg-primary); /* This already adapts to theme */
  border-radius: 50%;
  z-index: 2;
  opacity: 0;
  transition: all 0.3s ease;
}

/* Play icon */
.continue-card .card-image::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px;
  z-index: 3;
  opacity: 0;
  transition: all 0.3s ease;
  filter: invert(var(--logo-invert)); /* Use existing logo-invert variable */
}

/* Dark overlay on hover */
.continue-card:hover .card-image::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.continue-card:hover .card-image::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Image zoom effect */
.continue-card:hover .card-image img {
  transform: scale(1.1);
}

/* Add subtle shadow on hover */
.continue-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.continue-card .card-info h3 {
  display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
}

.continue-card .card-info p {
  display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.2;
    max-height: 2.4em;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .continue-card .card-image::before {
      width: 30px;
      height: 30px;
  }

  .continue-card .card-image::after {
      font-size: 14px;
  }
}

@media screen and (max-width: 540px) {
  .continue-card .card-info h3 {
      font-size: 0.7rem !important;  /* Smaller title */
      margin-bottom: 0.2rem;
      overflow: hidden;
  }

  .continue-card .card-info p {
      font-size: 0.6rem !important;   /* Smaller description */
      opacity: 0.8;
      overflow: hidden;
  }
}

/* Even smaller screens */
@media screen and (max-width: 360px) {
  .continue-card .card-info h3 {
      font-size: 0.7rem !important;
  }

  .continue-card .card-info p {
      font-size: 0.6rem !important;
  }
}


.card-image {
  border-radius: 6px;
  position: relative;
  width: 100%;
  height: 150px;
  transition: all 0.3s ease;
}

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



.progress {
  height: 100%;
  background: var(--accent-color);
  position: relative;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Add shine effect */
.progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shine 1.5s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Hover effect */
.continue-card:hover .progress-bar {
  height: 10px; /* Slightly increase height on hover */
  background: rgba(255, 255, 255, 0.15); /* Lighter background on hover */
}

.continue-card:hover .progress {
  filter: brightness(1.2); /* Make progress brighter on hover */
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .progress-bar {
    height: 3px;
  }
  
  .continue-card:hover .progress-bar {
    height: 4px;
  }
}


.episode-progress {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.card-info {
  padding: 1rem;
}

.card-info h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1rem;
}

.card-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  body #searchButton {
      display: none;
  }
}

@media (min-width: 1225px) {
  .update-card .info-button,
    .update-card .close-button {
        display: none;
    }

    /* Base expanded info style */
    .update-card .expanded-info {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: var(--bg-secondary);
      border-radius: 8px;
      z-index: 10;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      transform: translateY(10px);
      /* Allow pointer events so clicks and scrolling work */
      pointer-events: auto;
      display: block;
    }

    /* Show on hover */
    .update-card:hover .expanded-info {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Make content scrollable */
    .expanded-content {
      height: 100%;
      overflow-y: hidden;
      padding: 15px;
      position: relative;
      z-index: 11;
      pointer-events: auto;
      /* Enable scrolling and clicking inside the content */
      -webkit-overflow-scrolling: touch; /* improves mobile scroll performance */
    }

    .expanded-info .synopsis {
      overflow: hidden;
    }
    .expanded-info .additional-info {
      overflow: hidden;
  }
}

@media (max-width: 768px) {
  .info-boxes {
    margin-top: -0.3rem;
    gap: 3px;
  }

  .info-box {
    padding: 2px 4px;
    font-size: 0.5rem;
}

.expanded-info .synopsis {
  font-size: 0.7rem;
  margin-bottom: 10px;
}

.expanded-info .additional-info {
  font-size: 0.6rem;
  margin-bottom: 40px;
}
}

@media (max-width: 480px) {
  .info-boxes {
    margin-top: -0.5rem;
    gap: 2px;
  }

  .info-box {
    padding: 1px 3px;
    font-size: 0.4rem;
}

.expanded-info .synopsis {
  font-size: 0.65rem;
  margin-bottom: 8px;
}
}


/* Large Screens (Tablets & Small Desktops) */
@media screen and (max-width: 1224px) {
  /* Layout */

  .expanded-content h2 {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-bottom: 0.2rem;
}


  .expanded-info .additional-info {
      font-size: 0.7rem;
  }

  .categories-container {
      grid-template-columns: 1fr;
      padding: 1rem;
      margin-bottom: 60px;
      width: 100vw;
      margin-left: auto;
      margin-right: auto;
      overflow-x: hidden;
  }

  /* Cards Grid */
  .cards-wrapper {
      grid-template-columns: repeat(3, 1fr);
  }

  /* Search Bar */
  .header-right .search-bar input {
      width: 130px !important;
      box-sizing: border-box !important;
  }

  .header-right .search-bar input:focus {
      width: 160px !important;
      box-sizing: border-box !important;
  }

  /* Side Content */
  .side-content {
      width: 100%;
      margin: 0 auto 1rem auto;
      box-sizing: border-box;
      padding-right: 0.6rem;
  }
}

@media screen and (max-width: 768px) {
  .update-card img {
    max-height: 260px !important; /* Reduced from 280px */
  }
}

@media screen and (max-width: 550px) {
  .update-card img {
    max-height: 210px !important; /* Reduced from 280px */
  }
}
/* Medium Screens (Tablets) */
@media screen and (max-width: 768px) {

  /* Latest Updates */
  .latest-updates {
      padding: 1rem;
      height: auto;
  }

  .updates-swiper {
      height: auto;
  }

  .swiper-grid-column > .swiper-wrapper {
      gap: 8px !important;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
  }

  .update-card {
      width: 100% !important; /* Remove fixed width */
      max-width: 220px !important; /* Add max-width instead */
      margin: 0 !important;
  }

  .update-card img {
      height: 200px;
  }

  /* Swiper Content */
  .slide-content {
      left: 0;
      padding: 1rem;
      max-width: 100%;
      width: 100%;
  }

  .slide-content h2 {
      font-size: 1.5rem;
      margin-bottom: 0.5rem;
  }

  .slide-content p {
      font-size: 0.9rem;
      margin-bottom: 1rem;
      -webkit-line-clamp: 5;
      line-clamp: 5;
  }

  /* Buttons */
  .watch-button {
      padding: 14px 28px;
      font-size: 1rem;
  }


  /* Continue Watching */
  .cards-wrapper {
    display: flex;
    flex-direction: column;  /* Change back to vertical layout */
    gap: 1rem;
}

.continue-card {
    width: 100%;  /* Full width on mobile */
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
}

.continue-card .card-image {
    width: 120px;  /* Fixed width for thumbnail */
    min-width: 120px;  /* Prevent shrinking */
    height: 180px;
}

.continue-card .card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.continue-card .card-info h3 {
    margin-bottom: 0.5rem;
}

.continue-card .card-info p {
    font-size: 0.9rem;
}

  /* Info Boxes */
  .info-box {
      margin-top: 0.6rem;
      padding: 3px 6px;
      font-size: 0.6rem;
  }
}

/* Small Screens (Phones) */
@media screen and (max-width: 540px) {
  /* Latest Updates Grid */
  .swiper-grid-column > .swiper-wrapper {
    gap: 8px !important;
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important; /* Changed to 2 columns */
}

.update-card {
  width: 97% !important;
  height: 280px !important;
  margin: 0 !important;
}


.update-card img {
    height: 200px;
}

/* Rest of your 540px styles remain the same */
.update-info h3 {
    font-size: 0.85rem;
}



.cards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0; /* Remove padding */
}

.continue-card {
  width: 100%;
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  height: 60px; /* Slightly increased height */
  box-sizing: border-box; /* Add this to include padding in width calculation */
  align-items: center; /* Add this to center vertically */
}

.continue-card .card-image {
  width: 85px;
  min-width: 85px;
  height: 40px; /* Match container height */
  border-radius: 8px;
  overflow: hidden;
  display: flex; /* Add this */
  align-items: center; /* Add this */
}

.continue-card .card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.25rem 0;
  margin-right: 0.5rem; /* Add right margin to prevent text overflow */
}

.continue-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This ensures image covers area without distortion */
}


  /* Buttons */
  .watch-button {
      padding: 12px 28px;
      font-size: 0.9rem;
  }

  /* Slide Content */
  .slide-content {
      padding: 1rem;
      max-width: 100%;
      bottom: 35%;
  }

  .slide-content h2 {
      font-size: 1.35rem;
      margin-bottom: 0.5rem;
  }

  .slide-content p {
      font-size: 0.85rem;
      -webkit-line-clamp: 5;
      line-clamp: 5;
  }
}

.scroll-top-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--accent-color);
  color: var(--text-primary);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.scroll-top-button.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.scroll-top-button svg {
  width: 24px;
  height: 24px;
}


/* ********************************** //
// This handles the quick search.    //
// *********************************/

.search-container {
  position: relative;
  width: 400px;
  margin: auto;
}

.search-results {
  margin-top: 8px;
  position: absolute;
  width: 100%;
  top: 100%;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
  transform: translateY(-8px) scale(0.96);
  transition: all 0.23s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar for search results */
.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1224px) {
  .search-results {
    right: 0;
  }
}

.search-result {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.23s ease-out forwards;
  position: relative;
  border-radius: 8px;
  margin: 2px 6px;
}

.search-results.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.search-result:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.search-result img {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.23s ease;
}

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

.search-result-info {
  flex: 1;
  overflow: hidden;
}

.search-result-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.6em;
}

.search-result-desc {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.view-more {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  text-align: center;
  padding: 14px 20px;
  margin: 8px;
  background: linear-gradient(135deg, var(--button-color) 0%, rgba(var(--button-color), 0.8) 100%);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-more:hover {
  background: linear-gradient(135deg, var(--accent-color) 0%, rgba(var(--accent-color), 0.9) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-result:nth-child(1) { animation-delay: 0.07s; }
.search-result:nth-child(2) { animation-delay: 0.14s; }
.search-result:nth-child(3) { animation-delay: 0.21s; }
.search-result:nth-child(4) { animation-delay: 0.28s; }
.search-result:nth-child(5) { animation-delay: 0.35s; }

@media (max-width: 1224px) {
  .search-results {
    right: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 1224px) {
  .search-results {
    max-height: 350px;
    border-radius: 8px;
  }

  .search-result {
    padding: 12px;
    margin: 2px 4px;
  }

  .search-result img {
    width: 45px;
    height: 65px;
  }
  
  .search-result-title {
    font-size: 0.95rem;
  }
  
  .search-result-desc {
    font-size: 0.75rem;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .view-more {
    font-size: 0.85rem;
    padding: 10px 16px;
    margin: 4px;
  }
}

.episode {
  padding-right: 1rem;
  padding-left: 0;
  padding-bottom: 0;
  padding-top: 0;
}

.episode-link {
  min-height: 100px; /* Slightly smaller for mobile */
}

.episode-image-container {
  height: 102px; /* Maintain aspect ratio but smaller size */
}

  .episode-content {
    padding: 8px;
  }


@media (max-width: 1224px) {

  .scroll-top-button {
    width: 35px !important;
    height: 35px !important;
    bottom: 90px !important;
    right: 15px !important;
  }

  .scroll-top-button svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* SCHEDULE */

/* Schedule Container Styles */
.schedule-container {
  border-radius: 12px;
  padding: 1rem;
  margin: 0 auto;
  box-sizing: border-box;
  width: 100%; /* Keep 100% width of parent */
  max-width: 100%; /* Don't exceed parent width */
  overflow: hidden;
}

.schedule-container h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-primary);
  font-weight: 600;
}

/* Tabs Container */
.tabs-wrapper {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: thin;
  max-width: 100%;
  margin: 0 10px;
}

.tabs-container {
  
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  width: 100%;
}

#leftArrow, #rightArrow {
  position: relative !important;
  top: auto !important;
  transform: none !important;
}

.tabs-container .arrow {
  position: relative;
  top: auto !important; 
  left: auto !important;
  right: auto !important;
  margin: 0 5px;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  z-index: 2;
}

.tab {
  font-size: 1rem; /* Base font size for the tab */
}

/* Target the date specifically - this assumes the date may be in a span or div */
.tab .date, 
.tab span, 
.tab div {
  font-size: 0.8rem; /* Smaller font for the date */
}

/* If the date is directly inside the tab without a wrapper */
.tab {
  font-size: 0.85rem; /* Adjust overall tab text size */
  padding: 8px 12px; /* Slightly increase padding for better appearance */
}

/* For responsive design, make font sizes even smaller on mobile */
@media (max-width: 768px) {
  .tab {
    font-size: 0.8rem;
  }
  
  .tab .date, 
  .tab span, 
  .tab div {
    font-size: 0.7rem;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .tab {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  
  .tab .date, 
  .tab span, 
  .tab div {
    font-size: 0.65rem;
  }
}

@media (max-width: 768px) {
  .tabs {
    padding: 0;
  }
  
  .tab {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 0 5px;
}

.tab {
  flex: 0 0 auto;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Arrow Buttons */
.arrow {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.arrow:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


/* Schedule Grid */
.schedule {
  display: flex; /* Change from grid to flex */
  flex-direction: column; /* Stack items vertically */
  width: 100%; /* Ensure it takes full width of container */
  max-width: 100%; /* Don't exceed container width */
  overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Schedule Items */
.schedule-item {
  display: flex;
  flex-direction: column;
  padding: 12px;

  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.schedule-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.schedule-item .title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.schedule-item .time {
  background: var(--accent-color-transparent);
  color: var(--accent-color);
  font-size: 0.8rem;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 500;
  flex-shrink: 0;
  margin-left: 8px;
}

.schedule-item .title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}

.schedule-item .episode {
  background: var(--episode-container);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  text-align: center;
  display: block;
  text-decoration: none;
  transition: all 0.2s ease;
}

.schedule-item .episode:hover {
  background: var(--accent-color);
  color: #fff;
  cursor: pointer;
  transform: translateY(-1px);
}

.schedule-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
}

.schedule-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.episode-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  vertical-align: -2px;
}

.episode-play-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Show More Button */
.show-more {
  margin-top: auto;
  position: relative;
  bottom: 0;
  width: 100%;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .schedule {
    padding-bottom: 5rem;
    margin: 0 0 2rem 0; /* Reasonable bottom margin, no left/right margin */
    width: 100%; /* Ensure full width */
  }
  

  
  .schedule-container {
    padding: 0.5rem; /* Small consistent padding */
  }
  
  .schedule-item {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}

.show-more:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .schedule {
      grid-template-columns: 1fr;
      gap: 1rem;
      align-items: center;
  }

  .schedule-item {
      padding: 1rem;
      margin: 0;
      width: 95%;

  }

  .schedule-item .title {
      font-size: 0.9rem;
  }

  .schedule-item .time {
      font-size: 0.8rem;
  }

  .schedule-item .episode {
      padding: 0.4rem 0.8rem;
      font-size: 0.8rem;
  }
}

@media (max-width: 480px) {


  .schedule-item {
      padding: 0.75rem;
  }
}



.tab span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  opacity: 0.8;
}

.tab.active {
  border-radius: 6px;
  background: var(--episode-container);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tab {
      min-width: 80px;
      padding: 0.6rem 1rem;
      font-size: 0.9rem;
  }
  
  .tab span {
      font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .tab {
      min-width: 70px;
      padding: 0.5rem 0.75rem;
      font-size: 0.8rem;
  }
  
  .tab span {
      font-size: 0.65rem;
  }
}


.episode-number-recent-uploads {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.episode-number-recent-uploads::before {
  content: 'EP';
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

/* Hover effect */
.update-card:hover .episode-number-recent-uploads {
  background: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .episode-number-recent-uploads {
      padding: 4px 10px;
      font-size: 0.8rem;
  }
}

@media screen and (max-width: 480px) {
  .episode-number-recent-uploads {
      padding: 3px 8px;
      font-size: 0.75rem;
  }
}

@media screen and (min-width: 1224px) and (max-width: 1600px) {
  .slide-content h2 {
      font-size: 1.8rem;
      margin-bottom: 0.5rem;
  }

  .slide-content p {
      font-size: 0.9rem;
      line-height: 1.4;
      margin-bottom: 1rem;
  }

  .watch-button, .read-more {
      font-size: 0.9rem;
      padding: 0.6rem 1.2rem;
  }

  .anime-details {
      gap: 1rem;
  }

  .detail-item {
      font-size: 0.8rem;
  }

  .detail-item .info-box {
      padding: 3px 6px;
      font-size: 0.75rem;
  }
}
