/* ZipNation — professional Mini App theme */

:root {
    --bg: #0a0a0c;
    --bg-card: #141418;
    --bg-elevated: #1e1e24;
    --text: #ffffff;
    --text-muted: #8b8b95;
    --primary: #e91e8c;
    --primary-2: #9c27b0;
    --gradient: linear-gradient(135deg, #e91e8c 0%, #9c27b0 100%);
    --gradient-blue: linear-gradient(135deg, #2196f3, #00bcd4);
    --gradient-orange: linear-gradient(135deg, #ff9800, #ffc107);
    --rating-gold: #ff9800;
    --border: rgba(255, 255, 255, 0.07);
    --navbar-bg: rgba(13, 13, 16, 0.96);
    --nav-height: 48px;
    --bottom-nav-h: 56px;
    --radius: 16px;
    --radius-pill: 999px;
    --glow: rgba(233, 30, 140, 0.35);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
    background: var(--bg);
    padding-top: calc(var(--nav-height) + var(--safe-top));
    -webkit-overflow-scrolling: touch;
}

.tg-webapp body { padding-top: calc(var(--nav-height) + var(--safe-top)); }

/* ===== COMPACT HEADER ===== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    padding-top: var(--safe-top);
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    overflow: visible;
}
.site-header .container {
    overflow: visible;
}
.header-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: var(--nav-height);
    padding: 0.25rem 0;
}
.header-spacer { flex: 1; }
.logo-jutsu {
    display: flex; align-items: baseline; gap: 0.15rem;
    text-decoration: none; color: var(--text);
    font-weight: 800; font-size: 1.15rem; letter-spacing: -0.04em;
    flex-shrink: 0;
}
.logo-jutsu .logo-tld {
    font-size: 0.68rem; font-weight: 700;
    background: var(--gradient); color: #fff;
    padding: 0.12rem 0.4rem; border-radius: 6px;
}
.logo-jutsu .logo-mid {
    font-weight: 800;
    color: var(--primary);
    font-size: 0.95em;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* Desktop kategoriya dropdown */
.desktop-cat-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: 1rem;
    flex: 1;
    min-width: 0;
    overflow: visible;
}
.site-header .header-row {
    overflow: visible;
}
.dnav-drop-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.desktop-nav-extras {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.35rem;
}
.dnav-dropdown { position: relative; flex-shrink: 0; }
.dnav-drop-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.65rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}
.dnav-drop-btn:hover,
.dnav-drop-btn[aria-expanded="true"] {
    color: var(--text);
    background: var(--bg-card);
}
.dnav-drop-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    max-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    padding: 0.75rem;
    z-index: 300;
}

.dnav-drop-col { display: flex; flex-direction: column; gap: 0.2rem; }
.dnav-drop-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}
.dnav-drop-link {
    display: block;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.84rem;
}
.dnav-drop-link:hover { background: var(--bg-elevated); color: var(--primary); }
.dnav-drop-all {
    display: block;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.dnav-extra {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    white-space: nowrap;
}
.dnav-extra:hover { color: var(--primary); }

/* Mobil drawer accordion */
.drawer-acc-list { display: flex; flex-direction: column; gap: 0.25rem; }
.drawer-acc {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
    overflow: hidden;
}
.drawer-acc-summary {
    padding: 0.7rem 0.85rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.drawer-acc-summary::-webkit-details-marker { display: none; }
.drawer-acc[open] .drawer-acc-summary { color: var(--primary); }
.drawer-acc-body {
    padding: 0 0.85rem 0.75rem;
    border-top: 1px solid var(--border);
}
.drawer-sub-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0.5rem 0 0.35rem;
}
.drawer-sub-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.drawer-sub-link {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.78rem;
}
.drawer-sub-link:hover { border-color: var(--primary); color: var(--primary); }
.drawer-sub-all {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 700;
    color: var(--primary);
    border: none;
    background: none;
    padding: 0;
}
.drawer-extras-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}
.drawer-footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 1rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
}
.drawer-footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
}
.drawer-footer-legal a:hover { color: var(--primary); }
.mobile-drawer-panel {
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    overflow-y: auto;
}
.header-icon-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
}
.header-icon-btn svg { width: 18px; height: 18px; }

