* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0a0a0a; color: #e0e0e0; font-family: 'Inter', sans-serif; min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
select { background: #1a1a1a; border: 1px solid #333; color: #fff; padding: 6px 10px; border-radius: 5px; font-size: 0.78rem; font-family: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
::-webkit-scrollbar { width: 6px; height: 5px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 50px #141414 inset !important; -webkit-text-fill-color: #fff !important; }

/* --- SITE HEADER (FluxH style) --- */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(8,8,8,0.92); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-bottom: 1px solid transparent; background-image: linear-gradient(rgba(8,8,8,0.92), rgba(8,8,8,0.92)), linear-gradient(90deg, transparent, rgba(30,136,229,0.4), transparent); background-origin: padding-box, border-box; background-clip: padding-box, border-box; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 54px; }
.header-left { display: flex; align-items: center; gap: 28px; }
.header-brand { display: flex; align-items: center; gap: 8px; }
.brand-text { font-size: 1.3rem; font-weight: 900; color: #fff; letter-spacing: -0.5px; }
.header-nav { display: flex; gap: 2px; }
.header-nav a { padding: 6px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; color: #777; transition: color 0.2s, background 0.2s; text-transform: uppercase; letter-spacing: 0.4px; }
.header-nav a:hover { color: #fff; }
.header-nav a.active { color: #fff; background: rgba(255,255,255,0.08); }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-search { display: flex; align-items: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 6px 14px; gap: 7px; transition: border-color 0.2s, background 0.2s; }
.header-search:focus-within { border-color: rgba(30,136,229,0.5); background: rgba(255,255,255,0.07); }
.header-search input { background: none; border: none; color: #fff; font-size: 0.78rem; width: 160px; outline: none; font-family: inherit; }
.header-search input::placeholder { color: #555; }
.header-search svg { color: #555; flex-shrink: 0; transition: color 0.2s; }
.header-search:focus-within svg { color: #1e88e5; }
.header-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #1e88e5, #42a5f5); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 800; color: #fff; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.header-avatar:hover { transform: scale(1.08); box-shadow: 0 0 10px rgba(30,136,229,0.4); }

/* --- MAIN (full width, minimal padding) --- */
.main-content { padding: 20px 40px 40px; max-width: 1650px; margin: 0 auto; text-align: left; }

/* --- HEADER --- */
.hero-header { margin-bottom: 16px; }
.hero-header h2 { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 2px; }
.hero-header p { color: #555; font-size: 0.75rem; }

/* --- FILTERS --- */
.filter-pills { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.pill input { display: none; }
.pill span { display: block; padding: 5px 12px; border-radius: 4px; border: 1px solid #333; color: #777; font-size: 0.72rem; cursor: pointer; font-weight: 600; transition: 0.15s; }
.pill input:checked + span { background: rgba(30,136,229,0.15); color: #5fa8e8; border-color: rgba(30,136,229,0.4); }
.pill span:hover { border-color: #555; color: #ccc; }

/* --- PAGINATION (intelligent) --- */
.pagination { display: flex; align-items: center; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.page-btn, .page-num { padding: 5px 10px; border-radius: 4px; background: #1a1a1a; border: 1px solid #282828; color: #777; font-weight: 600; font-size: 0.7rem; transition: 0.15s; }
.page-btn:hover, .page-num:hover { background: #222; color: #fff; border-color: #444; }
.page-num.active { background: #1e88e5; border-color: #1e88e5; color: #fff; }
.page-goto { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.page-goto input { width: 44px; padding: 4px 6px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #fff; font-size: 0.7rem; text-align: center; outline: none; }
.page-goto button { padding: 4px 8px; background: #1e88e5; color: #fff; border: none; border-radius: 4px; font-size: 0.68rem; cursor: pointer; font-weight: 600; }

/* --- GRID (same poster size, contained) --- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px 12px; }
.card { background: #141414; border-radius: 6px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid transparent; display: block; position: relative; }
.card:hover { transform: translateY(-4px); border-color: #2a2a2a; box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.card-info { padding: 5px 6px 6px; }
.card-title { font-size: 0.68rem; font-weight: 600; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 0.58rem; color: #555; margin-top: 1px; }
.type-badge { background: rgba(30,136,229,0.1); color: #4a88bb; padding: 0px 4px; border-radius: 2px; font-size: 0.55rem; font-weight: 700; }
.poster-container { position: relative; }
.link-badge { position: absolute; bottom: 3px; left: 3px; background: rgba(0,0,0,0.6); color: #888; font-size: 0.52rem; padding: 1px 4px; border-radius: 2px; }

/* --- EMPTY STATE --- */
.empty-state { text-align: center; padding: 2rem; color: #555; grid-column: 1/-1; }
.empty-state svg { width: 40px; height: 40px; opacity: 0.2; margin-bottom: 8px; }
.empty-state p { font-size: 0.85rem; }

/* --- TITLE PAGE --- */
.title-hero { position: relative; margin-bottom: 16px; border-radius: 8px; overflow: hidden; }
.title-backdrop { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.18; }
.title-hero-content { position: relative; display: flex; gap: 20px; padding: 20px; background: linear-gradient(to right, rgba(10,10,10,0.95) 30%, rgba(10,10,10,0.5)); }
.title-poster-large img { width: 160px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,0.5); }
.title-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.title-meta h1 { font-size: 1.3rem; font-weight: 800; }
.title-original { color: #666; font-style: italic; font-size: 0.8rem; }
.title-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tag-vote,.tag-year,.tag-runtime { background: rgba(255,255,255,0.05); border: 1px solid #2a2a2a; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; color: #888; }
.tag-vote { color: #ffab40; border-color: rgba(255,171,64,0.25); }
.title-genres { display: flex; gap: 5px; flex-wrap: wrap; }
.genre-pill { background: rgba(229,9,20,0.08); border: 1px solid rgba(229,9,20,0.2); padding: 2px 8px; border-radius: 12px; font-size: 0.68rem; color: #e57373; }
.title-overview { color: #888; font-size: 0.82rem; line-height: 1.5; max-width: 500px; }
.title-link-count { color: #555; font-size: 0.72rem; margin-top: auto; }

/* --- LINKS/FILES --- */
.title-links-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.season-block { background: #141414; border: 1px solid #1e1e1e; border-radius: 6px; margin-bottom: 8px; overflow: hidden; }
.season-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; cursor: pointer; font-weight: 700; font-size: 0.85rem; }
.season-header:hover { background: #1a1a1a; }
.season-count { color: #666; font-size: 0.72rem; font-weight: 500; }
.season-episodes { display: none; border-top: 1px solid #1e1e1e; }
.season-block.open .season-episodes { display: block; }
.quality-block { margin-bottom: 12px; }
.quality-header { font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid #1e1e1e; }
.quality-count { color: #666; font-weight: 500; font-size: 0.75rem; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.02); font-size: 0.78rem; }
.file-item:hover { background: rgba(255,255,255,0.015); }
.file-item:last-child { border-bottom: none; }
.file-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.file-episode { background: #e53935; color: #fff; padding: 1px 5px; border-radius: 3px; font-size: 0.65rem; font-weight: 800; }
.file-host { color: #fff; font-weight: 600; font-size: 0.78rem; }
.file-name { color: #666; font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.quality-tag { background: rgba(255,255,255,0.06); border: 1px solid #2a2a2a; padding: 1px 5px; border-radius: 3px; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
.badge-size { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 3px; font-size: 0.62rem; color: #aaa; font-weight: 600; }
.badge-lang { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.15); padding: 1px 5px; border-radius: 3px; font-size: 0.62rem; color: #60a5fa; font-weight: 600; }
.badge-sub { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.15); padding: 1px 5px; border-radius: 3px; font-size: 0.62rem; color: #34d399; font-weight: 600; }
.btn-dl { background: rgba(255,255,255,0.04); border: 1px solid #2a2a2a; color: #777; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.15s; flex-shrink: 0; }
.btn-dl:hover { background: #1e88e5; border-color: #1e88e5; color: #fff; }

/* --- SETTINGS --- */
.settings-card { background: #141414; border: 1px solid #1e1e1e; border-radius: 8px; padding: 16px; max-width: 450px; margin-bottom: 16px; }
.settings-card h3 { font-size: 0.92rem; margin-bottom: 10px; }
.settings-info p { color: #666; margin-bottom: 4px; font-size: 0.8rem; }
.settings-info strong { color: #ccc; }
.settings-form input { width: 100%; padding: 8px 10px; background: #111; border: 1px solid #2a2a2a; border-radius: 5px; color: #fff; margin-bottom: 8px; font-size: 0.82rem; font-family: inherit; outline: none; }
.settings-form input:focus { border-color: #1e88e5; }
.btn-primary { padding: 8px 18px; background: #1e88e5; color: #fff; border: none; border-radius: 5px; font-weight: 700; font-size: 0.8rem; cursor: pointer; transition: 0.15s; }
.btn-primary:hover { box-shadow: 0 3px 10px rgba(30,136,229,0.25); }

/* --- REQUESTS --- */
.request-form-card { background: #141414; border: 1px solid #1e1e1e; border-radius: 8px; padding: 16px; margin-bottom: 20px; }
.request-form-card h3 { margin-bottom: 10px; font-size: 0.95rem; }
.request-form-card label { display: block; font-size: 0.7rem; color: #666; margin-bottom: 3px; margin-top: 8px; }
.request-form-card input, .request-form-card select { width: 100%; padding: 8px 10px; background: #111; border: 1px solid #2a2a2a; border-radius: 5px; color: #fff; font-size: 0.82rem; font-family: inherit; outline: none; }
.request-form-card input:focus { border-color: #1e88e5; }
.req-form-row { display: flex; gap: 10px; }
.req-submit-btn { margin-top: 12px; padding: 9px 18px; background: #1e88e5; color: #fff; border: none; border-radius: 5px; font-weight: 700; font-size: 0.82rem; cursor: pointer; transition: 0.15s; }
.req-submit-btn:hover { box-shadow: 0 3px 10px rgba(30,136,229,0.25); }
.req-success { color: #10b981; font-weight: 600; margin-bottom: 8px; font-size: 0.82rem; }
.req-error { color: #e53935; font-weight: 600; margin-bottom: 8px; font-size: 0.82rem; }
.request-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #141414; border: 1px solid #1e1e1e; border-radius: 6px; margin-bottom: 6px; }
.req-title { font-weight: 700; font-size: 0.82rem; margin-bottom: 2px; }
.req-meta { display: flex; gap: 6px; font-size: 0.68rem; color: #666; }
.req-type { background: rgba(30,136,229,0.12); color: #5090cc; padding: 0px 5px; border-radius: 3px; font-weight: 600; font-size: 0.62rem; text-transform: capitalize; }
.req-details { color: #666; font-size: 0.72rem; margin-top: 2px; }
.req-badge { padding: 2px 7px; border-radius: 3px; font-size: 0.65rem; font-weight: 700; }
.req-badge-pending { background: rgba(255,171,64,0.12); color: #e6a030; }
.req-badge-done { background: rgba(16,185,129,0.12); color: #10b981; }
.req-badge-rejected { background: rgba(229,57,53,0.12); color: #e53935; }

/* --- ADMIN DDL --- */
.adm-ddl { width: 100%; }
.ddl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ddl-card { background: #141414; border-radius: 5px; overflow: hidden; transition: transform 0.12s; border: 1px solid #1a1a1a; }
.ddl-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.ddl-card a { display: block; }
.ddl-card-poster { width: 100%; aspect-ratio: 2/3; background: #1a1a1a; object-fit: cover; display: block; }
.ddl-card-body { padding: 5px 7px; }
.ddl-card-title { font-size: 0.68rem; font-weight: 600; color: #ccc; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; margin-bottom: 2px; }
.ddl-card-meta { font-size: 0.58rem; color: #555; display: flex; justify-content: space-between; }
.ddl-card-cat { background: rgba(100,181,246,0.08); padding: 0px 4px; border-radius: 3px; color: #5090cc; }
.ddl-card-links { color: #4caf50; font-weight: 600; }
.ddl-no-poster { width: 100%; aspect-ratio: 2/3; background: #1a1a1a; display: flex; align-items: center; justify-content: center; color: #444; font-size: 0.65rem; }
.ddl-pagination { display: flex; gap: 3px; flex-wrap: wrap; }
.ddl-pagination a, .ddl-pagination span { padding: 4px 9px; border-radius: 3px; font-size: 0.7rem; }
.ddl-pagination a { background: #1a1a1a; color: #aaa; border: 1px solid #222; }
.ddl-pagination a:hover { background: #222; }
.ddl-pagination .current { background: #1e88e5; color: #fff; border: 1px solid transparent; }
.adm-ddl-search { display: flex; gap: 8px; margin-bottom: 12px; }
.adm-ddl-search input { flex: 1; padding: 8px 10px; background: #141414; border: 1px solid #2a2a2a; border-radius: 5px; color: #fff; font-size: 0.8rem; font-family: inherit; outline: none; }
.adm-ddl-search input:focus { border-color: #1e88e5; }
.adm-ddl-search button { padding: 8px 14px; background: #1e88e5; color: #fff; border: none; border-radius: 5px; cursor: pointer; font-weight: 600; font-size: 0.78rem; }
.adm-ddl-actions { display: flex; gap: 6px; margin-bottom: 12px; }
.adm-ddl-actions a { padding: 5px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.adm-btn-blue { background: #1e88e5; color: #fff; }
.adm-btn-green { background: #43a047; color: #fff; }
.adm-btn-red { background: #e53935; color: #fff; }
.adm-btn-outline2 { background: transparent; border: 1px solid #333; color: #ccc; }

.adm-ddl-form { background: #141414; border: 1px solid #1e1e1e; border-radius: 6px; padding: 14px; margin-bottom: 14px; }
.adm-ddl-form h3 { color: #fff; margin-bottom: 10px; font-size: 0.9rem; }
.adm-ddl-form label { display: block; font-size: 0.68rem; color: #666; margin-bottom: 2px; margin-top: 6px; }
.adm-ddl-form input, .adm-ddl-form select { width: 100%; padding: 7px 9px; background: #111; border: 1px solid #2a2a2a; border-radius: 4px; color: #fff; font-size: 0.78rem; font-family: inherit; }
.adm-ddl-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adm-ddl-form .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.adm-ddl-form button[type="submit"] { margin-top: 10px; padding: 7px 16px; background: #43a047; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 0.78rem; }
.adm-ddl-edit-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.adm-ddl-edit-title img { width: 40px; border-radius: 4px; }
.adm-ddl-edit-title h2 { margin: 0; font-size: 1rem; }
.adm-ddl-edit-title .cat { font-size: 0.72rem; color: #666; }
.link-list-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid #151515; font-size: 0.72rem; }
.link-list-item:hover { background: rgba(255,255,255,0.015); }
.link-list-item .host { width: 70px; font-weight: 600; color: #5090cc; }
.link-list-item .quality { width: 80px; color: #4caf50; }
.link-list-item .ep { width: 55px; color: #ffab40; }
.link-list-item .url { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555; }

/* --- LOGIN --- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0a0a0a; }
.login-box { width: 90%; max-width: 340px; text-align: center; }
.logo-large { margin-bottom: 1.5rem; }
.logo-large svg { width: 60px; height: 60px; color: #e53935; margin-bottom: 8px; }
.logo-large h1 { font-size: 1.5rem; font-weight: 800; color: #fff; }
.login-box input { width: 100%; padding: 11px; background: #141414; border: 1px solid #2a2a2a; border-radius: 6px; color: #fff; margin: 6px 0; font-size: 0.88rem; font-family: inherit; outline: none; }
.login-box input:focus { border-color: #1e88e5; }
.login-box button[type="submit"] { width: 100%; padding: 11px; background: #e53935; color: #fff; border: none; border-radius: 6px; font-weight: 700; font-size: 0.92rem; cursor: pointer; margin-top: 6px; }
.login-box .error-msg { color: #e53935; font-size: 0.8rem; margin-top: 10px; font-weight: 600; }
.login-box .link { color: #666; font-size: 0.78rem; margin-top: 14px; display: block; }
.login-box .link a { color: #1e88e5; font-weight: 600; }

/* --- SEARCH --- */
.search-box { max-width: 500px; margin-bottom: 20px; }
.search-input { width: 100%; padding: 10px 14px; background: #141414; border: 1px solid #2a2a2a; border-radius: 6px; color: #fff; font-size: 0.88rem; font-family: inherit; outline: none; }
.search-input:focus { border-color: #1e88e5; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    .header-inner { padding: 0 12px; height: 54px; }
    .header-nav { display: none; }
    .header-search input { width: 90px; }
    .main-content { padding: 10px; }
    .media-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .ddl-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .title-hero-content { flex-direction: column; align-items: center; text-align: center; }
    .req-form-row { flex-direction: column; }
}


/* --- REQUEST EXPAND DETAILS --- */
.req-expand { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; width: 100%; }
.req-expand.open { max-height: 400px; }
.req-expand-inner { padding-top: 12px; margin-top: 10px; border-top: 1px solid #222; }
.req-detail-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.8rem; }
.req-detail-label { color: #666; font-weight: 600; }
.req-detail-row span:last-child { color: #ccc; }


/* --- CATALOGUE HEADER (modern) --- */
.cat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cat-header-left { display: flex; align-items: center; gap: 10px; }
.cat-title { font-size: 1.2rem; font-weight: 800; color: #fff; }
.cat-badge { background: rgba(30,136,229,0.1); color: #5090cc; border: 1px solid rgba(30,136,229,0.2); padding: 3px 10px; border-radius: 12px; font-size: 0.68rem; font-weight: 700; }
.cat-header-right { }
.cat-page-info { color: #555; font-size: 0.72rem; font-weight: 600; }

/* --- CATALOGUE TOOLBAR --- */
.cat-toolbar { display: flex; align-items: center; margin-bottom: 18px; padding: 10px 14px; background: rgba(255,255,255,0.02); border-radius: 8px; }
.cat-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; }
.cat-pill input { display: none; }
.cat-pill span { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 6px; border: none; background: transparent; color: #777; font-size: 0.75rem; cursor: pointer; font-weight: 600; transition: 0.15s; }
.cat-pill input:checked + span { background: rgba(30,136,229,0.12); color: #60a5fa; }
.cat-pill span:hover { color: #ccc; background: rgba(255,255,255,0.04); }
.cat-sort { margin-left: auto; }
.cat-sort select { background: rgba(255,255,255,0.04); border: 1px solid #2a2a2a; color: #aaa; padding: 6px 12px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; font-family: inherit; cursor: pointer; }
.cat-sort select:focus { border-color: rgba(30,136,229,0.4); color: #fff; outline: none; }

/* --- CATALOGUE PAGINATION (modern) --- */
.cat-pagination { display: flex; align-items: center; gap: 4px; margin-bottom: 18px; }
.cp-btn, .cp-num { padding: 6px 11px; border-radius: 6px; background: transparent; border: 1px solid #2a2a2a; color: #777; font-weight: 600; font-size: 0.72rem; transition: 0.15s; }
.cp-btn:hover, .cp-num:hover { background: rgba(255,255,255,0.05); color: #fff; border-color: #444; }
.cp-num.active { background: #1e88e5; border-color: #1e88e5; color: #fff; }
.cp-btn.disabled { opacity: 0.3; pointer-events: none; }
