/* AnimePahe Stream - dark theme, pink #f13870 accent, modelled on animepahe.one */
:root { --ap-pink: #f13870; --ap-bg: #0b0b10; --ap-panel: #15151d; --ap-panel2: #1d1d28; --ap-text: #f2f2f5; --ap-muted: #9a9aad; --ap-border: #262633; }
* { box-sizing: border-box; }
body.ap-body { margin: 0; background: var(--ap-bg); color: var(--ap-text); font-family: "Segoe UI", Arial, Helvetica, sans-serif; }
.ap-body h1, .ap-body h2, .ap-body h3, .ap-body h4, .ap-body h5, .ap-body h6 { color: #f2f2f5 !important; }
.ap-body a { color: var(--ap-text); text-decoration: none; }
.ap-body a:hover { color: var(--ap-pink); }

/* Header */
.ap-header { background: radial-gradient(600px 120px at 50% -40px, rgba(241,56,112,.35), transparent 70%), #101018; border-bottom: 1px solid var(--ap-border); position: sticky; top: 0; z-index: 50; }
.ap-header-in { max-width: 1560px; margin: 0 auto; display: flex; align-items: center; gap: 28px; padding: 12px 20px; }
.ap-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; white-space: nowrap; }
.ap-logo em { color: var(--ap-pink); font-style: normal; }
.ap-logo-icon { background: linear-gradient(135deg, #f13870, #b3123f); color: #fff; width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.ap-nav { display: flex; gap: 22px; margin: 0 auto; flex-wrap: wrap; }
.ap-nav a, .ap-drop { font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: .4px; cursor: pointer; position: relative; padding: 6px 0; }
.ap-drop-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--ap-panel2); border: 1px solid var(--ap-border); border-radius: 10px; padding: 10px; min-width: 200px; max-height: 60vh; overflow: auto; z-index: 60; }
.ap-drop:hover .ap-drop-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.ap-drop-menu a { text-transform: none; font-weight: 500; font-size: 13px; padding: 4px 6px; white-space: nowrap; }
.ap-header-actions { display: flex; gap: 8px; }
.ap-icon-btn { background: var(--ap-panel2); border: 1px solid var(--ap-border); border-radius: 50%; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }

/* Layout */
.ap-main { max-width: 1560px; margin: 0 auto; padding: 22px 20px 40px; min-height: 60vh; }
.ap-keywords { color: var(--ap-muted); font-size: 13px; margin: 0 0 8px; }
.ap-intro { color: #cfcfda; line-height: 1.6; max-width: 1100px; }
.ap-share { display: flex; gap: 10px; align-items: center; margin: 14px 0 6px; flex-wrap: wrap; }
.ap-share a { background: var(--ap-panel2); border: 1px solid var(--ap-border); padding: 5px 12px; border-radius: 999px; font-size: 13px; }
.ap-section-head { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 14px; }
.ap-section-head h2 { font-size: 30px; margin: 0; line-height: 1.3; }
.ap-subhead { font-size: 18px; margin: 20px 0 10px; }

/* Tabs */
.ap-tabs { display: flex; gap: 8px; }
.ap-tab { background: #434343; color: #eee; border: none; border-radius: 50px; padding: 10px 20px; font-size: 16px; font-weight: 400; line-height: 20px; cursor: pointer; }
.ap-tab.active { background: var(--ap-pink); color: #fff; }
.ap-head-tabs { flex-direction: column; align-items: flex-start; gap: 12px; }
.ap-dl-row { margin: 14px 0 6px; text-align: center; }
.ap-dl-cta { display: inline-block; background: var(--ap-pink); color: #fff; font-weight: 700; font-size: 16px; padding: 12px 26px; border-radius: 50px; }
.ap-body a.ap-dl-cta:hover, .ap-body a.ap-download-btn:hover { color: #fff; opacity: .92; }
.ap-hidden { display: none !important; }

/* Cards: 8 per row on desktop */
.ap-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 16px 12px; }
.ap-card { min-width: 0; }
.ap-card-poster { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--ap-panel); aspect-ratio: 2/3; }
.ap-card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.ap-no-poster { position: absolute; inset: 0; z-index: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; padding: 12px; text-align: center; background: linear-gradient(160deg, #262633, #15151d 55%, rgba(241,56,112,.28)); }
.ap-no-poster-icon { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--ap-pink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; padding-left: 3px; }
.ap-no-poster-title { color: #fff; font-weight: 700; font-size: 14px; line-height: 1.35; }
.ap-badge { position: absolute; top: 8px; right: 8px; z-index: 2; color: var(--ap-pink); background: rgba(10,10,16,.75); border-radius: 6px; padding: 2px 7px; font-size: 12px; font-weight: 800; }
.ap-play { position: absolute; inset: 0; z-index: 2; display: none; align-items: center; justify-content: center; font-size: 34px; color: #fff; background: rgba(0,0,0,.45); }
.ap-card-poster:hover .ap-play { display: flex; }
.ap-card-title { display: block; margin-top: 8px; font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ap-card-meta { display: flex; justify-content: space-between; color: var(--ap-muted); font-size: 12.5px; margin-top: 3px; }

/* Filter + pagination */
.ap-filter-btn { background: var(--ap-pink); color: #fff; border: 0; border-radius: 999px; padding: 8px 22px; font-weight: 700; cursor: pointer; }
.ap-filter { display: flex; gap: 14px; flex-wrap: wrap; background: var(--ap-panel); border: 1px solid var(--ap-border); border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.ap-filter label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ap-muted); }
.ap-filter select { background: var(--ap-panel2); color: var(--ap-text); border: 1px solid var(--ap-border); border-radius: 8px; padding: 7px 10px; }
.ap-apply { align-self: flex-end; background: var(--ap-pink); color: #fff; border: 0; border-radius: 8px; padding: 9px 20px; font-weight: 700; cursor: pointer; }
.ap-pagination { display: flex; gap: 7px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.ap-pagination a { background: var(--ap-panel2); border: 1px solid var(--ap-border); border-radius: 999px; padding: 7px 15px; font-weight: 600; }
.ap-pagination a.active { background: var(--ap-pink); border-color: var(--ap-pink); color: #fff; }

/* Detail + watch */
.ap-crumb { color: var(--ap-muted); font-size: 14px; margin-bottom: 14px; }
.ap-crumb a { color: var(--ap-muted); }
.ap-alert { background: #3a2f10; border: 1px solid #8a6d1f; color: #ffd968; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.ap-player { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.ap-player-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.ap-player-play { position: relative; background: var(--ap-pink); color: #fff; width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.ap-player-watch iframe { width: 100%; height: 100%; border: 0; }
.ap-player-note { position: relative; color: #fff; background: rgba(0,0,0,.6); padding: 8px 16px; border-radius: 8px; }
.ap-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 20px; }
.ap-action { background: var(--ap-panel2); border: 1px solid var(--ap-border); border-radius: 999px; padding: 7px 16px; font-size: 13.5px; }
.ap-share-links a { color: var(--ap-pink); margin-left: 4px; }
.ap-detail { display: flex; gap: 26px; }
.ap-detail-poster { width: 220px; flex: none; }
.ap-detail-poster-imgwrap { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 2/3; background: var(--ap-panel); }
.ap-detail-poster-imgwrap img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-under-poster { margin-top: 8px; font-size: 13.5px; color: var(--ap-muted); }
.ap-stars { color: #f5b301; letter-spacing: 2px; }
.ap-detail-info h2 { margin: 0 0 10px; font-size: 30px; }
.ap-pills { display: flex; gap: 8px; margin-bottom: 12px; }
.ap-pill { border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 700; }
.ap-pill-pink { background: var(--ap-pink); color: #fff; }
.ap-pill-dark { background: var(--ap-panel2); border: 1px solid var(--ap-border); }
.ap-synopsis { color: #cfcfda; line-height: 1.65; max-width: 900px; }
.ap-meta { margin: 14px 0; }
.ap-meta > div { display: flex; gap: 10px; padding: 4px 0; }
.ap-meta dt { width: 90px; color: var(--ap-muted); flex: none; }
.ap-meta dd { margin: 0; }
.ap-meta a { color: var(--ap-pink); }
.ap-watch-btn { display: inline-block; background: var(--ap-pink); color: #fff; border-radius: 999px; padding: 11px 28px; font-weight: 800; margin-top: 8px; }
.ap-episodes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ap-ep { background: var(--ap-panel2); border: 1px solid var(--ap-border); border-radius: 8px; padding: 7px 13px; font-size: 13.5px; }
.ap-ep.active { background: var(--ap-pink); color: #fff; border-color: var(--ap-pink); }
.ap-kw-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 6px; }
.ap-kw-pills span { border: 1px solid var(--ap-border); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--ap-muted); }
.ap-server-note { color: var(--ap-muted); margin: 14px 0 8px; }
.ap-servers { display: flex; gap: 8px; }
.ap-server { background: var(--ap-panel2); border: 1px solid var(--ap-border); border-radius: 999px; padding: 8px 20px; font-weight: 700; cursor: pointer; font: inherit; color: inherit; }
.ap-server.active { background: var(--ap-pink); color: #fff; border-color: var(--ap-pink); }
.ap-watch-title { font-size: 24px; margin: 18px 0 6px; }
.ap-back-detail { margin-top: 22px; }
.ap-back-detail a { color: var(--ap-pink); }

/* Search, chips, download */
.ap-search-form { display: flex; gap: 10px; max-width: 640px; }
.ap-search-form input { flex: 1; background: var(--ap-panel); border: 1px solid var(--ap-border); border-radius: 10px; color: var(--ap-text); padding: 12px 14px; font-size: 15px; }
.ap-search-form button { background: var(--ap-pink); color: #fff; border: 0; border-radius: 10px; padding: 12px 24px; font-weight: 700; cursor: pointer; }
.ap-result-note { color: var(--ap-muted); }
.ap-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.ap-chip { background: var(--ap-panel2); border: 1px solid var(--ap-border); border-radius: 999px; padding: 8px 16px; font-size: 14px; }
.ap-download-btns { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.ap-download-btn { background: var(--ap-pink); color: #fff; border-radius: 12px; padding: 14px 24px; font-weight: 800; }

/* Footer */
.ap-footer { border-top: 1px solid var(--ap-border); background: #0e0e14; margin-top: 30px; }
.ap-footer-in { max-width: 1560px; margin: 0 auto; padding: 30px 20px; display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 30px; align-items: start; }
.ap-footer-text p { color: var(--ap-muted); line-height: 1.6; margin: 0 0 10px; }
.ap-footer-text a { color: var(--ap-pink); }
.ap-disclaimer { border: 1px solid var(--ap-border); border-radius: 10px; padding: 12px 14px; color: var(--ap-muted); font-size: 13px; line-height: 1.55; }

/* Responsive */
@media (max-width: 1200px) { .ap-grid { grid-template-columns: repeat(6, 1fr); } }
.ap-burger { display: none; background: var(--ap-panel2); border: 1px solid var(--ap-border); border-radius: 10px; width: 38px; height: 38px; align-items: center; justify-content: center; font-size: 19px; color: var(--ap-text); cursor: pointer; }
.ap-mnav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 190; }
.ap-mnav-overlay.open { display: block; }
.ap-mnav { position: fixed; top: 0; right: 0; height: 100dvh; width: min(320px, 86vw); background: #101018; border-left: 1px solid var(--ap-border); z-index: 200; transform: translateX(105%); transition: transform .25s ease; overflow-y: auto; padding: 14px 18px 24px; }
.ap-mnav.open { transform: none; }
.ap-mnav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ap-mnav-head .ap-logo { font-size: 19px; }
.ap-mnav-close { background: var(--ap-panel2); border: 1px solid var(--ap-border); color: var(--ap-text); border-radius: 10px; width: 36px; height: 36px; font-size: 15px; cursor: pointer; }
.ap-mnav-links a { display: block; padding: 11px 2px; font-weight: 700; text-transform: uppercase; font-size: 15px; letter-spacing: .4px; border-bottom: 1px solid var(--ap-border); }
.ap-mnav-links a.ap-mnav-sub { font-weight: 500; text-transform: none; font-size: 14px; padding: 8px 2px; border-bottom: 0; }
.ap-mnav-label { color: var(--ap-pink); font-size: 12px; font-weight: 800; letter-spacing: 1.2px; margin: 16px 0 2px; }
@media (max-width: 900px) { .ap-grid { grid-template-columns: repeat(4, 1fr); } .ap-footer-in { grid-template-columns: 1fr; } .ap-detail { flex-direction: column; } .ap-nav { display: none; } .ap-burger { display: inline-flex; } .ap-header-in { gap: 12px; padding: 10px 14px; } .ap-logo { font-size: 19px; } }
@media (max-width: 560px) { .ap-grid { grid-template-columns: repeat(3, 1fr); } .ap-section-head h2 { font-size: 22px; } .ap-tab { padding: 7px 15px; font-size: 13px; } }
@media (max-width: 400px) { .ap-grid { grid-template-columns: repeat(2, 1fr); } }

/* AnimePahe additions: latest releases rows, schedule, episode nav */
.ap-logo-text { letter-spacing: .2px; }
.ap-more { color: var(--ap-pink); font-weight: 600; font-size: 14px; white-space: nowrap; }
.ap-head-search { display: flex; align-items: center; background: var(--ap-panel2); border: 1px solid var(--ap-border); border-radius: 999px; overflow: hidden; margin-left: auto; }
.ap-head-search input { background: transparent; border: 0; color: var(--ap-text); padding: 8px 14px; width: 170px; outline: none; font-size: 14px; }
.ap-head-search button { background: transparent; border: 0; color: var(--ap-muted); padding: 8px 12px; cursor: pointer; font-size: 14px; }
.ap-badge-score { left: auto; right: 6px; background: rgba(11,11,16,.85); color: #ffd257; }
.ap-releases { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
.ap-release { display: flex; gap: 14px; background: var(--ap-panel); border: 1px solid var(--ap-border); border-radius: 12px; padding: 10px; align-items: center; }
.ap-release-thumb { position: relative; width: 64px; height: 88px; flex: 0 0 64px; border-radius: 8px; overflow: hidden; background: var(--ap-panel2); display: block; }
.ap-release-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-release-thumb .ap-no-poster { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ap-pink); font-size: 20px; }
.ap-release-ep { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(241,56,112,.92); color: #fff; font-size: 11px; font-weight: 700; text-align: center; padding: 2px 0; z-index: 2; }
.ap-release-info { min-width: 0; }
.ap-release-title { font-weight: 700; font-size: 15px; line-height: 1.35; display: block; }
.ap-release-meta { display: flex; gap: 10px; align-items: center; color: var(--ap-muted); font-size: 12.5px; margin-top: 6px; flex-wrap: wrap; }
.ap-tag { background: var(--ap-panel2); border: 1px solid var(--ap-border); color: var(--ap-pink); border-radius: 6px; padding: 2px 8px; font-weight: 700; font-size: 11.5px; }
.ap-romaji { color: var(--ap-muted); margin: 2px 0 10px; font-size: 14px; }
.ap-schedule { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; margin-bottom: 8px; }
.ap-sched-row { display: flex; gap: 12px; align-items: center; background: var(--ap-panel); border: 1px solid var(--ap-border); border-radius: 10px; padding: 9px 12px; }
.ap-sched-row a { font-weight: 600; font-size: 14.5px; }
.ap-sched-time { color: var(--ap-pink); font-weight: 700; font-size: 13.5px; min-width: 44px; }
.ap-ep-nav { display: flex; gap: 12px; margin: 18px 0 4px; flex-wrap: wrap; }
.ap-ep-next { margin-left: auto; }
.ap-back-detail { margin-top: 16px; }
.ap-back-detail a { color: var(--ap-pink); font-weight: 600; }
.ap-share-end { margin-top: 26px; }
.ap-footer-brand .ap-logo { margin-bottom: 8px; }
@media (max-width: 900px) {
  .ap-releases, .ap-schedule { grid-template-columns: 1fr; }
  .ap-head-search { display: none; }
}

/* Homepage banner + bottom article */
.ap-banner { background: linear-gradient(90deg, rgba(241,56,112,.22), rgba(241,56,112,.08)); border: 1px solid var(--ap-pink); border-radius: 12px; padding: 13px 18px; margin: 0 0 18px; font-size: 15px; line-height: 1.55; }
.ap-banner strong { color: var(--ap-pink); }
.ap-article { max-width: 980px; margin: 44px auto 10px; line-height: 1.75; color: #cfcfda; font-size: 15.5px; }
.ap-article h2 { font-size: 25px; margin: 34px 0 12px; line-height: 1.3; }
.ap-article h2:first-child { margin-top: 0; }
.ap-article h3 { font-size: 18.5px; margin: 22px 0 8px; }
.ap-article p { margin: 0 0 14px; }
.ap-article ul { margin: 0 0 16px; padding-left: 22px; }
.ap-article li { margin-bottom: 9px; }
.ap-article a { color: var(--ap-pink); font-weight: 600; }
.ap-article strong { color: var(--ap-text); }
.ap-article-end { border-top: 1px solid var(--ap-border); padding-top: 16px; margin-top: 22px; }

/* App download button */
.ap-app-btn-wrap { margin: 16px 0 6px; }
.ap-app-btn { display: inline-block; background: linear-gradient(135deg, #f13870, #b3123f); color: #fff !important; font-weight: 800; font-size: 17px; padding: 13px 30px; border-radius: 999px; box-shadow: 0 6px 22px rgba(241,56,112,.4); }
.ap-app-btn:hover { color: #fff !important; filter: brightness(1.1); }