/* Profile avatar + dropdown */
.header-profile { position: relative; flex-shrink: 0; }
.profile-avatar-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-weight: 800; font-size: 0.85rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit;
    transition: border-color 0.2s;
}
.profile-avatar-btn.logged-in {
    border-color: var(--primary);
    background: var(--gradient);
    color: #fff;
}
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(280px, 90vw);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    z-index: 300;
    overflow: hidden;
}
.profile-dropdown-head {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}
.profile-dropdown-name { display: block; font-weight: 700; font-size: 1rem; }
.profile-dropdown-sub { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }
.profile-dropdown-nav { padding: 0.35rem 0; }
.profile-dd-item {
    display: block;
    padding: 0.65rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.profile-dd-item:hover { background: rgba(255,255,255,0.05); }
.profile-dd-admin { color: var(--primary) !important; }
.profile-dropdown-foot {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
}
.btn-block { width: 100%; }

/* ===== HERO (HOME) ===== */
.home-main { padding-bottom: 1rem; }
.hero-section {
    position: relative;
    margin: calc(-1 * (var(--nav-height) + var(--safe-top))) 0 0;
    padding-top: calc(var(--nav-height) + var(--safe-top));
    min-height: 52vh;
    max-height: 420px;
}
.hero-carousel { position: relative; height: 100%; min-height: 280px; }
.hero-slide { position: relative; height: 100%; min-height: 280px; }
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center top;
    filter: blur(0);
    transform: scale(1.05);
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(10,10,12,0.95) 0%, rgba(10,10,12,0.6) 50%, rgba(10,10,12,0.3) 100%),
                linear-gradient(0deg, var(--bg) 0%, transparent 50%);
}
.hero-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; justify-content: flex-end;
    min-height: 280px;
    padding-bottom: 2rem;
    padding-top: 1rem;
}
.hero-badge {
    display: inline-block;
    background: var(--gradient);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    margin-bottom: 0.65rem;
    width: fit-content;
}
.hero-title {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    max-width: 520px;
}
.hero-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 480px;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hero-meta-item {
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
}
.hero-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.btn-hero-play {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient);
    color: #fff; font-weight: 700; font-size: 0.95rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-hero-secondary {
    display: inline-flex; align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.12);
    color: #fff; font-weight: 600; font-size: 0.9rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    border: 1px solid var(--border);
}
.hero-dots {
    position: absolute; bottom: 1rem; right: 1.25rem;
    display: flex; gap: 0.4rem; z-index: 3;
}
.hero-dot {
    width: 8px; height: 8px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.35);
    cursor: pointer; padding: 0;
}
.hero-dot.active { background: var(--primary); width: 20px; border-radius: 4px; }

/* Home sections */
.home-sections { padding-bottom: 2rem; }
.home-cats {
    display: flex; gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0 1.25rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.home-cats::-webkit-scrollbar { display: none; }
.home-cat-chip {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.content-row { margin-bottom: 1.75rem; }
.content-row.hidden { display: none; }
.row-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.75rem;
}
.row-head h2 { font-size: 1.05rem; font-weight: 700; }
.row-link { color: var(--primary); text-decoration: none; font-size: 0.82rem; font-weight: 600; }
.row-scroll {
    display: flex; gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll .jcard-compact {
    flex: 0 0 120px;
    scroll-snap-align: start;
}
@media (min-width: 768px) {
    .row-scroll .jcard-compact { flex: 0 0 140px; }
}

/* ===== CATALOG PAGE ===== */
.catalog-main { padding-top: 1rem; }
.catalog-head { margin-bottom: 1rem; }
.catalog-head h1 { font-size: 1.5rem; font-weight: 800; }
.catalog-tabs {
    display: flex; gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.catalog-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
    flex-shrink: 0;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.cat-tab.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
}
.catalog-grid-pro {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem 0.75rem;
}
@media (min-width: 768px) {
    .catalog-grid-pro { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
}

/* ===== DRAWER ===== */
.drawer-cat-list { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.5rem; }
.drawer-cat-link {
    display: block;
    padding: 0.6rem 0.75rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: background 0.15s;
}
.drawer-cat-link:hover { background: rgba(255,255,255,0.06); }
.drawer-social {
    display: flex; gap: 0.65rem;
    padding: 1rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border);
}
.drawer-admin-link { color: var(--primary) !important; font-weight: 600; }

/* ===== DETAIL PAGE ===== */
.detail-root { padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom)); }
.detail-hero {
    position: relative;
    min-height: 320px;
    margin-top: calc(-1 * (var(--nav-height) + var(--safe-top)));
    padding-top: calc(var(--nav-height) + var(--safe-top));
}
.detail-hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: blur(8px); transform: scale(1.1);
}
.detail-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, var(--bg) 0%, rgba(10,10,12,0.7) 60%, rgba(10,10,12,0.4) 100%);
}
.detail-hero-inner {
    position: relative; z-index: 2;
    display: flex; gap: 1.25rem;
    align-items: flex-end;
    padding: 1.5rem 0 2rem;
    flex-wrap: wrap;
}
.detail-hero-poster {
    width: 140px; flex-shrink: 0;
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.detail-hero-poster .detail-poster-img {
    width: 100%; height: 100%; object-fit: cover;
}
.detail-hero-info { flex: 1; min-width: 200px; }
.detail-badges { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.detail-badge {
    background: rgba(255,255,255,0.12);
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
}
.detail-badge.badge-top { background: var(--gradient); color: #fff; }
.detail-rating-row { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0; }
.detail-rating-badge {
    background: var(--rating-gold);
    color: #111;
    font-weight: 800;
    padding: 0.35rem 0.65rem;
    border-radius: 10px;
    font-size: 1rem;
}
.detail-rating-label { color: var(--text-muted); font-size: 0.85rem; }
.detail-actions-row { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.detail-body { padding-bottom: 2rem; }
.detail-section { margin-bottom: 2rem; }
.detail-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.detail-desc-text { color: var(--text-muted); line-height: 1.75; font-size: 0.95rem; }
.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.65rem;
}
.meta-cell {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
}
.meta-cell dt { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.meta-cell dd { font-size: 0.88rem; font-weight: 600; margin: 0; }
.detail-season-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}
.detail-season-tab {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}
.detail-season-tab.active,
.detail-season-tab:hover {
    border-color: var(--primary);
    color: var(--text);
    background: rgba(233, 30, 140, 0.12);
}
.detail-empty-eps {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}
.detail-episodes-grid {
    display: flex; flex-wrap: wrap; gap: 0.45rem;
}
.ep-chip {
    min-width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.15s;
}
.ep-chip:hover { border-color: var(--primary); background: rgba(233,30,140,0.15); }

/* ===== CARDS (fixed aspect + placeholder) ===== */
.jcard-poster {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
}
.jcard-poster-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.jcard-placeholder { opacity: 0.85; }
.jcard-rating {
    position: absolute; top: 8px; right: 8px;
    background: var(--rating-gold); color: #111;
    font-weight: 800; font-size: 0.72rem;
    padding: 0.22rem 0.48rem; border-radius: 8px;
    min-width: 32px; text-align: center;
}
.jcard-compact .jcard-title { font-size: 0.82rem; }
.jcard-compact .jcard-poster { margin-bottom: 0.4rem; }

/* Bottom nav safe area */
.bottom-nav {
    padding-bottom: var(--safe-bottom);
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
}
.search-overlay-panel {
    padding-top: calc(0.75rem + var(--safe-top));
}
.mobile-drawer-panel {
    padding-top: calc(0.75rem + var(--safe-top));
    padding-bottom: calc(1rem + var(--safe-bottom));
}

@media (max-width: 767px) {
    #header-search-btn { display: none !important; }
}

.logo-jutsu {
    display: flex; align-items: baseline; gap: 0.15rem;
    text-decoration: none; color: var(--text);
    font-weight: 800; font-size: 1.35rem; letter-spacing: -0.04em;
    flex-shrink: 0;
}
.logo-jutsu .logo-tld {
    font-size: 0.75rem; font-weight: 700;
    background: var(--gradient); color: #fff;
    padding: 0.15rem 0.45rem; border-radius: 6px;
    margin-left: 0.15rem;
}
.header-search {
    flex: 1; max-width: 560px; min-width: 0;
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-pill);
    padding: 0.55rem 1rem;
    border: 1px solid var(--border);
}
.header-search:focus-within { border-color: rgba(233,30,140,0.4); }
.header-search svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.header-search input {
    flex: 1; border: none; background: transparent; color: var(--text);
    font-size: 0.95rem; outline: none; font-family: inherit;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-tools {
    display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
}
.lang-pill {
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-pill);
    padding: 0.4rem 0.65rem; font-size: 0.8rem; cursor: pointer;
}
.theme-pill {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
}
.user-pill {
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-pill); padding: 0.25rem 0.65rem 0.25rem 0.25rem;
    text-decoration: none; color: var(--text); font-size: 0.85rem;
}
.user-pill-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--gradient); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem;
}

