/* VORTEX — الطبقة الموحدة v5: هوية بصرية واحدة لكل الصفحات (ما عدا القارئ) + كتالوج الأنمي والمانغا */
:root {
    --v5-bg: #05080c; --v5-card: linear-gradient(160deg, #111820, #0a0e13);
    --v5-line: rgba(255,255,255,.08); --v5-mute: #8a96a3; --v5-ac: #13abd2; --v5-ac2: #76e5fd;
    --v5-r: 16px;
}
body:not([data-page="reader"]) { background: var(--v5-bg); }
body:not([data-page="reader"]) main { min-height: 60vh; }
body:not([data-page="reader"]) .container, body:not([data-page="reader"]) .db { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* ===== كتالوج مشترك (الأنمي والمانغا) ===== */
.ac { padding: clamp(28px, 4vw, 52px) 0 56px; color: #fff; }
.ac.hidden, .ac-card.hidden, .ac-group.hidden, .ac-empty.hidden, #ax-catalog.hidden { display: none !important; }
.ac-head { margin-bottom: 26px; }
.ac-eyebrow { font: 700 11px/1 monospace; letter-spacing: .2em; color: var(--v5-ac2); }
.ac-head h1 { margin: 12px 0 8px; font-size: clamp(30px, 4.4vw, 48px); font-weight: 900; line-height: 1.15; }
.ac-sub { margin: 0; color: var(--v5-mute); font-size: 15px; line-height: 1.8; }
.ac-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.ac-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-chips button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--v5-line); background: transparent; color: #d4dbe2; font: inherit; font-size: 14px; cursor: pointer; transition: .2s; }
.ac-chips button:hover { border-color: rgba(255,255,255,.25); color: #fff; }
.ac-chips button.on { background: var(--v5-ac); border-color: transparent; color: #04151c; font-weight: 700; }
.ac-tools input { flex: 1 1 260px; max-width: 380px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--v5-line); background: rgba(255,255,255,.04); color: #fff; font: inherit; font-size: 14px; }
.ac-tools input:focus { outline: none; border-color: var(--v5-ac); }
.ac-group { margin-top: 30px; }
.ac-gtitle { margin: 0 0 16px; font-size: 20px; font-weight: 800; position: relative; padding-inline-start: 14px; }
.ac-gtitle::before { content: ""; position: absolute; inset-block: 3px; inset-inline-start: 0; width: 4px; border-radius: 4px; background: var(--v5-ac); }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; margin-top: 4px; }
.ac-card { display: block; color: inherit; text-decoration: none; transition: transform .3s; }
.ac-card:hover { transform: translateY(-5px); }
.ac-poster { position: relative; aspect-ratio: 2 / 3; border-radius: var(--v5-r); overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--ac, #13abd2) 40%, #111820), #07090d); border: 1px solid var(--v5-line); box-shadow: 0 18px 40px -20px rgba(0,0,0,.9); display: grid; place-items: center; }
.ac-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ac-poster > span { font-size: 52px; font-weight: 900; color: rgba(255,255,255,.85); }
.ac-badge { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; font-style: normal; padding: 3px 10px; border-radius: 999px; background: rgba(5,8,12,.78); border: 1px solid var(--v5-line); font-size: 12px; font-weight: 700; }
.ac-badge.movie { background: #f5c451; color: #1b1405; border-color: transparent; }
.ac-card:hover .ac-poster { border-color: rgba(118,229,253,.35); }
.ac-card h3 { margin: 12px 0 2px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.ac-card small { color: var(--v5-mute); font-size: 12.5px; }
.ac-empty { padding: 40px 0; text-align: center; color: var(--v5-mute); }
.ac-card[data-kind="مكتمل"] .ac-poster::after { content: ""; }

/* ===== كتالوج الأنمي داخل صفحة anime.html ===== */
#ax-catalog { padding-top: 4px; }
#ax-catalog .ac { padding-top: 44px; }

@media (max-width: 640px) {
    .ac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .ac-head h1 { font-size: 30px; }
    .ac-tools input { width: 100%; }
}
