:root {
  --primary-color: #ffa21b;
  --deep-blue-black: #0f1012;
  --dark-brown: #342D27;
  --text-color: #fff;
  --spacing: 20px;
  --mobile-bg: #3a312b;
  --mobile-new: orange;
  --active-green: #4caf50;
  --desktop-bg: #212121;
  --desktop-secondary: #342d27;
  --desktop-accent: #ffa21b;
  --desktop-accent-hover: #ffb44e;
  --font-family: 'Plus Jakarta Sans', sans-serif;
}
body {
  margin: 0;
  background: var(--deep-blue-black);
  font-family: var(--font-family);
  color: var(--text-color);
}
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-bottom: 30px;
}
.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.carousel-button:hover {
  background: rgba(0,0,0,0.8);
  transform: translateY(-50%) scale(1.1);
}
.carousel-button:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}
.prev { left: 20px; }
.next { right: 20px; }
.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 400%;
}
.carousel-slide {
  width: 25%;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}
.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}
.carousel-slide.fade-out {
  opacity: 0;
  transform: scale(0.8);
}
.hero-container {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 213px;
  width: 100%;
  align-items: center;
  padding: 13px 80px 0;
  height: 500px;
  max-height: 500px;
}
.slide-2,.slide-3,.slide-4 {
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 213px;
}
.slide-number {
  color: white;
  font-size: 24px;
  font-family: Plus Jakarta Sans, -apple-system, Roboto, Helvetica, sans-serif;
}
.hero-background {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 90%;
  object-fit: cover;
  object-position: center;
}
.content-wrapper {
  position: relative;
  display: flex;
  width: 100%;
  flex-direction: column;
  z-index: 1;
}
.icon-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.icon {
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  width: 50px;
}
.hero-title {
  color: rgba(255,255,255,1);
  text-shadow: 0 4px 4px rgba(0,0,0,0.25);
  align-self: start;
  margin-top: 100px;
  font: 700 40px Plus Jakarta Sans, -apple-system, Roboto, Helvetica, sans-serif;
}
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}
.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.indicator:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.indicator.active {
  background: white;
}

.backdrop-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 200000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.notice-container {
  width: fit-content;
  height: fit-content;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  background: var(--desktop-bg);
  border-radius: 20px;
  box-shadow: 0px 0px 30px;

    p {
      width: 80%;
    }

    .joinDiscord {      
    background: var(--desktop-accent);
    border-radius: 10px;
    margin-top: 20px;
    padding: 10px;
    width: 20%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    color: black;
    }

}

.close-notice {
    background: var(--desktop-accent);
    border-radius: 10px;
    margin-top: 20px;
    padding: 10px;
    width: 20%;
    cursor: pointer;
    border-style: none;
}

.mobilePopNav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 200000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);

  .mobile-nav-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;

    a {
    padding: 10px;
    border-radius: 15px;
    font-size: 20px;
    }
  }
}

@media (max-width:991px) {
  .hero-container {
    padding: 0 20px;
  }
  .hero-title {
    margin-top: 40px;
    font-size: 32px;
  }
  .carousel-button {
    width: 40px;
    height: 40px;
  }
  .prev {
    left: 10px;
  }
  .next {
    right: 10px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .carousel-track,.carousel-slide,.indicator,.carousel-button {
    transition: none;
  }
}
.trending-section {
  display: flex;
  align-items: center;
  padding: var(--spacing);
  margin-bottom: 30px;
}
.trending-badge {
  background: var(--primary-color);
  color: var(--text-color);
  padding: 10px 20px;
  border-radius: 25px;
  display: inline-flex;
  align-items: center;
  font-weight: bold;
}
.trending-badge svg {
  margin-right: 8px;
}
.popular-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: var(--spacing);
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 20px;
}
.popular-box {
  background: var(--dark-brown);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}