.nav-toggle {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); width: 42px; height: 42px; border-radius: 12px;
    font-size: 1.25rem; cursor: pointer; flex-shrink: 0;
}

/* Drawer kategoriyalar */
.drawer-categories { margin: 1rem 0; }
.drawer-cat-grid {
    display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.5rem;
}
.drawer-cat-grid .cat-pill {
    flex-shrink: 0; border: none; cursor: pointer;
    padding: 0.45rem 0.9rem; border-radius: var(--radius-pill);
    background: var(--bg-elevated); color: var(--text-muted);
    font-size: 0.82rem; font-weight: 600; font-family: inherit;
}
.drawer-cat-grid .cat-pill.active {
    background: var(--gradient); color: #fff;
}

/* ===== MAIN ===== */
.page-main {
    position: relative; z-index: 1;
    padding: 1rem 0 4rem;
    min-height: 60vh;
}
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.75rem;
}
.section-head h2 {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1.15rem; font-weight: 700;
}
.section-head h2 .sec-icon {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--gradient); display: inline-flex;
    align-items: center; justify-content: center; font-size: 0.85rem;
}
.section-sub { color: var(--text-muted); font-size: 0.85rem; }

/* ===== CARDS GRID ===== */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.85rem 0.65rem;
}
@media (min-width: 768px) {
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1.1rem 0.85rem; }
}
.jcard {
    text-decoration: none; color: inherit;
    opacity: 0; animation: cardIn 0.45s ease forwards;
}
.jcard-poster {
    position: relative; aspect-ratio: 2/3; border-radius: 14px;
    overflow: hidden; background: var(--bg-card);
    margin-bottom: 0.55rem;
}
.jcard-poster-inner,
.jcard-poster-img {
    width: 100%; height: 100%;
    transition: transform 0.35s ease;
}
.jcard-poster-img { object-fit: cover; display: block; }
.jcard:hover .jcard-poster-inner,
.jcard:hover .jcard-poster-img { transform: scale(1.05); }
.jcard-rating {
    position: absolute; top: 8px; right: 8px;
    background: var(--rating-gold); color: #111;
    font-weight: 800; font-size: 0.72rem;
    padding: 0.2rem 0.45rem; border-radius: 8px;
}
.jcard-ep {
    position: absolute; bottom: 8px; left: 8px;
    background: var(--gradient); color: #fff;
    font-size: 0.68rem; font-weight: 700;
    padding: 0.25rem 0.5rem; border-radius: 8px;
}
.jcard-type {
    position: absolute; top: 8px; left: 8px;
    background: rgba(0,0,0,0.65); color: #fff;
    font-size: 0.62rem; font-weight: 600;
    padding: 0.2rem 0.4rem; border-radius: 6px;
    text-transform: uppercase;
}
.jcard-title {
    font-size: 0.88rem; font-weight: 700; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 0.2rem;
}
.jcard-year { font-size: 0.78rem; color: var(--text-muted); }

