@font-face {
    font-family: "tabler-icons";
    font-display: swap;
    src: url("/inspinia/css/fonts/tabler-icons.woff2?v3.33.0") format("woff2"),
         url("/inspinia/css/fonts/tabler-icons.woff?") format("woff"),
         url("/inspinia/css/fonts/tabler-icons.ttf?v3.33.0") format("truetype");
    font-style: normal;
    font-weight: 400;
} 
 
/* CSS custom properties */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-card: #2a2a2a;
    --accent: #ff6b35;
    --accent-hover: #e55a25;
    --text-primary: #e0e0e0;
    --text-secondary: #999;
    --text-muted: #8a8a8a;
    --border-color: #333;
}

/* Logo */
.logo-text {
    color: var(--accent);
}

/* Mobile bottom nav padding */
body {
    padding-bottom: 56px;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* Content area padding */
.content-page {
    padding-top: 1.25rem;
}


/* Video card */
.video-card {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: var(--bg-primary);
}


.video-card .thumbnail-wrap {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: #111;
}

.video-card .thumbnail-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card .badge-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
}

.video-card .badge-hd {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #ff6b35;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 2px;
}

.video-card .badge-new {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #22c55e;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 2px;
}

.video-card .card-title {
    font-size: 13px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.video-card .card-title:hover {
    color: var(--accent);
}

.video-card .meta {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Video grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 991px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   TAG SYSTEM
   Three tiers: --hot (top ~10%), --mid (next ~25%), --base (rest)
   Used via class modifier on .tag-pill.
   ============================================================ */

/* Base tag */
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid #3a3a3a;
    background: #252525;
    color: #b0b0b0;
    font-size: 12px;
    line-height: 1.5;
    text-decoration: none;
    max-width: 100%;
    overflow-wrap: break-word;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tag-pill:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Tier: hot — top ~10% by count, high visual weight */
.tag-pill--hot {
    background: rgba(255, 107, 53, 0.12);
    border-color: rgba(255, 107, 53, 0.35);
    color: #d96030;
    font-weight: 500;
}

.tag-pill--hot:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Tier: mid — next ~25%, moderate visual weight */
.tag-pill--mid {
    background: #2e2e2e;
    border-color: #444;
    color: #c0c0c0;
}

.tag-pill--mid:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Tag count badge */
.tag-count {
    font-size: 10px;
    color: #666;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.tag-pill--hot .tag-count {
    color: rgba(217, 96, 48, 0.6);
}

/* Tag cloud container */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
}

/* Neutralise old generic rule that conflicts with tier classes */
.tag-cloud a {
    /* intentionally left empty — .tag-pill handles all styling */
}

.tag-cloud a:hover {
    /* intentionally left empty */
}

/* Sidebar tag cloud — slightly more compact */
.tag-cloud--sidebar .tag-pill {
    font-size: 11px;
    padding: 3px 9px;
}

/* ============================================================
   CATEGORY PILLS
   Tier above tags — section navigation, cyan accent
   ============================================================ */

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 4px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.08);
    color: #67e8f9;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.category-pill:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.category-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ============================================================
   PERFORMER PILLS
   Highest tier — people/names, violet accent
   ============================================================ */

.performer-section-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 4px;
    flex-shrink: 0;
}

.performer-section-label .ti {
    font-size: 13px;
    color: #c084fc;
}

.performer-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 4px;
    border: 1px solid rgba(192, 132, 252, 0.3);
    background: rgba(192, 132, 252, 0.08);
    color: #d8b4fe;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.performer-pill:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.performer-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* Player placeholder */
.player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none; /* не перехватывать клики — они должны доходить до .play-btn */
}

.play-btn {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.9); /* var(--accent) с прозрачностью */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.play-btn:hover {
    transform: scale(1.1);
    background: var(--accent);
}

.play-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
    margin-left: 4px;
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 13px;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--accent);
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* Hover preview */
.hover-preview {
    position: absolute;
    inset: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.hover-preview.active {
    opacity: 1;
}

/* Dropdown: тёмная тема */
.dropdown-menu {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(255, 107, 53, 0.12);
    color: var(--accent);
}

.dropdown-item.active,
.dropdown-item:active {
    background: var(--accent);
    color: #fff;
}

/* Empty state: пустая категория */
.empty-state {
    padding: 60px 20px;
}

.empty-state .empty-state-icon {
    font-size: 64px;
    color: #444;
    margin-bottom: 20px;
    display: block;
}

.empty-state h3 {
    color: #999;
}

.empty-state p {
    color: #666;
}

.related-categories {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* Pagination: max 5 buttons on mobile */
@media (max-width: 768px) {
    .pagination li:not(.prev):not(.next):not(.active):not(:nth-child(-n+3)):not(:last-child) {
        display: none;
    }
}

/* Mobile bottom nav */
#mobile-bottom-nav {
    height: 56px;
    background: var(--bg-primary);
    z-index: 1030;
}

.mobile-nav-label {
    font-size: 10px;
}

/* Nav active states */
.navbar .nav-link.active {
    color: var(--accent) !important;
    font-weight: 600;
}

#mobile-bottom-nav a.active {
    color: var(--accent) !important;
}



/* ============================================================
   CATEGORY CARDS (all.php)
   ============================================================ */

.cat-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-card);
    background-size: cover;
    background-position: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.cat-card:hover {
    transform: scale(1.03);
    text-decoration: none;
}

.cat-card:hover .cat-card__overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 60%);
    filter: brightness(1.15);
}

/* Overlay gradient */
.cat-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    transition: filter 0.3s ease;
    pointer-events: none;
}

/* Footer: name + count */
.cat-card__footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    z-index: 1;
}