.popular-box:hover {
  transform: scale(1.03);
}
.popular-box img {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width:768px) {
    
    .hero-container {
      display: flex;
      flex-direction: column;
      position: relative;
      min-height: 213px;
      width: 100%;
      align-items: center;
      height: 100px;
      max-height: 500px;
    }
    
    .left {
      display: flex;
      align-items: center;
      flex-direction: column;
    }
    
    
    .series-info {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    
    .series-title {
      font-size: 20px;
      font-weight: bold;
      margin-top: 10px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      width: 90%;
      align-self: center;
    }

  .popular-grid {
    grid-template-columns: repeat(auto-fill,minmax(120px,1fr));
  }
  
  .popular-section .filter-buttons {
    display: flex;
    align-items: center;
    gap: 10px !important;
    justify-content: center;
    padding: 10px; /* add some horizontal padding */
  }
  
  .popular-section .filter-option {
    align-self: center;
    background: none;
    border: none;
    color: #fff;
    font: inherit;
    cursor: pointer;
    padding: 15px 15px !important;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
  }
  
  .popular-section .item-card {
    border-radius: 7px;
    background-color: var(--dark-brown);
    display: flex;
    align-items: center;
    gap: 10px !important;
    min-height: 100px;
    width: 90%;
    margin-top: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .popular-section .info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 65% !important;
  }
  
}
#latest-release-mobile {
  display: block;
}
#latest-release-desktop {
  display: none;
}

@media(min-width: 768px) {
    .series-container {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--mobile-bg);
      padding: var(--spacing);
      border-radius: 10px;
      margin: var(--spacing) auto;
      max-width: 800px;
      width: 85%;
    }
    
    .chapters {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      margin-right: -15px;
    }
}

.left {
  display: flex;
  align-items: center;
}
.thumbnail {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
  margin-right: 10px;
}
.series-info {
  display: flex;
  flex-direction: column;
}
.series-title {
  font-size: 1.1em;
  font-weight: bold;
}
.rating {
  margin-top: 5px;
  font-size: 0.9em;
}
.rating span {
  color: #aaa;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: color 0.2s;
  font-size: 1em;
}
.rating span.filled {
  color: gold;
}

.chapter {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  font-weight: bold;
  margin: 5px 0;
  padding: 5px 10px;
  border-radius: 5px;
}
.chapter.newest {
  background: var(--mobile-new);
  border-color: var(--mobile-new);
  color: #000;
}
.chapter.active-chapter {
  background: var(--active-green) !important;
  color: var(--text-color);
}
@media (min-width:1025px) {
  #latest-release-mobile {
    display: none;
  }
  #latest-release-desktop {
    display: block;
  }
  .latest-releases-container {
    background: var(--desktop-bg);
    display: flex;
    flex-direction: column;
    margin: 0 auto 30px;
    max-width: 1200px;
    padding: 12px 0 20px;
    border-radius: 20px;
  }
}
.section-title-desktop {
  color: #fff;
  align-self: start;
  font: 700 20px var(--font-family);
  margin: 0 0 10px 10px;
  display: none;
}
@media (min-width:1025px) {
  .section-title-desktop {
    display: block;
  }
}
.section-title-mobile {
  color: #fff;
  font: 700 20px var(--font-family);
  margin: 0 0 10px 10px;
  display: block;
}
@media (min-width:1025px) {
  .section-title-mobile {
    display: none;
  }
}
.desktop-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  padding: 0 10px;
}
.release-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 12px var(--font-family);
  background: var(--desktop-secondary);
  border-radius: 8px;
  padding: 10px;
  width: 200px;
}
.series-thumbnail {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}
.series-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.heart-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 24px;
  height: 24px;
  z-index: 2;
}
.heart-icon {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transition: opacity 0.2s;
}
.heart-icon.empty {
  opacity: 1;
}
.heart-icon.filled {
  opacity: 0;
}
.heart-button.active .heart-icon.empty {
  opacity: 0;
}
.heart-button.active .heart-icon.filled {
  opacity: 1;
}
.rating-container {
  padding: 5px 0;
}
.stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}
.star-input {
  display: none;
}
.star-label {
  cursor: pointer;
  width: 24px;
  height: 24px;
}
.star-label svg {
  width: 100%;
  height: 100%;
  fill: #666;
  transition: fill 0.2s;
}
.star-input:checked ~ .star-label svg {
  fill: #ffd700;
}
.star-label:hover svg,
.star-label:hover ~ .star-label svg {
  fill: #ffd700;
}
.active-chapter {
  background: var(--active-green) !important;
  color: var(--text-color);
}
.chapter-button {
  border: none;
  border-radius: 26px;
  background: var(--desktop-accent);
  color: #16151d;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.chapter-button:hover {
  background: var(--desktop-accent-hover);
  transform: translateY(-2px);
}
.chapter-link {
  border: none;
  border-radius: 6px;
  background: var(--desktop-secondary);
  color: var(--text-color);
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.chapter-link:hover {
  background: #463a31;
  transform: translateY(-1px);
}
.popular-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 20px;
    align-items: center;
}
.popular-section .content-wrapper {
    background-color: #212121;
    display: flex;
    flex-direction: column;
    width: 80%;
    align-items: center;
    border-radius: 20px;
    padding: 20px 30px;
}
.popular-section .section-title {
  color: #fff;
  align-self: center;
  font: 700 40px Plus Jakarta Sans, -apple-system, Roboto, Helvetica, sans-serif;
  margin-bottom: 15px;
}
.popular-section .filter-container {
  border-radius: 38px;
  background-color: var(--dark-brown);
  margin-top: 7px;
  max-width: 600px; /* keep tabs within container */
  width: 95%;
  display: flex;
  flex-direction: column;
  color: #fff;
  white-space: nowrap;
  font: 700 12px var(--font-family);
  margin-left: auto;
  margin-right: auto; /* center horizontally */
}
.popular-section .filter-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  padding: 10px; /* add some horizontal padding */
}
.popular-section .filter-option {
  align-self: center;
  background: none;
  border: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
  padding: 15px 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}
