/*
Theme Name: WitAnime
Author: Secu
Description: قالب عربي (RTL) لمواقع مشاهدة الأنمي: أنميات، حلقات، سيرفرات مشاهدة متعددة، روابط تحميل، فلاتر وتصنيفات، ولوحة تحكم كاملة لإدارة المحتوى.
Version: 1.2.2
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sakura
Tags: rtl-language-support, dark, custom-menu, custom-logo, featured-images
*/

/* ================= Tokens ================= */
:root {
	--ink: #100c2a;        /* page */
	--panel: #1a1541;      /* surfaces */
	--panel-2: #251e56;    /* raised */
	--line: #342b6e;
	--text: #f6f3ff;
	--muted: #b0a9dc;

	--pink: #ff3e80;
	--orange: #ff9a3c;
	--grad: linear-gradient(120deg, #ff3e80 0%, #ff6a5c 55%, #ff9a3c 100%);
	--on-accent: #2a0616;
	--sky: #3fd0ff;
	--live: #33e3a0;
	--glow: 0 8px 28px rgba(255, 62, 128, .38);

	--r-lg: 16px;
	--r-sm: 8px;
	--font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
	--font-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", Tahoma, sans-serif;
	--wrap: 1280px;
}

/* ================= Base ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.75;
	direction: rtl;
	text-align: right;
	background-color: var(--ink);
	background-image:
		radial-gradient(900px 520px at 100% -10%, rgba(255, 62, 128, .20), transparent 60%),
		radial-gradient(800px 500px at 0% 0%, rgba(63, 208, 255, .14), transparent 60%),
		radial-gradient(700px 600px at 50% 100%, rgba(140, 80, 255, .16), transparent 70%);
	background-attachment: fixed;
	min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--pink); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.icon { flex-shrink: 0; }
::selection { background: var(--pink); color: #fff; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 100; top: 8px; inset-inline-start: 8px;
	background: var(--grad); color: var(--on-accent); padding: 8px 16px; border-radius: var(--r-sm);
}
.empty { color: var(--muted); padding: 32px 0; }

/* ================= Buttons & chips ================= */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 22px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--grad); color: var(--on-accent);
	font-weight: 600; line-height: 1.4; white-space: nowrap;
	box-shadow: var(--glow);
	transition: transform .15s, box-shadow .15s;
}
.btn:hover { color: var(--on-accent); transform: translateY(-1px); box-shadow: 0 12px 34px rgba(255, 62, 128, .5); }
.btn--ghost { background: rgba(255, 255, 255, .08); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.btn--ghost:hover { color: var(--text); background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.btn--small { padding: 6px 14px; font-size: .88rem; box-shadow: none; }
.icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.icon-btn:hover { border-color: var(--sky); color: var(--sky); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
	font-size: .82rem; padding: 4px 13px; border-radius: 999px;
	background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
	transition: background .15s, border-color .15s;
}
.chip:hover { color: var(--text); border-color: var(--pink); background: rgba(255, 62, 128, .16); }

/* ================= Header ================= */
.notice-bar {
	background: var(--grad); color: var(--on-accent);
	text-align: center; font-weight: 600; font-size: .9rem; padding: 7px 20px;
}
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(16, 12, 42, .82);
	-webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; white-space: nowrap;
}
.logo:hover { color: var(--text); }
.logo img { height: 40px; width: auto; max-width: none; }
.logo__mark {
	display: grid; place-items: center; width: 36px; height: 36px;
	background: var(--grad); color: #fff; border-radius: 11px;
	transform: rotate(-8deg); box-shadow: var(--glow);
}

.nav { flex: 1; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; gap: 2px; }
.nav li { position: relative; }
.nav a { display: block; padding: 8px 14px; border-radius: var(--r-sm); color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav .current-menu-item > a, .nav .current-menu-ancestor > a { color: var(--text); background: rgba(255, 62, 128, .16); }
.nav .sub-menu {
	display: none; position: absolute; top: 100%; inset-inline-start: 0; min-width: 210px; padding: 6px;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm);
	box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
}
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: block; }

.search-form {
	display: flex; align-items: center;
	background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; overflow: hidden;
}
.search-form:focus-within { border-color: var(--sky); background: rgba(63, 208, 255, .08); }
.search-form input[type="search"] { background: none; border: 0; outline: none; padding: 8px 16px; width: 220px; }
.search-form input::placeholder { color: var(--muted); }
.search-form button { background: none; border: 0; padding: 0 14px; height: 40px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.search-form button:hover { color: var(--sky); }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; margin-inline-start: auto; }

