:root {
    --primary-color: #0d0d0d;
    --secondary-color: #1a1a1a;
    --accent-color: #c3073f; /* Ярко-красный, как в S.T.A.L.K.E.R. */
    --accent-hover: #ff0952;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-main: 'Roboto', sans-serif;
    --font-headings: 'Orbitron', sans-serif; /* Техно-футуристичный шрифт */
    --container-width: 1200px;
    --header-height: 70px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

body.mobile-menu-open {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

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

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-top: -30px;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* 2. Компоненты (Кнопки, карточки и т.д.) */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-family: var(--font-headings);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border-color: var(--border-color);
}

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

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.8rem;
}

/* 3. Экран загрузки */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease, visibility 1s ease;
    visibility: visible;
    opacity: 1;
    overflow: hidden;
}

.loading-screen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,107,53,0.3) 0%, rgba(0,0,0,0) 60%);
    animation: rotate-glow 10s linear infinite;
    transform-origin: center center;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    z-index: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading-content img {
    width: 120px;
    height: 120px;
    animation: pulse 2s infinite ease-in-out;
}

.loading-text {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    color: #fff;
    margin-top: 20px;
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: glitch 3s infinite;
}

.loading-subtext {
    color: var(--text-secondary);
    text-align: center;
    font-size: 1rem;
    margin-top: 10px;
}

@keyframes rotate-glow {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px var(--accent-color));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px var(--accent-color));
    }
}

@keyframes glitch {
    0%, 100% {
        text-shadow: 0 0 5px var(--accent-color), 0 0 10px var(--accent-color);
        transform: skewX(0);
    }
    50% {
        text-shadow: 2px 2px 2px #ff0952, -2px -2px 2px #4dffc9;
        transform: skewX(-5deg);
    }
}

/* 4. Навигация */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.main-nav.scrolled {
    background-color: rgba(26, 26, 26, 0.9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    color: #fff;
    text-decoration: none;
}

.logo a span {
    color: var(--accent-color);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin: 0 20px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

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

.nav-auth .btn {
    margin-left: 0;
    white-space: nowrap;
}

.nav-auth .profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
}

.nav-auth .profile-btn img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    z-index: 1001; /* Выше чем .main-nav */
}

/* Стили для мобильного меню */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Начинаем за экраном */
    width: 300px;
    height: 100%;
    background-color: var(--secondary-color);
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    z-index: 2100; /* Выше всего остального */
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 80px 30px 30px;
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu ul {
    list-style: none;
    flex-grow: 1;
}

.mobile-menu li {
    margin-bottom: 20px;
}

.mobile-menu a {
    color: var(--text-color);
        font-size: 1.5rem;
    font-family: var(--font-headings);
    }
    
.mobile-auth-buttons {
    display: flex;
        flex-direction: column;
    gap: 15px;
}

.mobile-auth-buttons .btn {
    width: 100%;
    text-align: center;
}

/* 5. Hero Section (Главный экран) */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('gui/fon-web.png') no-repeat center center/cover;
    animation: slow-zoom 20s infinite alternate;
    z-index: 1;
}

@keyframes slow-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 20px;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    text-transform: none;
    letter-spacing: 0;
}

.hero-buttons .btn {
    margin: 0 10px;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
}