.popular-section .filter-option::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--primary-color);
  border-radius: 20px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.popular-section .filter-option:hover,
.popular-section .filter-option:focus {
    background: #0f1012;
    border-radius: 20px;
}
.popular-section .filter-option.active {
  color: #000;
}
.popular-section .filter-option.active::before {
  opacity: 1;
}
.popular-section .divider {
  width: 1px;
  height: 40px;
  border: 1px solid #fff;
}
.popular-section .items-container {
  display: flex;
  margin-top: 35px;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  padding: 8px 0;
  width: 100%;
  margin-bottom: 10px;
}
.popular-section .item-card {
  border-radius: 7px;
  background-color: var(--dark-brown);
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 100px;
  width: 90%;
  margin-top: 10px;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.popular-section .item-card:first-child {
  margin-top: 0;
}
.popular-section .item-card:hover {
  background-color: rgba(62,55,49,1);
  transform: scale(1.03);
}
.popular-section .thumbnail-box {
  width: 80px;
  height: 100px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.popular-section .thumbnail-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.popular-section .info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.popular-section .series-title {
  font-weight: bold;
  font-size: 1rem;
}
.popular-section .star-rating {
  display: flex;
  gap: 4px;
}
.popular-section .star-rating span {
  color: #aaa;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: color 0.2s;
}
.popular-section .star-rating span.filled {
  color: gold;
}

.ad-grid-container {
    width: 100%;
    display: grid;
    align-items: center;
    justify-items: center;
}
 
.ad-container {
    width: 80%;
    padding: 20px 30px;
    background-color: #212121;
    margin-bottom: 40px;
    border-radius: 20px;
}

.ad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.ad-space {
  width: 100%;
  height: 300px;
  background-color: #342D27;
  border-radius: 8px;
  overflow: hidden;
}

.ad-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-placeholder {
  color: #FFFFFF;
  font-family: Plus Jakarta Sans, -apple-system, Roboto, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.5;
}

.ad-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.ad-div {
    width: 80%;
    max-width: 1200px;
    margin: var(--spacing-lg) auto;
    min-height: clamp(120px, 25vw, 300px);
    background-color: transparent;
    border: 2px dashed rgba(52, 45, 39, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    margin-bottom: 40px;
}

#backToTopBtn {
  position: fixed;
  bottom: 200px;
  right: 0;
  background-color: #ff9800;
  color: white;
  border-radius: 20px 0 0 20px;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.arrow-up {
  font-size: 24px;
}

@media (max-width: 768px) {
  #backToTopBtn {
    bottom: 10px;
    padding: 8px 12px;
  }
  .arrow-up {
    font-size: 20px;
  }
  
  
  .series-container {
    background: var(--mobile-bg);
    padding: var(--spacing);
    border-radius: 10px;
    margin: var(--spacing) auto;
    max-width: 800px;
    width: 85%;
  }
  
  .chapters {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
    margin-top: 10px;
  }
}