/* ===== ОСНОВНЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Светлая тема */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --accent-color: #ff1744;
    --accent-hover: #d50032;
    --theme-color: #1e005e;
    --overlay-dark: rgba(0, 0, 0, 0.7);
    --overlay-light: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] {
    /* Темная тема */
    --theme-color: #ffb917;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #333333;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --border-color: #404040;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --overlay-dark: rgba(0, 0, 0, 0.85);
    --overlay-light: rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

button {
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    border: none;
    background: none;
    transition: all 0.3s ease;
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
}

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

.logo-dot {
    color: var(--accent-color);
    margin-left: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* ── "Ищу слив" header CTA link ── */
.nav-link.nav-link-forum {
    background: var(--accent-color);
    color: #fff;
    padding: 7px 10px;
    border-radius: 13px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-link.nav-link-forum:hover {
    background: var(--accent-hover);
    color: #fff;
}

.nav-link.nav-link-forum::after {
    display: none;
    /* suppress underline active bar */
}

.nav-link-forum-icon {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: #fff;
    mask-image: url('/images/icons/search.svg');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('/images/icons/search.svg');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    flex-shrink: 0;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    transform: scale(1.05);
}

.theme-icon {
    display: flex;
    color: var(--theme-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 32px;
    height: 32px;
    justify-content: center;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu {
    position: fixed;
    top: 81px;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: var(--bg-secondary);
    color: var(--accent-color);
}

.mobile-theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background-color: var(--bg-secondary);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== HERO СЕКЦИЯ ===== */
.hero {
    padding: 50px 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-title-main {
    font-size: 64px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    color: var(--text-primary);
}

.hero-title-sub {
    font-size: 36px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -1px;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.btn {
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 23, 68, 0.3);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-large {
    padding: 20px 48px;
    font-size: 18px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background-color: var(--bg-primary);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 40px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== КАТЕГОРИИ ===== */
.categories {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.home-card {
    max-height: 350px;
    width: 100%;
}

.category-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 3/4;
    display: block;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
}

.category-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-lg);
}

.category-image {
    width: 100%;
    height: 100%;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
}

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    z-index: 2;
}

.category-title {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.category-count {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ===== ПРЕИМУЩЕСТВА ===== */
.features {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 40px 32px;
    background-color: var(--bg-primary);
    border-radius: 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== CTA СЕКЦИЯ ===== */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.cta-description {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.cta .btn-primary {
    background-color: #ffffff;
    color: var(--accent-color);
}

.cta .btn-primary:hover {
    background-color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ===== FOOTER ===== */
.footer {
    padding: 80px 0 32px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-heading {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== СТРАНИЦА КАТАЛОГА ===== */
.page-header {
    padding: 60px 0 40px;
    background-color: var(--bg-secondary);
    text-align: center;
}

.page-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ── Default page body / content ──────────────────────────── */
.page-body {
    padding: 48px 0 80px;
}

.page-content-wrap {
    margin: 0 auto;
}

.page-cover {
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 36px;
    box-shadow: var(--shadow-md);
}

.page-cover img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

/* Rich text content */
.page-content {
    font-size: 16px;
    line-height: 1.85;
    color: var(--text-primary);
}

.page-content h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
}

.page-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--text-primary);
}

.page-content p {
    margin-bottom: 1rem;
}

.page-content ul,
.page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.page-content li {
    margin-bottom: 0.35rem;
}

.page-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.page-content a:hover {
    color: var(--accent-hover);
}

.page-content img {
    border-radius: 12px;
    margin: 1.25rem 0;
    max-width: 100%;
}

.page-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 12px 20px;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    border-radius: 0 10px 10px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 15px;
}

.page-content th,
.page-content td {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.page-content th {
    background: var(--bg-secondary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .page-body {
        padding: 28px 0 56px;
    }

    .page-content {
        font-size: 15px;
    }

    .page-content h2 {
        font-size: 21px;
    }

    .page-content h3 {
        font-size: 17px;
    }
}

/* ──────────────────────────────────────────────────────────── */

.catalog-description p {
    margin-top: 0.5rem;
}

.catalog-description h2,
.catalog-description h3 {
    margin-top: 1rem;
}

.catalog-description ul {
    padding-left: 1rem;
}

.catalog-categories {
    padding: 80px 0;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.catalog-category-card {
    background-color: var(--bg-secondary);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
}

.catalog-category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.catalog-category-link {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100%;
}

.catalog-category-image {
    position: relative;
    overflow: hidden;
}

.catalog-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.catalog-category-card:hover .catalog-category-image img {
    transform: scale(1.05);
}

.catalog-category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.catalog-category-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.catalog-category-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.category-description {
    padding: 40px 0;
}

.catalog-category-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.catalog-category-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.catalog-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.catalog-stat-icon {
    font-size: 18px;
}

.catalog-category-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
}

/* ===== ИНФОРМАЦИОННАЯ СЕКЦИЯ ===== */
.info-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.info-content {
    max-width: 1200px;
    margin: 0 auto;
}

.info-title {
    font-size: 40px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.info-card {
    padding: 40px 32px;
    background-color: var(--bg-primary);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.info-card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.info-card-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== СПИСОК МОДЕЛЕЙ ===== */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.breadcrumb-link {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    word-break: break-word;
}

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

.breadcrumb-separator {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.filters-section {
    padding: 40px 0;
    background-color: var(--bg-secondary);
}

.filters-wrapper {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-select {
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--accent-color);
    outline: none;
}

.filter-search {
    margin-left: auto;
}

.search-input {
    padding: 12px 24px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    width: 300px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

/* ── Category filter pill buttons ─────────────────────────── */
.filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.filter-link:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: var(--bg-secondary);
}

.filter-link.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

/* ── Catalog filter bar layout ────────────────────────────── */
.catalog-filter-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.catalog-filter-bar .filter-group {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .catalog-filter-bar {
        align-items: center;
        justify-content: center;
    }
}

.catalog-sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Catalog search form ─────────────────────────────────── */
.catalog-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .catalog-search-form {
        width: 100%;
    }
}

.catalog-search-input {
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    width: 200px;
    outline: none;
    transition: border-color .2s, width .3s;
}

.catalog-search-input::placeholder {
    color: var(--text-secondary);
}

.catalog-search-input:focus {
    border-color: var(--accent-color);
    width: 240px;
}

.catalog-search-btn {
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .2s;
}

.catalog-search-btn:hover {
    opacity: .8;
}

.catalog-search-btn svg {
    display: block;
}

.catalog-search-clear {
    color: var(--text-secondary);
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .2s, background .2s;
    flex-shrink: 0;
}

.catalog-search-clear:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

@media (max-width: 768px) {
    .catalog-search-input {
        width: 100%;
    }

    .catalog-search-input:focus {
        width: 100%;
    }
}

.models-list {
    padding: 40px 0 16px;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 24px;
}

.model-description {
    padding: 40px 0;
}

.model-card {
    background-color: var(--bg-secondary);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}

.model-card-spad {
    border: 2px solid var(--accent-color);
}

/* Scroll-reveal animation (JS adds these classes) */
.animate-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-hidden.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

.model-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.model-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.model-card-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.model-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.model-card:hover .model-card-image img {
    transform: scale(1.05);
}

.model-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    background-color: var(--accent-color);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.model-card-badge.hot {
    background-color: #ff9800;
}

.model-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%);
}

.model-card-content {
    padding: 10px 24px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.model-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
    flex: 1;
}

.model-card-category {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.model-card-stats {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.model-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.model-stat-icon img {
    height: 18px;
    width: 18px;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

/* The <ul> Yii renders */
.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Every <li> becomes a flex row item */
.pagination-numbers li {
    display: flex;
}

/* Numbered page links & the active page */
.pagination-numbers li a.pagination-number,
.pagination-numbers li span.pagination-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.25s, color 0.25s;
}

.pagination-numbers li a.pagination-number:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* Active page — <li class="active"> */
.pagination-numbers li.active a.pagination-number {
    background-color: var(--accent-color);
    color: #ffffff;
    pointer-events: none;
}

/* Prev / Next buttons — <li class="pagination-btn pagination-prev/next"> */
.pagination-numbers li.pagination-btn a.pagination-number,
.pagination-numbers li.pagination-btn span {
    width: auto;
    padding: 0 20px;
    height: 44px;
    border-radius: 50px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.25s, color 0.25s;
}

.pagination-numbers li.pagination-btn a.pagination-number:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* Disabled prev/next — <li class="disabled"> or Yii puts content in <span> */
.pagination-numbers li.pagination-btn.disabled span,
.pagination-numbers li.disabled span {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Ellipsis dots */
.pagination-dots,
.pagination-numbers li.dots {
    display: flex;
    align-items: center;
    padding: 0 4px;
    color: var(--text-tertiary);
}

/* ===== СТРАНИЦА МОДЕЛИ ===== */
.model-header {
    padding: 40px 0;
}

.model-header-content {
    margin-top: 32px;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);

    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .model-header-content {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
        margin-top: 16px;
    }
}

.model-avatar {
    width: 100%;
    border-radius: 20px;
}

.model-name {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.model-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 16px;
}

.model-category {
    padding: 8px 16px;
    background-color: var(--accent-color);
    color: #ffffff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
}

.model-separator {
    color: var(--text-tertiary);
}

.model-date {
    color: var(--text-secondary);
}

.model-stats-row {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 32px;
}

.model-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
}

.description-card {
    margin: 0 auto;
    padding: 48px;
    background-color: var(--bg-secondary);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.description-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.description-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.description-content p {
    margin-bottom: 16px;
}

.description-content p:last-child {
    margin-bottom: 0;
}

.description-content ul {
    padding-left: 1.3rem;
}

.description-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.tag {
    padding: 8px 16px;
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tag:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ===== ГАЛЕРЕЯ ===== */
.model-gallery {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.gallery-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/4;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-zoom img {
    height: 20px;
}

.gallery-zoom {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-zoom:hover {
    transform: scale(1.1);
    background-color: var(--accent-hover);
}

/* ── Sponsored (spad) gallery card label ─────────────────────────────────── */
.gallery-item-spad {
    box-shadow: none;
}

.gallery-item-spad:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.gallery-item-spad .gallery-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.25) 0%, transparent 45%);
    align-items: flex-end;
    justify-content: flex-start;
    padding: 7px;
    pointer-events: none;
    /* overlay itself isn't clickable; the <a> beneath is */
}

.gallery-spad-label {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--accent-color);
    border-radius: 4px;
    padding: 3px 8px;
    line-height: 1.3;
    text-shadow: none;
    pointer-events: none;
}

.gallery-load-more {
    text-align: center;
}

/* ===== ВИДЕО ===== */
.model-videos {
    padding: 80px 0;
}

.videos-header {
    text-align: center;
    margin-bottom: 60px;
}

.videos-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.videos-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}

.video-card {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/16;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img,
.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img,
.video-card:hover .video-thumbnail video {
    transform: scale(1.05);
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.video-card:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: var(--accent-hover);
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.video-views {
    font-size: 14px;
    color: var(--text-secondary);
}

.videos-load-more {
    text-align: center;
}


/* ===== ПОХОЖИЕ МОДЕЛИ ===== */
.related-models {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.related-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: -1px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 32px;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.image-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.image-modal.active {
    display: flex;
}

.image-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.image-modal-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #000;
}

.image-modal-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.image-modal-close:hover {
    background-color: var(--accent-color);
}

.image-modal-undress {
    position: fixed;
    top: 20px;
    right: 84px;
    padding: 12px 24px;
    border-radius: 24px;
    background-color: var(--accent-color);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    cursor: pointer;
}

.image-modal-undress:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 91, 34, 0.4);
}

.image-modal-prev,
.image-modal-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.image-modal-prev {
    left: 16px;
}

.image-modal-next {
    right: 16px;
}

.image-modal-prev:hover,
.image-modal-next:hover {
    background-color: var(--accent-color);
    transform: translateY(-50%) scale(1.08);
}

/* Modal save/favorite button */
.modal-save-btn {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    background: rgba(0, 0, 0, 0.55);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 12;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
    backdrop-filter: blur(6px);
}

.modal-save-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.modal-save-btn.is-saved {
    border-color: #e91e63;
    color: #f48fb1;
}

.modal-save-btn svg {
    display: block;
    flex-shrink: 0;
}

/* ===== ВИДЕО МОДАЛ ===== */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    outline: none;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== PRE-ROLL OVERLAY ===== */
.preroll-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

.preroll-modal.active {
    display: flex;
}

.preroll-box {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.preroll-media-link {
    display: block;
    position: relative;
    line-height: 0;
}

.preroll-media {
    max-width: 90vw;
    max-height: 78vh;
    border-radius: 8px;
    display: block;
    object-fit: contain;
}

.preroll-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
}

.preroll-skip-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
    padding: 0 4px;
}

.preroll-ad-badge {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 2px 6px;
    margin-right: auto;
}

.preroll-skip-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    white-space: nowrap;
}

.preroll-skip-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.preroll-skip-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.28);
}

.preroll-mute-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}

.preroll-mute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }

    .model-stats-row {
        flex-wrap: wrap;
        gap: 16px;
    }

    .hero-title-main {
        font-size: 52px;
    }

    .hero-title-sub {
        font-size: 28px;
    }

    .section-title {
        font-size: 40px;
    }

    .models-grid,
    .gallery-grid,
    .videos-grid,
    .home-grid,
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalog-category-link {
        grid-template-columns: 1fr;
    }

    .catalog-category-image {
        aspect-ratio: 16/9;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-search {
        margin-left: 0;
    }

    .search-input {
        width: 100%;
    }

    .image-modal-prev {
        left: 20px;
    }

    .image-modal-next {
        right: 20px;
    }

    .image-modal-undress {
        top: 80px;
        right: 24px;
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
    }

    .hero-title-main {
        font-size: 40px;
    }

    .hero-title-sub {
        font-size: 22px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        margin-bottom: 60px;
    }

    .btn {
        width: 100%;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-title {
        font-size: 32px;
    }

    .category-title {
        font-size: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 36px;
    }

    .cta-description {
        font-size: 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .page-title {
        font-size: 40px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .models-grid,
    .videos-grid,
    .home-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .model-name {
        font-size: 36px;
    }

    .description-card {
        padding: 32px 24px;
    }

    .description-title {
        font-size: 22px;
    }

    .gallery-title,
    .videos-title,
    .related-title {
        font-size: 26px;
    }

    /* Mobile pagination: hide big prev/next pills, show compact number circles */
    .pagination-numbers li.pagination-btn {
        display: none;
    }

    .pagination-numbers {
        gap: 4px;
    }

    .pagination-numbers li a.pagination-number,
    .pagination-numbers li span.pagination-number {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .logo {
        font-size: 24px;
    }

    .hero-title-main {
        font-size: 32px;
    }

    .hero-title-sub {
        font-size: 18px;
    }

    .stat-number {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .page-title {
        font-size: 32px;
    }

    .model-name {
        font-size: 28px;
    }

    .catalog-category-title {
        font-size: 28px;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.category-card,
.feature-card,
.model-card,
.gallery-item,
.video-card {
    animation: fadeIn 0.6s ease-out;
}

/* Плавная прокрутка */
html {
    scroll-padding-top: 80px;
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ ===== */

/* Улучшенная производительность */
* {
    -webkit-tap-highlight-color: transparent;
}

img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Улучшенная типографика */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Фокус для доступности */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Плавные переходы для всех интерактивных элементов */
a,
button,
input,
select,
.category-card,
.model-card,
.gallery-item,
.video-card {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Улучшение производительности анимаций */
.category-card,
.model-card,
.gallery-item,
.video-card,
.feature-card {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Оптимизация для touch устройств */
@media (hover: none) and (pointer: coarse) {

    .category-card:hover,
    .model-card:hover,
    .gallery-item:hover,
    .video-card:hover {
        transform: none;
    }

    .category-card:active,
    .model-card:active,
    .gallery-item:active,
    .video-card:active {
        transform: scale(0.98);
    }
}

/* Скрытие скроллбара для webkit */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Улучшение для Safari */
@supports (-webkit-appearance: none) {

    .btn,
    .filter-select,
    .search-input {
        -webkit-appearance: none;
    }
}

/* Предотвращение выделения текста на интерактивных элементах */
.btn,
.category-card,
.model-card,
.gallery-zoom,
.video-play-button,
.pagination-btn,
.pagination-number {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    .hero-title-main {
        font-size: 28px;
    }

    .hero-title-sub {
        font-size: 16px;
    }

    .btn {
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* Адаптация для планшетов в альбомной ориентации */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }

    .models-grid,
    .gallery-grid,
    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Улучшение для печати */
@media print {

    .navbar,
    .mobile-menu,
    .theme-toggle,
    .mobile-menu-toggle,
    .footer,
    .btn,
    .pagination,
    .filters-section {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* Поддержка prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Поддержка prefers-color-scheme */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2a2a2a;
        --bg-tertiary: #333333;
        --text-primary: #ffffff;
        --text-secondary: #b0b0b0;
        --text-tertiary: #808080;
        --border-color: #404040;
    }
}

/* Состояние загрузки */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-secondary);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Улучшение для высоких экранов */
@media (min-height: 900px) {
    .hero {
        padding: 40px 0;
    }

    .categories,
    .features,
    .models-list,
    .model-gallery,
    .model-videos {
        padding: 70px 0;
    }
}

/* Поддержка notch для iPhone */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .navbar {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Улучшение для landscape на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }

    .hero-title-main {
        font-size: 36px;
    }

    .hero-title-sub {
        font-size: 20px;
    }

    .hero-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .stat-item {
        padding: 16px;
    }

    .stat-number {
        font-size: 28px;
    }
}

/* Активное состояние для мобильных устройств */
@media (hover: none) {
    .btn:active {
        transform: scale(0.95);
    }

    .nav-link:active,
    .mobile-nav-link:active {
        opacity: 0.7;
    }
}

/* Улучшение читаемости на маленьких экранах */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .hero-description,
    .section-subtitle,
    .page-subtitle {
        font-size: 15px;
    }

    .feature-description,
    .info-card-text,
    .description-content {
        font-size: 14px;
    }
}

/* Оптимизация для iPad Pro */
@media (min-width: 1024px) and (max-width: 1366px) {
    .container {
        max-width: 1200px;
    }

    .models-grid,
    .gallery-grid,
    .videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Улучшение для широких экранов */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }

    .models-grid,
    .gallery-grid,
    .videos-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .hero-title-main {
        font-size: 72px;
    }

    .hero-title-sub {
        font-size: 40px;
    }
}

/* ===== COOKIE + 18+ CONSENT ===== */
.consent-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.consent-modal.is-visible {
    display: flex;
}

.consent-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay-dark);
    backdrop-filter: blur(10px);
}

.consent-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 32px;
    animation: consentFadeIn 0.3s ease;
}

.consent-modal__title {
    font-size: 28px;
    text-align: center;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.consent-modal__text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.consent-modal__note {
    margin-bottom: 24px;
    padding: 16px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.consent-modal__checks {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.consent-check:hover {
    border-color: var(--accent-color);
}

.consent-check input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    flex-shrink: 0;
}

.consent-check label {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    cursor: pointer;
}

.consent-modal__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.consent-modal__actions .btn {
    flex: 1 1 220px;
}

.consent-modal__error {
    display: none;
    margin-top: 16px;
    font-size: 14px;
    color: #ffffff;
    background: #d50032;
    border-radius: 14px;
    padding: 12px 14px;
}

.consent-modal__error.is-visible {
    display: block;
}

body.consent-lock {
    overflow: hidden;
}

@keyframes consentFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .consent-modal {
        align-items: end;
        padding: 12px;
    }

    .consent-modal__dialog {
        max-width: 100%;
        padding: 24px 20px;
        border-radius: 20px 20px 16px 16px;
    }

    .consent-modal__title {
        font-size: 24px;
    }

    .consent-modal__actions {
        flex-direction: column;
    }

    .consent-modal__actions .btn {
        width: 100%;
        flex: unset;
    }
}

@media (prefers-reduced-motion: reduce) {
    .consent-modal__dialog {
        animation: none;
    }
}

/* ============================================================
   FORUM — Section & Thread pages
   ============================================================ */

/* ── Section page: thread list ────────────────────────────── */
.forum-section-body {
    padding: 40px 0 60px;
}

.forum-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px 20px;
    font-size: 1rem;
}

/* ── Forum section header ───────────────────────────── */
.forum-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.forum-thread-count {
    font-size: 1.125rem;
}

@media (max-width: 640px) {
    .forum-section-header {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .forum-thread-count {
        text-align: center;
    }
}

/* ── Thread list ─────────────────────────────────── */
.forum-thread-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forum-thread-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.forum-thread-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

.forum-thread-main {
    flex: 1;
    min-width: 0;
}

.forum-thread-item .forum-thread-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-thread-item:hover .forum-thread-title {
    color: var(--accent-color);
}

.forum-thread-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
    align-items: center;
}

.forum-author-admin {
    color: var(--accent-color);
    font-weight: 600;
}

.forum-author {
    color: var(--text-secondary, #aaa);
}

.forum-author-platform {
    font-size: 0.72rem;
    background: var(--bg-tertiary);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.forum-thread-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-shrink: 0;
}

.forum-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.forum-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.forum-stat-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.forum-stat-last {
    min-width: 72px;
}

/* ── Mobile responsive ──────────────────────────────────── */
@media (max-width: 640px) {
    .forum-thread-item {
        display: block;
    }

    .forum-thread-stats {
        margin-top: 10px;
        justify-content: space-between;
    }

    .forum-thread-date {
        order: 3;
    }
}

/* ── Thread page: header section ─────────────────────────── */
/* ════════════════════════════════════════════════════════════
   FORUM — THREAD PAGE
   ════════════════════════════════════════════════════════════ */

/* ── Head section ────────────────────────────────────────── */
.forum-thread-head {
    padding: 40px 0 32px;
}

/* ── Main card (contains everything about the thread) ─────── */
.forum-thread-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    border-radius: 24px;
    padding: 2rem;
    margin-top: 16px;
}

/* ── Status + date row ────────────────────────────────────── */
.forum-thread-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.forum-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
}

/* ========================================================================
   FEED PAGE
   ======================================================================== */

/* ===== Stories ===== */

.stories {
    --story-width: 124px;
    --story-height: 230px;
    --story-radius: 16px;
    --avatar-size: 42px;
    --gap: 10px;
    --title-size: 14px;

    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
}

.stories .container {
    max-width: 1000px;
    margin: 0 auto;
    margin-top: 1rem;
    padding: 15px;
    padding-right: 0;
    background-color: var(--bg-secondary);
    border-radius: 12px;
}

.feed-wall .container {
    max-width: 1000px;
    margin: 0 auto;
    margin-top: 1rem;
    padding: 0;
}

.stories:active {
    cursor: grabbing;
}

.stories__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.stories__viewport::-webkit-scrollbar {
    display: none;
}

/* Scroll arrow button */
.stories__scroll-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: var(--bg-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
    flex-shrink: 0;
}

.stories__scroll-btn:hover {
    background: var(--bg-secondary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
    transform: translateY(-50%) scale(1.08);
}

.stories__scroll-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stories__wrapper {
    position: relative;
}

.stories__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100px;
    gap: 10px;
    width: max-content;
    min-width: 100%;
    padding: 6px 6px 14px;
}

.story {
    min-width: 0;
}

.story__card {
    position: relative;
    display: block;
    width: 100%;
    height: 150px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background: #ccc;
}

.story__card:hover,
.story__card:active {
    transform: scale(0.95);
}

.story__card:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 3px;
}

.story__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.story__card:hover .story__bg {
    transform: scale(1.04);
}

.story__fade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.02) 28%, rgba(0, 0, 0, 0.45) 100%);
}

.story__avatar-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    padding: 10px;
    width: 100%;
    height: 100%;
}

.story__avatar {
    z-index: 2;
    width: calc(var(--avatar-size) + 6px);
    height: calc(var(--avatar-size) + 6px);
    display: block;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #fff;
}

.story__title {
    z-index: 2;
    display: block;
    font-size: var(--title-size);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.story--add .story__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-tertiary);
    border: dashed 2px var(--accent-color);
    cursor: pointer;
    color: var(--accent-color);
}

.story__add-btn {
    appearance: none;
    font: inherit;
}

.story__add-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f3f4f6;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.story__add-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent-color);
    stroke-width: 2.25;
    stroke-linecap: round;
    fill: none;
}