.scroll-down-indicator a {
        font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* 6. Общие стили для секций */
    .main-container {
    background-color: var(--secondary-color);
}

.about-section {
    background-color: var(--primary-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.about-image {
    flex: 1;
    max-width: 500px;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* 7. Секция статистики */
.stats-section {
    background: linear-gradient(rgba(13, 13, 13, 0.8), rgba(13, 13, 13, 0.8)), url('img/background.jpg') no-repeat center center/cover;
    background-attachment: fixed;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.stat-item i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.stat-number {
    font-family: var(--font-headings);
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* 8. Секция новостей */
.latest-news-section {
    background-color: var(--primary-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
}

.news-card {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
    border: 1px solid #34495e;
    position: relative;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover::before {
    transform: scaleX(1);
}

.news-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

.news-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(231, 76, 60, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-image-overlay i {
    color: white;
    font-size: 24px;
}

.news-card:hover .news-image-overlay {
    opacity: 1;
}

.news-card:hover .news-image img {
    transform: scale(1.08);
}

.news-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 10px 15px;
    border-radius: 12px;
    text-align: center;
    font-size: 12px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.news-date-badge .day {
    display: block;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.news-date-badge .month {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.9;
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.adult-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.news-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    color: #ecf0f1;
}

.news-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #34495e;
    border-radius: 15px;
    transition: background 0.3s ease;
    color: #ecf0f1;
}

.news-meta span:hover {
    background: #2c3e50;
}

.news-category {
    color: #e74c3c;
    font-weight: 500;
}

.news-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 600;
}

.news-title a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #e74c3c;
}

.news-excerpt {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.news-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #bdc3c7;
}

.news-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-stats i {
    color: #e74c3c;
}

/* Анимации для карточек новостей */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.6s ease forwards;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }
.news-card:nth-child(4) { animation-delay: 0.4s; }
.news-card:nth-child(5) { animation-delay: 0.5s; }
.news-card:nth-child(6) { animation-delay: 0.6s; }

.section-footer {
    text-align: center;
    margin-top: 60px;
}

/* 9. Галерея */
.gallery-container {
    max-width: 1200px;
    margin: 120px auto 50px;
    padding: 20px;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.gallery-filter-btn {
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-filter-btn:hover, .gallery-filter-btn.active {
    background-color: #ff6b35;
    border-color: #ff6b35;
}

.gallery-category {
    margin-top: 60px;
    margin-bottom: 30px;
}

.gallery-category-title {
    font-size: 28px;
    color: #ff6b35;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 107, 53, 0.5);
}

.gallery-section {
    background-color: var(--secondary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1 / 1;
    background-color: rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
    pointer-events: none;
}

.gallery-item-title {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

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

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    .gallery-item-title {
        font-size: 14px;
    }
    .gallery-prev-btn, .gallery-next-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* 10. CTA (Призыв к действию) */
.cta-section {
    background: var(--primary-color);
}

.cta-content {
    background: linear-gradient(45deg, var(--secondary-color), #2a2a2a);
    padding: 60px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cta-content i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.cta-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta-content p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-buttons .btn {
    margin: 0 10px;
}

/* НОВЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ НОВОСТЕЙ */

/* 10.1. Шапка внутренних страниц */
.page-hero-section {
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    background-size: cover;
    background-position: center;
}

.page-hero-section .hero-title {
    font-size: 3rem;
}

.page-hero-section .hero-subtitle {
    font-size: 1.2rem;
}

/* 10.2. Список новостей */
.news-list-header {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 1px solid #34495e;
}

/* Фильтры новостей */
.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: #ecf0f1;
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.filter-btn.active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.filter-btn i {
    font-size: 16px;
}

/* Адаптивность для фильтров */
@media (max-width: 768px) {
    .news-filters {
        justify-content: center;
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .filter-btn i {
        font-size: 14px;
    }
}

.search-form {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-form input {
    flex: 1;
    padding: 18px 25px;
    border: 2px solid #34495e;
    border-radius: 25px;
    background: #34495e;
    color: #ecf0f1;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: #e74c3c;
    background: #2c3e50;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.search-form input::placeholder {
    color: #bdc3c7;
}

.search-form button {
    padding: 18px 30px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.no-results-found {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 1px solid #34495e;
}

.no-results-found h3 {
    color: #ecf0f1;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.no-results-found p {
    color: #bdc3c7;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
}

/* 10.3. Страница одной новости */
.news-single-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

@media (min-width: 992px) {
    .news-single-layout {
        grid-template-columns: 3fr 1fr;
    }
}

.news-single-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 1px solid #34495e;
    color: #ecf0f1;
}

.news-single-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.news-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    border-left: 4px solid #e74c3c;
    color: white;
}

.news-single-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ecf0f1;
    font-size: 14px;
}

.news-single-meta i {
    color: #e74c3c;
    font-size: 16px;
}

.news-single-title {
    font-size: 32px;
    font-weight: 700;
    color: #ecf0f1;
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-content {
    line-height: 1.8;
    color: #ecf0f1;
    font-size: 16px;
}

.post-content h1, .post-content h2, .post-content h3 {
    color: #e74c3c;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

.post-content h1 {
    font-size: 28px;
}

.post-content h2 {
    font-size: 24px;
}

.post-content h3 {
    font-size: 20px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content a {
    color: #e74c3c;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.post-content a:hover {
    border-bottom-color: #e74c3c;
}

.post-content blockquote {
    border-left: 4px solid #e74c3c;
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #ecf0f1;
    background: #2c3e50;
    border-radius: 0 10px 10px 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.post-content ul, .post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.news-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    border-top: 1px solid #34495e;
    flex-wrap: wrap;
}

.news-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-sidebar {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 1px solid #34495e;
    height: fit-content;
    color: #ecf0f1;
}

.news-sidebar h3 {
    color: #ecf0f1;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
    font-size: 20px;
    font-weight: 600;
}

.sidebar-news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-news-item {
    padding: 15px;
    background: #34495e;
    border-radius: 10px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-news-item:hover {
    background: #34495e;
    border-left-color: #e74c3c;
    transform: translateX(5px);
}

.sidebar-news-item a {
    text-decoration: none;
    color: inherit;
}

.sidebar-news-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: #ecf0f1;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-news-date {
    font-size: 12px;
    color: #bdc3c7;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sidebar-news-date::before {
    content: "\f133";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #e74c3c;
}

/* 10.4. Секция комментариев */
.comments-section {
    padding-top: 50px;
    margin-top: 50px;
    border-top: 1px solid #e9ecef;
}

.comments-section .section-title {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

.comment-form {
    background: #2c3e50;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    border: 1px solid #34495e;
    margin-top: 40px;
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 20px;
    background-color: #34495e;
    border: 2px solid #34495e;
    border-radius: 10px;
    color: #ecf0f1;
    margin-bottom: 20px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #e74c3c;
    background-color: #2c3e50;
}

.comment-form .btn {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
}

.auth-required-comment {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    border: 2px dashed #e74c3c;
}

.auth-required-comment p {
    color: #ecf0f1;
    margin-bottom: 20px;
    font-size: 16px;
}

.auth-required-comment a {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-required-comment a:hover {
    color: #c0392b;
}

/* Секция с отключенными комментариями */
.comments-disabled-section {
    padding-top: 50px;
    margin-top: 50px;
    border-top: 1px solid #e9ecef;
}

.comments-disabled-message {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    border: 2px dashed #e74c3c;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.comments-disabled-message h3 {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.comments-disabled-message p {
    color: #ecf0f1;
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

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

.comment-item {
    display: flex;
    gap: 20px;
    background: #2c3e50;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-left: 4px solid #e74c3c;
}

.comment-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e74c3c;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: #ecf0f1;
    font-size: 16px;
}

.comment-date {
    font-size: 12px;
    color: #bdc3c7;
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-date::before {
    content: "\f133";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #e74c3c;
}

.comment-text {
    color: #ecf0f1;
    line-height: 1.6;
    font-size: 14px;
}

.comment-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-left: auto;
}

.comment-delete-btn,
.comment-report-btn,
.comment-like-btn {
    background: transparent;
    border: 2px solid transparent;
    color: #7f8c8d;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.comment-delete-btn {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.comment-delete-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.comment-report-btn {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

.comment-report-btn:hover {
    background: #f1c40f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.comment-like-btn {
    color: #95a5a6;
    background: rgba(149, 165, 166, 0.1);
}

.comment-like-btn.liked {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.comment-like-btn .like-count {
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.comment-like-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.comment-like-btn.liked:hover {
    background: #e74c3c;
    color: white;
}

/* Модальное окно для жалоб */
.report-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    animation: modalFadeIn 0.3s ease;
}

.report-modal.show {
    display: flex;
}

.report-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
    opacity: 0;
    animation: modalContentShow 0.3s ease forwards;
}

@keyframes modalContentShow {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.report-title {
    color: #fff;
    font-size: 24px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-weight: 600;
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.report-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.report-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.report-option input[type="radio"] {
    display: none;
}

.report-option label {
    color: #ecf0f1;
    cursor: pointer;
    font-size: 16px;
    flex: 1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-option .radio-custom {
    width: 24px;
    height: 24px;
    border: 3px solid #7f8c8d;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.report-option input[type="radio"]:checked + label .radio-custom {
    border-color: #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3);
}

.report-option input[type="radio"]:checked + label .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    animation: radioCheck 0.3s ease forwards;
}

@keyframes radioCheck {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.report-option input[type="radio"]:checked + label {
    color: #fff;
}

.report-option input[type="radio"]:checked + label .radio-custom {
    transform: scale(1.1);
}

.report-textarea {
    width: 100%;
    min-height: 120px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: #fff;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.report-textarea:focus {
    outline: none;
    border-color: #e74c3c;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.1);
}

.report-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.report-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.report-submit,
.report-cancel {
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.report-submit {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.report-submit:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(231, 76, 60, 0.4);
}

.report-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.report-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .report-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .report-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .report-option {
        padding: 12px 15px;
    }

    .report-option label {
        font-size: 14px;
    }

    .report-buttons {
        flex-direction: column;
    }

    .report-submit,
    .report-cancel {
        width: 100%;
        padding: 12px 20px;
    }
}

.comment-delete-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.comment-report-btn:hover {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
}

.comment-delete-btn:disabled,
.comment-report-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-comments {
    text-align: center;
    color: #bdc3c7;
    padding: 40px;
    background: #2c3e50;
    border-radius: 15px;
    font-style: italic;
}


/* 10.5. Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
}

.pagination a:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.pagination a.active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
    cursor: default;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.pagination-arrow {
    font-size: 18px;
    font-weight: bold;
}

/* 11. Анимации при скролле */
[data-animation] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animation].is-visible {
    opacity: 1;
    transform: none;
}

.fade-in { transform: translateY(30px); }
.fade-in-down { transform: translateY(-30px); }
.fade-in-up { transform: translateY(30px); }
.zoom-in { transform: scale(0.9); }

/* 12. Футер (взят из contacts_modal.php) и модальные окна */
/* Стили для contacts_modal.php должны быть здесь или в отдельном файле, если они сложные */
.contacts-modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.contacts-modal-content {
    background-color: var(--secondary-color);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
}

.contacts-close-button {
    color: var(--text-secondary);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.contacts-close-button:hover,
.contacts-close-button:focus {
    color: var(--accent-color);
}

/* 13. Адаптивность */
@media (max-width: 1024px) {
    .nav-links { display: none; }
    .nav-auth { display: none; }
    .mobile-menu-toggle { display: block; }

    .about-content {
        flex-direction: column;
    }

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

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .section { padding: 60px 0; }
    .section-title { font-size: 2rem; }

    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.2rem; }

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

    .news-grid { grid-template-columns: 1fr; }
    
    .news-list-header {
        padding: 20px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-form input,
    .search-form button {
        width: 100%;
    }
    
    .news-single-content {
        padding: 25px;
    }
    
    .news-single-title {
        font-size: 24px;
    }
    
    .news-single-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .news-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .news-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .comment-form {
        padding: 20px;
    }
    
    .comment-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .comment-avatar img {
        width: 80px;
        height: 80px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination a {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-content { padding: 40px; }

    .chat-sidebar {
        position: fixed;
        left: 0;
        top: 70px; /* Высота навбара */
        height: calc(100% - 70px);
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1050; /* Выше чем .main-nav, но ниже модалок */
    }
    .chat-sidebar.open {
        transform: translateX(0);
    }
    #back-to-chats {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.5rem; }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .cta-buttons {
    display: flex;
        flex-direction: column;
        gap: 15px;
    }

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

/* НОВЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ПРОФИЛЯ */

/* 10.6. Шапка профиля */
.profile-hero {
    height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* 10.7. Макет страницы профиля */
.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: flex-start;
    margin-top: -80px;
    position: relative;
    z-index: 2;
}

.profile-sidebar .profile-card {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    text-align: center;
    position: sticky;
    top: 100px;
}

.profile-avatar-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: -105px auto 20px;
    border: 5px solid var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

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

.change-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: 2px solid var(--secondary-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    transition: background-color 0.3s;
}
.change-avatar-btn:hover {
    background-color: #ff8a5a;
}

.profile-username {
    font-size: 1.8rem;
    font-family: var(--font-headings);
    margin-bottom: 5px;
    word-break: break-all;
}

.profile-role {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.profile-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.profile-stats {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
}

.profile-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.profile-stats .stat-item i {
    font-size: 1.6rem;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.stat-number { 
    font-size: 1.5rem; 
    font-weight: 700; 
    line-height: 1;
}
.stat-label { 
    font-size: 0.8rem; 
    color: var(--text-secondary); 
    text-transform: uppercase;
    margin-top: 5px;
}

.profile-main-content {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-button {
    padding: 15px 25px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

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

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

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.5s; }

.tab-content h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.activity-item.empty {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}
.activity-item.empty i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

/* Стили для форм в настройках */
#settings-tab form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

#settings-tab .form-group {
    display: flex;
    flex-direction: column;
}

#settings-tab label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

#settings-tab input[type="text"],
#settings-tab input[type="email"],
#settings-tab input[type="password"],
#settings-tab textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#settings-tab input:focus,
#settings-tab textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.2);
}

#settings-tab input[disabled] {
    background-color: rgba(0,0,0,0.2);
    cursor: not-allowed;
    opacity: 0.7;
}

#settings-tab small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    opacity: 0.8;
}

#settings-tab hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

#settings-tab .btn {
    align-self: flex-start;
    padding: 10px 25px;
}

.form-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
    border: 1px solid transparent;
}
.form-message.success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.5);
    color: #52c41a;
    display: block;
}
.form-message.error {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.5);
    color: #ff4d4f;
    display: block;
}

/* Password strength meter from auth page, adapted for profile */
#password-change-form .password-strength-meter {
    height: 5px;
    width: 100%;
    background-color: rgba(255,255,255,0.1);
    border-radius: 5px;
    margin-top: 8px;
    overflow: hidden;
}
#password-change-form .strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
}
#password-change-form .strength-text {
    font-size: 0.8rem;
    margin-top: 5px;
    height: 1em;
    display: block;
    transition: color 0.3s;
}


/* Адаптивность для профиля */
@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-sidebar .profile-card {
        position: static;
        margin-bottom: 30px;
    }
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--primary-color);
    border-radius: 5px;
    margin-bottom: 10px;
}

.activity-item i {
    color: var(--accent-color);
        font-size: 1.2rem;
}

.activity-time {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 10.10. Стили для модального окна галереи */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gallery-modal-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
}

.gallery-close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.gallery-close-btn:hover {
    color: #bbb;
}

.gallery-prev-btn, .gallery-next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    padding: 16px;
    cursor: pointer;
    z-index: 1001;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-next-btn {
    right: 20px;
}

.gallery-prev-btn {
    left: 20px;
}

.gallery-prev-btn:hover, .gallery-next-btn:hover {
    background-color: rgba(255, 107, 53, 0.8);
}

/* Стили для футера */
.site-footer {
    background: var(--secondary-color);
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 107, 53, 0.2);
    padding: 50px 0 20px;
    margin-top: 80px;
        position: relative;
    }

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
        left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, rgba(255, 107, 53, 0.7), transparent);
}

.footer-content {
    display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding: 0 15px;
}

.footer-section h3 {
    color: #ff6b35;
        font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 107, 53, 0.3);
}

.footer-section p {
    margin-bottom: 10px;
    color: var(--text-color);
}

.footer-section p i {
    width: 20px;
    margin-right: 10px;
    color: #ff6b35;
}

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

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #ff6b35;
    transform: translateY(-3px);
}

.social-icons img {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

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

.footer-links a:hover {
    color: #ff6b35;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* 10. Chat Styles */
.chat-container {
    display: flex;
    height: calc(100vh - 70px);
    margin-top: 70px;
    background-color: var(--primary-color);
    overflow: hidden;
    position: relative; /* Для позиционирования сайдбара */
}

.chat-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: var(--secondary-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    z-index: 100; /* Чтобы быть над основным контентом */
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.chat-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.chat-search-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.chat-search {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--primary-color);
    color: var(--text-color);
}

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

#new-chat-btn {
    width: 100%;
}

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

.chat-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.chat-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.chat-item.active {
    background-color: var(--accent-color);
}

.chat-item-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.chat-item-info {
    flex: 1;
    overflow: hidden;
}

.chat-item-name {
    font-weight: 700;
    color: #fff;
}

.chat-item-last {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.chat-item-unread {
    background-color: var(--accent-hover);
    color: #fff;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-welcome, .chat-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    color: var(--text-secondary);
}

.chat-welcome i {
    font-size: 5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.chat-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.chat-content:not(.hidden) {
    display: flex !important;
    flex-direction: column;
}

.chat-main-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
}

#back-to-chats {
    display: none; /* Shown on mobile via JS */
    margin-right: 15px;
}

.chat-main-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.chat-main-status {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 5px;
}

.online-status-text {
    color: #4CAF50;
    font-weight: 500;
}

.offline-status-text {
    color: var(--text-secondary);
    font-style: italic;
}

.chat-item-status {
    color: var(--text-secondary);
    font-size: 0.8em;
    margin-top: 2px;
}

.chat-item-status.online {
    color: #4CAF50;
    font-weight: 500;
}

.chat-item-status.offline {
    color: var(--text-secondary);
    font-style: italic;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Стили сообщений перенесены в chat.css */

.chat-input {
    padding: 15px 20px;
    background-color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
}
.chat-input-form {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-input-field {
    flex: 1;
    resize: none;
    padding: 12px 18px;
    border-radius: 25px;
    border: none;
    background-color: var(--primary-color);
    color: var(--text-color);
    max-height: 100px;
    overflow-y: auto;
}
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-icon:hover {
    color: var(--accent-color);
}

/* Modal for new chat */
.modal {
    display: none;
    position: fixed;
    z-index: 1100; /* Выше чем сайдбар чата */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
}
.user-search-item {
    padding: 10px;
    cursor: pointer;
}
.user-search-item:hover {
    background-color: var(--accent-color);
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .chat-sidebar {
        position: fixed;
        left: 0;
        top: 70px; /* Высота навбара */
        height: calc(100% - 70px);
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1050; /* Выше чем .main-nav, но ниже модалок */
    }

    .chat-sidebar.open {
        transform: translateX(0);
    }

    #back-to-chats {
        display: block;
    }

    .chat-main {
        width: 100%;
    }
}

/* 11. Feedback Form Styles */
.feedback-form-container .form-group {
    margin-bottom: 20px;
}

.feedback-form-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

.rating-stars {
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.rating-stars .fa-star:hover,
.rating-stars .fa-star.hovered {
    color: var(--accent-hover);
    transform: scale(1.1);
    transition: color 0.2s, transform 0.2s;
}

.rating-stars .fa-star.selected {
    color: var(--accent-color);
}

.feedback-form-container textarea {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--primary-color);
    color: var(--text-color);
    min-height: 120px;
}

.success-message {
    padding: 20px;
    background-color: rgba(7, 195, 127, 0.1);
    border: 1px solid #07c37f;
    border-radius: 5px;
    color: #07c37f;
    text-align: center;
}

.site-footer {
    background: var(--secondary-color);
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 107, 53, 0.2);
    padding: 50px 0 20px;
    margin-top: 80px;
        position: relative;
    }

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
        left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, rgba(255, 107, 53, 0.7), transparent);
}

.footer-content {
    display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding: 0 15px;
}

.footer-section h3 {
    color: #ff6b35;
        font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 107, 53, 0.3);
}

.footer-section p {
    margin-bottom: 10px;
    color: var(--text-color);
}

.footer-section p i {
    width: 20px;
    margin-right: 10px;
    color: #ff6b35;
}

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

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #ff6b35;
    transform: translateY(-3px);
}

.social-icons img {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

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

.footer-links a:hover {
    color: #ff6b35;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* 12. Стили для страницы авторизации */
.auth-page-background {
    background: url('gui/fon-web.png') no-repeat center center/cover;
    min-height: 100vh;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.auth-box {
    width: 100%;
    max-width: 480px;
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 40px 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.auth-form h2 {
    font-family: var(--font-headings);
    text-align: center;
    margin-bottom: 25px;
    color: var(--accent-color);
    text-transform: uppercase;
}

.auth-form .form-group {
    margin-bottom: 20px;
    position: relative; /* Это зафиксирует иконки на месте */
}

.auth-form .input-icon {
    position: absolute;
    top: 14px; /* Фиксируем позицию сверху */
    left: 15px;
    transform: none; /* Убираем центрирование по вертикали */
    color: var(--text-secondary);
    transition: color 0.2s; /* Добавляем плавность для красоты */
}

/* При фокусе или вводе иконка тоже может менять цвет */
.auth-form input:focus ~ .input-icon {
    color: var(--accent-color);
}

.auth-form input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 5px;
    font-size: 1rem;
}

.auth-form label {
    position: absolute;
    top: 14px;
    left: 45px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.auth-form input:not(:placeholder-shown) + label,
.auth-form input:focus + label {
    top: -10px;
    left: 10px;
    font-size: 0.75rem;
    background: var(--secondary-color);
    padding: 0 5px;
    color: var(--accent-color);
}

.auth-form.date-group label {
    top: -10px;
    left: 10px;
    font-size: 0.75rem;
    background: var(--secondary-color);
    padding: 0 5px;
    color: var(--accent-color);
}

.validation-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #28a745;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.validation-icon::before { content: "\f00c"; }
.auth-form.valid .validation-icon { opacity: 1; }
.auth-form.valid input { border-color: #28a745; }

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 35px;
    position: relative;
}
.progress-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: var(--border-color);
}
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background-color: var(--secondary-color);
    padding: 0 10px;
}
.progress-step span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 3px solid var(--secondary-color);
    transition: all 0.3s;
}
.progress-step p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: bold;
}
.progress-step.active span {
    background-color: var(--accent-color);
    color: #fff;
}
.progress-step.active p { color: var(--text-color); }
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =====================================================================
   АВАТАР (Финальная, исправленная версия от 2024-07-04)
===================================================================== */
.avatar-upload-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px; /* Расстояние между текстом и кругом */
    margin-bottom: 25px;
}
.avatar-group-title {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0;
    font-weight: bold;
    text-align: center;
}
.avatar-preview-container {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s;
}
.avatar-preview-container:hover {
    border-color: var(--accent-color);
}
.avatar-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar-preview-text {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 0;
    font-size: 0.8rem;
    text-align: center;
    transition: opacity 0.3s;
    opacity: 0;
}
.avatar-preview-container:hover .avatar-preview-text { opacity: 1; }

/* Прячем стандартный инпут НАВСЕГДА */
.avatar-input {
    display: none !important;
}

.form-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}
.btn-block, .btn-secondary {
    flex: 1;
    padding: 12px;
    font-family: var(--font-headings);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: 1px solid transparent;
}
.btn-block {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}
.btn-block:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(195, 7, 63, 0.3);
}
.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-color);
}
.btn-secondary:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.form-group-checkbox {
    margin: 20px 0;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 60, 60, 0.2);
}