/* ===== LOAD MORE + PAGINATION ===== */
.catalog-footer { margin-top: 2rem; text-align: center; }
.btn-load-more {
    display: inline-block; min-width: 280px;
    padding: 0.85rem 2rem; border-radius: var(--radius-pill);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-muted); font-weight: 600; cursor: pointer;
    font-family: inherit; font-size: 0.95rem;
    transition: all 0.2s;
}
.btn-load-more:hover { color: var(--text); border-color: rgba(233,30,140,0.4); }
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 0.45rem; margin-top: 1.25rem; flex-wrap: wrap;
}
.page-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--border); background: transparent;
    color: var(--text); cursor: pointer; font-size: 0.85rem;
    font-family: inherit; display: flex; align-items: center; justify-content: center;
}
.page-btn.active { background: var(--gradient); border-color: transparent; font-weight: 700; }
.page-btn:disabled { opacity: 0.35; cursor: default; }

/* ===== JUTSU FOOTER ===== */
.jutsu-footer {
    background: var(--navbar-bg); border-top: 1px solid var(--border);
    padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom));
    position: relative; z-index: 1;
}
.jutsu-footer .footer-social {
    display: flex; flex-wrap: wrap; gap: 0.65rem;
    justify-content: center; margin-bottom: 1.25rem;
}
.jutsu-footer .social-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: all 0.2s;
}
.jutsu-footer .social-btn:hover {
    color: var(--primary); border-color: var(--primary);
    transform: translateY(-2px);
}
.jutsu-footer .social-btn svg { width: 20px; height: 20px; }
.jutsu-footer-inner {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 1rem;
}
.jutsu-footer-copy { color: var(--text-muted); font-size: 0.8rem; }
.footer-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill-btn {
    display: inline-block; padding: 0.45rem 1rem;
    border-radius: var(--radius-pill); text-decoration: none;
    background: var(--gradient); color: #fff;
    font-size: 0.78rem; font-weight: 600;
    white-space: nowrap;
}
.pill-btn:hover { opacity: 0.9; }
.back-top {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg-card);
    color: var(--text); cursor: pointer; font-size: 1.1rem;
}

/* ===== DETAIL PAGE ===== */
.detail-page { padding-top: calc(var(--nav-height) + 1rem); }
.detail-grid {
    display: grid; grid-template-columns: 280px 1fr; gap: 2rem;
}
@media (max-width: 767px) {
    .detail-grid { grid-template-columns: 1fr; }
}
.detail-poster {
    border-radius: var(--radius); overflow: hidden; aspect-ratio: 2/3;
    background: var(--bg-card);
}
.detail-poster-inner { width: 100%; height: 100%; }
.detail-poster-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-actions { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 1rem; }
.btn-gradient {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.85rem 1rem; border-radius: var(--radius-pill);
    border: none; color: #fff; font-weight: 700; font-size: 0.9rem;
    cursor: pointer; text-decoration: none; font-family: inherit;
}
.btn-gradient.pink { background: var(--gradient); }
.btn-gradient.blue { background: var(--gradient-blue); }
.btn-gradient.orange { background: var(--gradient-orange); }
.detail-title { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; margin-bottom: 0.25rem; }
.detail-subtitle { color: var(--text-muted); margin-bottom: 1rem; }
.detail-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem; margin-bottom: 1.5rem;
}
.stat-box {
    background: var(--bg-card); border-radius: 12px;
    padding: 0.75rem; border: 1px solid var(--border);
}
.stat-box label { display: block; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.stat-box span { font-weight: 600; font-size: 0.85rem; }
.detail-meta { display: grid; gap: 0.5rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; font-size: 0.88rem; }
.meta-row dt { color: var(--text-muted); min-width: 100px; }
.meta-row dd { color: var(--text); margin: 0; }
.meta-row dd.tag { color: var(--primary); }

/* ===== WATCH PAGE JUTSU ===== */
.page-watch .watch-page {
    padding: calc(var(--nav-height) + 1rem) 0 4rem;
    min-height: 100vh;
}
.page-watch .watch-layout {
    display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem;
}
@media (max-width: 900px) {
    .page-watch .watch-layout { grid-template-columns: 1fr; }
}
.watch-sidebar .sidebar-block {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--border);
}
.sidebar-watch-tab .full-width { width: 100%; text-align: center; }

/* ===== PLAYER TOOLBAR & DROPDOWNS ===== */
.player-toolbar {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin-bottom: 0.65rem;
}
.player-dd { position: relative; flex: 1; min-width: 120px; }
.player-dd-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; padding: 0.65rem 1rem;
    background: linear-gradient(135deg, #29b6f6, #0288d1);
    border: none; border-radius: 10px; color: #fff;
    font-weight: 700; font-size: 0.88rem; cursor: pointer; font-family: inherit;
}
.player-dd-btn svg { flex-shrink: 0; opacity: 0.9; }
.player-dd-menu {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50;
    background: #1a1a1f; border: 1px solid var(--border);
    border-radius: 10px; max-height: 220px; overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.player-dd-item {
    display: block; width: 100%; text-align: left;
    padding: 0.65rem 1rem; border: none; background: transparent;
    color: var(--text); font-size: 0.85rem; cursor: pointer; font-family: inherit;
}
.player-dd-item:hover:not([disabled]) { background: rgba(255,255,255,0.06); }
.player-dd-item.active { color: var(--text-muted); }
.player-dd-item[disabled] { opacity: 0.4; cursor: not-allowed; }
.player-dd-hint { padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--text-muted); margin: 0; }

