﻿/* Базовые стили и сброс */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f0f2f5;
            color: #333;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        button {
            cursor: pointer;
            border: none;
            outline: none;
            font-family: inherit;
        }

        /* --- Шапка (Header) --- */
        header {
            background-color: #1a1a1a;
            color: #ffffff;
            padding: 10px 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }

        .logo-area {
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: bold;
            letter-spacing: 1px;
            color: #fff;
            line-height: 1.1;
        }

        .logo span {
            color: #4CAF50;
        }

        .slogan {
            color: #888;
            font-size: 12px;
            font-style: italic;
            margin-top: 2px;
        }

        /* --- Главное меню (Desktop) --- */
        .main-nav {
            flex-grow: 1;
            display: flex;
            justify-content: center;
            padding: 0 20px;
        }

        .nav-list {
            display: flex;
            list-style: none;
            gap: 25px;
            align-items: center;
        }

        .nav-item {
            position: relative;
        }

        .nav-item-mega {
            position: static; /* Для центрирования мега-меню относительно всего меню */
        }

        .nav-item > a {
            color: #ddd;
            font-size: 0.95rem;
            font-weight: 500;
            transition: color 0.3s;
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 10px 0;
            position: relative; /* Необходим для позиционирования подчеркивания */
        }

        /* Красивое подчеркивание при наведении (раскрывается из центра) */
        .nav-item > a::after {
            content: '';
            position: absolute;
            bottom: 2px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 2px;
            background-color: #4CAF50;
            transition: width 0.3s ease;
        }

        .nav-item:hover > a::after {
            width: 100%;
        }

        .nav-item > a:hover {
            color: #4CAF50;
        }

        /* Выпадающее Мега-меню (Desktop) */
        .nav-mega-menu {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translate(-50%, 15px);
            background-color: #fff;
            width: 850px;
            max-width: 90vw;
            border-radius: 8px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 101;
            padding: 25px 30px;
            
            /* Сетка в 3 колонки */
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px 20px;
            
            /* Прокрутка меню */
            max-height: 450px;
            overflow-y: auto;
        }

        /* Кастомный скроллбар для мега-меню */
        .nav-mega-menu::-webkit-scrollbar {
            width: 8px;
        }
        .nav-mega-menu::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        .nav-mega-menu::-webkit-scrollbar-thumb {
            background: #ccc;
            border-radius: 4px;
        }
        .nav-mega-menu::-webkit-scrollbar-thumb:hover {
            background: #aaa;
        }

        .nav-item-mega:hover .nav-mega-menu {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, 0);
        }

        .nav-mega-menu li {
            list-style: none;
        }

        .nav-mega-menu a {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 10px;
            color: #444;
            font-size: 0.9rem;
            border-radius: 4px;
            transition: background 0.2s, color 0.2s;
        }

        .nav-mega-menu a:hover {
            background-color: #f0f2f5;
            color: #4CAF50;
        }

        .nav-mega-menu .count {
            color: #999;
            font-size: 0.75rem;
            font-weight: 600;
        }

        /* Сжатие до 2-х колонок на средних экранах */
        @media (max-width: 1100px) {
            .nav-mega-menu {
                width: 650px;
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* Кнопки в шапке */
        .header-actions {
            display: flex;
            gap: 15px;
            align-items: center;
            flex-shrink: 0;
        }

        .btn {
            padding: 10px 20px;
            border-radius: 5px;
            font-weight: 600;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-add {
            background-color: #4CAF50;
            color: white;
        }

        .btn-add:hover {
            background-color: #45a049;
        }

        .btn-bookmark, .btn-user, .btn-search {
            background-color: #333;
            color: white;
            border: 1px solid #555;
            padding: 10px 15px; /* Чуть компактнее, так как только иконки */
        }

        .btn-bookmark:hover, .btn-user:hover, .btn-search:hover {
            background-color: #444;
            color: #4CAF50;
        }

        /* --- Панель поиска --- */
        .search-panel {
            background-color: #fff;
            padding: 15px 5%;
            border-bottom: 1px solid #e9ecef;
            display: none;
            box-shadow: 0 4px 10px rgba(0,0,0,0.05);
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            z-index: 90;
        }

        .search-panel.active {
            display: block;
            animation: slideDownSearch 0.2s ease;
        }

        @keyframes slideDownSearch {
            from { opacity: 0; transform: translateY(-5px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .search-form {
            display: flex;
            gap: 10px;
            max-width: 800px;
            margin: 0 auto;
        }

        .search-form input {
            flex: 1;
            padding: 10px 15px;
            border: 1px solid #ccc;
            border-radius: 5px;
            font-size: 1rem;
            outline: none;
            transition: border-color 0.3s;
        }

        .search-form input:focus {
            border-color: #4CAF50;
        }

        /* Гамбургер */
        .hamburger {
            display: none;
            background: transparent;
            color: white;
            font-size: 1.5rem;
            border: none;
            cursor: pointer;
            padding: 5px;
        }

        /* --- Dropdown панель пользователя --- */
        .user-dropdown-wrapper {
            position: relative;
        }

        .btn-user .fa-chevron-down {
            font-size: 0.7rem;
            margin-left: 2px;
            transition: transform 0.3s ease;
        }

        .user-dropdown-wrapper.active .fa-chevron-down {
            transform: rotate(180deg);
        }

        .user-dropdown {
            position: absolute;
            top: calc(100% + 15px);
            right: 0;
            width: 320px;
            background-color: #fff;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            border: 1px solid #eee;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s ease;
            cursor: default;
            z-index: 102;
        }

        .user-dropdown::before {
            content: '';
            position: absolute;
            top: -8px;
            right: 18px; /* Сдвинуто под новую иконку */
            width: 15px;
            height: 15px;
            background-color: #fff;
            transform: rotate(45deg);
            border-left: 1px solid #eee;
            border-top: 1px solid #eee;
        }

        .user-dropdown-wrapper.active .user-dropdown {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-content {
            padding: 20px;
            max-height: 80vh;
            overflow-y: auto;
        }

        /* Стили содержимого профиля */
        .dropdown-section h3 { font-size: 1.1rem; color: #222; margin-bottom: 15px; text-align: center; }
        .form-group { margin-bottom: 12px; position: relative; }
        .form-group i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #888; }
        .form-group input { width: 100%; padding: 10px 10px 10px 35px; border: 1px solid #ddd; border-radius: 6px; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
        .form-group input:focus { border-color: #4CAF50; }
        .btn-login { width: 100%; background-color: #007bff; color: white; padding: 10px; border-radius: 6px; margin-bottom: 10px; justify-content: center; }
        .btn-login:hover { background-color: #0056b3; }
        .register-link { display: block; text-align: center; font-size: 0.85rem; color: #007bff; margin-bottom: 15px; }
        .divider { height: 1px; background-color: #eee; margin: 20px 0; position: relative; }
        .divider::after { content: "ИЛИ ПРОФИЛЬ"; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 10px; font-size: 0.75rem; color: #aaa; font-weight: bold; }
        .user-profile-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
        .avatar { width: 50px; height: 50px; border-radius: 50%; background-color: #4CAF50; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.2rem; font-weight: bold; }
        .user-details p { margin: 2px 0; font-size: 0.85rem; color: #666; }
        .user-details .login-name { font-weight: bold; font-size: 1rem; color: #222; }
        .bonuses { color: #f39c12; font-weight: 600; }
        .user-menu { list-style: none; }
        .user-menu a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; color: #444; transition: background 0.2s, color 0.2s; font-size: 0.95rem; }
        .user-menu a i { width: 20px; text-align: center; color: #777; }
        .user-menu a:hover { background-color: #f5f5f5; color: #4CAF50; }
        .user-menu a:hover i { color: #4CAF50; }
        .user-menu .logout { color: #dc3545; margin-top: 5px; border-top: 1px solid #f0f0f0; border-radius: 0 0 6px 6px; }
        .user-menu .logout i { color: #dc3545; }
        .user-menu .logout:hover { background-color: #fff5f5; color: #c82333; }

        /* --- Мобильное боковое меню --- */
        .mobile-menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .mobile-menu-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .mobile-menu {
            position: fixed;
            top: 0;
            left: 0; /* Меню выезжает слева */
            width: 280px;
            height: 100%;
            background-color: #1a1a1a;
            z-index: 999;
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            box-shadow: 2px 0 15px rgba(0,0,0,0.5);
            display: flex;
            flex-direction: column;
        }

        .mobile-menu.active {
            transform: translateX(0);
        }

        .mobile-menu-header {
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #333;
        }

        .close-menu {
            background: none;
            border: none;
            color: #aaa;
            font-size: 1.5rem;
            cursor: pointer;
        }

        .close-menu:hover {
            color: #fff;
        }

        .mobile-nav-list {
            list-style: none;
            padding: 20px 0;
            overflow-y: auto;
        }

        .mobile-nav-list > li > a, .mobile-nav-list summary {
            display: block;
            padding: 15px 25px;
            color: #ddd;
            font-size: 1.1rem;
            border-bottom: 1px solid #2a2a2a;
            text-decoration: none;
            cursor: pointer;
        }

        .mobile-nav-list > li > a:hover, .mobile-nav-list summary:hover {
            background-color: #2a2a2a;
            color: #4CAF50;
        }

        /* Многоуровневое меню в мобилке через details/summary */
        details.mobile-dropdown summary {
            outline: none;
            list-style: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        details.mobile-dropdown summary::-webkit-details-marker {
            display: none;
        }

        details.mobile-dropdown[open] summary {
            color: #4CAF50;
        }

        details.mobile-dropdown[open] summary .fa-angle-down {
            transform: rotate(180deg);
        }

        .mobile-submenu {
            list-style: none;
            background-color: #111;
            display: flex;
            flex-direction: column; /* 1 колонка для мобильных */
        }

        .mobile-submenu li a {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 25px 12px 40px;
            color: #aaa;
            font-size: 1rem;
            border-bottom: 1px solid #222;
        }

        .mobile-submenu li a .count {
            color: #666;
            font-size: 0.85rem;
        }

        .mobile-submenu li a:hover {
            color: #fff;
        }

        /* --- Баннер под шапкой --- */
        .top-banner-container {
            display: flex;
            justify-content: center;
            padding: 20px 5%;
            background-color: #e9ecef;
        }

        .banner-728 {
            width: 100%;
            max-width: 728px;
            height: 90px;
            background-color: #fff;
            border: 1px dashed #adb5bd;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6c757d;
            font-size: 1.1rem;
            border-radius: 4px;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        }

        /* --- Секция Hero --- */
        .hero {
            text-align: center;
            padding: 40px 5% 10px;
        }

        .hero h1 {
            font-size: 2.2rem;
            color: #222;
            margin-bottom: 15px;
            font-weight: 800;
        }

        .hero h2 {
            font-size: 1.1rem;
            color: #666;
            font-weight: 400;
            max-width: 800px;
            margin: 0 auto;
            line-height: 1.5;
        }

        /* --- Основной контент --- */
        main {
            flex: 1;
            padding: 30px 5%;
        }

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

        .card {
            background-color: #ffffff;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
            animation: fadeIn 0.6s ease forwards;
            opacity: 0;
            transform: translateY(15px);
        }

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

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 15px rgba(0,0,0,0.1);
        }

        .card-image-wrapper {
            position: relative;
            width: 100%;
            aspect-ratio: 16/9;
            overflow: hidden;
            background-color: #ddd;
            display: block;
        }

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

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

        /* --- Сильно заблюренная шторка 18+ --- */
        .nsfw-overlay {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Полупрозрачный темный фон для контраста текста */
            background-color: rgba(0, 0, 0, 0.4); 
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 10;
            text-align: center;
            padding: 20px;
            /* Мощный фильтр размытия фона */
            backdrop-filter: blur(25px); 
            -webkit-backdrop-filter: blur(25px);
        }

        .is-nsfw .nsfw-overlay {
            display: flex;
        }

        .is-nsfw img {
            /* Дополнительное размытие самой картинки */
            filter: blur(10px) brightness(0.8);
            transform: scale(1.2);
        }
        
        .is-nsfw:hover img {
            transform: scale(1.2); 
        }

        .nsfw-icon { color: #dc3545; font-size: 2.5rem; margin-bottom: 10px; }
        .nsfw-title { color: white; font-size: 1.2rem; font-weight: bold; margin-bottom: 5px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
        .nsfw-text { color: #f0f0f0; font-size: 0.85rem; margin-bottom: 15px; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
        .btn-18 { background-color: #dc3545; color: white; padding: 8px 20px; border-radius: 20px; font-weight: bold; font-size: 0.9rem; transition: background 0.2s; box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3); }
        .btn-18:hover { background-color: #c82333; }

        /* --- Шторка Пароля --- */
        .password-overlay {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.4); 
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 10;
            text-align: center;
            padding: 20px;
            backdrop-filter: blur(25px); 
            -webkit-backdrop-filter: blur(25px);
        }

        .is-locked .password-overlay { display: flex; }
        .is-locked img { filter: blur(10px) brightness(0.8); transform: scale(1.2); }
        .is-locked:hover img { transform: scale(1.2); }
        .password-icon { color: #ffc107; font-size: 2.5rem; margin-bottom: 10px; }
        .password-title { color: white; font-size: 1.2rem; font-weight: bold; margin-bottom: 5px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
        .password-text { color: #f0f0f0; font-size: 0.85rem; margin-bottom: 15px; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
        .password-form { display: flex; width: 100%; max-width: 220px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); border-radius: 4px; overflow: hidden; }
        .password-form input { flex: 1; padding: 10px; border: none; outline: none; font-size: 0.9rem; }
        .btn-unlock { background-color: #4CAF50; color: white; border: none; padding: 0 15px; cursor: pointer; transition: background 0.2s; }
        .btn-unlock:hover { background-color: #45a049; }

        .card-info {
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .resolution { font-size: 0.9rem; color: #666; font-weight: 500; }
        .resolution i { margin-right: 5px; color: #aaa; }
        
        .stats-group { display: flex; align-items: center; gap: 12px; }
        .rating { font-size: 0.85rem; font-weight: bold; }
        .rating i { margin-right: 3px; }
        .rate-red { color: #dc3545; }
        .rate-gray { color: #888; }
        .rate-yellow { color: #d4a000; } /* Темно-желтый для читаемости на белом */
        .rate-green { color: #28a745; }

        .downloads { font-size: 0.85rem; color: #999; }
        .downloads i { margin-right: 3px; }

        /* Кнопка подгрузки */
        .load-more-container {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            margin-top: 20px;
        }

        .btn-load {
            background-color: #ffffff;
            color: #333;
            border: 2px solid #ccc;
            padding: 12px 35px;
            font-size: 1rem;
            border-radius: 25px;
            font-weight: 600;
            transition: all 0.3s;
        }

        .btn-load:hover {
            background-color: #f0f2f5;
            border-color: #4CAF50;
            color: #4CAF50;
            box-shadow: 0 4px 10px rgba(76, 175, 80, 0.15);
        }

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

        .page-btn {
            min-width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 6px;
            color: #555;
            font-weight: 600;
            transition: all 0.2s;
            text-decoration: none;
        }

        .page-btn:hover:not(.active) {
            background-color: #f0f2f5;
            color: #4CAF50;
            border-color: #4CAF50;
        }

        .page-btn.active {
            background-color: #4CAF50;
            color: white;
            border-color: #4CAF50;
            cursor: default;
        }

        .page-dots {
            color: #888;
            font-weight: bold;
            letter-spacing: 2px;
        }

        /* --- Секция с описанием сайта (SEO) --- */
        .site-seo-desc {
            background-color: #fff;
            padding: 35px;
            border-radius: 12px;
            margin-top: 50px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.03);
            border: 1px solid #eaeaea;
        }

        .site-seo-desc h3 {
            font-size: 1.5rem;
            color: #222;
            margin-bottom: 15px;
        }

        .site-seo-desc p {
            color: #555;
            line-height: 1.6;
            margin-bottom: 15px;
            font-size: 0.95rem;
        }

        .site-seo-desc p:last-child {
            margin-bottom: 0;
        }

        /* --- Футер --- */
        footer { background-color: #1a1a1a; color: #aaa; padding: 40px 5% 20px; text-align: center; }
        .footer-links { display: flex; justify-content: center; gap: 25px; margin-bottom: 25px; flex-wrap: wrap; font-weight: 500; }
        .footer-links a { transition: color 0.2s; }
        .footer-links a:hover { color: #fff; }
        .social-buttons { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; flex-wrap: wrap; }
        .social-btn { width: 45px; height: 45px; border-radius: 50%; background-color: #333; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; color: #fff; font-size: 1.2rem; }
        .social-btn.vk:hover { background-color: #0077FF; }
        .social-btn.tg:hover { background-color: #229ED9; }
        .social-btn.yt:hover { background-color: #FF0000; }
        .social-btn.pin:hover { background-color: #E60023; }
        .social-btn.x:hover { background-color: #000000; box-shadow: 0 0 5px rgba(255,255,255,0.5); }
        .social-btn.red:hover { background-color: #FF4500; }
        .copyright { font-size: 0.9rem; color: #888; margin-bottom: 15px; }
        .legal-links { font-size: 0.75rem; color: #666; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; border-top: 1px solid #333; padding-top: 15px; }
        .legal-links a:hover { text-decoration: underline; color: #999; }

        /* Адаптивность */
        @media (max-width: 992px) {
            .main-nav { display: none; } /* Скрываем десктопное меню */
            .hamburger { display: block; } /* Показываем гамбургер */
        }

        @media (max-width: 768px) {
            .header-actions .btn-add span { display: none; }
            .btn-add { padding: 10px 15px; }
            .gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
            .user-dropdown { width: 280px; right: 0; }
            .user-dropdown::before { right: 20px; }
            .hero h1 { font-size: 1.8rem; }
            .hero h2 { font-size: 1rem; }
            .site-seo-desc { padding: 25px 20px; }
        }
        
        @media (max-width: 480px) {
            .btn-add { display: none; } /* Скрываем кнопку "Добавить" на самых мелких экранах для экономии места */
            .top-banner-container { padding: 10px; }
            .banner-728 { font-size: 0.9rem; }
        }