.cat-card__name {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.3;
    flex: 1 1 auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cat-card__count {
    flex-shrink: 0;
    background: rgba(255, 107, 53, 0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.4;
}

/* No-image fallback */
.cat-card--no-image {
    background-color: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-card__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    color: #555;
    z-index: 0;
}

/* ============================================================
   TOPNAV + MOBILE SIDEBAR (offcanvas)
   Десктоп >= 992px: только горизонтальное меню topnav,
   sidebar полностью скрыт через display:none.
   Мобильный < 992px: topnav скрыт, hamburger открывает sidebar слева.
   ============================================================ */

/* === ДЕСКТОП: sidebar полностью скрыт === */
/* Inspinia offcanvas прячет sidebar через margin-left + opacity, но при
   position:fixed этого недостаточно — sidebar остаётся в DOM и виден.
   Принудительно скрываем через display:none. */
@media (min-width: 992px) {
    html[data-layout="topnav"] .sidenav-menu {
        display: none !important;
    }

    /* На десктопе sidenav-toggle-button тоже скрыт */
    html[data-layout="topnav"] .app-topbar .sidenav-toggle-button {
        display: none !important;
    }
}

/* === МОБИЛЬНЫЙ: sidebar анимируется через Inspinia (margin-left + opacity) === */
/* Inspinia добавляет .sidebar-enable на <html> через JS при клике на hamburger.
   Анимация управляется правилами из app.css:
     html[data-sidenav-size=offcanvas] .sidenav-menu { margin-left: -260px; opacity: 0; transition: all 0.25s }
     html[data-sidenav-size=offcanvas].sidebar-enable .sidenav-menu { margin-left: 0; opacity: 1; }
   НЕ переопределяем margin-left и opacity — это ломает transition. */
@media (max-width: 991.98px) {
    /* На мобильных скрыть горизонтальное меню */
    html[data-layout="topnav"] .topnav {
        display: none !important;
    }

    /* Показываем hamburger для открытия sidebar */
    html[data-layout="topnav"] .app-topbar .sidenav-toggle-button {
        display: flex !important;
    }

    /* topnav-toggle-button скрываем — он для Bootstrap collapse,
       который не нужен при offcanvas-sidebar */
    html[data-layout="topnav"] .topnav-toggle-button {
        display: none !important;
    }

}

/* Offcanvas navigation */
#navOffcanvas {
    background: var(--bg-primary);
    max-width: 280px;
}

#navOffcanvas .nav-link {
    color: var(--text-primary);
    padding: 12px 20px;
    font-size: 15px;
}

#navOffcanvas .nav-link:hover,
#navOffcanvas .nav-link.active {
    color: var(--accent);
    background: rgba(255, 107, 53, 0.08);
}

/* Similar model cards */
.similar-model-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}
.similar-model-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.similar-model-card img,
.similar-model-card .model-avatar-fallback {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.similar-model-card:hover img,
.similar-model-card:hover .model-avatar-fallback {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px var(--accent, #ff6b35);
}
.similar-model-card:hover .model-name {
    color: var(--accent, #ff6b35) !important;
}

/* Fallback avatar gradients */
.model-avatar-fallback {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    user-select: none;
}
.model-avatar-fallback[data-color="0"] { background: linear-gradient(135deg, #e05c5c, #c0392b); }
.model-avatar-fallback[data-color="1"] { background: linear-gradient(135deg, #e08c3c, #d35400); }
.model-avatar-fallback[data-color="2"] { background: linear-gradient(135deg, #8e44ad, #6c3483); }
.model-avatar-fallback[data-color="3"] { background: linear-gradient(135deg, #2980b9, #1a5276); }
.model-avatar-fallback[data-color="4"] { background: linear-gradient(135deg, #27ae60, #1e8449); }
.model-avatar-fallback[data-color="5"] { background: linear-gradient(135deg, #c0392b, #922b21); }
.model-avatar-fallback[data-color="6"] { background: linear-gradient(135deg, #7d6608, #b7950b); }
.model-avatar-fallback[data-color="7"] { background: linear-gradient(135deg, #1abc9c, #148f77); }

.model-name {
    transition: color 0.2s ease;
}

/* Footer category pills */
.footer-cat-link {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    color: #aaa;
    background-color: rgba(255, 255, 255, 0.05);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.footer-cat-link:hover {
    background-color: rgba(255, 107, 53, 0.15);
    color: #ff6b35;
}

/* Mobile sidebar: добавляем верхний отступ, которого нет в Inspinia app.css */
.side-nav {
    padding-top: 12px;
}

/* Yii debug toolbar: понижаем z-index чтобы не перекрывал элементы управления плеера.
   Таргетируем и базовый класс, и positioned-модификаторы (bottom/upper),
   т.к. position:fixed задаётся через модификатор-класс в toolbar.css */
.yii-debug-toolbar,
.yii-debug-toolbar_position_bottom,
.yii-debug-toolbar_position_upper {
    z-index: 999 !important;
}

/* === Mobile overflow fix === */
/* ВАЖНО: overflow-x: hidden НЕЛЬЗЯ ставить на .wrapper или любой предок .app-topbar —
   это создаёт scroll container и ломает position:sticky у header.
   Ставим ТОЛЬКО на .content-page, который идёт ПОСЛЕ .app-topbar в DOM. */
.content-page {
    overflow-x: hidden;
}

.offcanvas,
.offcanvas-top {
    max-width: 100%;
}

/* === Topbar search fix ===
   .app-search внутри левого flex-блока topbar:
   ограничиваем ширину, чтобы input-group не разворачивался на всю строку.
   Ранее style="width:100%" на input ломал input-group — кнопка падала вниз. */
.app-topbar .app-search {
    width: 260px;
    flex-shrink: 0;
}

.app-topbar .app-search .form-control {
    min-width: 0;
    width: auto;
}

