/* MangaBox v2 - Flat Modern, No Shadows, RTL */
:root{
  --bg:#0b0b0c;
  --bg-2:#121214;
  --bg-3:#19191b;
  --bg-card:#141416;
  --bg-elevated:#1c1c1f;
  --border:#212124;
  --border-2:#2a2a2e;
  --border-hover:#3a3a42;
  --text:#f4f4f5;
  --text-2:#a1a1aa;
  --text-3:#71717a;
  --primary:#7c3aed;
  --primary-2:#6d28d9;
  --primary-light:#a78bfa;
  --primary-bg:rgba(124,58,237,0.12);
  --premium:#f59e0b;
  --premium-bg:rgba(245,158,11,0.12);
  --green:#22c55e;
  --red:#ef4444;
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;
  --radius-xl:20px;
  --radius-2xl:24px;
  --radius-full:999px;
  --container:1320px;
  --nav-h:62px;
  --nav-h-lg:72px;
  --font:'Vazirmatn',system-ui,-apple-system,sans-serif;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;overflow-x:hidden}
body{background:var(--bg);color:var(--text);font-family:var(--font);direction:rtl;min-height:100vh;line-height:1.7;-webkit-font-smoothing:antialiased;overflow-x:hidden}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
ul,ol{list-style:none}
input,select,textarea{font-family:inherit}
::selection{background:var(--primary-bg);color:var(--primary-light)}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:var(--bg)}
::-webkit-scrollbar-thumb{background:#2a2a2e;border-radius:8px}
.container{width:100%;max-width:var(--container);margin:0 auto;padding:0 16px}
@media(min-width:768px){.container{padding:0 24px}}
.hidden{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Buttons - flat, no shadow */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:var(--radius-md);font-weight:600;transition:background .15s,border-color .15s,color .15s,transform .15s;white-space:nowrap;border:1px solid transparent;line-height:1}
.btn:active{transform:scale(.98)}
.btn-sm{padding:7px 14px;font-size:12px}
.btn-md{padding:10px 18px;font-size:13px}
.btn-lg{padding:12px 22px;font-size:14px}
.btn-primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.btn-primary:hover{background:var(--primary-2);border-color:var(--primary-2)}
.btn-glass{background:var(--bg-3);border-color:var(--border);color:var(--text-2)}
.btn-glass:hover{background:var(--bg-elevated);border-color:var(--border-2);color:var(--text)}
.btn-premium{background:var(--premium);color:#000;border-color:var(--premium);font-weight:800}
.btn-premium:hover{background:#eab308}
.btn-outline{background:transparent;border-color:var(--border);color:var(--text-2)}
.btn-outline:hover{border-color:var(--border-hover);color:var(--text)}
.btn-danger{background:rgba(239,68,68,0.1);border-color:rgba(239,68,68,0.2);color:#f87171}
.btn-danger:hover{background:rgba(239,68,68,0.18)}
.btn:disabled{opacity:.5;pointer-events:none}
.w-full{width:100%}

/* Tags */
.tag{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:var(--radius-full);font-size:11px;font-weight:500;border:1px solid var(--border);transition:all .15s;cursor:default;line-height:1.2}
.tag-purple{background:var(--primary-bg);color:var(--primary-light);border-color:rgba(124,58,237,0.22)}
.tag-muted{background:var(--bg-3);color:var(--text-2);border-color:var(--border)}
.tag-muted:hover{background:var(--bg-elevated);color:var(--text)}
.tag-active{background:var(--primary);color:#fff;border-color:var(--primary)}
.tag-dot::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}

/* Section */
.section{padding:28px 0}
@media(min-width:768px){.section{padding:36px 0}}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.section-head-left{display:flex;align-items:center;gap:12px;min-width:0}
.section-icon{width:36px;height:36px;border-radius:var(--radius-md);background:var(--bg-3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.section-icon svg{width:18px;height:18px;color:var(--text-2)}
.section-head-left h2{font-size:16px;font-weight:800;color:var(--text);line-height:1.3}
.section-head-left p{font-size:12px;color:var(--text-3);line-height:1.4;margin-top:2px}
.section-action{font-size:12px;color:var(--text-2);display:inline-flex;align-items:center;gap:4px;transition:color .15s;white-space:nowrap}
.section-action:hover{color:var(--primary-light)}
.section-action svg{width:14px;height:14px}

/* Cards - FLAT, no shadow, border only */
.work-card{border-radius:var(--radius-lg);overflow:hidden;background:var(--bg-card);border:1px solid var(--border);transition:border-color .2s,transform .2s;display:block;position:relative}
.work-card:hover{transform:translateY(-2px);border-color:var(--border-2)}
.work-card-cover{position:relative;aspect-ratio:3/4;overflow:hidden;background:var(--bg-2)}
.work-card-cover img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.work-card:hover .work-card-cover img{transform:scale(1.04)}
.work-card-badges{position:absolute;top:8px;right:8px;display:flex;flex-direction:column;gap:6px;z-index:1}
.work-card-badge{display:inline-flex;align-items:center;gap:3px;padding:3px 7px;border-radius:6px;font-size:10px;font-weight:700;line-height:1;border:1px solid transparent}
.work-card-badge.premium{background:var(--premium);color:#000}
.work-card-badge.locked{background:#000;color:#fff;border-color:var(--border)}
.work-card-badge.new{background:var(--green);color:#000}
.work-card-rating{position:absolute;top:8px;left:8px;display:flex;align-items:center;gap:2px;padding:3px 6px;border-radius:6px;background:rgba(0,0,0,0.75);border:1px solid rgba(255,255,255,0.08);color:#fbbf24;font-size:11px;font-weight:700;z-index:1}
.work-card-bottom{position:absolute;bottom:0;left:0;right:0;padding:10px 8px 8px;background:linear-gradient(to top, rgba(0,0,0,0.85), transparent);display:flex;gap:6px;flex-wrap:wrap}
.work-card-type{padding:2px 6px;border-radius:5px;font-size:10px;font-weight:600;background:rgba(255,255,255,0.12);border:1px solid rgba(255,255,255,0.08);color:#e4e4e7}
.work-card-info{padding:10px 12px 12px}
.work-card-title{font-size:13px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4}
.work-card:hover .work-card-title{color:var(--primary-light)}
.work-card-meta{font-size:11px;color:var(--text-3);margin-top:4px;display:flex;gap:6px;align-items:center}

/* Creative variation - accent left border */
.work-card.accented{border-right:3px solid var(--primary)}
.work-card.accented:hover{border-right-color:var(--primary-light)}

/* Horizontal slider - no shadow, minimal */
.h-slider{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;margin:-4px;padding:4px}
.h-slider::-webkit-scrollbar{display:none}
.h-slider-track{display:flex;gap:14px;padding-bottom:2px}
.h-slider-track .work-card{min-width:160px;max-width:180px;flex-shrink:0}
@media(min-width:768px){.h-slider-track .work-card{min-width:180px;max-width:200px}}

/* Latest chapter list - flat */
.latest-grid{display:grid;grid-template-columns:1fr;gap:10px}
@media(min-width:640px){.latest-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.latest-grid{grid-template-columns:repeat(3,1fr)}}
.latest-item{display:flex;gap:12px;padding:10px;border-radius:var(--radius-lg);background:var(--bg-card);border:1px solid var(--border);transition:border-color .15s}
.latest-item:hover{border-color:var(--border-2)}
.latest-item img{width:56px;height:76px;border-radius:var(--radius-sm);object-fit:cover;flex-shrink:0;background:var(--bg-2)}
.latest-item-main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}
.latest-work{font-size:11px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.latest-title{font-size:13px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:2px 0}
.latest-meta{font-size:11px;color:var(--text-3);display:flex;align-items:center;gap:8px}
.latest-meta svg{width:12px;height:12px}

/* Ranking */
.ranking-item{display:flex;align-items:center;gap:12px;padding:10px;border-radius:var(--radius-md);background:var(--bg-card);border:1px solid transparent;transition:all .15s}
.ranking-item:hover{background:var(--bg-3);border-color:var(--border)}
.ranking-num{width:28px;height:28px;border-radius:var(--radius-sm);background:var(--bg-3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;color:var(--text-2);flex-shrink:0}
.ranking-num.top{background:var(--primary-bg);border-color:rgba(124,58,237,0.25);color:var(--primary-light)}
.ranking-cover{width:44px;height:60px;border-radius:6px;object-fit:cover;flex-shrink:0;background:var(--bg-2)}
.ranking-info{flex:1;min-width:0}
.ranking-title{font-size:13px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ranking-sub{font-size:11px;color:var(--text-3)}
.ranking-meta{display:flex;gap:10px;margin-top:2px;font-size:11px;color:var(--text-3)}

/* Navbar - flat */
.navbar{position:fixed;top:0;left:0;right:0;z-index:100;height:var(--nav-h);display:flex;align-items:center;background:rgba(11,11,12,0.85);backdrop-filter:blur(16px);border-bottom:1px solid var(--border);transition:background .2s}
@media(min-width:768px){.navbar{height:var(--nav-h-lg)}}
.navbar.scrolled{background:rgba(11,11,12,0.95)}
.navbar-inner{display:flex;align-items:center;justify-content:space-between;width:100%;gap:12px}
.logo{display:flex;align-items:center;gap:10px}
.logo-icon{width:36px;height:36px;border-radius:var(--radius-md);background:var(--text);color:var(--bg);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:16px}
.logo-text{line-height:1.1}
.logo-title{font-size:15px;font-weight:900}
.logo-sub{font-size:9px;color:var(--text-3);letter-spacing:.08em}
.nav-links{display:none;align-items:center;gap:4px}
@media(min-width:1024px){.nav-links{display:flex}}
.nav-link{display:flex;align-items:center;gap:6px;padding:8px 14px;border-radius:var(--radius-md);font-size:13px;font-weight:500;color:var(--text-2);border:1px solid transparent;transition:all .15s}
.nav-link:hover{background:var(--bg-3);color:var(--text)}
.nav-link.active{background:var(--primary-bg);color:var(--primary-light);border-color:rgba(124,58,237,0.22)}
.nav-link svg{width:16px;height:16px}
.nav-actions{display:flex;align-items:center;gap:8px}
.icon-btn{width:36px;height:36px;border-radius:var(--radius-md);background:var(--bg-3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--text-2);transition:all .15s;position:relative}
.icon-btn:hover{border-color:var(--border-2);color:var(--text)}
.icon-btn svg{width:18px;height:18px}
.badge-dot{position:absolute;top:6px;left:6px;width:8px;height:8px;border-radius:50%;background:var(--primary);border:2px solid var(--bg)}
.user-btn{display:none;align-items:center;gap:8px;padding:6px 12px 6px 6px;border-radius:var(--radius-full);background:var(--bg-3);border:1px solid var(--border);font-size:12px;color:var(--text)}
@media(min-width:768px){.user-btn{display:flex}}
.user-avatar{width:26px;height:26px;border-radius:50%;background:var(--primary);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:11px}
.mobile-btn{width:36px;height:36px;border-radius:var(--radius-md);background:var(--bg-3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center}
@media(min-width:1024px){.mobile-btn{display:none}}

/* Mobile menu */
.mobile-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.6);z-index:200;opacity:0;visibility:hidden;transition:.25s}
.mobile-overlay.open{opacity:1;visibility:visible}
.mobile-menu{position:fixed;top:0;right:0;bottom:0;width:300px;max-width:85vw;background:var(--bg-2);border-left:1px solid var(--border);z-index:250;transform:translateX(100%);transition:transform .35s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column}
.mobile-menu.open{transform:translateX(0)}
.mobile-menu-head{padding:16px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.mobile-nav{flex:1;padding:12px;display:flex;flex-direction:column;gap:4px;overflow-y:auto}
.mobile-nav-link{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--radius-md);font-size:14px;color:var(--text-2)}
.mobile-nav-link:hover{background:var(--bg-3);color:var(--text)}
.mobile-nav-link.active{background:var(--primary-bg);color:var(--primary-light)}
.mobile-nav-link svg{width:18px;height:18px}

/* Search overlay */
.search-overlay{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,0.7);backdrop-filter:blur(4px);display:flex;align-items:flex-start;justify-content:center;padding:24px 16px;opacity:0;visibility:hidden;transition:.25s}
.search-overlay.open{opacity:1;visibility:visible}
.search-box{width:100%;max-width:560px;background:var(--bg-2);border:1px solid var(--border);border-radius:var(--radius-xl);overflow:hidden}
.search-head{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border)}
.search-head svg{width:18px;height:18px;color:var(--text-3)}
.search-input{flex:1;background:transparent;border:none;outline:none;color:var(--text);font-size:14px}
.search-results{max-height:360px;overflow-y:auto;padding:8px}
.search-item{display:flex;gap:12px;padding:8px;border-radius:var(--radius-md);transition:background .15s}
.search-item:hover{background:var(--bg-3)}
.search-item img{width:40px;height:54px;border-radius:6px;object-fit:cover;background:var(--bg)}

/* Hero - flat, no shadow, creative border */
.hero{position:relative;min-height:520px;overflow:hidden;border-bottom:1px solid var(--border)}
@media(min-width:768px){.hero{min-height:580px}}
@media(min-width:1024px){.hero{min-height:620px}}
.hero-bg{position:absolute;inset:0}
.hero-bg img{width:100%;height:100%;object-fit:cover}
.hero-bg::after{content:'';position:absolute;inset:0;background:linear-gradient(to top, var(--bg) 8%, rgba(11,11,12,0.75) 40%, rgba(11,11,12,0.35) 100%), linear-gradient(to left, var(--bg) 0%, transparent 70%)}
.hero-content{position:relative;z-index:2;min-height:inherit;display:flex;align-items:center;padding-top:calc(var(--nav-h) + 24px);padding-bottom:40px}
@media(min-width:768px){.hero-content{padding-top:calc(var(--nav-h-lg) + 28px)}}
.hero-grid{display:grid;gap:24px;width:100%}
@media(min-width:1024px){.hero-grid{grid-template-columns:1fr 260px;gap:40px}}
.hero-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:var(--radius-full);font-size:11px;font-weight:700;background:var(--bg-3);border:1px solid var(--border);color:var(--text-2)}
.hero-title{font-size:28px;font-weight:900;line-height:1.15;color:var(--text);margin:12px 0 6px}
@media(min-width:768px){.hero-title{font-size:42px}}
@media(min-width:1024px){.hero-title{font-size:48px}}
.hero-sub{font-size:13px;color:var(--text-3);margin-bottom:12px}
.hero-genres{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.hero-genre{padding:5px 12px;border-radius:var(--radius-full);font-size:11px;background:var(--bg-3);border:1px solid var(--border);color:var(--text-2)}
.hero-genre.type{background:var(--primary-bg);border-color:rgba(124,58,237,0.25);color:var(--primary-light)}
.hero-synopsis{color:var(--text-2);font-size:13px;line-height:1.9;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-width:640px;margin-bottom:16px}
.hero-stats{display:flex;gap:16px;margin-bottom:20px;flex-wrap:wrap}
.hero-stat{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:var(--radius-md);background:var(--bg-3);border:1px solid var(--border)}
.hero-stat-icon{width:28px;height:28px;border-radius:8px;background:var(--bg-2);display:flex;align-items:center;justify-content:center;border:1px solid var(--border)}
.hero-stat-icon svg{width:14px;height:14px;color:var(--text-2)}
.hero-stat-label{font-size:10px;color:var(--text-3)}
.hero-stat-value{font-size:12px;font-weight:700;color:var(--text)}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.hero-cover{display:none;justify-content:center;align-items:center}
@media(min-width:1024px){.hero-cover{display:flex}}
.hero-cover-inner{width:240px;aspect-ratio:3/4;border-radius:var(--radius-xl);overflow:hidden;border:1px solid var(--border);background:var(--bg-3)}
.hero-cover-inner img{width:100%;height:100%;object-fit:cover}
.hero-indicators{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:3}
@media(min-width:1024px){.hero-indicators{left:24px;transform:none}}
.hero-dot{width:28px;height:4px;border-radius:2px;background:rgba(255,255,255,0.18);transition:all .2s;cursor:pointer;border:none}
.hero-dot.active{background:var(--primary);width:32px}

/* Genre grid - creative no shadow */
.genre-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
@media(min-width:480px){.genre-grid{grid-template-columns:repeat(4,1fr)}}
@media(min-width:768px){.genre-grid{grid-template-columns:repeat(5,1fr)}}
@media(min-width:1024px){.genre-grid{grid-template-columns:repeat(8,1fr)}}
.genre-card{aspect-ratio:1;border-radius:var(--radius-lg);background:var(--bg-card);border:1px solid var(--border);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;transition:border-color .2s,transform .2s}
.genre-card:hover{border-color:var(--border-2);transform:translateY(-2px)}
.genre-card-icon{width:28px;height:28px;color:var(--text-2)}
.genre-card:hover .genre-card-icon{color:var(--primary-light)}
.genre-card-label{font-size:11px;font-weight:600;color:var(--text-2)}

/* Footer */
.footer{border-top:1px solid var(--border);margin-top:48px;padding:32px 0;background:var(--bg-2)}
.footer-grid{display:grid;grid-template-columns:1fr;gap:24px}
@media(min-width:640px){.footer-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:768px){.footer-grid{grid-template-columns:repeat(4,1fr)}}
.footer-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:12px}
.footer-link{display:block;font-size:12px;color:var(--text-3);padding:4px 0;transition:color .15s}
.footer-link:hover{color:var(--text-2)}
.footer-bottom{margin-top:24px;padding-top:16px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:8px;font-size:11px;color:var(--text-3)}
@media(min-width:640px){.footer-bottom{flex-direction:row;justify-content:space-between}}

/* Forms */
.form-group{margin-bottom:16px}
.form-label{display:block;font-size:12px;font-weight:600;color:var(--text-2);margin-bottom:6px}
.form-input{width:100%;padding:10px 14px;border-radius:var(--radius-md);background:var(--bg-3);border:1px solid var(--border);color:var(--text);font-size:13px;outline:none;transition:border-color .15s}
.form-input:focus{border-color:var(--primary)}
.form-input::placeholder{color:var(--text-3)}
textarea.form-input{resize:vertical;min-height:90px}
.form-select{width:100%;padding:10px 14px;border-radius:var(--radius-md);background:var(--bg-3);border:1px solid var(--border);color:var(--text);font-size:13px}

/* Auth */
.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:calc(var(--nav-h) + 24px) 16px 24px}
.auth-card{width:100%;max-width:400px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-xl);padding:28px}
.auth-title{font-size:20px;font-weight:900;margin-bottom:6px}
.auth-sub{font-size:12px;color:var(--text-3);margin-bottom:20px}

/* Alert */
.alert{padding:12px 14px;border-radius:var(--radius-md);font-size:12px;border:1px solid; margin-bottom:16px}
.alert-success{background:rgba(34,197,94,0.08);border-color:rgba(34,197,94,0.18);color:#4ade80}
.alert-error{background:rgba(239,68,68,0.08);border-color:rgba(239,68,68,0.18);color:#f87171}
.alert-info{background:var(--primary-bg);border-color:rgba(124,58,237,0.18);color:var(--primary-light)}

/* Archive */
.archive-page{padding-top:calc(var(--nav-h) + 24px);min-height:100vh}
@media(min-width:768px){.archive-page{padding-top:calc(var(--nav-h-lg) + 32px)}}
.toolbar{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:12px;margin-bottom:16px;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.toolbar-search{flex:1;min-width:180px;position:relative;display:flex;align-items:center}
.toolbar-search svg{position:absolute;right:10px;width:14px;height:14px;color:var(--text-3);pointer-events:none}
.toolbar-search input{width:100%;padding:8px 14px 8px 14px;padding-right:32px;background:var(--bg-3);border:1px solid var(--border);border-radius:var(--radius-md);color:var(--text);font-size:12px;outline:none}
.filter-panel{overflow:hidden;max-height:0;transition:max-height .3s;width:100%}
.filter-panel.open{max-height:500px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}
.archive-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
@media(min-width:640px){.archive-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:768px){.archive-grid{grid-template-columns:repeat(4,1fr);gap:16px}}
@media(min-width:1024px){.archive-grid{grid-template-columns:repeat(5,1fr)}}
@media(min-width:1280px){.archive-grid{grid-template-columns:repeat(6,1fr)}}

/* Work single */
.work-page{padding-top:calc(var(--nav-h) + 20px)}
@media(min-width:768px){.work-page{padding-top:calc(var(--nav-h-lg) + 28px)}}
.work-hero{display:grid;gap:20px;margin-bottom:28px}
@media(min-width:768px){.work-hero{grid-template-columns:220px 1fr;gap:28px}}
.work-cover{width:180px;aspect-ratio:3/4;border-radius:var(--radius-xl);overflow:hidden;border:1px solid var(--border);background:var(--bg-3);margin:0 auto}
@media(min-width:768px){.work-cover{width:100%;margin:0}}
.work-info{display:flex;flex-direction:column;gap:10px}
.work-title{font-size:22px;font-weight:900;line-height:1.25}
.work-title-en{font-size:12px;color:var(--text-3)}
.work-badges{display:flex;flex-wrap:wrap;gap:6px}
.work-badge{padding:4px 10px;border-radius:var(--radius-full);font-size:11px;border:1px solid var(--border)}
.work-badge.type{background:var(--primary-bg);color:var(--primary-light);border-color:rgba(124,58,237,0.22)}
.work-badge.status{background:rgba(34,197,94,0.1);color:#4ade80;border-color:rgba(34,197,94,0.18)}
.work-rating{display:flex;align-items:center;gap:6px}
.work-stats{display:flex;flex-wrap:wrap;gap:8px}
.work-stat{padding:8px 12px;border-radius:var(--radius-md);background:var(--bg-card);border:1px solid var(--border);display:flex;align-items:center;gap:8px}
.work-stat svg{width:14px;height:14px;color:var(--text-3)}
.work-synopsis{margin:24px 0}
.work-synopsis h3{font-size:14px;font-weight:700;margin-bottom:8px;display:flex;align-items:center;gap:8px}
.work-synopsis p{font-size:13px;color:var(--text-2);line-height:1.9}

/* Chapter row */
.chapter-list{display:flex;flex-direction:column;gap:8px}
.chapter-row{display:flex;align-items:center;gap:12px;padding:12px;border-radius:var(--radius-md);background:var(--bg-card);border:1px solid var(--border);transition:border-color .15s}
.chapter-row:hover{border-color:var(--border-2)}
.chapter-row.locked{opacity:.7}
.chapter-num{width:40px;height:40px;border-radius:var(--radius-md);background:var(--bg-3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;color:var(--text-2);flex-shrink:0}
.chapter-row:hover .chapter-num{background:var(--primary-bg);color:var(--primary-light);border-color:rgba(124,58,237,0.22)}
.chapter-info{flex:1;min-width:0}
.chapter-title{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chapter-meta{font-size:11px;color:var(--text-3);display:flex;gap:10px;margin-top:2px}

/* Reader */
.reader-progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:200;background:var(--bg-3)}
.reader-progress-bar{height:100%;background:var(--primary);transition:width .1s}
.reader-top{position:fixed;top:0;left:0;right:0;z-index:150;background:rgba(11,11,12,0.9);backdrop-filter:blur(16px);border-bottom:1px solid var(--border);padding:8px 12px;display:flex;align-items:center;gap:8px;transition:transform .3s}
.reader-top.hidden{transform:translateY(-100%)}
.reader-bottom{position:fixed;bottom:0;left:0;right:0;z-index:150;background:rgba(11,11,12,0.9);backdrop-filter:blur(16px);border-top:1px solid var(--border);padding:8px 12px;display:flex;justify-content:center;gap:12px;transition:transform .3s}
.reader-bottom.hidden{transform:translateY(100%)}
.reader-images{padding-top:60px;padding-bottom:80px;max-width:800px;margin:0 auto}
.reader-images img{width:100%;height:auto;display:block;background:var(--bg-2)}

/* Translator card */
.translator-card{padding:16px;border-radius:var(--radius-lg);background:var(--bg-card);border:1px solid var(--border);transition:border-color .2s}
.translator-card:hover{border-color:var(--border-2)}
.translator-head{display:flex;gap:12px;align-items:center;margin-bottom:12px}
.translator-logo{width:44px;height:44px;border-radius:var(--radius-md);background:var(--bg-3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;overflow:hidden}
.translator-stats{display:flex;gap:12px}
.translator-stat{font-size:11px}
.translator-stat b{display:block;font-size:13px;color:var(--text)}

/* Premium */
.premium-hero{text-align:center;padding:40px 0 24px}
.pricing-grid{display:grid;grid-template-columns:1fr;gap:16px;margin:24px 0}
@media(min-width:768px){.pricing-grid{grid-template-columns:repeat(3,1fr)}}
.pricing-card{padding:20px;border-radius:var(--radius-xl);background:var(--bg-card);border:1px solid var(--border);text-align:center;position:relative;transition:border-color .2s}
.pricing-card:hover{border-color:var(--border-2)}
.pricing-card.popular{border-color:var(--primary);background:linear-gradient(to bottom, var(--primary-bg), var(--bg-card))}
.pricing-badge{position:absolute;top:-10px;left:50%;transform:translateX(-50%);padding:3px 10px;border-radius:var(--radius-full);background:var(--primary);color:#fff;font-size:10px;font-weight:700}
.pricing-price{font-size:28px;font-weight:900;margin:8px 0}
.pricing-features{text-align:right;margin:16px 0}
.pricing-feature{display:flex;gap:8px;padding:6px 0;font-size:12px;color:var(--text-2)}
.pricing-feature svg{width:14px;height:14px;color:var(--green);flex-shrink:0}

/* Tabs */
.tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-bottom:4px;border-bottom:1px solid var(--border)}
.tabs::-webkit-scrollbar{display:none}
.tab-btn{padding:8px 14px;border-radius:var(--radius-md);font-size:12px;font-weight:600;color:var(--text-3);white-space:nowrap;border:1px solid transparent;transition:all .15s}
.tab-btn:hover{color:var(--text-2);background:var(--bg-3)}
.tab-btn.active{background:var(--bg-3);color:var(--text);border-color:var(--border)}
.tab-panel{display:none}
.tab-panel.active{display:block}

/* Pagination */
.pagination{display:flex;gap:6px;justify-content:center;margin:24px 0;flex-wrap:wrap}
.page-btn{width:36px;height:36px;border-radius:var(--radius-md);background:var(--bg-card);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--text-2);transition:all .15s}
.page-btn:hover{border-color:var(--border-2);color:var(--text)}
.page-btn.active{background:var(--primary);color:#fff;border-color:var(--primary)}

/* Utilities */
.grid-2{display:grid;grid-template-columns:1fr;gap:16px}
@media(min-width:768px){.grid-2{grid-template-columns:1fr 1fr}}
.grid-3{display:grid;grid-template-columns:1fr;gap:16px}
@media(min-width:640px){.grid-3{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.grid-3{grid-template-columns:repeat(3,1fr)}}
.empty{text-align:center;padding:48px 16px;color:var(--text-3)}
.empty svg{width:48px;height:48px;margin:0 auto 12px;opacity:.5}

/* --- FIXES v2.1: دسته‌بندی، چپتر، fade، ریسپانسیو --- */
/* جلوگیری از خروج باکس از کادر */
.work-card, .latest-item, .ranking-item, .translator-card, .genre-card{max-width:100%;min-width:0;contain:content}
.work-card-info, .latest-item-main, .ranking-info{min-width:0;overflow:hidden}
.work-card-title{position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;min-width:0}
.work-card-title.fade{mask-image:linear-gradient(to right, transparent 0%, black 28px);-webkit-mask-image:linear-gradient(to right, transparent 0%, black 28px)}
.latest-title.fade{mask-image:linear-gradient(to right, transparent 0%, black 22px);-webkit-mask-image:linear-gradient(to right, transparent 0%, black 22px)}
.latest-work{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
/* انگلیسی اصلی، فارسی کوچک */
.work-card-title-en{font-size:13px;font-weight:800;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;min-width:0}
.work-card-title-fa{font-size:10px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;margin-top:2px}

/* آرشیو گرید جلوگیری از overflow */
.archive-grid .work-card{width:100%;min-width:0;max-width:100%}
.archive-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:640px){.archive-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:768px){.archive-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:1024px){.archive-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(min-width:1280px){.archive-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}

/* هرو اسلایدر کلیک - pointer-events برای دکمه‌ها */
.hero-slide a, .hero-slide button{pointer-events:auto;position:relative;z-index:5}
.hero{touch-action:pan-y}
.hero-content{pointer-events:none}
.hero-content > *{pointer-events:auto}

/* جستجو فیکس */
.search-item{max-width:100%;min-width:0;overflow:hidden}

/* چپتر به جای فصل - استایل اعداد */
.chapter-num{font-variant-numeric:tabular-nums;direction:ltr}
