:root {
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --pink: #ec4899;
  --gold: #f59e0b;
  --orange: #f97316;
  --teal: #14b8a6;

  /* dark theme (default, matches reference image 2) */
  --bg: #0a0a14;
  --bg-alt: #0d0d18;
  --card-bg: #14141f;
  --text: #f5f5fa;
  --text-muted: #9c9cb5;
  --border: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(8, 8, 16, 0.55);
  --input-bg: #1a1a2a;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

body.light-mode {

  --bg: #ffffff;
  --bg-alt: #f8f7fc;
  --card-bg: #ffffff;
  --text: #17172b;
  --text-muted: #6b7280;
  --border: #eceaf3;
  --header-bg: rgba(255, 255, 255, 0.92);
  --input-bg: #f5f4fa;
  --shadow: 0 10px 30px rgba(60, 40, 120, .08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
.logo {
  font-family: 'Poppins', sans-serif;
}

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

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.logo span {
  color: var(--purple);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), #9333ea);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, .4);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--card-bg);
}

.btn-outline:hover {
  border-color: var(--purple);
}

.btn-sm {
  padding: .55rem 1.2rem;
  font-size: .85rem;
  border-radius: 7px;
}

.btn-outline-manga {
  border: 1px solid var(--orange);
  color: var(--orange);
  background: var(--card-bg);
}

.btn-outline-trailer {
  border: 1px solid var(--teal);
  color: var(--teal);
  background: var(--card-bg);
}

/* Header start huaa haii */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 2rem;
  gap: 1.5rem;
}

.main-nav {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s;
  font-size: .95rem;
}

.main-nav a:hover {
  color: var(--purple-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .55rem .9rem;
  width: 230px;
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  width: 100%;
  font-size: .85rem;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  color: var(--text-muted);
  display: flex;
}

/* pill toggle: sun + moon icons together */
.theme-toggle {
  position: relative;
  width: 64px;
  height: 32px;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  flex-shrink: 0;
}

.theme-toggle .icon-sun {
  color: var(--gold);
  z-index: 2;
}

.theme-toggle .icon-moon {
  color: var(--purple-light);
  z-index: 2;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  transition: left .25s ease;
  z-index: 1;
}

body.light-mode .toggle-thumb {
  left: 3px;
  background: var(--gold);
}

body:not(.light-mode) .toggle-thumb {
  left: 35px;
}

.mobile-search-btn,
.hamburger-btn {
  display: none;
}

.get-started-btn {
  flex-shrink: 0;
}

.mobile-search-panel {
  display: none;
  padding: 0 1.2rem 1rem;
}

.mobile-search-panel input {
  width: 100%;
  padding: .7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
}

.mobile-search-panel.open {
  display: block;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  padding: 5.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  transition: right .3s ease;
  z-index: 200;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.mobile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: .3rem 0;
}

.mobile-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 150;
}

.overlay.open {
  display: block;
}

/*Hero shuru huaa haii*/

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  transition: opacity .3s ease;
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.hero-bg-light {
  background-image: url('../images/light.png');
  opacity: 1;
}

.hero-bg-dark {
  background-image: url('../images/dark.png');
  opacity: 0;
}

body.light-mode .hero-bg-light {
  opacity: 1;
}

body.light-mode .hero-bg-dark {
  opacity: 0;
}

body:not(.light-mode) .hero-bg-light {
  opacity: 0;
}

body:not(.light-mode) .hero-bg-dark {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 32%, transparent 68%);
}

body.light-mode .hero-overlay {
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, .9) 32%, transparent 68%);
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
  width: 100%;
}

.hero-text {
  max-width: 640px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--card-bg);
  border: 1px solid var(--purple);
  color: var(--purple);
  padding: .5rem 1rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 1.3rem;
}

body:not(.light-mode) .badge {
  color: var(--purple-light);
  border-color: rgba(167, 139, 250, .4);
}

.hero-text h1 {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

.hero-text h1 span {
  background: linear-gradient(135deg, var(--purple), #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text>p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.play-triangle {
  font-size: .7rem;
}

.stat-boxes {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .8rem 1.2rem;
  box-shadow: var(--shadow);
}

.stat-icon {
  font-size: 1.3rem;
}

.stat-box strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text);
}

.stat-box span {
  font-size: .78rem;
  color: var(--text-muted);
}

.play-hero-video {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .6rem 1.2rem 0.6rem .6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: var(--shadow);
}

.play-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: #fff;
}

/*    SECTIONS (generic)    */
.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

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

.center-header {
  position: relative;
  justify-content: center;
}

.view-all-abs {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-35%);
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .7rem;
}

.deco {
  color: var(--purple-light);
  font-size: .85rem;
  letter-spacing: 1px;
  opacity: .6;
}

.icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: var(--input-bg);
}

.news-icon {
  color: var(--pink);
}

.manga-icon {
  color: var(--orange);
}

.trailer-icon {
  color: var(--teal);
}

/* ---------- Trending carousel ---------- */
.carousel-wrap {
  position: relative;
}

.card-row {
  display: flex;
  gap: 1.3rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: .5rem;
  scrollbar-width: none;
}

.card-row::-webkit-scrollbar {
  display: none;
}

.anime-card {
  position: relative;
  flex: 0 0 200px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .25s ease;
  box-shadow: var(--shadow);
}

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

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

.card-body {
  padding: .9rem;
}

.card-body h3 {
  font-size: 1rem;
  margin-bottom: .4rem;
}

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