.form-group-checkbox:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 60, 60, 0.4);
}

.form-group-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    color: #fff;
    width: 100%;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #ff3c3c;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.checkbox-text {
    font-size: 14px;
    line-height: 1.4;
    padding-top: 2px;
    display: block;
    width: calc(100% - 36px); /* 24px checkbox + 12px margin */
}

.form-group-checkbox input[type="checkbox"]:checked + .checkbox-label .checkbox-custom {
    background: #ff3c3c;
}

.form-group-checkbox input[type="checkbox"]:checked + .checkbox-label .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-group-checkbox input[type="checkbox"]:focus + .checkbox-label .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(255, 60, 60, 0.3);
}

.form-group-checkbox a {
    color: #ff3c3c;
    text-decoration: none;
}

.form-group-checkbox a:hover {
    text-decoration: underline;
}

/* Стили для обязательных чекбоксов */
.form-group-checkbox input[type="checkbox"][required] + .checkbox-label .checkbox-text::after {
    content: ' *';
    color: #ff3c3c;
}

.auth-switch {
    text-align: center;
    margin-top: 25px;
}
.hidden {
    display: none !important;
}
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(220, 53, 69, 0.8);
    border: 1px solid #dc3545;
}
.alert-success {
    background-color: rgba(40, 167, 69, 0.8);
    border: 1px solid #28a745;
}