.story--add .story__title {
    position: static;
    max-width: 100%;
    padding: 0 10px;
    text-align: center;
    white-space: normal;
    text-overflow: initial;
    overflow: visible;
    font-size: 0.8rem;
    font-weight: 400;
    text-shadow: none;
}

@media (max-width: 991px) {
    .stories {
        --story-width: 112px;
        --story-height: 208px;
        --avatar-size: 50px;
        --title-size: 13px;
    }

    .stories .container {
        border-radius: 0;
    }

    .story--add .story__title {
        font-size: 18px;
    }
}

@media (max-width: 640px) {
    .stories {
        --story-width: 96px;
        --story-height: 172px;
        --avatar-size: 42px;
        --gap: 8px;
        --title-size: 12px;
    }

    .story__title {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .story__avatar {
        border-width: 2px;
    }

    .story__add-icon {
        width: 48px;
        height: 48px;
    }

    .story__add-icon svg {
        width: 24px;
        height: 24px;
    }

    .story--add .story__title {
        font-size: 15px;
        line-height: 1.1;
    }

    .story-community-list {
        grid-template-columns: 1fr;
    }
}

@media (hover: none) {
    .story__card:hover {
        transform: none;
    }

    .story__card:hover .story__bg {
        transform: none;
    }
}

body.story-modal-lock {
    overflow: hidden;
}

/* ===== Story Viewer Modal ===== */

.story-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.story-modal.is-active {
    display: flex;
}

.story-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
}

