/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --dark-bg: #0a0a0a;
  --card-bg: #1a1a1a;
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --accent-red: #ff3a3a;
  --accent-green: #d4ff59;
  --section-spacing: 3rem;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  width: auto;
  height: auto;
  display: block;
}

.container {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
}

section {
  margin-bottom: var(--section-spacing);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-green));
}

.view-all {
  color: var(--accent-green);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.3s;
}

.view-all:hover {
  opacity: 0.8;
}

/* Navbar */
.navbar {
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 40px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-red);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-red);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s;
}

.search-bar:focus-within {
  background-color: rgba(255, 255, 255, 0.2);
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.3rem 0.5rem;
  width: 180px;
}

.search-bar input:focus {
  outline: none;
}

.search-bar button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Banner */
.hero-banner {
  position: relative;
  height: 500px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: var(--section-spacing);
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.banner-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.banner-slide.active {
  opacity: 1;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
  z-index: 1;
}

.banner-info {
  position: relative;
  z-index: 2;
  color: white;
  padding: 20px;
  max-width: 600px;
}

.banner-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.banner-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.banner-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.banner-description {
  margin-bottom: 1.5rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-actions {
  display: flex;
  gap: 1rem;
}

.banner-btn {
  background-color: var(--accent-red);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s;
}

.banner-btn:hover {
  transform: scale(1.1);
}

.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 10;
}

.banner-nav-btn {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

.banner-nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s;
}

.banner-dot.active {
  background-color: var(--accent-red);
}

/* Card Carousel */
.card-carousel {
  position: relative;
}

.carousel-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  padding-bottom: 1rem;
}

.carousel-container::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.anime-card {
  width: 255px;
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s;
  flex-shrink: 0;
}

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

.card-image {
  height: 314px;
  background-color: #333;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  display: block;
}

.card-status {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--accent-green);
  color: #000;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.card-info {
  padding: 1rem;
}

.card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.card-genre {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-top: 0.5rem;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-green);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.carousel-btn {
  pointer-events: all;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 10;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

.carousel-btn.left {
  margin-left: -20px;
}

.carousel-btn.right {
  margin-right: -20px;
}

/* Schedule Section - Updated with Carousel */
.schedule-section {
  position: relative;
}

.schedule-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 1rem;
  transition: transform 0.3s ease;
}

.schedule-container::-webkit-scrollbar {
  display: none;
}

.schedule-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  width: 280px;
  max-width: 280px;
  flex-shrink: 0;
}

.schedule-header {
  padding: 1rem;
  background: var(--accent-red);
  color: white;
  font-weight: 600;
  text-align: center;
}

.schedule-animes {
  padding: 1rem;
}