/* --- Feedback Page --- */
.feedback-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feedback-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feedback-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.3);
}

.feedback-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.feedback-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid #ff5722;
}

.feedback-user-info {
    display: flex;
    flex-direction: column;
}

.feedback-username {
    font-weight: 700;
    color: #fff;
    font-size: 1.1em;
}

.feedback-rating {
    color: #ffc107;
    font-size: 1.2em;
}

.feedback-card-body p {
    color: #ccc;
    line-height: 1.6;
    flex-grow: 1; /* Makes body take available space */
}

.feedback-card-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #333;
    text-align: right;
}

.feedback-date {
    font-size: 0.85em;
    color: #888;
}

.loading-feedback, .error-feedback {
    color: #ccc;
    font-size: 1.2em;
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1; /* Take full width */
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.page-link {
    color: #ccc;
    background-color: #2a2a2a;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.page-link:hover, .page-link.active {
    background-color: #ff5722;
    color: #fff;
}

/* --- Password Strength Meter --- */
.password-strength-meter {
    height: 5px;
    width: 100%;
    background-color: #333;
    border-radius: 5px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.strength-text {
    margin-top: 4px;
    font-size: 0.85em;
    height: 1.2em; /* Резервируем место, чтобы форма не прыгала */
}

/* --- Username Availability Checker --- */
.username-check-status {
    font-size: 0.85em;
    height: 1.2em; /* Резервируем место */
    margin-top: 4px;
}

.username-check-status .available {
    color: #4caf50; /* Green */
}

.username-check-status .unavailable {
    color: #f44336; /* Red */
}

.username-suggestions {
    font-size: 0.85em;
    margin-top: 4px;
}

.suggestion-link {
    color: #ff9800;
    text-decoration: none;
    margin-left: 8px;
    border-bottom: 1px dashed #ff9800;
    cursor: pointer;
}

.suggestion-link:hover {
    color: #ffc107;
    border-bottom-style: solid;
}

/* Specific styles for auth page navigation */
.auth-page .main-nav {
    background-color: rgba(30, 30, 30, 0.9);
    border-bottom: 1px solid #333;
}

.form-step h3 {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}

/* --- Стили для Шага 3 --- */
.form-step#step-3 .step-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 220px; /* Примерная высота, чтобы вместить все */
}

.form-step#step-3 h3 {
    text-align: center;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.form-step#step-3 .agreements-container {
    margin-bottom: 20px; /* Добавляем отступ снизу */
    flex-grow: 1; /* Позволяем контейнеру расти */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-step#step-3 .form-group-checkbox {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    transition: background 0.3s;
    margin: 0;
}