/* Skip intro / credits */
.player-skip-btn {
    position: absolute; bottom: 4.5rem; right: 1rem; z-index: 8;
    background: rgba(30,30,35,0.92); border: 1px solid rgba(255,255,255,0.15);
    color: #fff; padding: 0.55rem 1rem; border-radius: 8px;
    font-size: 0.82rem; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: opacity 0.2s;
}
.player-skip-btn:hover { background: rgba(50,50,58,0.95); }

/* Extra controls bar */
.player-extra-controls {
    display: flex; align-items: center; gap: 0.35rem;
    background: #0d0d10; border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 0.45rem 0.65rem; margin-top: -1px;
}
.player-extra-spacer { flex: 1; }
.player-nav-btn {
    width: 36px; height: 36px; border-radius: 8px;
    border: none; background: transparent; color: #fff;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.player-nav-btn:hover:not(:disabled) { background: rgba(41,182,246,0.25); }
.player-nav-btn:disabled { opacity: 0.3; cursor: default; }
.player-settings-toggle.active,
.player-nav-btn.player-settings-toggle:hover { background: #29b6f6; }

/* Settings panel */
.player-settings-panel {
    background: #1e1e24; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 0.75rem 1rem; margin-top: 0.5rem;
}
.settings-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.55rem 0; border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.settings-row:last-of-type { border-bottom: none; }
.settings-row select {
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); padding: 0.35rem 0.65rem; border-radius: 8px;
    font-family: inherit; font-size: 0.85rem;
}
.btn-report {
    width: 100%; margin-top: 0.75rem; padding: 0.75rem;
    background: linear-gradient(135deg, #29b6f6, #0288d1);
    border: none; border-radius: 10px; color: #fff;
    font-weight: 700; cursor: pointer; font-family: inherit; font-size: 0.88rem;
}
.btn-report:hover { opacity: 0.92; }

/* Desktop navigatsiya */
.desktop-nav {
    display: flex; align-items: center; gap: 0.35rem; flex-shrink: 0;
}
.desktop-nav a {
    color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
    font-weight: 600; padding: 0.45rem 0.75rem; border-radius: var(--radius-pill);
    transition: all 0.2s;
}
.desktop-nav a:hover { color: var(--text); background: var(--bg-card); }
.nav-admin-link { color: var(--primary) !important; }

@media (min-width: 768px) {
    .nav-toggle { display: none; }
    body:not(.page-watch) { padding-bottom: 0; }
}
@media (max-width: 767px) {
    .desktop-nav { display: none !important; }
}

/* Player ichidagi boshqaruv */
.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: min(56.25vw, 70vh);
    background: #0a0a0a url('/static/img/playerbanner.jpg') center / cover no-repeat;
    border-radius: var(--radius);
    overflow: hidden;
}
.player-poster {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: url('/static/img/playerbanner.jpg') center / cover no-repeat;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.player-poster.hidden {
    opacity: 0;
}
.player-wrap .plyr,
.player-wrap .plyr__video-wrapper,
.player-wrap video {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
}
.player-loading {
    z-index: 5;
}
.player-wrap .plyr video {
    object-fit: contain;
    width: 100%;
    height: 100%;
    background: transparent;
}
.player-wrap .plyr--fullscreen-active video {
    object-fit: contain;
}
.player-in.player-toolbar {
    position: absolute; top: 0; left: 0; right: 0; z-index: 7;
    margin: 0; padding: 0.5rem; background: linear-gradient(180deg, rgba(0,0,0,0.75), transparent);
    border: none;
}
.player-dd-sm { padding: 0.4rem 0.65rem !important; font-size: 0.75rem !important; min-width: 0; }
.player-overlay-bar {
    position: absolute; bottom: 3.5rem; right: 0.75rem; z-index: 7;
    display: flex; gap: 0.35rem;
}
.player-in.player-settings-panel {
    position: absolute; bottom: 3.5rem; left: 0.75rem; right: 4.5rem; z-index: 8;
    max-width: 280px;
}
.watch-layout-single { grid-template-columns: 1fr !important; max-width: 960px; margin: 0 auto; }
.page-watch .plyr { border-radius: 0; }

/* Hide old hero on home */
.home-page .hero { display: none; }
.home-page .filter-bar { display: none; }

/* Auth chip override */
.user-chip { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 0.35rem 0.75rem; }
.btn-primary { background: var(--gradient) !important; border: none !important; }

/* ===== WATCH PAGE PLAYER v5 ===== */
.page-watch { padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 1rem); }
.player-toolbar-row {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin-bottom: 0.65rem;
}
.player-controls-bar {
    display: none;
}
.player-extra-controls {
    display: none;
}
.plyr-extra-controls {
    display: flex !important;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    margin-right: 0.25rem;
}
.page-watch .plyr__controls {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    scrollbar-width: none;
}
.page-watch .plyr__controls::-webkit-scrollbar { display: none; }
.plyr--hide-controls .plyr__controls {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.plyr--hide-controls .plyr-extra-controls {
    opacity: 0;
    pointer-events: none;
}
.plyr-extra-controls .pctrl-seek {
    font-size: 0.72rem !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    min-width: 36px !important;
    width: auto !important;
    padding: 0 0.35rem !important;
}
.plyr-extra-controls .pctrl-settings {
    font-size: 1rem !important;
}
@media (max-width: 767px) {
    .plyr-extra-controls .pctrl-ep,
    .plyr-extra-controls .pctrl-tg {
        display: none !important;
    }
    .page-watch .plyr__controls [data-plyr="fullscreen"] {
        display: none !important;
    }
    .plyr-extra-controls .pctrl-fs {
        display: flex !important;
    }
}
@media (pointer: coarse) {
    .plyr-extra-controls .pctrl-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
    }
    .plyr-extra-controls .pctrl-seek {
        width: auto !important;
        min-width: 40px !important;
        padding: 0 0.4rem !important;
    }
}
.plyr-extra-controls .pctrl-btn {
    flex: 0 0 auto;
    min-width: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.15s, background 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.plyr-extra-controls .pctrl-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}
.plyr-extra-controls .pctrl-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.plyr-extra-controls .pctrl-btn.pctrl-tg {
    width: auto;
    padding: 0 0.45rem;
    font-size: 0.95rem;
}
@media (pointer: coarse) {
    .plyr-extra-controls .pctrl-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px;
        font-size: 1rem;
    }
}
.page-watch .plyr__control {
    flex-shrink: 0;
}
.pctrl-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.pctrl-btn:disabled { opacity: 0.35; cursor: default; }
.pctrl-btn.pctrl-tg {
    background: linear-gradient(135deg, #29b6f6, #0288d1);
    border-color: transparent;
    color: #fff;
    flex: 1 1 100%;
}
.player-load-hint {
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    margin-top: 0.35rem;
    text-align: center;
    padding: 0 1rem;
    max-width: 280px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
.player-load-pct {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.player-loading:not(.indeterminate) .loader-progress-fill {
    transition: width 0.2s linear;
}
.watch-meta-tags {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    margin-top: 0.5rem;
}
.watch-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.watch-block {
    margin-bottom: 1.75rem;
}
.watch-block h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.watch-desc {
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 0.95rem;
}
.episode-list-grid {
    display: flex; flex-wrap: wrap; gap: 0.45rem;
}
.episode-list-grid .ep-btn {
    min-width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: inherit;
}
.episode-list-grid .ep-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
}
.episode-list-grid .ep-btn.locked { opacity: 0.35; cursor: not-allowed; }

/* Settings bottom sheet */
.player-sheet {
    position: fixed; inset: 0; z-index: 500;
    display: flex; align-items: flex-end; justify-content: center;
}
.player-sheet.hidden { display: none; }
.player-sheet-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.55);
}
.player-sheet-panel {
    position: relative; z-index: 1;
    width: 100%; max-width: 480px;
    background: var(--bg-elevated);
    border-radius: 16px 16px 0 0;
    padding-bottom: calc(1rem + var(--safe-bottom));
    max-height: 70vh;
    overflow-y: auto;
    animation: sheetUp 0.25s ease;
}
@keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.player-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.player-sheet-head h3 { font-size: 1rem; font-weight: 700; }
.player-sheet-close {
    background: none; border: none;
    color: var(--text-muted);
    font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.player-sheet-body { padding: 1rem 1.25rem; }
.sheet-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.sheet-row select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    font-family: inherit;
}
.btn-report-sheet {
    width: 100%; margin-top: 1rem;
    padding: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
body.sheet-open { overflow: hidden; }

/* Plyr: native settings yashirish */
.plyr__menu,
.plyr__controls [data-plyr="settings"] { display: none !important; }

.page-watch .player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0a0a url('/static/img/playerbanner.jpg') center / cover no-repeat;
    border-radius: var(--radius);
    overflow: hidden;
}
.page-watch .player-wrap .plyr,
.page-watch .player-wrap video {
    width: 100%; height: 100%;
}
.page-watch .player-wrap .plyr video {
    object-fit: contain;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --bg: #f4f6fa;
    --bg-card: #ffffff;
    --bg-elevated: #eef1f6;
    --text: #111827;
    --text-muted: #6b7280;
    --border: rgba(17, 24, 39, 0.1);
    --navbar-bg: rgba(255, 255, 255, 0.96);
    --glow: rgba(233, 30, 140, 0.15);
}
[data-theme="light"] body,
body.theme-light {
    background: var(--bg);
    color: var(--text);
}
[data-theme="light"] .site-header,
[data-theme="light"] .mobile-drawer-panel,
[data-theme="light"] .search-overlay-panel,
[data-theme="light"] .profile-dropdown,
[data-theme="light"] .bottom-nav {
    background: var(--navbar-bg);
    color: var(--text);
}
[data-theme="light"] .hero-overlay {
    background: linear-gradient(90deg, rgba(244,246,250,0.95) 0%, rgba(244,246,250,0.7) 50%, rgba(244,246,250,0.4) 100%),
                linear-gradient(0deg, var(--bg) 0%, transparent 50%);
}
[data-theme="light"] .detail-hero-overlay {
    background: linear-gradient(0deg, var(--bg) 0%, rgba(244,246,250,0.75) 60%, rgba(244,246,250,0.45) 100%);
}
[data-theme="light"] .header-icon-btn,
[data-theme="light"] .profile-avatar-btn,
[data-theme="light"] .home-cat-chip,
[data-theme="light"] .cat-tab,
[data-theme="light"] .meta-cell,
[data-theme="light"] .stat-box {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="light"] .jcard-type {
    background: rgba(0,0,0,0.55);
    color: #fff;
}
[data-theme="light"] .modal-card {
    background: var(--bg-card);
    color: var(--text);
}

