/*
 Theme Name:   Mo7tas 2026
 Description:  التصميم الجديد لمكتبة مُحتاس — قالب فرعي فوق AniFansub Light Edition
 Author:       Mo7tas
 Template:     AniFansub Light Edition
 Version:      0.1.3
 Text Domain:  mo7tas
*/
:root{--accent:#D13438;--bg:#0D0E12;--surface:#16181F;--surface2:#1A1C24;--chip:#1E212A;--border:#23262F;--line:#22252E;--border2:#2A2E39;--text:#F2F2F4;--text2:#C9CCD4;--muted:#A3A7B3;--link:#FF8F91;--sub:#3E63DD;--dub:#D9912B;--cls:#A8946B}
html[data-theme="light"]{--bg:#F6F6F8;--surface:#FFFFFF;--surface2:#F1F2F5;--chip:#ECEEF2;--border:#E3E5EA;--line:#ECEEF2;--border2:#D5D8DF;--text:#15161A;--text2:#3C404B;--muted:#5E6370;--link:#B3262A}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:'IBM Plex Sans Arabic',system-ui,-apple-system,'Segoe UI',Tahoma,sans-serif;font-size:16px;line-height:1.6}
a{color:var(--link);text-decoration:none}a:hover{opacity:.85}
img{max-width:100%;height:auto}
.m7-wrap{max-width:1080px;margin:0 auto;padding:0 32px}
.m7-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
/* header */
.m7-top{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:10px 0}
.m7-brand{display:flex;align-items:center;gap:10px;color:var(--text)}
.m7-brand img{width:46px;height:auto;display:block}
.m7-brand b{font-size:20px;line-height:1.15;display:block}
.m7-brand small{font-size:12px;color:var(--muted);display:block}
.m7-grow{flex-grow:1}
.m7-search{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--border2);border-radius:10px;padding:0 12px;height:44px;flex:1 1 240px;max-width:320px}
.m7-search input{background:transparent;border:0;color:var(--text);font:inherit;font-size:14px;outline:none;width:100%}
.m7-btn{height:44px;padding:0 16px;display:inline-flex;align-items:center;gap:8px;border-radius:10px;border:1px solid var(--border2);background:var(--surface);color:var(--text);font:inherit;font-size:14px;cursor:pointer}
.m7-btn--accent{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.m7-hero{border-radius:14px;overflow:hidden;border:1px solid var(--border);background:var(--surface);box-shadow:0 10px 28px rgba(0,0,0,.25)}
.m7-banner{display:block;width:100%;aspect-ratio:2560/855;background:#fff center/cover no-repeat}
.m7-nav{display:flex;flex-wrap:wrap;align-items:stretch;border-top:1px solid var(--border);border-bottom:3px solid var(--accent)}
.m7-nav a{color:var(--text);padding:0 16px;min-height:52px;display:flex;align-items:center;gap:8px;font-size:16px;font-weight:500}
.m7-nav a.is-active{background:var(--chip)}
.m7-nav .m7-home{width:56px;justify-content:center;padding:0;color:var(--text2)}
.m7-nav .m7-home.is-active{background:var(--accent);color:#fff}
.m7-nav .m7-sep{width:1px;margin:14px 6px;background:var(--border2)}
.m7-dot{width:8px;height:8px;border-radius:50%;flex:none}
/* sections */
.m7-section{padding-top:48px}
.m7-h{display:flex;align-items:center;gap:12px;margin:0 0 16px;font-size:22px;font-weight:700}
.m7-h::before{content:"";flex:none;width:10px;height:10px;border-radius:50%;background:var(--accent)}
.m7-h::after{content:"";flex:1;height:1px;background:var(--line)}
.m7-head{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px}
.m7-head .m7-h{margin:0;flex:1}
.m7-pills{display:flex;flex-wrap:wrap;gap:8px}
.m7-pill{height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--border2);background:transparent;color:var(--text2);font:inherit;font-size:14px;cursor:pointer}
.m7-pill[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
/* cards */
.m7-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(225px,1fr));gap:18px}
.m7-card{display:flex;flex-direction:column;gap:10px;color:var(--text);min-width:0}
.m7-card__img{position:relative;display:block;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--surface2) center/cover no-repeat;border:1px solid var(--border)}
.m7-card__img img{width:100%;height:100%;object-fit:cover;display:block}
.m7-card__title{font-size:15px;font-weight:600;line-height:1.4;unicode-bidi:plaintext;text-align:start}
.m7-card__meta{font-size:13px;color:var(--muted)}
.m7-badges{position:absolute;top:10px;inset-inline-start:10px;display:flex;gap:6px}
.m7-stamp{display:inline-block;padding:3px 9px;border-radius:4px;font-size:12px;font-weight:700;color:#fff;outline:1.5px solid currentColor;outline-offset:-4px;transform:rotate(-4deg);box-shadow:0 2px 6px rgba(0,0,0,.25)}
.m7-stamp--sub{background:#2B3E6B;color:#DCE6FF}.m7-stamp--dub{background:#6B4A17;color:#FFE7C2}.m7-stamp--cls{background:#5A4C34;color:#F3EADB}
/* libraries */
.m7-libs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.m7-lib{display:flex;flex-direction:column;gap:6px;padding:20px 22px;background:var(--surface);border:1px solid var(--border);border-radius:16px;color:var(--text)}
.m7-lib b{font-size:20px;display:flex;align-items:center;gap:8px}
.m7-lib span{color:var(--muted);font-size:14px}
/* lists */
.m7-cols3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:stretch}
.m7-box{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:24px;min-width:0}
.m7-box h2{margin:0 0 16px;font-size:20px;font-weight:700;display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.m7-box h2 a{font-size:14px;font-weight:600}
.m7-rank{list-style:none;margin:0;padding:0}
.m7-rank li{display:flex;align-items:center;gap:14px;min-height:72px;border-bottom:1px solid var(--line)}
.m7-rank .n{width:28px;font-size:22px;font-weight:700;color:var(--accent);text-align:center;flex:none}
.m7-rank .t{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.m7-rank .t a{color:var(--text);font-size:15px;font-weight:600;unicode-bidi:plaintext}
.m7-rank .t small{font-size:13px;color:var(--muted)}
.m7-rank .thumb{width:72px;height:44px;border-radius:6px;background:var(--surface2) center/cover no-repeat;flex:none}
.m7-rank .av{width:44px;height:44px;border-radius:50%;flex:none;overflow:hidden;background:var(--chip)}
.m7-rank .lg{width:34px;height:34px;border-radius:8px;background:var(--chip);border:1px solid var(--border2);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:var(--muted);flex:none}
.m7-support{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:18px 24px;background:var(--surface);border:1px solid var(--border);border-radius:16px;margin-top:24px}
/* stats */
.m7-stats{display:flex;flex-direction:column;gap:1px;background:var(--border);border:1px solid var(--border);border-radius:16px;overflow:hidden}
.m7-stats__row{display:grid;gap:1px}
.m7-kpi{background:var(--surface);padding:22px 24px;display:flex;flex-direction:column;gap:6px}
.m7-kpi b{font-size:34px;line-height:1}
.m7-kpi span{color:var(--muted);font-size:14px}
.m7-dist{background:var(--surface);padding:22px 24px;display:flex;flex-direction:column;gap:14px}
.m7-dist__bar{display:flex;gap:3px;height:12px;border-radius:6px;overflow:hidden}
.m7-dist__bar span{min-width:6px}
.m7-dist__leg{display:flex;flex-wrap:wrap;gap:10px 24px;font-size:14px}
.m7-dist__leg span{display:flex;align-items:center;gap:8px;color:var(--text2)}
.m7-dist__leg i{width:10px;height:10px;border-radius:3px;display:block}
/* single (step 1) */
.m7-title{margin:0;font-size:38px;line-height:1.2;font-weight:700;unicode-bidi:plaintext;text-align:start}
.m7-content{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:24px;overflow:hidden}
.m7-lock{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:40px 24px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:12px}
/* footer */
.m7-clouds{height:70px;margin-top:56px;opacity:.22;background:
 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cg fill='%23C62B2F'%3E%3Ccircle cx='30' cy='38' r='16'/%3E%3Ccircle cx='52' cy='28' r='20'/%3E%3Ccircle cx='78' cy='34' r='17'/%3E%3Ccircle cx='96' cy='42' r='11'/%3E%3Crect x='16' y='40' width='92' height='14' rx='7'/%3E%3C/g%3E%3C/svg%3E") no-repeat 3% 70%/120px 60px,
 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cg fill='%23C62B2F'%3E%3Ccircle cx='30' cy='38' r='16'/%3E%3Ccircle cx='52' cy='28' r='20'/%3E%3Ccircle cx='78' cy='34' r='17'/%3E%3Ccircle cx='96' cy='42' r='11'/%3E%3Crect x='16' y='40' width='92' height='14' rx='7'/%3E%3C/g%3E%3C/svg%3E") no-repeat 50% 60%/90px 45px,
 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cg fill='%23C62B2F'%3E%3Ccircle cx='30' cy='38' r='16'/%3E%3Ccircle cx='52' cy='28' r='20'/%3E%3Ccircle cx='78' cy='34' r='17'/%3E%3Ccircle cx='96' cy='42' r='11'/%3E%3Crect x='16' y='40' width='92' height='14' rx='7'/%3E%3C/g%3E%3C/svg%3E") no-repeat 97% 75%/130px 65px}
.m7-foot{border-top:1px solid var(--line);padding:28px 0;display:flex;flex-wrap:wrap;align-items:center;gap:20px;font-size:14px;color:var(--muted)}
.m7-foot a{color:var(--text2)}
.m7-pager{display:flex;justify-content:center;gap:8px;margin-top:28px;flex-wrap:wrap}
.m7-pager .page-numbers{min-width:40px;height:40px;padding:0 10px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;border:1px solid var(--border2);color:var(--text2)}
.m7-pager .current{background:var(--accent);border-color:var(--accent);color:#fff}
@media (max-width:900px){.m7-wrap{padding:0 16px}.m7-libs,.m7-cols3{grid-template-columns:1fr}.m7-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px}.m7-title{font-size:28px}.m7-kpi b{font-size:26px}.m7-stats__row{grid-template-columns:repeat(2,minmax(0,1fr)) !important}}