/* ================= Page heads & breadcrumbs ================= */
.page-head { padding-block: 28px 20px; }
.page-head--tight { padding-block: 20px 12px; }
.page-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.45; margin: 6px 0 0; }
.page-desc { color: var(--muted); max-width: 75ch; }
.page-desc p { margin: 8px 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; opacity: .45; margin-inline-end: 8px; }
.crumbs a:hover { color: var(--sky); }

/* ================= Home intro & about ================= */
.intro { padding-top: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.intro__title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.5; margin: 0; }
.about { padding-bottom: 8px; }
.about__text { color: var(--muted); max-width: 80ch; margin-top: 14px; }
.about__text p { margin: 0 0 .8em; }

/* ================= Sections & grid ================= */
.section { padding-block: 32px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section__title {
	position: relative; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; line-height: 1.45; margin: 0;
	padding-inline-start: 16px;
}
.section__title::before {
	content: ""; position: absolute; inset-inline-start: 0; top: 12%; bottom: 12%; width: 5px; border-radius: 3px;
	background: var(--grad); box-shadow: 0 0 14px rgba(255, 62, 128, .6);
}
.section__title small { font-family: var(--font-body); font-weight: 500; font-size: .9rem; color: var(--muted); }
.section__more { color: var(--sky); font-weight: 600; font-size: .92rem; }
.section__more:hover { color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 24px 16px; }

/* ================= Cards ================= */
.card { min-width: 0; }
.card__media {
	position: relative; display: block; aspect-ratio: 300 / 430;
	border-radius: var(--r-lg); overflow: hidden; background: var(--panel);
	box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
	transition: box-shadow .25s, transform .25s;
}
.card__media:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--pink), 0 16px 36px rgba(255, 62, 128, .3); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card__media:hover img { transform: scale(1.06); }
.card__media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(16, 12, 42, .85), transparent 45%);
	pointer-events: none;
}
.card__body { padding-top: 10px; }
.card__title {
	font-size: .97rem; font-weight: 600; line-height: 1.5; margin: 0;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { margin: 3px 0 0; font-size: .82rem; color: var(--muted); }
.card__status {
	position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1;
	display: inline-flex; align-items: center; gap: 6px;
	font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
	background: rgba(16, 12, 42, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card__status--airing::before {
	content: ""; width: 7px; height: 7px; border-radius: 50%;
	background: var(--live); box-shadow: 0 0 8px var(--live);
}
.card__status--airing { color: var(--live); }
.card__status--upcoming { color: var(--sky); }

/* Signature element: the episode number tab */
.ep-tag {
	position: absolute; z-index: 1; inset-inline-end: 0; bottom: 16px;
	display: flex; flex-direction: column; align-items: center; min-width: 60px;
	padding: 5px 12px 7px; line-height: 1.05;
	background: var(--grad); color: var(--on-accent);
	border-start-start-radius: 14px; border-end-start-radius: 14px;
	box-shadow: var(--glow);
}
.ep-tag small { font-size: .66rem; font-weight: 600; }
.ep-tag b { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; }
.card__play {
	position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
	opacity: 0; transition: opacity .2s;
}
.card__play .icon {
	width: 56px; height: 56px; padding: 14px; border-radius: 50%;
	background: var(--grad); color: #fff; box-shadow: var(--glow);
}
.card__media:hover .card__play, .card__media:focus-visible .card__play { opacity: 1; }

/* ================= Hero slider ================= */
.hero { position: relative; margin-top: 24px; }
.hero__track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	border-radius: 24px; scrollbar-width: none;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06);
}
.hero__track::-webkit-scrollbar { display: none; }
.hero__slide {
	flex: 0 0 100%; scroll-snap-align: start; position: relative; overflow: hidden;
	min-height: 440px; display: flex; align-items: flex-end;
}
.hero__bg {
	position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); max-width: none;
	object-fit: cover; object-position: center 25%;
	filter: blur(3px) brightness(.55) saturate(1.35);
}
.hero__slide::after {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(to left, rgba(16, 12, 42, .96) 0%, rgba(16, 12, 42, .55) 55%, rgba(16, 12, 42, .1) 100%),
		linear-gradient(to top, rgba(255, 62, 128, .22), transparent 50%);
}
.hero__content { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 30px; padding: 40px; width: 100%; }
.hero__poster { flex: 0 0 190px; }
.hero__poster img { border-radius: var(--r-lg); box-shadow: 0 20px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .12); aspect-ratio: 300 / 430; object-fit: cover; }
.hero__text { max-width: 640px; }
.hero__title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.8rem); line-height: 1.3; margin: 12px 0 8px; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.hero__story {
	color: #e2ddfb; margin: 0 0 20px; max-width: 60ch;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__nav { position: absolute; bottom: 24px; inset-inline-end: 24px; z-index: 2; display: flex; gap: 8px; }
.hero__btn {
	display: grid; place-items: center; width: 42px; height: 42px; cursor: pointer;
	background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero__btn:hover { background: var(--grad); border-color: transparent; color: #fff; }

/* ================= Anime filters ================= */
.filters {
	display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
	background: rgba(26, 21, 65, .75); border: 1px solid var(--line); border-radius: var(--r-lg);
	padding: 16px; margin-bottom: 28px;
}
.filters__item { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); }
.filters select {
	min-width: 160px; padding: 8px 12px; color: var(--text);
	background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.filters select:focus { border-color: var(--sky); outline: none; }

/* ================= Pagination ================= */
.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.page-numbers {
	display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 12px;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 600;
}
.page-numbers:hover { border-color: var(--pink); color: var(--text); }
.page-numbers.current { background: var(--grad); border-color: transparent; color: var(--on-accent); box-shadow: var(--glow); }
.page-numbers.dots { background: none; border: 0; }

/* ================= Single anime ================= */
.anime-hero { position: relative; overflow: hidden; padding-block: 24px 40px; }
.anime-hero__bg {
	position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none;
	object-fit: cover; object-position: center 20%;
	filter: blur(30px) brightness(.45) saturate(1.6);
}
.anime-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--ink), rgba(16, 12, 42, .3) 70%); }
.anime-hero .wrap { position: relative; z-index: 1; }
.anime-head { display: grid; grid-template-columns: 250px 1fr; gap: 36px; margin-top: 20px; align-items: start; }
.anime-head__poster img { border-radius: var(--r-lg); width: 100%; aspect-ratio: 300 / 430; object-fit: cover; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .12); }
.anime-head__title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.35; margin: 0; }
.anime-head__alt { color: var(--muted); margin: 4px 0 14px; text-align: right; }
.story__title { font-size: 1rem; font-weight: 600; color: var(--sky); margin: 20px 0 0; }
.story { color: #e0dbf7; max-width: 72ch; margin-top: 6px; }
.story p { margin: 0 0 .8em; }
.anime-head__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.facts {
	list-style: none; padding: 0; margin: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px;
}
.facts li { background: rgba(26, 21, 65, .8); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; }
.facts span { display: block; font-size: .78rem; color: var(--muted); }
.facts b { font-weight: 600; }
.facts a { color: var(--sky); }

.ep-tools { display: flex; gap: 8px; }
.ep-tools input {
	width: 150px; padding: 8px 12px; background: var(--panel);
	border: 1px solid var(--line); border-radius: var(--r-sm); outline: none;
}
.ep-tools input:focus { border-color: var(--sky); }
.ep-list {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px;
}
.ep-list a {
	display: block; text-align: center; padding: 12px 8px; font-weight: 600;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm);
	transition: border-color .15s, background .15s;
}
.ep-list a:hover { border-color: var(--pink); color: var(--text); background: rgba(255, 62, 128, .14); }
.ep-list a:visited { color: var(--muted); }

