﻿/* Базовые настройки и переменные */
:root {
    --bg-dark: #0f1115;
    --bg-card: #1c1f26;
    --bg-hover: #252a33;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #ff3366;
    --primary-hover: #e62050;
    --accent: #3b82f6;
    --success: #10b981;
    --border: #2d3748;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

/* Навигация */
.navbar {
    background-color: rgba(15, 17, 21, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.nav-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.nav-search input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-main);
    outline: none;
}

.nav-search input:focus {
    border-color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-auth {
    display: flex;
    gap: 10px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Герой секция */
.hero {
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(255,51,102,0.1) 0%, rgba(15,17,21,1) 70%);
    z-index: -1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
}

/* Сетки и карточки (Общие стили) */
section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.see-all {
    color: var(--primary);
    font-weight: 600;
}

.projects-grid, .assets-grid, .categories-grid, .docs-engines {
    display: grid;
    gap: 25px;
}

.projects-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.assets-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.categories-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.docs-engines { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* Карточка проекта */
.project-card, .asset-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
}

.project-card:hover, .asset-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--primary);
}

.project-image, .asset-image {
    position: relative;
    width: 100%;
}

.project-image img, .asset-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.project-info, .asset-info {
    padding: 15px;
}

.project-info h3, .asset-info h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.tag {
    background-color: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Подвал */
.footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
    margin-top: 50px;
}

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

.footer-links h3 {
    margin-bottom: 20px;
    color: white;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--text-muted);
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--primary);
}

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