/* ===== COUNTDOWN ===== */
.jcard-countdown {
    position: absolute;
    bottom: 8px; left: 8px; right: 8px;
    background: rgba(233, 30, 140, 0.92);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.3rem 0.45rem;
    border-radius: 8px;
    text-align: center;
    line-height: 1.25;
}
.detail-countdown-wrap {
    margin: 0.75rem 0;
    padding: 0.65rem 0.85rem;
    background: rgba(233, 30, 140, 0.15);
    border: 1px solid rgba(233, 30, 140, 0.35);
    border-radius: 12px;
}
.detail-countdown-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.detail-countdown {
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}
.content-cd { display: block; color: var(--primary); margin-top: 0.25rem; }

/* ===== MOBILE HEADER FIX ===== */
@media (max-width: 767px) {
    .header-row {
        justify-content: space-between !important;
        gap: 0.35rem;
    }
    .header-spacer { display: none; }
    .logo-jutsu {
        font-size: 1.32rem;
        max-width: calc(100vw - 52px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .logo-jutsu .logo-tld {
        font-size: 0.62rem;
        padding: 0.14rem 0.42rem;
    }
    .logo-jutsu .logo-mid { font-size: 1em; }
}

/* ===== WATCH PAGE PRO ===== */
.watch-layout-pro {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}
.watch-top-row {
    display: grid;
    gap: 1.25rem;
    align-items: start;
}
@media (min-width: 1024px) {
    .watch-top-row {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
        gap: 1.5rem;
    }
    .page-watch .player-wrap {
        max-height: min(52vw, 78vh);
        aspect-ratio: 16 / 9;
    }
}
.watch-meta-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.watch-ratings-side h3 {
    font-size: 0.95rem;
    margin: 0 0 0.65rem;
}
.ratings-grid-compact {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
.ratings-grid-compact .rating-card {
    padding: 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}
.ratings-grid-compact .rating-val {
    font-size: 1.1rem;
}
.watch-body-row {
    min-width: 0;
}
.similar-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
@media (min-width: 1024px) {
    .similar-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.comment-form textarea {
    width: 100%;
    min-height: 88px;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
}
.player-has-error .plyr,
.player-has-error .zn-player-controls,
.player-has-error #player-toolbar { display: none !important; }
.player-has-error video { visibility: hidden; }
.watch-title-block { margin: 1rem 0; }
.watch-title-block h1 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.watch-subtitle { color: var(--text-muted); font-size: 0.9rem; }
.ratings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.rating-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem;
    text-align: center;
}
.rating-label { display: block; font-size: 0.75rem; color: var(--text-muted); }
.rating-val { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.rating-votes { display: block; font-size: 0.72rem; color: var(--text-muted); }
.star-rating { display: flex; gap: 0.15rem; flex-wrap: wrap; margin-top: 0.5rem; }
.star-btn {
    background: none; border: none; color: var(--text-muted);
    font-size: 1.2rem; cursor: pointer; padding: 0;
}
.star-btn.active { color: #ffc107; }
.comments-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.comment-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 0.85rem;
}
.comment-form textarea {
    width: 100%; margin-bottom: 0; padding: 0.65rem;
    border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg-elevated); color: var(--text); font-family: inherit;
}
.continue-pct {
    position: absolute; bottom: 6px; left: 6px; right: 6px;
    background: rgba(233,30,140,0.9); color: #fff;
    font-size: 0.65rem; font-weight: 700; text-align: center;
    padding: 0.2rem; border-radius: 6px;
}
.continue-card .jcard-poster { position: relative; }
.continue-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.continue-card {
    display: flex; gap: 0.75rem; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 12px; padding: 0.65rem;
    text-decoration: none; color: inherit;
}
.continue-bar { height: 4px; background: var(--border); border-radius: 2px; margin-top: 0.35rem; }
.continue-bar div { height: 100%; background: var(--primary); border-radius: 2px; }
.history-row {
    display: flex; justify-content: space-between; padding: 0.75rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; text-decoration: none; color: inherit; margin-bottom: 0.5rem;
}
.page-section { padding: calc(var(--nav-height) + 1.5rem) 0 calc(var(--bottom-nav-h) + var(--safe-bottom) + 2rem); }
.page-section h1 { font-size: 1.75rem; margin-bottom: 0.35rem; }
.page-lead { color: var(--text-muted); margin-bottom: 1.5rem; }

@media (orientation: landscape) and (max-height: 500px) {
    .page-watch .player-wrap {
        max-height: 100vh;
        aspect-ratio: unset;
        height: calc(100vh - var(--nav-height) - 1rem);
        border-radius: 0;
    }
    .page-watch .watch-side-col,
    .page-watch .watch-title-block,
    .page-watch .watch-block { display: none; }
    .page-watch .watch-main-col .watch-block { display: none; }
    .page-watch .player-section { display: block; }
}

.admin-layout { display: grid; gap: 0; }
@media (min-width: 1024px) {
    .admin-layout { grid-template-columns: 240px 1fr; gap: 1.5rem; }
}
.admin-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    height: fit-content;
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
}
.admin-sidebar-brand { font-weight: 800; margin-bottom: 1rem; font-size: 0.95rem; }
.admin-sidebar-nav { display: flex; flex-direction: column; gap: 0.35rem; }
.admin-nav-item {
    text-align: left; padding: 0.55rem 0.75rem;
    border: none; border-radius: 10px; background: transparent;
    color: var(--text-muted); cursor: pointer; font-family: inherit; font-size: 0.88rem;
}
.admin-nav-item.active, .admin-nav-item:hover {
    background: var(--bg-elevated); color: var(--text);
}
.admin-main { min-width: 0; }

body.in-telegram #auth-modal,
html.tg-webapp-boot #auth-modal,
html[data-tg-webapp="1"] #auth-modal {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.in-telegram .browser-login-ui,
html.tg-webapp-boot .browser-login-ui,
html[data-tg-webapp="1"] .browser-login-ui {
    display: none !important;
}

body.in-telegram #profile-dd-login {
    display: none !important;
}

/* ===== MOBILE / TG FULLSCREEN PLAYER (CSS only — web native FS yo'q) ===== */
body.player-mobile-fs {
    overflow: hidden !important;
}
body.player-mobile-fs .site-header,
body.player-mobile-fs .bottom-nav,
body.player-mobile-fs .jutsu-footer,
body.player-mobile-fs .mobile-drawer,
body.player-mobile-fs .search-overlay {
    display: none !important;
}
body.player-mobile-fs .watch-page,
body.player-mobile-fs .watch-layout,
body.player-mobile-fs .watch-main-col,
body.player-mobile-fs .player-section {
    margin: 0 !important;
    padding: 0 !important;
}
body.player-mobile-fs #player-toolbar,
body.player-mobile-fs .watch-title-block,
body.player-mobile-fs .watch-block,
body.player-mobile-fs .watch-side-col,
body.player-mobile-fs .watch-panel,
body.player-mobile-fs .watch-stack > section:not(.watch-player-block) {
    display: none !important;
}
body.player-mobile-fs #player-shell {
    position: fixed !important;
    z-index: 10000 !important;
    background: #000 !important;
    touch-action: manipulation;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    border: none !important;
}
/* Portrait: player 90° aylantirish — 16:9 landscape */
body.player-mobile-fs-portrait #player-shell {
    top: 50% !important;
    left: 50% !important;
    width: 100vh !important;
    height: 100vw !important;
    max-width: none !important;
    max-height: none !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
}
body.player-mobile-fs-portrait #player-shell .plyr {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16 / 9 !important;
    max-width: 100% !important;
    max-height: 100% !important;
}
/* Landscape: markazda 16:9 */
body.player-mobile-fs-landscape #player-shell {
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    transform: none !important;
}
body.player-mobile-fs-landscape #player-shell .plyr {
    width: min(100vw, calc(100vh * 16 / 9)) !important;
    height: min(100vh, calc(100vw * 9 / 16)) !important;
    aspect-ratio: 16 / 9 !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
}
body.player-mobile-fs #player-shell .plyr__video-wrapper,
body.player-mobile-fs #player-shell video {
    width: 100% !important;
    height: 100% !important;
}
body.player-mobile-fs #player-shell .plyr video {
    object-fit: contain !important;
}
body.player-mobile-fs .plyr__controls {
    display: none !important;
}
body.player-mobile-fs .zn-player-controls {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 10002;
}
body.player-mobile-fs .zn-player-stage {
    position: absolute;
    inset: 0;
}
body.player-mobile-fs-portrait #player-shell .zn-player-stage,
body.player-mobile-fs-portrait #player-shell .plyr {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16 / 9 !important;
    max-width: 100% !important;
    max-height: 100% !important;
}
body.player-mobile-fs .player-poster {
    object-fit: cover;
}
body.player-mobile-fs .player-loading {
    z-index: 10001;
}
body.player-mobile-fs .player-skip-btn {
    z-index: 10003;
}