.form-step#step-3 .form-group-checkbox:hover {
    background: rgba(255, 255, 255, 0.1);
}

.form-step#step-3 .checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    width: 100%;
}

.form-step#step-3 .checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #ff3c3c;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
    top: 1px;
}

.form-step#step-3 .checkbox-text {
    color: #eee;
    font-size: 14px;
    line-height: 1.5;
    display: block;
    width: 100%;
}

.form-step#step-3 .checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    width: 100%;
    flex-wrap: nowrap;
}

.form-step#step-3 .checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #ff3c3c;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
    top: 1px;
}

.form-step#step-3 .checkbox-text a {
    color: #ff3c3c;
    text-decoration: none;
}
.form-step#step-3 .checkbox-text a:hover {
    text-decoration: underline;
}


.form-step#step-3 input[type="checkbox"]:checked + .checkbox-label .checkbox-custom {
    background-color: #ff3c3c;
    border-color: #ff3c3c;
}

.form-step#step-3 input[type="checkbox"]:checked + .checkbox-label .checkbox-custom::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.form-step#step-3 .form-navigation {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 15px; /* Пространство между кнопками */
    margin-top: auto; /* Прижимаем кнопки к низу */
}

/* Новые стили для чекбоксов в форме регистрации */
.custom-checkbox-container {
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.custom-checkbox {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    transition: background 0.3s;
    position: relative;
    width: 90%;
    max-width: 400px;
}

.custom-checkbox:hover {
    background: rgba(255, 255, 255, 0.1);
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    z-index: -1;
}

.custom-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: #ff3c3c;
    position: relative;
    width: 100%;
}

.checkbox-mark {
    display: inline-block;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #ff3c3c;
    border-radius: 4px;
    margin-right: 15px;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    flex-shrink: 0;
}

.custom-checkbox input[type="checkbox"]:checked + label .checkbox-mark {
    background-color: #ff3c3c;
}

.custom-checkbox input[type="checkbox"]:checked + label .checkbox-mark:after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-label-text {
    font-size: 14px;
    line-height: 1.5;
    color: #eee;
    flex-grow: 1;
    text-align: left;
}

/* Обновленные стили для контейнера соглашений */
.form-step#step-3 .agreements-container {
    margin-bottom: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
}

/* Стили для кнопок */
.form-step#step-3 .form-navigation {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: auto;
}

.form-step#step-3 .form-navigation button {
    max-width: 200px;
}

/* Центрирование заголовка */
.form-step#step-3 h3 {
    text-align: center;
    margin-bottom: 25px;
}

.agreement-link {
    color: #ff3c3c;
    text-decoration: none;
    position: relative;
    z-index: 5;
    padding: 0 2px;
}

.agreement-link:hover {
    text-decoration: underline;
}

/* Стили для обязательных чекбоксов */
.custom-checkbox input[type="checkbox"][required] + label .checkbox-label-text::after {
    content: ' *';
    color: #ff3c3c;
}

/* Исправление для кликабельности */
.custom-checkbox label .checkbox-mark,
.custom-checkbox label .checkbox-label-text {
    pointer-events: none;
}

.custom-checkbox label {
    z-index: 2;
}

.custom-checkbox a {
    z-index: 10;
    position: relative;
    pointer-events: auto;
}

/* Обновленные стили для контейнера соглашений */
.form-step#step-3 .agreements-container {
    margin-bottom: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
}

/* Новые стили для чекбоксов в форме регистрации */
.form-step#step-3 .agreements-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.agreement-box {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 60, 60, 0.2);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
}

.agreement-box:hover {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 60, 60, 0.4);
}

.checkbox-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 15px;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-wrapper label {
    position: relative;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid #ff3c3c;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin: 0;
    padding: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + label .checkmark {
    background-color: #ff3c3c;
}

.checkbox-wrapper input[type="checkbox"]:checked + label .checkmark:after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.agreement-text {
    color: #eee;
    font-size: 14px;
    line-height: 1.5;
    flex-grow: 1;
    text-align: center;
    margin: 0;
    padding: 0;
}

.agreement-text a {
    color: #ff3c3c;
    text-decoration: none;
    position: relative;
    z-index: 5;
    transition: all 0.2s ease;
}

.agreement-text a:hover {
    text-decoration: underline;
}

/* Стили для обязательных чекбоксов */
.checkbox-wrapper input[type="checkbox"][required] + label + .agreement-text::after {
    content: " *";
    color: #ff3c3c;
}

/* Стили для кнопок */
.form-step#step-3 .form-navigation {
    width: 100%;
    max-width: 500px;
    margin: 20px auto 0;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.form-step#step-3 .form-navigation button {
    flex: 1;
    max-width: none;
}

/* Центрирование заголовка */
.form-step#step-3 h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #fff;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* Улучшенные стили для всего шага 3 */
.form-step#step-3 .step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.history-section {
    background: var(--primary-color);
    padding: 80px 0;
}

.history-timeline {
    position: relative;
    max-width: 1200px;
    margin: 60px auto;
}

.history-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.history-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.history-item-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    right: -9px;
    background-color: var(--secondary-color);
    border: 4px solid var(--accent-color);
    top: 32px;
    border-radius: 50%;
    z-index: 1;
}

.history-item.left {
    left: 0;
}