.story-modal__dialog {
    position: relative;
    z-index: 2;
    width: min(100%, 430px);
    height: min(92vh, 820px);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #000;
}

.story-modal__viewer {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.story-modal__progress {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 5;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
}

.story-modal__progress-item {
    position: relative;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.story-modal__progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: #fff;
    border-radius: inherit;
    transition: width 0.08s linear;
}

.story-modal__topbar {
    position: absolute;
    top: 28px;
    left: 16px;
    right: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.story-modal__author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.story-modal__author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.story-modal__author-meta {
    min-width: 0;
}

.story-modal__author-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.story-modal__author-name:hover {
    text-decoration: underline;
    color: #fff;
}

.story-modal__author-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.story-modal__footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 6;
    padding: 16px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    display: flex;
    justify-content: center;
}

.story-modal__full-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #e62e2e;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.18s ease;
    box-shadow: 0 4px 18px rgba(230, 46, 46, 0.45);
}

.story-modal__full-btn:hover {
    background: #c92020;
    color: #fff;
    text-decoration: none;
}

.story-modal__close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    top: 26px;
    right: 16px;
    z-index: 7;
    font-size: 24px;
    line-height: 1;
}

.story-modal__close:hover {
    background: rgba(255, 255, 255, 0.24);
}

.story-modal__stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.story-modal__stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.story-modal__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.story-modal__media.is-active {
    display: block;
}