.card-meta span:first-child {
  color: var(--gold);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.genre-tag {
  font-size: .72rem;
  background: var(--input-bg);
  padding: .25rem .6rem;
  border-radius: 6px;
  color: var(--text-muted);
}

.bookmark {
  color: var(--text-muted);
}

.heart-btn {
  position: absolute;
  top: .7rem;
  right: .7rem;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(20, 20, 30, .5);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light-mode .heart-btn {
  background: rgba(255, 255, 255, .85);
  color: #333;
  border-color: var(--border);
}

.tag {
  position: absolute;
  top: .7rem;
  left: .7rem;
  z-index: 2;
  font-size: .7rem;
  font-weight: 700;
  padding: .3rem .6rem;
  border-radius: 6px;
  color: #fff;
}

.trending-tag {
  background: #e91e63;
}

.breaking-tag {
  background: #e63946;
}

.official-tag {
  background: var(--purple);
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(124, 58, 237, .9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  opacity: 0;
  transition: opacity .2s;
}

.anime-card:hover .play-overlay,
.news-img:hover .play-overlay,
.trailer-main .play-overlay,
.trailer-thumb .play-overlay {
  opacity: 1;
}

.play-overlay.big {
  width: 64px;
  height: 64px;
  font-size: 1.3rem;
}

.play-overlay.small {
  width: 28px;
  height: 28px;
  font-size: .6rem;
  background: rgba(0, 0, 0, .55);
}

.carousel-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  color: var(--text);
}

.carousel-arrow.left {
  left: -19px;
}

.carousel-arrow.right {
  right: -19px;
}

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.news-img {
  position: relative;
}

.news-img img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.news-card h3 {
  font-size: .95rem;
  padding: .9rem .9rem .3rem;
  line-height: 1.35;
}

.news-meta {
  padding: 0 .9rem 1rem;
  color: var(--text-muted);
  font-size: .78rem;
}

/* ---------- Split section (manga + trailers) ---------- */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.manga-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.manga-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  padding-bottom: .6rem;
  box-shadow: var(--shadow);
}

.manga-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin-bottom: .5rem;
}

.manga-card h4 {
  font-size: .82rem;
  padding: 0 .6rem;
}

.manga-card p {
  font-size: .72rem;
  color: var(--text-muted);
  padding: 0 .6rem;
  margin: .2rem 0;
}

.manga-card .rating {
  font-size: .72rem;
  color: var(--gold);
  padding: 0 .6rem;
}

.trailer-flex {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.trailer-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  flex: 1.4;
  box-shadow: var(--shadow);
}

.trailer-main img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.trailer-main-info {
  padding: .9rem;
}

.trailer-main-info h4 {
  font-size: .9rem;
  margin-bottom: .4rem;
  line-height: 1.3;
}

.trailer-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: .75rem;
  flex-wrap: wrap;
}

.trailer-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.trailer-item {
  display: flex;
  gap: .7rem;
  align-items: center;
}

.trailer-thumb {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
}

.trailer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trailer-item h5 {
  font-size: .8rem;
  margin-bottom: .3rem;
  line-height: 1.3;
}

/*    FOOTER    */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3.5rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
  gap: 2rem;
}

.footer-col h5 {
  font-size: 1rem;
  margin-bottom: 1.1rem;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: .88rem;
  margin-bottom: .7rem;
  transition: color .2s;
}

.footer-col a:hover {
  color: var(--purple-light);
}

.about-col p {
  color: var(--text-muted);
  font-size: .88rem;
  margin: .9rem 0 1.2rem;
  line-height: 1.5;
}

.social-icons {
  display: flex;
  gap: .7rem;
}

.social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.newsletter-col p {
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: .9rem;
}

.newsletter-form {
  display: flex;
  gap: .6rem;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: .65rem .9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  font-size: .85rem;
}

.newsletter-form .btn {
  padding: .65rem 1.1rem;
  font-size: .85rem;
  flex-shrink: 0;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: .85rem;
}

.back-to-top {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}


/*    RESPONSIVE     */
@media (max-width:1100px) {
  .hero {
    min-height: 560px;
  }

  .hero-bg {
    background-position: 70% center;
  }

  .hero-overlay {
    background: linear-gradient(180deg, var(--bg) 0%, rgba(10, 10, 20, .4) 45%, var(--bg) 94%);
  }

  body.light-mode .hero-overlay {
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, .55) 45%, #ffffff 94%);
  }

  .hero-inner {
    padding: 2.5rem 1.5rem;
  }

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

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

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

@media (max-width:900px) {
  .split-section {
    grid-template-columns: 1fr;
  }

  .trailer-flex {
    flex-direction: column;
  }
}

@media (max-width:768px) {

  .main-nav,
  .search-box,
  .get-started-btn,
  .header-actions .theme-toggle {
    display: none;
  }

  .mobile-search-btn,
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-search-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
  }

  .hamburger-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    flex-direction: column;
    gap: 4px;
  }

  .hamburger-btn span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
  }

  .header-inner {
    padding: .8rem 1.2rem;
  }

  .hero {
    min-height: 480px;
  }

  .hero-bg {
    background-position: 80% center;
  }

  .hero-inner {
    padding: 2rem 1.2rem;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .stat-boxes {
    flex-direction: column;
  }

  .stat-box {
    width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .section {
    padding: 2.5rem 1.2rem;
  }

  .center-header {
    flex-direction: column;
  }

  .view-all-abs {
    position: static;
    transform: none;
  }

  .news-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1.2rem;
  }

  .anime-card {
    flex: 0 0 160px;
  }

  .anime-card img {
    height: 220px;
  }

  .carousel-arrow {
    display: none;
  }
}

@media (max-width:480px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-text h1 {
    font-size: 1.9rem;
  }

  .newsletter-form {
    flex-direction: column;
  }
}