.history-item.right {
    left: 50%;
}

.history-item.right .history-item-dot {
    left: -9px;
}

.history-item-card {
    padding: 25px;
    background: var(--secondary-color);
    position: relative;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.history-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.history-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
}

.history-item-content h3 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.history-item-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

@media screen and (max-width: 992px) {
    .history-timeline::after {
        left: 20px;
    }

    .history-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 20px;
    }
    
    .history-item.right, .history-item.left {
        left: 0;
    }

    .history-item.left .history-item-dot, .history-item.right .history-item-dot {
        left: 11px;
    }
}

/* Стили для заголовков страниц */
.page-title {
    text-align: center;
    font-size: 3.5rem;
    font-family: var(--font-headings);
    color: var(--accent-color);
    margin: 80px 0 80px;
    text-shadow: 0 0 15px rgba(255,107,53,0.3);
}

.gallery-item-title small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.auth-alerts .alert {
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 12px 15px; /* Уменьшаем размер */
    font-size: 0.95rem;
}

.auth-form h2 {
    font-family: var(--font-headings);
    text-align: center;
    margin-bottom: 25px;
    color: var(--accent-color);
    text-transform: uppercase;
}

/* Стили для музыкальной секции */
.music-section {
    background-color: var(--primary-color);
    text-align: center;
}

.music-player-container {
    max-width: 800px;
    margin: 40px auto 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.section-footer {
    text-align: center;
    margin-top: 60px;
}

/* ==========================================================================
   Стили для чата поддержки
   ========================================================================== */
.chat-support-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
}
.chat-support-button:hover {
    transform: scale(1.1);
}

.chat-support-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 370px;
    max-width: calc(100% - 40px);
    background-color: var(--secondary-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.chat-support-widget.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.chat-widget-header {
    background-color: rgba(0,0,0,0.2);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-widget-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-family: var(--font-headings);
}
.chat-widget-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.chat-widget-messages {
    flex-grow: 1;
    padding: 10px;
    height: 400px;
    overflow-y: auto;
    /* Скрытие стандартного скроллбара */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}
/* Скрытие скроллбара для Webkit-браузеров (Chrome, Safari) */
.chat-widget-messages::-webkit-scrollbar {
    display: none;
}

.chat-widget-messages .message {
    display: flex;
    margin-bottom: 15px;
}
.chat-widget-messages .message.support .message-content {
    background-color: rgba(255,255,255,0.05);
    border-radius: 15px 15px 15px 5px;
    align-self: flex-start; /* Прижимаем к левому краю */
}
.chat-widget-messages .message.user {
    justify-content: flex-end;
}
.chat-widget-messages .message.user .message-content {
    background-color: var(--accent-color);
    color: white;
    border-radius: 15px 15px 5px 15px;
}
.chat-widget-messages .message.user .message-time {
    color: rgba(255,255,255,0.7);
}
.chat-widget-messages .message.system,
.chat-widget-messages .message.system-error {
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-secondary);
    width: 100%;
    justify-content: center;
}
.chat-widget-messages .message.system-error .message-content {
    background: none;
    color: #ff4d4f;
}

.chat-widget-messages .message-content {
    padding: 12px 15px;
    max-width: 90%;
    position: relative;
}
.chat-widget-messages .message-content p {
    margin: 0 0 8px;
    line-height: 1.5;
    word-wrap: break-word;
    color: var(--text-secondary);
    text-align: right;
}
.chat-widget-messages .message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: right;
}

.chat-widget-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background-color: var(--primary-color);
}
.chat-widget-input textarea {
    flex-grow: 1;
    border: none;
    background: none;
    color: var(--text-color);
    padding: 8px;
    resize: none;
    font-size: 1rem;
    max-height: 100px; /* Ограничиваем максимальную высоту */
    scrollbar-width: thin; /* Тонкий скроллбар для Firefox */
    scrollbar-color: var(--accent-color) transparent; /* Цвет скроллбара */
}
.chat-widget-input textarea::-webkit-scrollbar {
    width: 5px;
}
.chat-widget-input textarea::-webkit-scrollbar-track {
    background: transparent;
}
.chat-widget-input textarea::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 20px;
    border: 3px solid transparent;
}

.chat-widget-input .chat-input-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    width: 40px;
    transition: color 0.3s;
}
.chat-widget-input .chat-input-btn:hover {
    color: var(--accent-color);
}

/* Стили для реакций */
.message-reactions {
    align-self: flex-end;
    margin-left: 8px;
}
.reaction-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.reaction-btn:hover {
    background: var(--accent-color);
    color: white;
}

.chat-widget-footer {
    padding: 10px 15px;
    border-top: 1px solid var(--border-color);
    background-color: var(--primary-color);
}

.chat-file-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 5px;
    display: none; /* Скрыт по умолчанию */
}
.chat-file-preview i {
    margin-right: 5px;
}

/* Стили для реакций */
.message-actions {
    position: absolute;
    top: -15px;
    right: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.message:hover .message-actions {
    opacity: 1;
}
.reaction-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.reaction-btn:hover {
    background: var(--accent-color);
    color: white;
}

.reactions-palette {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 5px;
    display: flex;
    gap: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}
.reactions-palette.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}
.reactions-palette button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: transform 0.2s, background-color 0.2s;
}
.reactions-palette button:hover {
    transform: scale(1.2);
    background-color: rgba(255,255,255,0.1);
}

.chat-widget-footer {
    padding: 10px 15px;
}

.reaction-display {
    position: absolute;
    bottom: -15px;
    right: 0;
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.message-reactions-container {
    position: absolute;
    bottom: -10px;
    left: 10px;
    display: flex;
    gap: 4px;
}
.reaction-chip {
    background: var(--primary-color);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.8rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.chat-file-preview {
    padding: 8px 12px;
    display: none; /* Скрыт по умолчанию */
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0,0,0,0.15);
    border-radius: 6px;
    margin-bottom: 5px;
}
.remove-file-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Система друзей */

.friends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.friends-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.friends-search {
    margin-bottom: 20px;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.friend-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.friend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #4CAF50);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.friend-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.friend-card:hover::before {
    opacity: 1;
}

.friend-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 18px;
}

.friend-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.friend-card:hover .friend-avatar img {
    transform: scale(1.05);
}

.online-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.online-status.online {
    background: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.online-status.offline {
    background: #9E9E9E;
}

/* Статус точки для списка друзей */
.friend-avatar .status-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    background: #9E9E9E;
}

.friend-avatar .status-dot.online {
    background: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.friend-avatar .status-dot.offline {
    background: #9E9E9E;
}

.user-avatar .status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    background: #9E9E9E;
    transition: background-color 0.3s ease;
}

.user-avatar .status-dot.online {
    background: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.user-avatar .status-dot.offline {
    background: #9E9E9E;
}

.friend-info h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.2em;
    font-weight: 600;
}