.story-modal__nav {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 4;
    width: 28%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
}

.story-modal__nav--prev {
    left: 0;
}

.story-modal__nav--next {
    right: 0;
}

.story-modal__nav::before {
    content: "";
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    opacity: 0;
    transform: scale(0.96);
    transition: 0.2s ease;
}

.story-modal__nav:hover::before {
    opacity: 1;
    transform: scale(1);
}

.story-modal__nav--prev::after,
.story-modal__nav--next::after {
    position: absolute;
    font-size: 30px;
    color: #fff;
    opacity: 0;
    transition: 0.2s ease;
}

.story-modal__nav--prev::after {
    content: "\2039";
}

.story-modal__nav--next::after {
    content: "\203A";
}

.story-modal__nav:hover::after {
    opacity: 1;
}

/* ===== Story Create Modal ===== */

.story-create-modal {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.story-create-modal.is-active {
    display: flex;
}

.story-create-modal__overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-dark);
    backdrop-filter: blur(10px);
}

.story-create-modal__dialog {
    position: relative;
    z-index: 2;
    width: min(100%, 760px);
    max-height: min(90vh, 860px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.story-create-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--border-color);
}

.story-create-modal__title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.story-create-modal__subtitle {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.story-create-modal__close {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.story-create-modal__close:hover {
    background: var(--bg-tertiary);
}

.story-create-modal__body {
    padding: 24px 28px;
    overflow: auto;
}

.story-create-modal__footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 28px 28px;
    border-top: 1px solid var(--border-color);
}

.story-step {
    display: none;
}

.story-step.is-active {
    display: block;
}

.story-create-modal__search {
    margin-bottom: 18px;
}

.story-create-modal__search-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 999px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.story-create-modal__search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.story-community-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.story-community-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-align: left;
}

