/* ================= DESKTOP LAYOUT ENHANCEMENTS ================= */
/* Only applies to screens 769px and above - mobile remains unchanged */

/* ================= DESKTOP NAVBAR (hidden on mobile by default) ================= */
.desktop-nav,
.desktop-header-right {
  display: none;
}

@media (min-width: 769px) {

  header {
    padding: 12px 24px;
    gap: 24px;
  }

  /* Hide the mobile hamburger on desktop (!important beats the inline
     <style> block in <head>, which loads after this file and would
     otherwise re-show it) */
  .menu-btn {
    display: none !important;
  }

  /* Hide the mobile slide-out nav panel entirely on desktop */
  .nav-panel-overlay,
  .nav-panel {
    display: none !important;
  }

  /* ---- Nav links ---- */
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
  }

  .desktop-nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    opacity: 0.85;
    transition: 0.15s ease;
  }

  .desktop-nav-link:hover,
  .desktop-nav-link.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.14);
  }

  .desktop-nav-dropdown {
    position: relative;
  }

  .desktop-nav-dropdown-btn svg {
    transition: transform 0.15s ease;
  }

  .desktop-nav-dropdown.open .desktop-nav-dropdown-btn svg {
    transform: rotate(180deg);
  }

  .desktop-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 160px;
    background: #1B1724;
    border: 1px solid #2b2f40;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: 0.15s ease;
    z-index: 50;
  }

  .desktop-nav-dropdown.open .desktop-nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .desktop-nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    color: #e2e4ea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
  }

  .desktop-nav-dropdown-menu a:hover {
    background: #262a38;
    color: #fff;
  }

  /* ---- Right side: search + bookmark ---- */
  .desktop-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    position: relative;
  }

  .desktop-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 9px 12px;
    min-width: 220px;
    color: #fff;
  }

  .desktop-search svg {
    opacity: 0.8;
    flex-shrink: 0;
  }

  .desktop-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 14px;
  }

  .desktop-search input::placeholder {
    color: rgba(255, 255, 255, 0.65);
  }

  .desktop-search-kbd {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 3px 6px;
    font-family: inherit;
    flex-shrink: 0;
  }

  .desktop-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 52px;
    width: 320px;
    background: #1B1724;
    border: 1px solid #2b2f40;
    border-radius: 14px;
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    z-index: 60;
  }

  .desktop-search-results.active {
    display: block;
  }

  .desktop-bookmark-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: 0.15s ease;
    flex-shrink: 0;
  }

  .desktop-bookmark-btn:hover {
    background: rgba(0, 0, 0, 0.4);
  }

}
  
@media (min-width: 769px) {
  
  /* ================= HERO CAROUSEL - DESKTOP ================= */
  .hero-carousel {
    padding: 24px 0 32px;
    background: linear-gradient(135deg, rgba(144, 61, 224, 0.05) 0%, rgba(50, 227, 255, 0.05) 100%);
  }

  .hero-track {
    height: 400px;
  }

  .hero-slide {
    width: 280px;
    height: 380px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    border-radius: 20px;
  }

  .hero-slide[data-pos="center"] {
    transform: translateX(0) scale(1);
    opacity: 1;
    z-index: 5;
    filter: brightness(1);
  }

  .hero-slide[data-pos="left"] {
    transform: translateX(-220px) scale(0.85);
    opacity: 0.65;
    z-index: 3;
    filter: brightness(0.7);
  }

  .hero-slide[data-pos="right"] {
    transform: translateX(220px) scale(0.85);
    opacity: 0.65;
    z-index: 3;
    filter: brightness(0.7);
  }

  .hero-slide[data-pos="far-left"] {
    transform: translateX(-360px) scale(0.72);
    opacity: 0.35;
    z-index: 1;
    filter: brightness(0.45);
  }

  .hero-slide[data-pos="far-right"] {
    transform: translateX(360px) scale(0.72);
    opacity: 0.35;
    z-index: 1;
    filter: brightness(0.45);
  }

  .hero-slide[data-pos="hidden"] {
    transform: translateX(0) scale(0.6);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
  }

  .hero-slide .hero-title {
    font-size: 18px;
    font-weight: 900;
  }

  .hero-slide .hero-rating {
    font-size: 14px;
    padding: 6px 12px;
  }

  .hero-dots {
    gap: 8px;
    margin-top: 20px;
  }

  .hero-dot {
    width: 8px;
    height: 8px;
  }

  .hero-dot.active {
    width: 24px;
  }

  /* ================= TRENDING SECTION - DESKTOP GRID ================= */
  
  .section-title {
    font-size: 18px;
    font-weight: 800;
    margin: 28px 0 14px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .trending-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 0 16px 16px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: visible;
    box-sizing: border-box;
  }

  .trend-card {
    flex-shrink: 1;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 14px;
    overflow: hidden;
  }

  .trend-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  }

  .trend-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
  }

  .trend-info {
    padding: 10px 10px;
  }

  .trend-info .trend-title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
  }

  .trend-info .trend-chapter {
    font-size: 11px;
    margin-top: 4px;
  }

  /* ================= LATEST UPDATES - 2-COLUMN LIST (matches reference) ================= */

  .latest-chapters-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
  }

  .latest-chapters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    margin: 0;
    padding: 0;
  }

  .lc-row {
    display: flex;
    flex-direction: row;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: none;
  }

  .lc-row:hover {
    transform: none;
    box-shadow: none;
  }

  .lc-cover {
    width: 88px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .lc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .lc-body {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: block;
  }

  .lc-title {
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    min-height: 0;
  }

  .lc-title:hover {
    color: var(--accent);
  }

  .lc-chapter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: none;
  }

  .lc-chapter-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .lc-chapter-name {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 4px 10px;
  }

  .lc-chapter-time {
    color: var(--muted);
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .lc-chapter-row.is-new .lc-chapter-name {
    color: #fff;
    font-weight: 700;
  }

  /* ================= PAGINATION - DESKTOP ================= */
  
  .lc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding: 16px;
    border-top: none;
  }

  .lc-page-num,
  .lc-page-arrow {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
  }

  .lc-page-num.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .lc-page-num:hover:not(.active) {
    background: var(--border);
    transform: translateY(-2px);
  }

  /* ================= FOOTER - DESKTOP ================= */
  
  footer {
    margin-top: 40px;
    padding: 24px 16px;
    gap: 16px;
  }

  .footer-card {
    padding: 12px 20px;
    font-size: 14px;
  }

  .copyright {
    font-size: 13px;
  }

  /* ================= WRAPPER & GENERAL ================= */
  
  .wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
  }

}

@media (min-width: 1025px) {
  
  /* Large desktop optimizations */
  
  .trending-scroll {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .hero-slide {
    width: 320px;
    height: 420px;
  }

  .hero-slide[data-pos="left"] {
    transform: translateX(-260px) scale(0.87);
  }

  .hero-slide[data-pos="right"] {
    transform: translateX(260px) scale(0.87);
  }

  .hero-slide[data-pos="far-left"] {
    transform: translateX(-420px) scale(0.74);
  }

  .hero-slide[data-pos="far-right"] {
    transform: translateX(420px) scale(0.74);
  }

  .hero-slide[data-pos="hidden"] {
    opacity: 0.15;
    filter: brightness(0.3);
  }

  .section-title {
    padding: 0;
  }

}

@media (min-width: 1280px) {

  .hero-track {
    height: 440px;
  }

}