.friend-id {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 6px 0;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.friend-status {
    color: var(--accent-color);
    font-size: 0.9em;
    margin: 6px 0;
    font-weight: 500;
    text-transform: capitalize;
}

.friend-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.friend-actions .btn {
    flex: 1;
    min-width: 90px;
    font-size: 0.85em;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.friend-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Поиск пользователей */
.user-search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.user-search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.user-search-item:last-child {
    border-bottom: none;
}

.user-search-item:hover {
    background: var(--hover-bg);
    transform: translateX(4px);
}

.user-avatar {
    position: relative;
}

.user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.user-avatar .online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.user-info {
    flex: 1;
}

.user-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
    font-weight: 600;
}

.user-info p {
    margin: 2px 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.user-id {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    font-size: 0.8em;
}

.user-status {
    color: var(--accent-color);
    font-weight: 500;
    text-transform: capitalize;
}

/* Заявки в друзья */
.friend-requests-list {
    max-height: 400px;
    overflow-y: auto;
}

.friend-request-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    background: var(--card-bg);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.friend-request-item:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.request-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.request-info {
    flex: 1;
}

.request-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
    font-weight: 600;
}

.request-info p {
    margin: 2px 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.request-message {
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
}

.request-time {
    color: var(--text-secondary);
    font-size: 0.8em;
    opacity: 0.8;
}

.request-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.request-actions .btn {
    font-size: 0.85em;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.request-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notification-success {
    border-left: 4px solid #4CAF50;
}

.notification-error {
    border-left: 4px solid #f44336;
}

.notification-info {
    border-left: 4px solid var(--accent-color);
}

.notification button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification button:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.badge {
    background: #f44336;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    margin-bottom: 15px;
    opacity: 0.6;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    margin: auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.1);
}

.modal-title {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.5em;
    font-weight: 600;
}

.search-section {
    margin-bottom: 20px;
}

.request-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.request-section h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .friends-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .friends-actions {
        justify-content: center;
    }
    
    .friends-grid {
        grid-template-columns: 1fr;
    }
    
    .friend-card {
        padding: 20px;
    }
    
    .friend-actions {
        flex-direction: column;
    }
    
    .user-search-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .friend-request-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .request-actions {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* Улучшенные стили для модального окна добавления друзей */
#add-friend-modal .modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

#add-friend-modal .modal-title {
    color: var(--text-primary);
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 15px;
}

#add-friend-modal .search-section {
    margin-bottom: 25px;
}

#add-friend-modal .user-search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1em;
    transition: all 0.3s ease;
}

#add-friend-modal .user-search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

#add-friend-modal .user-search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

#add-friend-modal .user-search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

#add-friend-modal .user-search-item:last-child {
    border-bottom: none;
}

#add-friend-modal .user-search-item:hover {
    background: var(--hover-bg);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#add-friend-modal .user-avatar {
    position: relative;
    flex-shrink: 0;
}

#add-friend-modal .user-avatar img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#add-friend-modal .user-avatar .online-status {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#add-friend-modal .user-info {
    flex: 1;
    min-width: 0;
}

#add-friend-modal .user-info h4 {
    margin: 0 0 6px 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1em;
}

#add-friend-modal .user-id {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

#add-friend-modal .user-status {
    color: var(--accent-color);
    font-weight: 500;
    text-transform: capitalize;
    font-size: 0.9em;
}

#add-friend-modal .user-search-item .btn {
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

#add-friend-modal .user-search-item .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#add-friend-modal .request-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
    display: none;
}

#add-friend-modal .request-section h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.3em;
    font-weight: 600;
}

#add-friend-modal .request-message {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1em;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

#add-friend-modal .request-message:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

#add-friend-modal .send-request-btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

#add-friend-modal .send-request-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    #add-friend-modal .modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
    }
    
    #add-friend-modal .user-search-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px;
    }
    
    #add-friend-modal .user-search-item .btn {
        width: 100%;
        margin-top: 10px;
    }
}

/* Стили для секции заблокированных пользователей */
.blocked-users-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.blocked-users-section h3 {
    color: var(--text-primary);
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blocked-users-section h3::before {
    content: '\f05e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--danger-color);
}

.blocked-users-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.blocked-users-list .no-data {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.blocked-user {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.blocked-user:hover {
    opacity: 1;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blocked-user .friend-avatar img {
    border: 3px solid var(--danger-color);
    filter: grayscale(50%);
}

.blocked-user .friend-info h4 {
    color: var(--text-secondary);
    text-decoration: line-through;
}

.blocked-user .status-badge.blocked {
    background: var(--danger-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
}

.blocked-user .friend-actions .btn-warning {
    background: var(--warning-color);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.blocked-user .friend-actions .btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .blocked-user {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 15px;
    }
    
    .blocked-user .friend-actions .btn {
        width: 100%;
        margin-top: 10px;
    }
}

/* =================================
   FRIENDS PAGE STYLES - MODERN REDESIGN
   ================================= */

#friends-tab .friends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

#friends-tab .friends-actions {
    display: flex;
    gap: 12px;
}

#friends-tab .friends-sub-nav {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}

#friends-tab .sub-nav-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}
#friends-tab .sub-nav-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
#friends-tab .sub-nav-btn.active,
#friends-tab .sub-nav-btn:hover {
    color: var(--text-primary);
}
#friends-tab .sub-nav-btn.active::after {
    transform: scaleX(1);
}

.friends-content-pane {
    display: none;
}
.friends-content-pane.active {
    display: block;
}

.friend-list-grid, .blocked-users-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.friend-card, .blocked-user-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.friend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.friend-card-avatar {
    position: relative;
    margin-bottom: 16px;
}
.friend-card-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}
.friend-card-avatar .online-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    background-color: #828487; /* Offline */
}
.friend-card-avatar .online-status.online {
    background-color: #31a24c; /* Green */
}

.friend-card-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.friend-card-id {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-family: monospace;
}

.friend-card-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
}

.blocked-user-card {
    opacity: 0.7;
}
.blocked-user-card .friend-card-avatar img {
    filter: grayscale(1);
}

/* Add Friend Modal Redesign */
#add-friend-modal .modal-content {
    background: var(--sidebar-bg);
    border-radius: 16px;
    padding: 32px;
}
#add-friend-modal .modal-title {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}
#add-friend-modal #user-search-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--chat-bg);
    color: var(--text-primary);
}

#add-friend-modal .user-search-results {
    margin-top: 16px;
    max-height: 300px;
    overflow-y: auto;
}
#add-friend-modal .user-search-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}
#add-friend-modal .user-search-item:hover {
    background-color: var(--hover-bg);
}
#add-friend-modal .user-search-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
}
#add-friend-modal .user-search-item .user-info {
    flex-grow: 1;
}
#add-friend-modal .user-search-item .btn {
    margin-left: auto;
    flex-shrink: 0;
}
/* === СТИЛИ ДЛЯ РАЗДЕЛА ДРУЗЕЙ === */

/* Поиск друзей */
.friends-search {
    margin: 20px 0;
    position: relative;
}

.friends-search .form-input,
#friend-search {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.friends-search .form-input:focus,
#friend-search:focus {
    outline: none;
    border-color: #00ff88;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.friends-search .form-input::placeholder,
#friend-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Сетка друзей */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.friend-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.friend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

.friend-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.online-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
}

.online-status.online {
    background: #00ff88;
}

.online-status.offline {
    background: #666;
}
/* Стиль для отображения ID пользователя в профиле */
.profile-user-id {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 5px 0 15px 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-align: center;
    opacity: 0.9;
}

.profile-user-id:before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* === NOTIFICATION INDICATOR STYLES === */
.notification-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    background: #ff6b35;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.unread-count {
    line-height: 1;
    min-width: 12px;
    text-align: center;
}

/* Пульсация для привлечения внимания */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}