/* ================= Watch page ================= */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding-bottom: 48px; align-items: start; }
.player {
	position: relative; aspect-ratio: 16 / 9; background: #07051a;
	border-radius: var(--r-lg); overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08), 0 0 80px rgba(255, 62, 128, .12);
}
.player--trailer { max-width: 860px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__empty { display: grid; place-items: center; height: 100%; color: var(--muted); padding: 20px; text-align: center; }

.servers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.servers__label { color: var(--muted); font-size: .9rem; margin-inline-end: 4px; }
.servers button {
	padding: 7px 18px; cursor: pointer; font-weight: 600;
	background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
}
.servers button:hover { border-color: var(--pink); }
.servers button[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: var(--on-accent); box-shadow: var(--glow); }

.ep-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.ep-about { margin-top: 32px; padding: 18px 20px; background: rgba(26, 21, 65, .6); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ep-about p { margin: 12px 0 0; color: #dcd7f5; }
.ep-about a { color: var(--sky); }
.ep-about bdi { white-space: nowrap; }
.ep-about__date { color: var(--muted); font-size: .88rem; }
.ep-about__story { color: var(--muted) !important; font-size: .95rem; }

.downloads { margin-top: 32px; }
.downloads__list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.downloads__list li {
	display: flex; align-items: center; gap: 12px; padding: 10px 14px;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.downloads__host { font-weight: 600; }
.downloads__q { font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: rgba(63, 208, 255, .12); color: var(--sky); }
.downloads__list .btn { margin-inline-start: auto; }

.watch__side { display: grid; gap: 16px; position: sticky; top: 88px; }
.mini-anime {
	display: flex; gap: 12px; align-items: center; padding: 10px;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.mini-anime:hover { border-color: var(--pink); color: var(--text); }
.mini-anime img { width: 64px; aspect-ratio: 300 / 430; object-fit: cover; border-radius: var(--r-sm); }
.mini-anime b { display: block; line-height: 1.5; }
.mini-anime small { color: var(--muted); }
.side-eps { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.side-eps__title { font-family: var(--font-head); font-size: 1rem; margin: 0 0 10px; }
.side-eps ol { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.side-eps a { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--muted); }
.side-eps a:hover { background: var(--panel-2); color: var(--text); }
.side-eps a.is-current { background: var(--grad); color: var(--on-accent); font-weight: 600; }

/* ================= Content pages, 404 ================= */
.prose { padding-bottom: 48px; }
.prose > * { max-width: 80ch; }
.prose .sk-form { max-width: 720px; }
.ltr-block { text-align: left; margin-top: 28px; }
.prose a { color: var(--sky); text-decoration: underline; }
.not-found { text-align: center; padding-block: 72px; display: grid; justify-items: center; gap: 8px; }
.not-found__code {
	font-family: var(--font-head); font-weight: 800; font-size: 6rem; line-height: 1; margin: 0;
	background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.search-form--big input[type="search"] { width: min(420px, 70vw); padding: 12px 20px; }

/* ================= Footer ================= */
.site-footer { margin-top: 48px; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(8, 6, 24, .7); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; padding-block: 36px; }
.site-footer__brand p { color: var(--muted); margin: 6px 0 0; max-width: 42ch; font-size: .92rem; }
.site-footer__h { font-size: .95rem; margin: 0 0 10px; color: var(--text); }
.site-footer__genres { max-width: 520px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer__nav a, .socials a, .site-footer__genres a { color: var(--muted); font-size: .92rem; }
.site-footer__nav a:hover, .socials a:hover, .site-footer__genres a:hover { color: var(--pink); }
.site-footer__copy { padding-block: 14px; border-top: 1px solid rgba(255, 255, 255, .06); color: var(--muted); font-size: .85rem; }


/* ================= Ads ================= */
.ad { margin: 20px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad__label { display: block; font-size: .68rem; letter-spacing: .04em; color: var(--muted); opacity: .7; margin-bottom: 4px; }
.ad__body { display: flex; justify-content: center; align-items: center; max-width: 100%; overflow: hidden; }
.ad__body iframe, .ad__body img, .ad__body ins { max-width: 100% !important; }
.site-main > .ad--header { margin-top: 16px; }
.watch__main > .ad:first-child { margin-top: 0; }
.watch__side .ad { margin: 0; }
.ad-sticky {
	position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
	display: flex; justify-content: center; padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
	background: rgba(16, 12, 42, .96); border-top: 1px solid var(--line);
	box-shadow: 0 -8px 24px rgba(0, 0, 0, .4);
}
.ad-sticky__body { max-width: 100%; overflow: hidden; }
.ad-sticky__close {
	position: absolute; top: -30px; inset-inline-start: 8px; width: 30px; height: 30px; border-radius: 8px 8px 0 0;
	background: rgba(16, 12, 42, .96); border: 1px solid var(--line); border-bottom: 0; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
}
body.has-sticky-ad { padding-bottom: 70px; }

/* ================= Forms (contact / DMCA) ================= */
.sk-form { max-width: 720px; margin-top: 16px; }
.sk-form label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.sk-form input[type="text"], .sk-form input[type="email"], .sk-form input[type="url"], .sk-form textarea {
	width: 100%; padding: 11px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); outline: none; font-size: 16px;
}
.sk-form input:focus, .sk-form textarea:focus { border-color: var(--sky); }
.sk-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.sk-form__check label { display: flex; gap: 8px; align-items: flex-start; color: var(--text); }
.sk-form__check input { margin-top: 6px; }
.sk-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: 0; padding: 0; }
.form-note { padding: 12px 16px; border-radius: var(--r-sm); margin: 12px 0; font-weight: 600; }
.form-note--ok { background: rgba(51, 227, 160, .12); border: 1px solid rgba(51, 227, 160, .4); color: var(--live); }
.form-note--err { background: rgba(255, 62, 128, .12); border: 1px solid rgba(255, 62, 128, .4); color: #ff8fb5; }
.prose h2 { font-family: var(--font-head); font-size: 1.2rem; margin: 28px 0 8px; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 4px; }

/* ================= Footer logo ================= */
.site-footer__logo img { height: 36px; width: auto; max-width: none; margin-bottom: 14px; }
.site-footer__brand { max-width: 460px; }
.site-footer__brand .site-footer__h { margin-top: 4px; }
.site-footer__nav ul { flex-direction: column; gap: 6px; }
.socials { margin-top: 14px !important; }
.site-footer__copy { text-align: center; }

/* ================= Mobile header: compact, search on demand ================= */
.search-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--text); }

/* ================= Responsive ================= */
@media (max-width: 1024px) {
	.watch { grid-template-columns: 1fr; }
	.watch__side { position: static; }
	.side-eps ol { max-height: 360px; }
}
@media (max-width: 900px) {
	.menu-toggle, .search-toggle { display: grid; place-items: center; }
	.menu-toggle { margin-inline-start: 0; }
	.search-toggle { margin-inline-start: auto; }
	.logo img { height: 34px; }
	.site-header .search-form { display: none; }
	.site-header.search-open .search-form { display: flex; }
	.site-footer__inner { flex-direction: column; }
	.site-footer__brand, .site-footer__genres { max-width: none; }
	.site-header__inner { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
	.nav { display: none; flex-basis: 100%; order: 3; }
	.nav.is-open { display: block; }
	.nav > ul { flex-direction: column; padding-bottom: 8px; }
	.nav .sub-menu { position: static; display: block; border: 0; box-shadow: none; background: none; padding-inline-start: 16px; }
	.search-form { order: 4; flex-basis: 100%; }
	.search-form input[type="search"] { flex: 1; width: auto; }
	.anime-head { grid-template-columns: 170px 1fr; gap: 22px; }
}
@media (max-width: 640px) {
	body { background-attachment: scroll; }
	.wrap { padding-inline: 14px; }
	.grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 18px 12px; }
	.hero__slide { min-height: 380px; }
	.hero__content { padding: 22px; }
	.hero__poster { display: none; }
	.hero__nav { top: 16px; bottom: auto; }
	.anime-head { grid-template-columns: 1fr; }
	.anime-head__poster { max-width: 200px; }
	.ep-list { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
	.ep-nav .btn { flex: 1; justify-content: center; }
	.filters select { min-width: 0; width: 100%; }
	.filters__item { flex: 1 1 140px; }
	.player { border-radius: 0; margin-inline: -14px; }
	.logo img { height: 30px; }
	.sk-form__row { grid-template-columns: 1fr; }
	.section { padding-block: 24px; }
	.section__title { font-size: 1.12rem; }
	.page-title { font-size: 1.3rem; }
	.card__title { font-size: .9rem; }
	.ep-tag { min-width: 50px; padding: 4px 10px 6px; bottom: 12px; }
	.ep-tag b { font-size: 1.3rem; }
	.servers button { padding: 9px 16px; }
	.ep-list a { padding: 13px 6px; }
	.intro { padding-top: 22px; }
	.intro__genres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; width: calc(100% + 28px); }
	.intro__genres::-webkit-scrollbar { display: none; }
	.chip { white-space: nowrap; }
	.anime-head__poster { margin-inline: auto; }
	.anime-head__actions .btn { flex: 1; justify-content: center; }
	.downloads__list li { flex-wrap: wrap; }
	.hero__title { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