/* Адаптивность */
@media (max-width: 992px) {
    .nav-search, .nav-links, .nav-auth {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Стили для страницы Каталога (Проекты / Ассеты) --- */

.catalog-page {
    padding: 40px 0;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.catalog-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

/* Боковая панель фильтров */
.sidebar-filters {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.checkbox-label:hover {
    color: var(--primary);
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Сортировка */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background-color: var(--bg-card);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.sort-select {
    background-color: var(--bg-dark);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.sort-select:focus {
    border-color: var(--primary);
}

/* Дополнения для карточек проектов в каталоге */
.project-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-price {
    background-color: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border);
}

.project-price.free {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.btn-favorite {
    background-color: rgba(15, 17, 21, 0.8);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-favorite:hover {
    background-color: var(--bg-hover);
    color: var(--primary);
    border-color: var(--primary);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-platforms {
    display: flex;
    gap: 10px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Пагинация (Страницы) */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.page-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-btn.next {
    width: auto;
    padding: 0 20px;
    gap: 8px;
}

.page-dots {
    color: var(--text-muted);
    font-weight: bold;
}

/* Адаптивность для каталога */
@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-filters {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .filter-group {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sort-bar {
        flex-direction:
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* --- Стили для страницы Документации (Docs Page) --- */

.docs-page {
    border-top: 1px solid var(--border);
}

.docs-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding: 0;
    max-width: 1400px;
}

/* Боковое меню */
.docs-sidebar {
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
    overflow-y: auto;
}

/* Кастомный скроллбар для сайдбара */
.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 10px;
}

.docs-search-mobile {
    display: none;
    margin-bottom: 20px;
}

.docs-group {
    margin-bottom: 15px;
}

.docs-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.docs-group-header:hover {
    background-color: var(--bg-hover);
}

.docs-group-header .toggle-icon {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.docs-group.active .docs-group-header {
    color: var(--primary);
}

.docs-group.active .toggle-icon {
    transform: rotate(180deg);
}

.docs-list {
    list-style: none;
    padding-left: 30px;
    margin-top: 5px;
}

.docs-list li {
    margin-bottom: 8px;
}

.docs-list a {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: block;
    padding: 5px 0;
    transition: color 0.2s;
}

.docs-list a:hover {
    color: white;
}

.docs-list a.active {
    color: var(--primary);
    font-weight: 500;
}

/* Основной контент статьи */
.docs-content {
    padding: 40px;
    max-width: 900px;
}

.breadcrumbs {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumbs a {
    color: var(--primary);
}

.article-body h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.article-meta img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.article-body h2 {
    font-size: 1.8rem;
    color: white;
    margin: 40px 0 20px;
}

.article-body p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.article-body ul, .article-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
    font-size: 1.1rem;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body code {
    background-color: var(--bg-hover);
    color: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.95em;
}

/* Блоки с кодом */
.code-block {
    background-color: #0d1117;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 30px 0;
    overflow: hidden;
}

.code-header {
    background-color: var(--bg-hover);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: white;
}

.code-block pre {
    padding: 20px;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    background: none;
    padding: 0;
    color: #a5d6ff;
    font-size: 0.95rem;
}

/* Инфо-плашки (Alerts) */
.alert-box {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid;
    background-color: rgba(255, 255, 255, 0.05);
}

.alert-box i {
    font-size: 1.5rem;
    margin-top: 2px;
}

.alert-box.info {
    border-color: var(--accent);
}

.alert-box.info i {
    color: var(--accent);
}

.alert-box.warning {
    border-color: #fbbf24;
}

.alert-box.warning i {
    color: #fbbf24;
}

/* Подвал статьи */
.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.helpful-box {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
}

.next-article a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary);
}

/* Адаптивность документации */
@media (max-width: 992px) {
    .docs-container {
        grid-template-columns: 1fr;
    }
    .docs-sidebar {
        display: none; /* В реальном проекте тут будет кнопка открытия меню */
    }
    .docs-content {
        padding: 20px;
    }
    .article-footer {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}

/* --- Стили для страницы Спонсоров --- */

.sponsors-hero {
    padding: 80px 0;
    background: linear-gradient(to bottom, rgba(255, 51, 102, 0.05), var(--bg-dark));
    border-bottom: 1px solid var(--border);
}

.sponsors-hero h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 20px;
}

.sponsors-hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

.sponsors-hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.text-center {
    text-align: center;
}

.creators-catalog {
    padding: 60px 0;
}

/* Табы фильтров */
.creators-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Продолжение стилей Спонсоров */
.tab-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    border-color: var(--primary);
    color: white;
}

.tab-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Сетка карточек авторов */
.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Карточка автора */
.creator-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.creator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--primary);
}

.creator-cover {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    background-color: var(--bg-dark);
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-info {
    padding: 50px 20px 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.creator-info h3 {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 5px;
}

.creator-niche {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    min-height: 40px; /* Чтобы карточки были одной высоты */
}

.creator-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.creator-stats div {
    display: flex;
    flex-direction: column;
}

.creator-stats strong {
    font-size: 1.2rem;
    color: white;
}

.creator-stats span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Прогресс-бар цели спонсорства */
.funding-goal {
    text-align: left;
    margin-bottom: 25px;
    flex: 1;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.goal-header span:last-child {
    font-weight: bold;
    color: var(--primary);
}

.progress-bar {
    height: 8px;
    background-color: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

.progress-fill.success {
    background-color: var(--success);
}

.goal-amount {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    text-align: right;
}

.w-100 {
    width: 100%;
    justify-content: center;
}

/* Адаптивность для страницы спонсоров */
@media (max-width: 768px) {
    .sponsors-hero h1 {
        font-size: 2rem;
    }
    .sponsors-hero-actions {
        flex-direction: column;
    }
}

/* --- Стили для страницы Загрузки проекта (Upload) --- */

.upload-section {
    padding: 40px 0 80px;
}

.upload-container {
    max-width: 800px;
}

.upload-header {
    text-align: center;
    margin-bottom: 40px;
}

.upload-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.upload-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.form-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.form-card h2 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.form-card h2 i {
    color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Инпуты и Селекты */
input[type="text"],
input[type="url"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    min-height: 120px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Текстовый редактор (заглушка панели) */
.editor-toolbar {
    display: flex;
    gap: 5px;
    background-color: var(--bg-hover);
    padding: 10px;
    border: 1px solid var(--border);
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.editor-toolbar button {
    background: none;
    border: none;
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-toolbar button:hover {
    background-color: var(--border);
    color: var(--text-main);
}

/* Зоны загрузки файлов (Drag & Drop) */
.file-drop-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    background-color: rgba(15, 17, 21, 0.5);
    transition: all 0.3s;
    cursor: pointer;
}

.file-drop-area:hover {
    border-color: var(--primary);
    background-color: rgba(255, 51, 102, 0.05);
}

.file-drop-area i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.file-drop-area p {
    color: var(--text-muted);
}

.file-drop-area p span {
    color: var(--primary);
    font-weight: 600;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Радио кнопки для монетизации */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--bg-dark);
}

.radio-label:hover {
    border-color: var(--primary);
}

.radio-label input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.radio-label div strong {
    display: block;
    margin-bottom: 5px;
    color: white;
}

.radio-label div span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.checkbox-group.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.price-wrapper {
    position: relative;
    max-width: 200px;
}

.price-wrapper .currency {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: bold;
}

/* Кнопки внизу */
.upload-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 20px;
}

/* Мини-профиль в навбаре */
.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background-color 0.2s;
}

.user-profile-mini:hover {
    background-color: var(--bg-card);
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* Адаптивность для формы */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .upload-actions {
        flex-direction: column;
    }
    .upload-actions button {
        width: 100%;
    }
}

/* --- Стили для страницы Игры (Game Page) --- */

.game-page {
    padding: 40px 0 80px;
}

/* Шапка игры */
.game-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.game-title-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.game-title-row h1 {
    font-size: 2.5rem;
    color: white;
    margin: 0;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fbbf24;
    font-size: 1.1rem;
}

.game-rating span {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: 5px;
}

.game-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 800px;
}

.game-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.game-author span {
    color: var(--text-muted);
}

.game-author strong {
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* Сетка (Левая и Правая колонки) */
.game-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* --- Левая Колонка --- */

/* Галерея */
.game-gallery {
    margin-bottom: 30px;
}

.main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: white;
    opacity: 0.8;
    cursor: pointer;
    transition: all 0.2s;
}

.play-button-overlay:hover {
    opacity: 1;
    color: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnail-list img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    opacity: 0.6;
}

.thumbnail-list img:hover {
    opacity: 1;
}

.thumbnail-list img.active {
    border-color: var(--primary);
    opacity: 1;
}

/* Блоки контента (Описание, Требования, Комменты) */
.content-block {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.content-block h2 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.game-description p {
    margin-bottom: 15px;
}

.game-description h3 {
    color: white;
    margin: 25px 0 10px;
}

.game-description ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.game-description ul li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* Таблица системных требований */
.req-table {
    width: 100%;
    border-collapse: collapse;
}

.req-table th, .req-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.req-table th {
    background-color: var(--bg-dark);
    color: white;
    font-weight: 600;
}

.req-table tr:last-child td {
    border-bottom: none;
}

.req-table td {
    color: var(--text-muted);
}

/* Комментарии */
.comment-form {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.comment-form img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.form-wrapper textarea {
    width: 100%;
    min-height: 80px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment {
    display: flex;
    gap: 15px;
}

.comment.developer-reply {
    margin-left: 55px;
    border-left: 2px solid var(--primary);
    padding-left: 15px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-body {
    flex: 1;
    background-color: var(--bg-dark);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: white;
}

.dev-badge {
    color: var(--primary);
}

.dev-badge span {
    background-color: var(--primary);
    color: white;
    font-size: 0.7rem;
    adding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: bold;
}

.comment-date { color: var(--text-muted); font-size: 0.85rem; }
.comment-text { color: var(--text-main); line-height: 1.5; margin-bottom: 15px; }
.comment-actions { display: flex; gap: 15px; }
.comment-actions button { background: none; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.2s; display: flex; align-items: center; gap: 5px; }
.comment-actions button:hover { color: var(--primary); }

/* --- Правая Колонка (Сайдбар Игры) --- */
.game-sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 20px; }
.buy-box, .game-info-box, .game-tags-box, .game-links-box { background-color: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 25px; }
.price-tag { font-size: 2rem; font-weight: 800; color: white; margin-bottom: 10px; }
.price-tag.free { color: var(--success); }
.support-text { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.btn-huge { width: 100%; padding: 15px; font-size: 1.1rem; justify-content: center; margin-bottom: 15px; }
.support-btn { border-color: var(--primary); color: var(--primary); }
.support-btn:hover { background-color: rgba(255, 51, 102, 0.1); }
.platforms-available { text-align: center; color: var(--text-muted); margin-top: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.platforms-available i { font-size: 1.2rem; color: white; }
.game-info-box h3, .game-tags-box h3 { font-size: 1.2rem; color: white; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.info-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95rem; }
.info-label { color: var(--text-muted); }
.info-value { color: white; font-weight: 500; text-align: right; }
.game-links-box { display: flex; flex-direction: column; gap: 10px; }
.social-link { display: flex; align-items: center; gap: 10px; padding: 12px; background-color: var(--bg-dark); border-radius: 8px; color: var(--text-main); transition: all 0.2s; border: 1px solid var(--border); }
.social-link:hover { border-color: var(--primary); color: var(--primary); transform: translateX(5px); }

/* Адаптивность для страницы игры */
@media (max-width: 992px) { .game-layout { grid-template-columns: 1fr; } .game-sidebar { position: static; } }
@media (max-width: 768px) { .game-title-row { flex-direction: column; align-items: flex-start; } .thumbnail-list { grid-template-columns: repeat(2, 1fr); } }

/* --- Стили для страницы Сообщества --- */

.community-page {
    padding: 40px 0;
    position: relative;
    min-height: 80vh;
}

.community-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* Блок создания поста */
.create-post-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.create-post-box .user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.fake-input {
    flex: 1;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 12px 20px;
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s;
    font-size: 1rem;
}

.fake-input:hover {
    border-color: var(--primary);
}

/* Фильтры ленты */
.feed-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.feed-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.feed-tab:hover {
    color: white;
}

.feed-tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* Карточка поста */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    transition: border-color 0.2s;
}

.post-card:hover {
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.post-sidebar {
    background-color: rgba(15, 17, 21, 0.5);
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border-right: 1px solid var(--border);
}

.vote-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.vote-btn:hover { color: white; }
.vote-btn.upvote.active { color: var(--primary); }
.vote-btn.downvote.active { color: #3b82f6; }

.vote-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.post-content {
    padding: 20px;
    flex: 1;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.post-header img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.author-name {
    color: white;
    font-weight: 500;
}

.post-time {
    color: var(--text-muted);
}

.badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: auto;
}

.badge.solved {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.discussion {
    background-color: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.post-title a {
    color: white;
}

.post-title a:hover {
    color: var(--primary);
}

.post-preview {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-stats {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Сайдбар сообщества */
.sidebar-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-box h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.top-helpers ul {
    list-style: none;
}

.top-helpers li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.top-helpers li:last-child {
    margin-bottom: 0;
}

.top-helpers img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.helper-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.helper-info strong {
    color: white;
    font-size: 0.95rem;
}

.helper-info span {
    color: var(--text-
    muted);
    font-size: 0.85rem;
}

/* --- ИСПРАВЛЕННАЯ ЗАГЛУШКА АВТОРИЗАЦИИ (Auth Wall) --- */
.community-page {
    padding: 40px 0;
    position: relative; /* Это КРИТИЧЕСКИ ВАЖНО для тумана */
    min-height: 80vh;
    overflow: hidden; /* Чтобы туман не вылезал за границы */
}

.auth-wall {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 17, 21, 0.7);
    backdrop-filter: blur(12px); /* Сила размытия */
    -webkit-backdrop-filter: blur(12px); /* Для Safari */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    z-index: 999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.auth-wall-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.auth-wall-content i.fa-lock {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 25px;
}

.auth-wall-content h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.auth-wall-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.auth-wall-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}


/* Адаптивность для Сообщества */
@media (max-width: 992px) {
    .community-layout {
        grid-template-columns: 1fr;
    }
    .community-sidebar {
        display: none; /* На мобилках скрываем сайдбар, чтобы не мешал ленте */
    }
}

@media (max-width: 768px) {
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .auth-wall-buttons {
        flex-direction: column;
    }
    .auth-wall-buttons button {
        width: 100%;
    }
    .auth-wall-content {
        margin: 0 20px;
        padding: 40px 20px;
    }
}

/* --- Стили для Личного Кабинета (Профиля) --- */

.profile-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.profile-cover {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.edit-cover-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(15, 17, 21, 0.7);
    backdrop-filter: blur(4px);
    border: none;
    color: white;
}

.edit-cover-btn:hover {
    background-color: var(--primary);
}

.profile-info-bar {
    display: flex;
    align-items: flex-end;
    gap: 30px;
    padding-bottom: 30px;
    margin-top: -50px; /* Поднимаем контент на обложку */
    position: relative;
    z-index: 10;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 6px solid var(--bg-card);
    position: relative;
    background-color: var(--bg-dark);
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: 4px solid var(--bg-card);
    cursor: pointer;
    transition: transform 0.2s;
}

.edit-avatar-btn:hover {
    transform: scale(1.1);
}

.profile-details {
    flex: 1;
    padding-bottom: 10px;
}

.profile-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.profile-title h1 {
    font-size: 2rem;
    color: white;
    margin: 0;
}

.pro-badge {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: #451a03;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.profile-bio {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 15px;
    max-width: 600px;
}

.profile-links {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-links a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-links a:hover {
    color: var(--primary);
}

.profile-actions {
    display: flex;
    gap: 15px;
    padding-bottom: 10px;
}

.profile-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    overflow-x: auto; /* Для мобилок */
    padding-bottom: 10px;
}

.profile-tabs .tab-btn {
    border: none;
    background: none;
    border-radius: 0;
    padding: 10px 15px;
    font-size: 1.05rem;
}

.profile-tabs .tab-btn.active {
    background: none;
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

/* Адаптивность профиля */
@media (max-width: 768px) {
    .profile-info-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .profile-title {
        justify-content: center;
    }
    
    .profile-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-actions {
        width: 100%;
        flex-direction: column;
    }
}

/* --- СТИЛИ ДЛЯ ДЖЕМОВ (JAMS) --- */
.active-jam {
    padding: 40px 0;
}

.jam-hero-card {
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.jam-status {
    display: inline-block;
    background-color: var(--success);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.jam-hero-card h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 10px;
}

.jam-theme {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.jam-theme strong {
    color: var(--primary);
}

.jam-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.time-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.time-box span {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 5px;
}

.jam-stats-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.jam-actions {
    display: flex;
    justify-content: center
    gap: 20px;
}

.jams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.jam-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}

.jam-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.jam-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.jam-card-content {
    padding: 20px;
    position: relative;
}

.jam-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.jam-badge.upcoming { background-color: var(--accent); }
.jam-badge.ended { background-color: #475569; }

.jam-card h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.jam-dates, .jam-host {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.jam-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* --- СТИЛИ ДЛЯ ПОИСКА КОМАНДЫ (TEAMS) --- */
.team-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    transition: border-color 0.3s;
}

.team-card:hover {
    border-color: var(--primary);
}

.team-card-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
    position: relative;
}

.team-card-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.team-card-info {
    flex: 1;
}

.team-card-info h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.role-badge, .payment-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Цвета для бейджиков команд */
.role-badge.looking { background-color: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.role-badge.specialist { background-color: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }

.payment-badge.revshare { background-color: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.payment-badge.free { background-color: rgba(100, 116, 139, 0.2); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.4); }

.post-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    position: absolute;
    top: 0;
    right: 0;
}

.team-card-body p {
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.team-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.team-card-footer {
    display: flex;
    gap: 15px;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* Адаптивность для новых страниц */
@media (max-width: 768px) {
    .jam-hero-card h1 { font-size: 2rem; }
    .jam-timer { flex-wrap: wrap; }
    .jam-stats-row { flex-direction: column; gap: 10px; }
    .team-card-header { flex-direction: column; }
    .post-date { position: static; margin-top: 10px; }
    .team-card-footer { flex-direction: column; align-items: stretch; }
    .team-card-footer a, .team-card-footer button { text-align: center; justify-content: center; }
}



/* ══════════════════════════════════════════════
   ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ И УЛУЧШЕНИЯ
══════════════════════════════════════════════ */

/* Мобильное меню */
@media (max-width: 992px) {
    .nav-links, .nav-auth { display: none; }
    .mobile-menu-btn { display: block !important; }
    .nav-links.mobile-open {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        padding: 20px;
        z-index: 999;
        gap: 12px;
    }
    .nav-auth.mobile-open {
        display: flex !important;
        flex-direction: row;
        position: absolute;
        top: calc(100% + 200px);
        right: 20px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        padding: 12px;
        border-radius: 10px;
        z-index: 999;
    }
}

/* Страница Команды */
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    transition: border-color 0.3s;
}
.team-card:hover { border-color: var(--primary); }
.team-card-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
    position: relative;
}
.team-card-header img { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--border); }
.team-card-info { flex: 1; }
.team-card-info h3 { color: white; font-size: 1.1rem; margin-bottom: 6px; }

/* Страница Джемов */
.active-jam { padding: 60px 0; }
.jam-hero-card {
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    border: 1px solid var(--border);
}
.jam-hero-card h1 { font-size: 3rem; color: white; margin-bottom: 10px; }
.jam-theme { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; }
.jam-theme strong { color: var(--primary); }
.jam-status {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.jam-timer { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; }
.time-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.time-box span { font-size: 2.5rem; font-weight: 800; color: white; line-height: 1; margin-bottom: 5px; }
.jam-stats-row { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; color: var(--text-muted); }
.jam-stats-row span i { color: var(--primary); margin-right: 6px; }
.jam-actions { display: flex; justify-content: center; gap: 15px; }
.jams-list { padding: 60px 0; }
.jams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.jam-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}
.jam-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.jam-card img { width: 100%; height: 160px; object-fit: cover; }
.jam-card-content { padding: 20px; }
.jam-card-content h3 { color: white; margin-bottom: 8px; }
.jam-dates, .jam-host { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 5px; }
.jam-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; color: var(--text-muted); font-size: 0.9rem; }
.jam-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.jam-badge.upcoming { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.jam-badge.ended { background: rgba(148,163,184,0.1); color: #94a3b8; border: 1px solid var(--border); }

/* Индикатор активной страницы */
.nav-links a.active-page,
.nav-links a[style*="--primary"] { color: var(--primary) !important; }

/* Улучшение auth-wall */
.auth-wall {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, var(--bg-dark) 60%, transparent);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 60px;
    min-height: 350px;
    transition: opacity 0.5s;
    z-index: 10;
}
.auth-wall-content { text-align: center; max-width: 500px; padding: 40px; }
.auth-wall-content .fa-lock { font-size: 3rem; color: var(--primary); margin-bottom: 20px; }
.auth-wall-content h2 { color: white; font-size: 1.6rem; margin-bottom: 15px; }
.auth-wall-content p { color: var(--text-muted); line-height: 1.6; margin-bottom: 30px; }
.auth-wall-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* Кнопка выхода в nav */
.logout-btn { opacity: 0.6; transition: opacity 0.2s; }
.logout-btn:hover { opacity: 1; color: var(--primary) !important; }

/* Профиль - поле pro-badge */
.pro-badge {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: #451a03;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 1px;
}

/* Улучшение карточек проектов */
.project-card, .asset-card {
    position: relative;
}
.project-price { position: relative; }

/* Btn-sm */
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

/* Кнопка «Огромная» */
.btn-huge { width: 100%; padding: 15px; font-size: 1.1rem; justify-content: center; margin-bottom: 15px; }

/* Fix для radio-label */
.radio-label { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-main); }

/* Community page overflow fix */
.community-page { position: relative; }

/* Docs active link */
.docs-list a.active { color: var(--primary); font-weight: 500; }

/* Улучшение форм */
.form-card input[type="text"]:focus,
.form-card input[type="url"]:focus,
.form-card input[type="number"]:focus,
.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,51,102,0.1);
}


/* ============================================================
   Auth Modal + User Menu (added by frontend block A)
   ============================================================ */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: authFade 0.2s ease;
}
.auth-modal-overlay.open { display: flex; }
@keyframes authFade { from { opacity: 0; } to { opacity: 1; } }

.auth-modal {
  background: var(--bg-card, #1a1d24);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 32px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: authPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes authPop { from { transform: translateY(12px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.auth-modal-close:hover { background: rgba(255,255,255,0.05); color: white; }

.auth-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.15s;
}
.auth-tab.active {
  background: var(--bg, #0f1115);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.auth-form h2 {
  color: white;
  font-size: 1.5rem;
  margin: 0 0 6px;
}
.auth-subtitle {
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.auth-form label {
  display: block;
  color: var(--text-muted, #94a3b8);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.auth-form label .hint {
  color: rgba(148, 163, 184, 0.6);
  font-weight: 400;
  font-size: 0.78rem;
}
.auth-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  color: white;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--primary, #8b5cf6);
  background: rgba(255,255,255,0.06);
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.auth-form .w-100 { width: 100%; }

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
}
.auth-switch a { color: var(--primary, #8b5cf6); text-decoration: none; font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

/* ---- Logged-in navbar ---- */

.nav-auth .nav-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
}

.nav-notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: color 0.15s, background 0.15s;
}
.nav-notif-btn:hover { color: white; background: rgba(255,255,255,0.06); }
.nav-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1.2;
  min-width: 18px;
  text-align: center;
}

.user-menu { position: relative; }
.user-menu-toggle {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 5px 12px 5px 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: white;
  transition: background 0.15s;
}
.user-menu-toggle:hover { background: rgba(255,255,255,0.07); }
.user-menu-toggle .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.user-menu-name {
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-caret { font-size: 0.7rem; color: var(--text-muted, #94a3b8); }

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card, #1a1d24);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  z-index: 100;
}
.user-menu-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text, #e2e8f0);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.user-menu-dropdown a:hover { background: rgba(255,255,255,0.05); color: white; }
.user-menu-dropdown a i { width: 16px; text-align: center; color: var(--text-muted, #94a3b8); }

@media (max-width: 768px) {
  .user-menu-name { display: none; }
  .nav-notif-btn { display: none; }
}

/* ============================================================
   Catalog filters + pagination (added by Stage C)
   ============================================================ */

.filter-select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  color: white;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.filter-select:focus {
  outline: none;
  border-color: var(--primary, #8b5cf6);
}
.filter-select option {
  background: #1a1d24;
  color: white;
}

.catalog-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.catalog-pagination .page-btn {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 8px;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}
.catalog-pagination .page-btn:hover {
  background: rgba(255,255,255,0.07);
  color: white;
}
.catalog-pagination .page-btn.active {
  background: var(--primary, #8b5cf6);
  border-color: var(--primary, #8b5cf6);
  color: white;
}

/* ============================================================
   Catalog: sort-bar, pagination (added by frontend Stage C)
   ============================================================ */

.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.catalog-count {
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
}
.sort-select, .filter-select {
  background: var(--bg-card, #1a1d24);
  color: white;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}
.sort-select:focus, .filter-select:focus {
  outline: none;
  border-color: var(--primary, #8b5cf6);
}
.filter-group { margin-bottom: 20px; }
.filter-group h3 { color: var(--text-muted, #94a3b8); font-size: 0.85rem; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.filter-select { width: 100%; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  padding: 16px 0;
}
.page-btn {
  background: var(--bg-card, #1a1d24);
  color: var(--text-muted, #94a3b8);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover { background: rgba(255,255,255,0.06); color: white; }
.page-btn.active {
  background: var(--primary, #8b5cf6);
  color: white;
  border-color: var(--primary, #8b5cf6);
}

/* Make project-card clickable when used as <a> tag */
a.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
a.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* ============================================================
   Game page dynamic styles (Stage D)
   ============================================================ */

.game-stats-bar {
  display: flex;
  gap: 16px;
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
}
.game-stats-bar i { margin-right: 4px; }

#like-btn {
  width: 100%;
  margin-top: 12px;
  transition: background 0.2s, color 0.2s;
}
#like-btn.liked {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.auth-hint {
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
  padding: 12px 0;
}
.auth-hint a { color: var(--primary, #8b5cf6); }

#comment-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px;
  resize: vertical;
  min-height: 70px;
  margin-bottom: 10px;
}
#comment-input:focus { outline: none; border-color: var(--primary, #8b5cf6); }

/* ============================================================
   Upload page preview (Stage E)
   ============================================================ */

.upload-preview img {
  margin-top: 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.upload-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.upload-preview-grid img {
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}

/* ============================================================
   Notification dropdown + Toasts polish (final polish)
   ============================================================ */

.nav-notif-wrapper { position: relative; }

.nav-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  background: var(--bg-card, #1a1d24);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.5);
  z-index: 200;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  color: white;
  font-size: 0.95rem;
}
.notif-mark-all {
  background: none;
  border: none;
  color: var(--primary, #8b5cf6);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.notif-mark-all:hover { background: rgba(139,92,246,0.15); }

.notif-list {
  overflow-y: auto;
  flex: 1;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
  cursor: default;
}
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(139,92,246,0.06); }
.notif-item.unread .notif-icon { color: var(--primary, #8b5cf6); }

.notif-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted, #94a3b8);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.notif-body { flex: 1; min-width: 0; }
.notif-title {
  font-size: 0.88rem;
  color: var(--text, #e2e8f0);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-time {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 3px;
}

/* Empty states */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted, #94a3b8);
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state h3 {
  color: white;
  margin-bottom: 8px;
  font-size: 1.2rem;
}
.empty-state p {
  margin-bottom: 20px;
  max-width: 360px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .nav-notif-dropdown { width: 300px; right: -40px; }
}

/* Fix: ensure [hidden] always works, even on flex/grid children */
[hidden] { display: none !important; }

/* Bookmark button state */
#bookmark-btn.bookmarked {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.3);
  color: var(--primary, #8b5cf6);
}

/* Settings modal form labels */
.settings-label {
  display: block;
  color: var(--text-muted, #94a3b8);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.settings-label input,
.settings-label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  color: white;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.settings-label input:focus,
.settings-label textarea:focus {
  outline: none;
  border-color: var(--primary, #8b5cf6);
}

/* ============================================================
   Docs: rich categories, article cards, code blocks, helpful buttons
   ============================================================ */

.docs-cat-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  text-decoration: none; color: var(--text, #e2e8f0);
  transition: background 0.15s; margin-bottom: 4px;
}
.docs-cat-link:hover { background: rgba(255,255,255,0.05); }
.docs-cat-link.active { background: rgba(139,92,246,0.12); color: white; }
.docs-cat-link i { width: 20px; text-align: center; font-size: 1.1rem; }
.docs-cat-link span:first-of-type { flex: 1; font-weight: 500; }
.docs-cat-count {
  background: rgba(255,255,255,0.06); padding: 2px 8px;
  border-radius: 10px; font-size: 0.78rem; color: var(--text-muted);
}

.doc-article-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; background: var(--bg-card, #1a1d24);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px; text-decoration: none; color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 12px;
}
.doc-article-card:hover {
  transform: translateX(4px); border-color: rgba(139,92,246,0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.doc-card-icon { font-size: 2rem; width: 50px; text-align: center; flex-shrink: 0; }
.doc-card-body { flex: 1; min-width: 0; }
.doc-card-body h3 { color: white; margin: 6px 0; font-size: 1.05rem; }
.doc-card-body p { color: var(--text-muted); font-size: 0.9rem; margin: 0; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-tag {
  padding: 3px 10px; border-radius: 6px; font-size: 0.78rem; font-weight: 600;
}
.doc-card-meta { display: flex; gap: 14px; margin-top: 10px; color: var(--text-muted); font-size: 0.82rem; }
.doc-card-arrow { color: var(--text-muted); font-size: 0.85rem; flex-shrink: 0; }

/* Article view */
.article-summary {
  background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2);
  border-radius: 12px; padding: 16px 20px; margin: 20px 0;
  color: #a5b4fc; font-size: 0.95rem; line-height: 1.6;
}
.article-summary i { margin-right: 8px; }
.meta-sep { color: var(--border); }

.article-content { margin-top: 24px; }
.article-content h3 { border-bottom: 1px solid var(--border); padding-bottom: 8px; }

.article-actions {
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.helpful-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.helpful-box span:first-child { color: var(--text-muted); font-size: 0.9rem; }
.helpful-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; font-family: inherit;
  font-size: 0.88rem; transition: all 0.2s;
}
.helpful-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.helpful-btn.yes.voted { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3); color: #86efac; }
.helpful-btn.no.voted { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.helpful-count { font-weight: 600; }

/* Code blocks */
.code-block {
  background: #0d1117; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; margin: 16px 0; overflow: hidden;
}
.code-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.82rem; color: var(--text-muted);
}
.copy-btn {
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 0.82rem; padding: 4px 10px;
  border-radius: 6px; transition: all 0.15s; font-family: inherit;
}
.copy-btn:hover { background: rgba(255,255,255,0.08); color: white; }
.code-block pre {
  margin: 0; padding: 16px; overflow-x: auto;
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  font-size: 0.88rem; line-height: 1.6; color: #e6edf3;
}
.code-block code { font-family: inherit; }

/* Inline code */
.article-content code {
  background: rgba(139,92,246,0.12); color: #c4b5fd;
  padding: 2px 7px; border-radius: 5px; font-size: 0.88em;
  font-family: 'Fira Code', monospace;
}
.code-block code { background: none; color: inherit; padding: 0; }

@media (max-width: 768px) {
  .doc-article-card { flex-direction: column; align-items: flex-start; }
  .doc-card-icon { display: none; }
  .doc-card-arrow { display: none; }
  .article-actions { flex-direction: column; }
}

/* Home forum cards hover */
.home-forum-card:hover {
  border-color: rgba(139,92,246,0.3) !important;
  transform: translateX(4px);
}

/* ============================================================
   Global Search Overlay
   ============================================================ */

.nav-search-btn {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  color: var(--text-muted, #94a3b8);
  cursor: pointer; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.nav-search-btn:hover { color: white; background: rgba(255,255,255,0.08); border-color: var(--primary); }

.search-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,12,18,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 20px 20px;
  animation: searchFadeIn 0.2s ease;
}
@keyframes searchFadeIn { from { opacity: 0; } to { opacity: 1; } }

.search-overlay-content {
  width: 100%; max-width: 640px;
  background: var(--bg-card, #1a1d24);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  overflow: hidden;
  animation: searchPopIn 0.25s cubic-bezier(0.16,1,0.3,1);
  max-height: 70vh;
  display: flex; flex-direction: column;
}
@keyframes searchPopIn { from { transform: translateY(-20px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }

.search-overlay-header {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 4px 4px 0;
  border-bottom: 1px solid var(--border);
}
.search-overlay-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
}
.search-overlay-input-wrap i { color: var(--text-muted); font-size: 1rem; }
.search-overlay-input-wrap input {
  flex: 1; background: none; border: none; color: white;
  font-size: 1.05rem; font-family: inherit; outline: none;
}
.search-overlay-input-wrap input::placeholder { color: var(--text-muted); }
.search-overlay-input-wrap kbd {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 7px; font-size: 0.72rem;
  color: var(--text-muted); font-family: inherit;
}
.search-overlay-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 14px 16px; font-size: 1.1rem;
  transition: color 0.15s;
}
.search-overlay-close:hover { color: white; }

.search-overlay-results {
  overflow-y: auto; flex: 1; padding: 8px;
}

.search-hints { padding: 24px 12px; }
.search-hint-tag {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 8px; padding: 6px 14px;
  font-size: 0.85rem; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.search-hint-tag:hover { color: white; border-color: var(--primary); background: rgba(139,92,246,0.1); }

.search-section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 12px 6px; font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em;
}
.search-section-header a {
  color: var(--primary); text-decoration: none; font-weight: 500;
  text-transform: none; font-size: 0.82rem;
}

.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: inherit;
  transition: background 0.15s;
}
.search-result-item:hover { background: rgba(255,255,255,0.05); }
.search-result-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.search-result-body { flex: 1; min-width: 0; }
.search-result-title {
  color: white; font-size: 0.9rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-sub { color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }

/* Hide old nav-search on pages that still have it */
.nav-search { display: none; }

@media (max-width: 768px) {
  .search-overlay { padding: 20px 12px; }
  .search-overlay-content { max-height: 85vh; }
}

/* Fix 7: Search button position fix */
.nav-container { position: relative; }
.nav-search-btn { order: 0; flex-shrink: 0; }

/* Fix 5: Comment action buttons */
.btn-icon {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  font-size: 0.8rem; transition: all 0.15s;
}
.btn-icon:hover { color: #ef4444; background: rgba(239,68,68,0.1); }

/* Fix 6: Notification delete button */
.notif-del-btn {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  font-size: 0.75rem; opacity: 0; transition: opacity 0.15s;
  flex-shrink: 0;
}
.notif-item:hover .notif-del-btn { opacity: 1; }
.notif-del-btn:hover { color: #ef4444; }

/* Fix 3: Category cards centered text */
.category-card { text-align: center; }
.category-card p { margin: 0 auto; }

/* Fix 9: Article date formatting */
.article-meta { flex-wrap: wrap; gap: 8px; }

/* ============================================================
   Animations & Transitions (пункт 10)
   ============================================================ */

/* Smooth page transitions */
body { opacity: 1; transition: opacity 0.2s; }

/* Cards hover lift effect */
.project-card, .asset-card, .jam-card, .team-card, .doc-article-card, .category-card, .creator-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.project-card:hover, .asset-card:hover, .jam-card:hover, .category-card:hover, .creator-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* Buttons press effect */
.btn { transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.btn:active { transform: scale(0.97); }
.btn-primary:hover { box-shadow: 0 4px 20px rgba(139,92,246,0.4); }

/* Nav links subtle underline on hover */
.nav-links a { position: relative; transition: color 0.2s; }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; width: 0;
  height: 2px; background: var(--primary); border-radius: 1px;
  transition: width 0.25s ease, left 0.25s ease;
}
.nav-links a:hover::after { width: 100%; left: 0; }

/* Fade-in on scroll (elements with .animate-in class) */
.animate-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-in.visible { opacity: 1; transform: none; }

/* Stagger children animation */
.animate-in.visible:nth-child(1) { transition-delay: 0s; }
.animate-in.visible:nth-child(2) { transition-delay: 0.08s; }
.animate-in.visible:nth-child(3) { transition-delay: 0.16s; }
.animate-in.visible:nth-child(4) { transition-delay: 0.24s; }

/* Hero gradient text animation */
.gradient-text {
  background: linear-gradient(135deg, #8b5cf6, #6366f1, #3b82f6, #8b5cf6);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Smooth counter animation */
.stat-number { transition: all 0.3s ease; }

/* Image load fade-in */
.project-image img, .asset-image img, .jam-card img {
  opacity: 0; transition: opacity 0.4s ease;
}
.project-image img[src], .asset-image img[src], .jam-card img[src] {
  opacity: 1;
}

/* Code block hover glow */
.code-block { transition: box-shadow 0.3s ease; }
.code-block:hover { box-shadow: 0 0 20px rgba(139,92,246,0.15); }

/* Tag hover */
.tag { transition: all 0.2s; cursor: default; }
.tag:hover { background: rgba(139,92,246,0.15); color: var(--primary); }

/* Notification slide in */
.notif-item {
  animation: notifSlideIn 0.3s ease;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

/* Profile avatar hover */
.profile-avatar-large:hover img { transform: scale(1.05); }
.profile-avatar-large img { transition: transform 0.3s ease; }

/* Skeleton loading pulse */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
.fa-spinner { animation: fa-spin 1s linear infinite, skeletonPulse 1.5s ease infinite; }

/* ============================================================
   Mobile adaptation — comprehensive fixes (пункт 8)
   ============================================================ */

/* --- Mobile navbar --- */
@media (max-width: 992px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
  }
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex !important; }
  .nav-auth {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  .nav-auth .btn { font-size: 0.82rem; padding: 7px 14px; }
  .nav-search-btn { width: 34px; height: 34px; font-size: 0.85rem; }
  .user-menu-name { display: none; }
  .user-menu-toggle { padding: 4px 8px 4px 4px; }
  .nav-upload-btn { width: 34px; height: 34px; }
}

/* Mobile menu overlay */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s;
}
.mobile-menu-btn:hover { color: white; background: rgba(255,255,255,0.08); }

.mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(10,12,18,0.95);
  backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  padding: 20px;
  animation: mobileNavIn 0.25s ease;
}
.mobile-nav-overlay.open { display: flex; }
@keyframes mobileNavIn { from { opacity: 0; } to { opacity: 1; } }

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; cursor: pointer; padding: 8px;
}
.mobile-nav-close:hover { color: white; }

.mobile-nav-links {
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-nav-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  color: var(--text); text-decoration: none;
  font-size: 1.05rem; transition: background 0.15s;
}
.mobile-nav-links a:hover, .mobile-nav-links a:active {
  background: rgba(139,92,246,0.1);
}
.mobile-nav-links a i { width: 20px; text-align: center; color: var(--primary); }

/* --- Back button for inner pages (mobile) --- */
.mobile-back-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 16px;
  width: fit-content;
  transition: all 0.15s;
}
.mobile-back-btn:hover { color: white; background: rgba(255,255,255,0.06); }

@media (max-width: 768px) {
  .mobile-back-btn { display: inline-flex; }

  /* Hero */
  .hero-content h1 { font-size: 1.8rem; }
  .hero-content p { font-size: 0.95rem; }
  .hero-buttons { flex-direction: column; gap: 10px; }
  .hero-buttons .btn { width: 100%; text-align: center; }
  .hero-stats { flex-direction: row; gap: 20px; }
  .hero-stats .stat { min-width: auto; }

  /* Categories grid */
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .category-card { padding: 16px; }
  .category-icon { width: 40px; height: 40px; font-size: 1rem; }
  .category-card h3 { font-size: 0.95rem; }
  .category-card p { font-size: 0.8rem; }

  /* Projects/assets grid */
  .projects-grid, .assets-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Section headers */
  .section-header { flex-direction: column; gap: 8px; align-items: flex-start; }

  /* Catalog layout */
  .catalog-layout { grid-template-columns: 1fr; }
  .sidebar-filters { position: static; width: 100%; }

  /* Game page */
  .game-layout { display: flex; flex-direction: column; }
  .game-sidebar { order: -1; width: 100%; }
  .buy-box { display: flex; flex-wrap: wrap; gap: 8px; }
  .buy-box .btn-huge { flex: 1; min-width: 120px; }
  .game-author { flex-wrap: wrap; gap: 8px; }

  /* Forum */
  .community-layout { grid-template-columns: 1fr; }
  .community-sidebar { display: none; }
  .post-card { flex-direction: column; }
  .post-sidebar { flex-direction: row; padding: 8px 0; }

  /* Docs */
  .docs-container { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }

  /* Profile */
  .profile-info-bar { flex-direction: column; text-align: center; align-items: center; }
  .profile-actions { flex-direction: column; width: 100%; }
  .profile-actions .btn { width: 100%; }
  .profile-tabs { flex-wrap: wrap; }
  .profile-tabs .tab-btn { flex: 1; min-width: 100px; font-size: 0.85rem; padding: 8px; }

  /* Upload forms */
  .form-row { flex-direction: column; }
  .upload-actions { flex-direction: column; }
  .upload-actions .btn { width: 100%; }

  /* Teams */
  .team-card-header { flex-direction: column; gap: 10px; }
  .team-card-footer { flex-direction: column; gap: 8px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  /* Auth modal */
  .auth-modal { margin: 10px; padding: 24px; }

  /* Search overlay */
  .search-overlay { padding: 10px; }
  .search-overlay-content { max-height: 90vh; border-radius: 12px; }

  /* Comments */
  .comment { flex-direction: column; gap: 8px; }
  .comment-avatar { width: 30px; height: 30px; }

  /* General spacing */
  .container { padding-left: 16px; padding-right: 16px; }
  section { padding: 30px 0; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 12px; }
  .jam-timer { flex-wrap: wrap; }
  .profile-avatar-large img { width: 80px; height: 80px; }
}