.story-community-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.story-community-card.is-selected {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 8%, var(--bg-secondary));
}

.story-community-card__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.story-community-card__content {
    min-width: 0;
    flex: 1;
}

.story-community-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-community-card__meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.story-community-card__check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-primary);
    color: transparent;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.story-community-card.is-selected .story-community-card__check {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.story-upload {
    display: grid;
    gap: 18px;
}

.story-upload__dropzone {
    min-height: 280px;
    padding: 28px;
    border-radius: 24px;
    border: 2px dashed var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    cursor: pointer;
}

.story-upload__dropzone:hover {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 4%, var(--bg-secondary));
}

.story-upload__icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.story-upload__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.story-upload__text {
    font-size: 14px;
    color: var(--text-secondary);
}

.story-upload__preview {
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-sm);
    max-width: 380px;
}

.story-upload__preview-media {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    display: none;
}

.story-upload__preview-media.is-active {
    display: block;
}

.story-success {
    padding: 12px 0 8px;
    text-align: center;
}

.story-success__icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    box-shadow: 0 10px 30px rgba(255, 23, 68, 0.24);
}

.story-success__title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.story-success__text {
    max-width: 520px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .story-modal {
        padding: 0;
    }

    .story-modal__dialog {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .story-modal__close {
        top: 26px;
        right: 14px;
    }

    .story-modal__topbar {
        top: 26px;
        left: 12px;
        right: 66px;
    }

    .story-modal__nav::before,
    .story-modal__nav::after {
        display: none;
    }

    .story-create-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .story-create-modal__dialog {
        width: 100%;
        max-height: 96dvh;
        border-radius: 24px 24px 18px 18px;
    }

    .story-create-modal__header {
        padding: 22px 20px 18px;
    }

    .story-create-modal__title {
        font-size: 24px;
    }

    .story-create-modal__body {
        padding: 20px;
    }

    .story-create-modal__footer {
        padding: 16px 20px 20px;
        flex-direction: column;
    }

    .story-create-modal__footer .btn {
        width: 100%;
    }

    .story-upload__dropzone {
        min-height: 220px;
        padding: 22px 18px;
    }

    .story-upload__title {
        font-size: 18px;
    }

    .story-success__title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .story-community-card {
        padding: 12px;
        gap: 12px;
    }

    .story-community-card__avatar {
        width: 48px;
        height: 48px;
    }

    .story-community-card__title {
        font-size: 15px;
    }
}

/* ===== Feed Wall ===== */

.feed-wall {
    padding: 24px 0;
}

.feed-wall__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.feed-wall__main {
    min-width: 0;
}

.feed-wall__sidebar {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 20px;
}

.feed-widget {
    min-height: 220px;
    border-radius: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* ── Feed Sidebar Ad ─────────────────────────────────────── */
.feed-sidebar-ad {
    padding: 0;
    overflow: hidden;
    min-height: unset;
    position: relative;
}

.feed-sidebar-ad__link {
    display: block;
    position: relative;
    text-decoration: none;
    border-radius: 24px;
    overflow: hidden;
}

.feed-sidebar-ad__img {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.feed-sidebar-ad__link:hover .feed-sidebar-ad__img {
    transform: scale(1.03);
}

.feed-sidebar-ad__label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0 0 24px 24px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   Likes / Dislikes / Stars / Favorites
   ============================================================ */

/* Star rating row */
.model-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px;
}

.model-stars {
    display: flex;
    gap: 3px;
}

.star {
    font-size: 22px;
    line-height: 1;
    cursor: default;
    transition: transform 0.15s;
}

.star--filled {
    color: #f5a623;
}

.star--empty {
    color: #d0d0d0;
}

[data-theme="dark"] .star--empty {
    color: #555;
}

.model-rating__count {
    font-size: 14px;
    color: var(--text-secondary, #888);
}

/* Action buttons row */
.model-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.model-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--card-bg, #f5f5f5);
    color: var(--text, #222);
    user-select: none;
}

.model-btn:hover {
    transform: scale(1.04);
}

.model-btn--like {
    border-color: #4caf50;
    color: #2e7d32;
}

.model-btn--dislike {
    border-color: #e53935;
    color: #c62828;
}

[data-theme="dark"] .model-btn--like {
    border-color: #4caf50;
    color: #a5d6a7;
}

[data-theme="dark"] .model-btn--dislike {
    border-color: #e53935;
    color: #ef9a9a;
}

.model-btn--like.is-active {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.model-btn--dislike.is-active {
    background: #fce4ec;
    border-color: #e91e63;
    color: #880e4f;
}

[data-theme="dark"] .model-btn--like.is-active {
    background: #1b2e1b;
    border-color: #4caf50;
    color: #a5d6a7;
}

[data-theme="dark"] .model-btn--dislike.is-active {
    background: #2e1b21;
    border-color: #e91e63;
    color: #f48fb1;
}

.model-btn--save.is-saved .model-btn__icon--save {
    color: #e91e63;
}

.model-btn--save.is-saved {
    border-color: #e91e63;
}

.model-btn--save {
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .model-btn--save {
    border-color: rgba(255, 255, 255, 0.15);
}

.model-btn__icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-btn__icon svg {
    display: block;
    vertical-align: middle;
}

.model-btn__count {
    font-variant-numeric: tabular-nums;
}

/* Gallery save button */
.gallery-save-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    z-index: 5;
}

.gallery-save-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.1);
}

.gallery-save-btn.is-saved {
    color: #e91e63;
}

/* Navbar favorites link */
.nav-link-fav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-fav-icon {
    font-size: 16px;
}

#nav-fav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e91e63;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

/* ============================================================
   Favorites page
   ============================================================ */

.favorites-page {
    padding: 40px 0;
    min-height: 60vh;
}

.favorites-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
}

.favorites-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.fav-tab {
    padding: 9px 22px;
    border: 2px solid var(--border, #e0e0e0);
    border-radius: 50px;
    background: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text, #222);
    transition: background 0.2s, border-color 0.2s;
}

.fav-tab.active,
.fav-tab:hover {
    background: var(--accent, #e91e63);
    border-color: var(--accent, #e91e63);
    color: #fff;
}

.fav-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #888);
    font-size: 16px;
    line-height: 1.6;
}

.fav-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fav-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--border, #e0e0e0);
    border-top-color: var(--accent, #e91e63);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.fav-grid--photos {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.fav-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg, #f5f5f5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s, box-shadow 0.2s;
}

.fav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.13);
}

.fav-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.fav-card__img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.fav-card--photo .fav-card__img {
    aspect-ratio: 4 / 5;
}

.fav-card__body {
    padding: 10px 12px;
}

.fav-card__name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fav-card__info {
    font-size: 12px;
    color: var(--text-secondary, #888);
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fav-card__remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 5;
}

.fav-card__remove:hover {
    background: rgba(233, 30, 99, 0.9);
}

/* ===== Feed Posts ===== */

.feed-list {
    display: grid;
    gap: 20px;
}

.feed-post {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.feed-post__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.feed-post__author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.feed-post__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.feed-post__author-info {
    min-width: 0;
}

.feed-post__author-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-post__date {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.feed-post__text {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ===== Feed Gallery ===== */

.feed-post__gallery {
    margin-top: 14px;
}

.gallery {
    display: grid;
    gap: 8px;
    border-radius: 18px;
    overflow: hidden;
}

.gallery__item {
    display: block;
    position: relative;
    background: #f2f2f2;
    overflow: hidden;
    min-width: 0;
}

.gallery__item img,
.gallery__item video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.gallery__item:hover img,
.gallery__item:hover video {
    transform: scale(1.03);
}

.gallery__item--video {
    cursor: pointer;
}

.gallery__play-btn {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease;
    pointer-events: none;
}

.gallery__item--video:hover .gallery__play-btn {
    background: rgba(0, 0, 0, 0.45);
}

.gallery__play-btn svg {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.gallery--1 {
    grid-template-columns: 1fr;
}

.gallery--1 .gallery__item {
    aspect-ratio: 16 / 10;
}

.gallery--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery--2 .gallery__item {
    aspect-ratio: 1 / 1;
}

.gallery--3 {
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.gallery--3 .gallery__item:first-child {
    grid-row: 1 / 3;
    aspect-ratio: auto;
    min-height: 320px;
}

.gallery--3 .gallery__item:nth-child(2),
.gallery--3 .gallery__item:nth-child(3) {
    aspect-ratio: 1 / 1;
}

.gallery--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery--4 .gallery__item {
    aspect-ratio: 1 / 1;
}

/* ===== Feed Actions ===== */

.feed-post__actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.feed-post__rates {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.feed-post__action,
.feed-post__comments-btn {
    height: 42px;
    border-radius: 999px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.feed-post__action:hover,
.feed-post__comments-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.feed-post__action.is-active.is-like {
    background: rgb(22, 177, 89, 0.12);
    border-color: rgb(22, 177, 89, 0.35);
    color: #16b159;
}

.feed-post__action.is-active.is-dislike {
    background: rgba(255, 23, 68, 0.12);
    border-color: rgb(255, 23, 68, 0.35);
    color: var(--accent-color);
}

.feed-post__comments-count,
.feed-post__count {
    font-weight: 700;
}

/* ===== Comments Modal ===== */

body.comments-modal-lock {
    overflow: hidden;
}

.comments-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.comments-modal.is-active {
    display: flex;
}

.comments-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
}

.comments-modal__dialog {
    position: relative;
    z-index: 2;
    width: min(100%, 720px);
    max-height: min(88vh, 760px);
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.comments-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-color);
}

.comments-modal__title {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text-primary);
}

.comments-modal__close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.comments-modal__body {
    padding: 20px 24px;
    overflow: auto;
}

.comments-modal__footer {
    padding: 18px 24px 24px;
    border-top: 1px solid var(--border-color);
}

.comments-list {
    display: grid;
    gap: 14px;
}

.comment-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-item__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-item__body {
    min-width: 0;
    flex: 1;
    background: var(--bg-tertiary);
    border-radius: 18px;
    padding: 12px 14px;
}

.comment-item__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.comment-item__text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    word-break: break-word;
}

.comment-item__date {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.comment-item__pending-label {
    color: var(--text-tertiary);
    font-style: italic;
}

.comment-item--pending .comment-item__body {
    opacity: 0.75;
    border: 1px dashed var(--border-color);
}

.comment-item__loading,
.comment-item__empty {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-tertiary);
}

.feed-loading {
    padding: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-tertiary);
}

.comments-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.comments-form__input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    padding: 0 18px;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.comments-form__input:focus {
    border-color: #999;
}

.comments-form__submit {
    height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    border: 0;
    background: var(--accent-color);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.comments-form__submit:hover {
    background: #000;
}

/* ===== Feed Responsive ===== */

@media (max-width: 1100px) {
    .feed-wall__layout {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

    .feed-wall .container {
        max-width: 1000px;
        padding: 0 16px;
    }
}

@media (max-width: 900px) {
    .feed-wall__layout {
        grid-template-columns: 1fr;
    }

    .feed-wall__sidebar {
        order: -1;
        grid-template-columns: 1fr 1fr;
        position: static;
    }
}

@media (max-width: 640px) {
    .feed-wall {
        padding: 16px 0;
    }

    .feed-list {
        gap: 16px;
    }

    .feed-post {
        padding: 14px;
        border-radius: 20px;
    }

    .feed-post__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .feed-post__date {
        font-size: 13px;
    }

    .feed-post__avatar {
        width: 46px;
        height: 46px;
    }

    .feed-post__author-name {
        font-size: 15px;
    }

    .feed-post__text {
        font-size: 14px;
    }

    .gallery--2,
    .gallery--4 {
        grid-template-columns: 1fr 1fr;
    }

    .gallery--3 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .gallery--3 .gallery__item:first-child {
        grid-row: auto;
        min-height: auto;
        aspect-ratio: 16 / 10;
    }

    .gallery--3 .gallery__item:nth-child(2),
    .gallery--3 .gallery__item:nth-child(3) {
        aspect-ratio: 16 / 10;
    }

    .feed-post__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .feed-post__rates {
        width: 100%;
    }

    .feed-post__action,
    .feed-post__comments-btn {
        justify-content: center;
    }

    .feed-post__action {
        flex: 1;
    }

    .feed-post__comments-btn {
        width: 100%;
    }

    .feed-wall__sidebar {
        grid-template-columns: 1fr;
    }

    .comments-modal {
        padding: 0;
        align-items: flex-end;
    }

    .comments-modal__dialog {
        width: 100%;
        max-height: 92dvh;
        border-radius: 24px 24px 0 0;
    }

    .comments-modal__header {
        padding: 18px 16px;
    }

    .comments-modal__body {
        padding: 16px;
    }

    .comments-modal__footer {
        padding: 14px 16px 18px;
    }

    .comments-modal__title {
        font-size: 20px;
    }

    .comments-form {
        display: block;
        width: 100%;
    }

    .comments-form__submit {
        width: 100%;
    }

    .comments-form__input {
        margin-bottom: 1rem;
    }
}

.forum-status-active {
    background: #d4f5d4;
    color: #03bc03;
}

.forum-status-active::before {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    background-color: #03bc03;
    -webkit-mask-image: url('/images/icons/success.svg');
    mask-image: url('/images/icons/success.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    margin-right: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}

.forum-status-pending {
    background: #fff3cd;
    color: #7a5a00;
}

.forum-status-moderation {
    background: #cce5ff;
    color: #004085;
}

.forum-status-deleted {
    background: #f8d7da;
    color: #721c24;
}

.forum-thread-date-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.forum-thread-date-stat img {
    width: 16px;
    height: 16px;
    opacity: 0.55;
}

/* ── Title ────────────────────────────────────────────────── */
.forum-thread-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 14px;
}

/* ── Moderator header ──────────────────────────────────────── */
.forum-moderator-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.forum-moderator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.forum-moderator-name {
    font-size: 1rem;
    font-weight: 600;
    color: #dc3545;
}

/* ── OP text inside card ──────────────────────────────────── */
.forum-op-body {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 18px;
}

/* ── Compact photo thumbnails inside card ─────────────────── */
.forum-op-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.forum-op-photo {
    display: block;
    width: 140px;
    height: 140px;
    padding: 0;
    border: none;
    background: none;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.forum-op-photo:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.forum-op-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Video thumbnails inside card ─────────────────────────── */
.forum-op-videos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.forum-op-video-card {
    width: 200px;
    flex-shrink: 0;
}

/* ── Video thumbnail helper ───────────────────────────────── */
.video-thumb-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* ── Replies section wrapper ──────────────────────────────── */
.forum-replies-section {
    padding: 20px 0 40px;
}

/* ── Single reply card ────────────────────────────────────── */
.forum-reply-card {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-color);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 16px;
}

/* ── Reply meta (author left, date right) ─────────────────── */
.forum-reply-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 8px;
}

.forum-author {
    font-weight: 600;
    color: var(--text-primary);
}

.forum-author-platform {
    background: var(--bg-tertiary);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.72rem;
    margin-left: 6px;
}

.forum-reply-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.forum-reply-date:hover,
.forum-msg-anchor:hover {
    color: var(--accent-color);
}

/* ── Reply body text ──────────────────────────────────────── */
.forum-reply-body {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.forum-reply-body a {
    color: var(--accent-color);
}

/* ── Reply media ─────────────────────────────────────────── */
.forum-message-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.forum-media-item {
    border-radius: 6px;
    overflow: hidden;
}

.forum-media-link {
    display: block;
}

.forum-media-img {
    display: block;
    max-height: 280px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.forum-media-img:hover {
    opacity: 0.85;
}

.forum-media-video-el {
    max-height: 360px;
    max-width: 100%;
    border-radius: 6px;
    background: #000;
}

/* ── Back link ───────────────────────────────────────────── */
.forum-thread-back {
    padding: 8px 0 48px;
}

.btn-back {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: border-color 0.15s, color 0.15s;
}

.btn-back:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

@media (max-width: 600px) {
    .forum-thread-card {
        padding: 16px 14px;
    }

    .forum-thread-title {
        font-size: 1.4rem;
    }

    .forum-op-photo {
        width: 100px;
        height: 100px;
    }

    .forum-reply-card {
        padding: 14px;
    }

    .forum-reply-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ──── Empty search results promo ──────────────────────────────────── */
.empty-promo-wrapper {
    grid-column: 1 / -1;
    text-align: center;
    width: 100%;
}

.empty-promo {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: stretch;
}

.empty-promo-block {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    text-align: center;
}

@media (max-width: 640px) {
    .empty-promo {
        flex-direction: column;
    }
}

.empty-promo-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--text-primary);
}

.empty-promo-desc {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.empty-promo-buttons {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.empty-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.q-cap {
    text-transform: capitalize;
}

/* Suggestions section — shown on all catalog pages */
.suggestions-section {
    padding: 1.5rem 0 3rem;
    border-top: 1px solid var(--border-color);
}

.suggestions-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}



/* ──── Thread creation modal ────────────────────────────────────── */
.thread-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.thread-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.thread-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.thread-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.thread-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.thread-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.thread-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.thread-modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.thread-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.thread-modal-actions .btn {
    flex: 1;
}

@media (max-width: 640px) {
    .thread-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .thread-modal-header {
        padding: 1.25rem 1.5rem;
    }

    .thread-modal-header h3 {
        font-size: 1.25rem;
    }

    .thread-modal-body {
        padding: 1.5rem;
    }

    .thread-modal-actions {
        flex-direction: column;
    }

    .thread-modal-actions .btn {
        width: 100%;
    }
}


/* ============================================================
   Push notification — subscribe button & modal
   ============================================================ */

.model-btn--subscribe {
    color: white;
    background: var(--accent-color);
    transition: color .2s, border-color .2s, background .2s;
}

/* Inline variant under avatar */
.model-btn--subscribe-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    padding: 15px;
    border-radius: 15px;
    margin: 8px 0 4px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s
}

/* stat item as link */
.model-stat-item--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity .15s;
}
.model-stat-item--link:hover { opacity: .75; }

[data-theme="dark"] .model-btn--subscribe {
    border-color: rgba(255, 255, 255, .15);
}

.model-btn--subscribe.is-subscribed,
.model-btn--subscribe:hover {
    color: white;
    background: var(--accent-color);
}

/* Modal overlay */
.push-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 1400;
    backdrop-filter: blur(3px);
}

.push-modal.is-visible~.push-modal-overlay,
.push-modal-overlay:has(~ .push-modal.is-visible) {
    display: block;
}

#pushModal.is-visible+.push-modal-overlay,
#pushModalOverlay:has(+ #pushModal.is-visible) {
    display: block;
}

/* Reorder: overlay first in DOM, then modal — use sibling trick */
.push-modal-overlay {
    display: none;
}

#pushModal.is-visible {
    display: flex;
}

#pushModal.is-visible~#pushModalOverlay,
#pushModalOverlay.is-visible {
    display: block;
}

/* The overlay is before the modal in DOM, so use JS to toggle it */

/* Modal box */
.push-modal {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(500px, calc(100vw - 32px));
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
    padding: 32px 28px 24px;
    z-index: 1500;
    gap: 12px;
    box-sizing: border-box;
}

.push-modal__title {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0;
}

.push-modal__desc {
    font-size: .95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.push-modal__status {
    font-size: .88rem;
    padding: 10px 14px;
    border-radius: 10px;
    width: 100%;
    text-align: center;
}

.push-modal__status--info {
    background: rgba(99, 102, 241, .1);
    color: #6366f1;
}

.push-modal__status--success {
    background: rgba(34, 197, 94, .1);
    color: #16a34a;
}

.push-modal__status--error {
    background: rgba(239, 68, 68, .1);
    color: #dc2626;
}

.push-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}

.push-modal__btn-enable {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    background: #22c55e;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity .2s;
}

.push-modal__btn-enable:hover {
    opacity: .88;
}

.push-modal__btn-enable:disabled {
    opacity: .5;
    cursor: default;
}

.push-modal__btn-cancel {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: .88rem;
    cursor: pointer;
    padding: 6px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.push-modal__btn-cancel:hover {
    color: var(--text-primary);
}

/* Denied instructions */
.push-modal__denied {
    width: 100%;
    text-align: left;
}

.push-modal__denied-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.push-modal__denied-steps {
    margin: 0 0 10px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.push-modal__denied-steps li {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.push-modal__denied-link {
    font-size: .82rem;
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: .7;
}

@media (max-width: 480px) {
    .push-modal {
        padding: 24px 18px 20px;
        border-radius: 16px;
    }

    .push-modal__title {
        font-size: 1.2rem;
    }

    .push-modal__desc {
        font-size: .88rem;
    }
}