.schedule-anime {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.schedule-anime:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.schedule-anime-img {
  width: 50px;
  height: 70px;
  background-color: #333;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.schedule-anime-img img {
  width: 100%;
  height: 100%;
}

.schedule-anime-info {
  flex-grow: 1;
  min-width: 0;
  max-width: 200px; /* Fixed max width to force wrapping */
}

.schedule-anime-title {
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 0.3rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.schedule-anime-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Schedule Carousel Navigation */
.schedule-nav {
  position: absolute;
  top: 60%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.schedule-nav-btn {
  pointer-events: all;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0.8;
}

.schedule-nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 1;
  transform: scale(1.1);
}

.schedule-nav-btn.left {
  margin-left: -20px;
}

.schedule-nav-btn.right {
  margin-right: -20px;
}

/* Responsive untuk Schedule */
@media (max-width: 768px) {
  .schedule-card {
    width: 250px;
    max-width: 250px;
  }
  
  .schedule-anime-info {
    max-width: 170px;
  }
  
  .schedule-nav-btn {
    width: 35px;
    height: 35px;
  }
  
  .schedule-nav-btn.left {
    margin-left: -17px;
  }
  
  .schedule-nav-btn.right {
    margin-right: -17px;
  }
}

@media (max-width: 576px) {
  .schedule-card {
    width: 220px;
    max-width: 220px;
  }
  
  .schedule-anime-info {
    max-width: 140px;
  }
  
  .schedule-container {
    gap: 1rem;
  }
  
  .schedule-anime-title {
    font-size: 0.85rem;
  }
}

/* Top Genres - Now using schedule structure */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.genre-day {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 1rem;
}

.genre-header {
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.genre-count {
  background-color: var(--accent-green);
  color: #000;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.genre-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--accent-red);
  display: flex;
  font-size: 32px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* Character Section */
.character-carousel .carousel-container {
  display: flex;
  gap: 2rem;
  padding-bottom: 1rem;
}

.character-card {
  width: 120px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.character-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #333;
  margin: 0 auto 0.5rem;
  overflow: hidden;
  border: 3px solid var(--accent-green);
}

.character-avatar img {
  width: 100%;
  height: 100%;
}

.character-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.character-anime {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.3rem;
  line-height: 1.3;
}

/* Upcoming Section */
.upcoming-card {
  display: flex;
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  min-width: 350px;
  /* Added minimum width for consistency */
  height: 180px;
  /* Fixed height for all cards */
}

.upcoming-image {
  width: 120px;
  /* Increased from 100px */
  height: 100%;
  /* Take full height of card */
  background-color: #333;
  flex-shrink: 0;
}

.upcoming-image img {
  width: 100%;
  height: 100%;
}

.upcoming-info {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.upcoming-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  /* Ensure space for 2 lines */
  line-height: 1.2;
}

.upcoming-date {
  display: inline-block;
  background-color: var(--accent-red);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.upcoming-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
  line-height: 1.4;
  padding-bottom: 0.3rem;
  margin-bottom: 0.3rem;
  position: relative;
}

.upcoming-description::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.2em;
  background: linear-gradient(to bottom, transparent, var(--card-bg));
  display: none;
}

/* Editor Picks Section */
.editor-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  position: relative;
}

.editor-image {
  width: 150px;
  height: 200px;
  background-color: #333;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.editor-image img {
  width: 100%;
  height: 100%;
  display: block;
}

.editor-content {
  flex-grow: 1;
}

.editor-action {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.editor-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.editor-description {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.editor-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.editor-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

/* Base Button Styles */
.editor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 0.5rem;
  border: none;
}

/* Primary Button */
.editor-btn-primary {
  background: var(--accent-green);
  color: #000;
}

.editor-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 255, 89, 0.3);
}

/* Icon Styles */
.editor-btn i {
  font-size: 0.9em;
}

/* Footer */
footer {
  background-color: #111;
  padding: 1rem 0;
  margin-top: var(--section-spacing);
}

.copyright {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .schedule-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .genre-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {
  .schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .genre-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .upcoming-card {
    min-width: 300px;
    height: 160px;
  }

  .upcoming-image {
    width: 100px;
  }

  .navbar-container {
    position: relative;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dark-bg);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-out;
  }

  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .nav-links li {
    padding: 0.8rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-menu-btn {
    display: block;
  }

  .search-bar {
    display: none;
  }

  .hero-banner {
    height: 400px;
  }

  .banner-title {
    font-size: 2rem;
  }

  .genre-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .editor-card {
    flex-direction: column;
    text-align: center;
  }

  .editor-meta {
    justify-content: center;
  }

  .editor-action {
    justify-content: center;
  }

  .editor-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .character-card {
    width: 100px;
  }

  .character-avatar {
    width: 80px;
    height: 80px;
  }

  .character-name {
    font-size: 0.8rem;
  }

  .character-anime {
    font-size: 0.7rem;
  }
}

@media (max-width: 576px) {
  .character-carousel .carousel-container {
    gap: 1rem;
  }

  .character-card {
    width: 90px;
  }

  .character-avatar {
    width: 70px;
    height: 70px;
  }

  .upcoming-card {
    min-width: 260px;
    height: 140px;
  }

  .upcoming-image {
    width: 90px;
  }

  .upcoming-title {
    font-size: 0.9rem;
  }

  .upcoming-description {
    -webkit-line-clamp: 2;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .genre-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .anime-card {
    min-width: calc(50% - 0.75rem);
  }

  .hero-banner {
    height: 350px;
  }

  .banner-title {
    font-size: 1.8rem;
  }

  .banner-meta {
    flex-wrap: wrap;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .editor-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .editor-btn {
    width: 100%;
  }
}