/* Стили для мобильной версии */
.mobile-notification {
    position: absolute;
    top: -8px;
    right: -10px;
    padding: 2px 6px;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    line-height: 12px;
}

.mobile-notification i {
    display: none; /* Скрываем иконку колокольчика в мобильной версии */
}

/* Адаптация для навигации */
#chat-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

#mobile-chat-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Особые стили для темной темы (если есть) */
@media (prefers-color-scheme: dark) {
    .notification-indicator {
        background: #ff6b6b;
        color: #fff;
    }
}

/* Responsive поведение */
@media (max-width: 768px) {
    .notification-indicator:not(.mobile-notification) {
        padding: 1px 6px;
        font-size: 11px;
    }
    
    .notification-indicator:not(.mobile-notification) i {
        font-size: 9px;
        margin-right: 3px;
    }
}

/* Стили для взрослого контента */
.news-card.adult-content {
    position: relative;
    transition: all 0.3s ease;
    transform: scale(0.98);
}

.news-card.adult-content:hover {
    transform: scale(1);
}

.news-card.adult-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.9), rgba(192, 57, 43, 0.9));
    z-index: 10;
    pointer-events: none;
    border-radius: 10px;
}

.news-card.adult-content::after {
    content: '🔞 КОНТЕНТ 18+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #e74c3c;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    z-index: 25;
    pointer-events: none;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 2px solid #e74c3c;
}

.news-card.adult-content .adult-badge {
    display: none;
}

.news-card.adult-content .news-content {
    position: relative;
    z-index: 15;
}

.news-card.adult-content .news-image img {
    filter: blur(10px) brightness(0.3);
}

.news-card.adult-content .news-title a {
    color: #ffffff !important;
}

.news-card.adult-content .news-excerpt {
    color: #ffffff !important;
}

/* Модальное окно для подтверждения взрослого контента */
.adult-content-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.adult-content-modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.adult-content-modal .modal-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid #e74c3c;
    position: relative;
    overflow: hidden;
}

.adult-content-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #c0392b, #e74c3c);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.adult-content-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(231, 76, 60, 0.3);
}

.adult-content-modal .modal-title {
    color: #e74c3c;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.adult-content-modal .modal-close {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
}

.adult-content-modal .modal-close:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.adult-content-modal .modal-body {
    margin-bottom: 30px;
}

.adult-content-modal .modal-text {
    line-height: 1.6;
}

.adult-content-modal .modal-text h4 {
    color: #e74c3c;
    margin: 15px 0;
    font-size: 18px;
    font-weight: bold;
}

.adult-content-modal .modal-text p {
    margin: 10px 0;
    color: #ecf0f1;
}

.adult-content-modal .modal-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.adult-content-modal .btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
}

.adult-content-modal .btn-confirm {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.adult-content-modal .btn-confirm:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.adult-content-modal .btn-cancel {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
}

.adult-content-modal .btn-cancel:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.6);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .adult-content-modal .modal-content {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .adult-content-modal .modal-title {
        font-size: 20px;
    }
    
    .adult-content-modal .modal-footer {
        flex-direction: column;
    }
    
    .adult-content-modal .btn {
        width: 100%;
        min-width: auto;
    }
}

/* Стили для кнопки лайка */
#like-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#like-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(231, 76, 60, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#like-button:hover::before {
    width: 300px;
    height: 300px;
}

#like-button.liked {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    transform: scale(1.05);
}

#like-button.liked:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

#like-button.liked i {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Полноэкранный просмотр изображений */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.fullscreen-modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

.fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px 20px;
}

.fullscreen-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fullscreen-close:hover {
    background: rgba(231, 76, 60, 0.8);
    transform: scale(1.1);
}

#fullscreen-image {
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    display: block;
    margin: auto;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

#fullscreen-image.zoomed {
    transform: scale(1.5);
    cursor: zoom-out;
}

.fullscreen-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    width: 100%;
    pointer-events: none;
}

.fullscreen-prev,
.fullscreen-next {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
}

.fullscreen-prev:hover,
.fullscreen-next:hover {
    background: rgba(231, 76, 60, 0.8);
    transform: scale(1.1);
}

.fullscreen-prev {
    left: 0;
}

.fullscreen-next {
    right: 0;
}

/* Курсор для кликабельных изображений */
.news-single-image,
.news-image img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.news-single-image:hover,
.news-image img:hover {
    transform: scale(1.02);
}

/* Адаптивность для полноэкранного просмотра */
@media (max-width: 768px) {
    .fullscreen-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
        width: 36px;
        height: 36px;
    }
    
    .fullscreen-prev,
    .fullscreen-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0 5px;
    }
    
    .fullscreen-content {
        padding: 40px 10px 10px 10px;
    }
    
    #fullscreen-image {
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 80px);
    }
    
    #fullscreen-image.zoomed {
        transform: scale(1.2);
    }
}

/* Адаптивность для комментариев */
@media (max-width: 768px) {
    .comment-item {
        padding: 15px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .comment-author {
        font-size: 14px;
    }
    
    .comment-date {
        font-size: 12px;
    }
    
    .comment-actions {
        position: absolute;
        top: 10px;
        right: 10px;
    }
    
    .comment-delete-btn,
    .comment-report-btn {
        padding: 3px 8px;
        font-size: 12px;
    }
    
    .comment-text {
        font-size: 13px;
        margin-top: 10px;
    }
    
    .comment-avatar img {
        width: 40px;
        height: 40px;
    }
}

/* Стили для видео в карточках новостей */
.news-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    border-radius: 0;
}

.news-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    transition: transform 0.4s ease;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(231, 76, 60, 0.95);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 3px solid rgba(255,255,255,0.3);
}

.video-play-overlay i {
    color: white;
    font-size: 28px;
    margin-left: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.news-card:hover .video-play-overlay {
    background: rgba(231, 76, 60, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.news-card:hover .news-video {
    transform: scale(1.08);
}

.video-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.4);
    z-index: 2;
}

.video-badge i {
    margin-right: 3px;
}

/* Стили для видео на странице отдельной новости */
.news-single-video-container {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.news-single-video {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    background: #000;
}

/* Адаптивность для видео */
@media (max-width: 768px) {
    .news-single-video {
        max-height: 300px;
    }
    
    .video-play-overlay {
        width: 60px;
        height: 60px;
    }
    
    .video-play-overlay i {
        font-size: 24px;
    }
    
    .video-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .news-video {
        object-fit: contain;
    }
}

/* Дополнительные стили для видео */
.news-video::-webkit-media-controls {
    display: none !important;
}

.news-video::-webkit-media-controls-panel {
    display: none !important;
}

.news-video::-webkit-media-controls-play-button {
    display: none !important;
}

.news-video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Стили для видео в карточках - скрываем контролы */
.news-video {
    pointer-events: none;
}

.news-video-container {
    cursor: pointer;
}

/* Стили для видео на странице новости - показываем контролы */
.news-single-video {
    pointer-events: auto;
}

.news-single-video::-webkit-media-controls {
    display: flex !important;
}



/* Улучшенный hover эффект для видео */
.news-card:hover .video-play-overlay {
    background: rgba(231, 76, 60, 1);
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 6px 25px rgba(0,0,0,0.6);
}

/* Анимация для кнопки воспроизведения */
@keyframes pulse-video {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.video-play-overlay {
    animation: pulse-video 2s infinite;
}

.news-card:hover .video-play-overlay {
    animation: none;
}