/* Desktop keyboard focus — player sahifasi */
.page-watch .player-wrap:focus-within {
    outline: none;
}

/* ===== UX FIX: SIMILAR GRID ===== */
.similar-grid,
.similar-grid-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 0.65rem;
}
@media (min-width: 768px) {
    .similar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
    .similar-grid-page { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .similar-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .similar-grid-page { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1440px) {
    .similar-grid-page { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.jcard-compact .jcard-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    max-height: 2.5em;
}
.jcard-compact .jcard-year { display: none; }
.jcard-compact .jcard-poster { aspect-ratio: 2/3; margin-bottom: 0.35rem; }

/* ===== WATCH DESKTOP LAYOUT ===== */
@media (min-width: 1024px) {
    .page-watch .watch-page {
        max-width: var(--container-wide, 1400px);
        margin: 0 auto;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .page-watch .player-wrap {
        border-radius: var(--radius);
    }
}
.watch-block { margin-bottom: 1.5rem; }
.watch-block h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }

/* ===== COMMENTS UX ===== */
.comment-guest {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.comment-guest.hidden { display: none; }
.comment-hint { color: var(--text-muted); margin: 0; font-size: 0.9rem; }
.comment-empty { color: var(--text-muted); font-size: 0.88rem; }

/* ===== PROFILE QUICK NAV ===== */
.profile-quick-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1.25rem;
    width: 100%;
    max-width: 420px;
}
.profile-quick-link {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: border-color 0.15s;
}
.profile-quick-link:hover { border-color: var(--primary); color: var(--primary); }

/* ===== SETTINGS PAGE ===== */
.settings-body { max-width: 520px; }
.settings-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}
.settings-block h2 { font-size: 1rem; margin: 0 0 0.75rem; }
.settings-row-btn {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}
.settings-lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}
.settings-lang-btn {
    padding: 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}
.settings-lang-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(233, 30, 140, 0.08);
}
.settings-link-row {
    display: block;
    padding: 0.65rem 0;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.settings-link-row:last-child { border-bottom: none; }
.btn-block { width: 100%; margin-top: 0.5rem; }

/* Bottom nav active state */
.bottom-nav-item.active { color: var(--primary); }
.profile-dd-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

