﻿/* Базовые стили и сброс */
        * { 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 {
            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; }

        .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; }

        .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; 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; }
        @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; }

        .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; }

        /* --- Модальное окно Входа --- */
        .login-modal-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.7); z-index: 10000;
            display: none; justify-content: center; align-items: center;
            opacity: 0; transition: opacity 0.3s ease; backdrop-filter: blur(5px);
        }
        .login-modal-overlay.active { display: flex; opacity: 1; }
        
        .login-modal-content {
            background: #fff; width: 100%; max-width: 400px;
            border-radius: 12px; padding: 35px 30px; position: relative;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            transform: translateY(-20px); transition: transform 0.3s ease;
        }
        .login-modal-overlay.active .login-modal-content { transform: translateY(0); }
        
        .login-modal-content h3 { margin-bottom: 25px; color: #222; text-align: center; font-size: 1.4rem; }
        .close-login-modal {
            position: absolute; top: 15px; right: 20px; font-size: 1.5rem;
            color: #aaa; cursor: pointer; transition: color 0.2s;
        }
        .close-login-modal:hover { color: #dc3545; }
        .modal-links { display: flex; justify-content: space-between; margin-top: 15px; font-size: 0.85rem; }
        .modal-links a { color: #007bff; transition: color 0.2s; font-weight: 500; }
        .modal-links a:hover { color: #0056b3; text-decoration: underline; }

        .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 0.3s ease; box-shadow: none; display: flex; flex-direction: column; }
        .mobile-menu.active { transform: translateX(0); box-shadow: 2px 0 15px rgba(0,0,0,0.5); }
        .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.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; }
        .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); }

        /* ==========================================================================
           СТИЛИ СТРАНИЦЫ ОБОЕВ 
           ========================================================================== */
        .wallpaper-container {
            padding: 20px 5% 30px;
            display: flex;
            gap: 30px;
            align-items: flex-start;
        }

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

        .sidebar-col {
            width: 350px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        .breadcrumbs { font-size: 0.9rem; color: #666; margin-bottom: 15px; }
        .breadcrumbs a { color: #007bff; transition: color 0.2s; }
        .breadcrumbs a:hover { color: #0056b3; text-decoration: underline; }
        
        .wallpaper-title { font-size: 2rem; color: #222; margin-bottom: 20px; font-weight: 800; }

        .main-image-wrapper {
            background-color: #fff; border-radius: 12px; overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05); position: relative;
            cursor: pointer; transition: box-shadow 0.3s;
        }
        .main-image-wrapper:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .main-image-wrapper img { width: 100%; display: block; object-fit: contain; max-height: 70vh; }

        /* Обновленный Action Bar (соц. сети слева, лайки/закладки справа) */
        .action-bar {
            display: flex; justify-content: space-between; align-items: center;
            background-color: #fff; padding: 15px 20px; border-radius: 12px;
            margin-top: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            flex-wrap: wrap; gap: 15px;
        }

        .share-buttons { display: flex; align-items: center; gap: 10px; }
        .share-buttons span { font-weight: 600; color: #666; font-size: 0.95rem; margin-right: 5px; }
        .share-btn { 
            width: 38px; height: 38px; border-radius: 50%; color: white; 
            display: flex; align-items: center; justify-content: center; 
            font-size: 1.1rem; transition: transform 0.2s, opacity 0.2s; 
        }
        .share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
        .share-btn.tg { background-color: #0088cc; }
        .share-btn.wa { background-color: #25D366; }
        .share-btn.tw { background-color: #000000; }
        .share-btn.em { background-color: #ea4335; }

        .action-buttons { display: flex; gap: 15px; }
        .act-btn {
            background: #f8f9fa; border: 1px solid #e9ecef; padding: 10px 20px;
            border-radius: 25px; font-size: 1rem; font-weight: 600; color: #555;
            display: flex; align-items: center; gap: 8px; transition: all 0.2s;
        }
        .act-btn:hover { background: #e9ecef; color: #222; }
        .act-btn.like:hover { background: #d4edda; color: #28a745; border-color: #c3e6cb; }
        .act-btn.dislike:hover { background: #f8d7da; color: #dc3545; border-color: #f5c6cb; }
        .act-btn.fav:hover { background: #fff3cd; color: #ffc107; border-color: #ffeeba; }

        /* Вынесенный блок тегов */
        .tags-container {
            margin-top: 20px; padding: 0 5px; display: flex; gap: 10px; flex-wrap: wrap;
        }
        .tag {
            background-color: #e9ecef; color: #495057; padding: 6px 14px;
            border-radius: 6px; font-size: 0.85rem; font-weight: 500; transition: background 0.2s;
        }
        .tag:hover { background-color: #4CAF50; color: #fff; }

        /* --- Табы с описанием --- */
        .info-tabs {
            background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            margin-top: 20px; overflow: hidden;
        }
        .tabs-header {
            display: flex; border-bottom: 1px solid #eee; background: #f8f9fa; flex-wrap: wrap;
        }
        .tab-btn {
            padding: 15px 25px; background: transparent; border: none; font-size: 0.95rem;
            font-weight: 600; color: #666; cursor: pointer; transition: all 0.2s;
            border-bottom: 2px solid transparent; outline: none; flex: 1; text-align: center;
            white-space: nowrap;
        }
        @media (min-width: 480px) { .tab-btn { flex: none; text-align: left; } }
        .tab-btn:hover { color: #4CAF50; }
        .tab-btn.active {
            color: #4CAF50; border-bottom-color: #4CAF50; background: #fff;
        }
        .tabs-content { padding: 25px; }
        .tab-pane { display: none; color: #444; line-height: 1.6; font-size: 0.95rem; }
        .tab-pane.active { display: block; animation: fadeInTab 0.3s ease; }
        @keyframes fadeInTab { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

        /* Стили для вкладки "Доступные разрешения" */
        .resolutions-list-tab {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 15px;
        }
        .res-item-tab {
            font-size: 0.9rem;
            color: #999; /* Серый для недоступных по умолчанию */
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .res-item-tab i {
            font-size: 0.8rem;
            opacity: 0.5;
        }
        .res-item-tab.available {
            color: #007bff; /* Синий для доступных */
            font-weight: 600;
        }
        .res-item-tab.available i {
            color: #007bff;
            opacity: 1;
        }
        a.res-item-tab.available:hover {
            color: #0056b3;
            text-decoration: underline;
        }

        /* Блок Скачивания (Сайдбар) */
        .download-box {
            background-color: #fff; border-radius: 12px; padding: 25px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-top: 25px;
        }
        .sidebar-title { font-size: 1.2rem; color: #222; margin-bottom: 20px; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; display: flex; align-items: center; gap: 10px; }
        
        .res-group { margin-bottom: 20px; }
        .res-group-title { font-size: 0.9rem; color: #888; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
        .res-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
        
        .res-btn {
            background-color: #f8f9fa; border: 1px solid #dee2e6; color: #444; padding: 10px;
            border-radius: 6px; text-align: center; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; display: block;
        }
        .res-btn:hover { background-color: #4CAF50; color: #fff; border-color: #4CAF50; }
        .res-btn.main-res { 
            background-color: #007bff; color: white; border-color: #007bff; 
            font-size: 1.05rem; padding: 12px 25px; display: block; margin-bottom: 25px; border-radius: 8px; text-align: center; width: 100%;
        }
        .res-btn.main-res:hover { background-color: #0056b3; }

        /* Блок Автора (Остался в сайдбаре) */
        .author-box {
            background-color: #fff; border-radius: 12px; padding: 25px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center;
        }
        .author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; border: 3px solid #4CAF50; padding: 2px; }
        .author-name { font-size: 1.2rem; font-weight: bold; color: #222; margin-bottom: 5px; }
        .author-stats { color: #777; font-size: 0.9rem; margin-bottom: 15px; }
        .btn-follow { background-color: #333; color: white; padding: 10px 20px; border-radius: 20px; width: 100%; font-weight: bold; transition: background 0.2s; }
        .btn-follow:hover { background-color: #4CAF50; }

        /* Слайдер схожих обоев */
        .slider-section { margin-top: 30px; background-color: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
        .slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
        .slider-header h3 { font-size: 1.3rem; color: #222; }
        .slider-nav { display: flex; gap: 10px; }
        .slider-nav button { width: 35px; height: 35px; border-radius: 50%; background-color: #f0f2f5; border: 1px solid #ddd; display: flex; justify-content: center; align-items: center; color: #555; transition: all 0.2s; }
        .slider-nav button:hover { background-color: #4CAF50; color: #fff; border-color: #4CAF50; }

        .slider-track-container { overflow: hidden; position: relative; }
        .slider-track { display: flex; gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 10px; }
        .slider-track::-webkit-scrollbar { height: 6px; }
        .slider-track::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
        .slider-track::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
        
        .slide-item { flex: 0 0 250px; scroll-snap-align: start; border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; }
        .slide-item img { width: 100%; height: 140px; object-fit: cover; display: block; transition: transform 0.3s; }
        .slide-item:hover img { transform: scale(1.05); }

        /* Сетка похожих изображений (Теперь Слайдер) */
        .similar-grid-section { margin-top: 40px; padding: 0 5%; }
        .section-title-wrap { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #ddd; }
        .section-title { font-size: 1.6rem; color: #222; }
        
        .similar-slider-nav { display: flex; gap: 10px; }
        .similar-slider-nav button { width: 35px; height: 35px; border-radius: 50%; background-color: #f0f2f5; border: 1px solid #ddd; display: flex; justify-content: center; align-items: center; color: #555; transition: all 0.2s; cursor: pointer; }
        .similar-slider-nav button:hover { background-color: #4CAF50; color: #fff; border-color: #4CAF50; }

        .gallery-slider { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 15px; }
        .gallery-slider::-webkit-scrollbar { height: 6px; }
        .gallery-slider::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
        .gallery-slider::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
        
        .gallery-slider .card { flex: 0 0 280px; scroll-snap-align: start; background-color: #ffffff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; }
        .card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
        .card-image-wrapper { width: 100%; aspect-ratio: 16/9; overflow: hidden; background-color: #ddd; }
        .card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
        .card:hover .card-image-wrapper img { transform: scale(1.05); }
        .card-info { padding: 12px; display: flex; justify-content: space-between; font-size: 0.85rem; color: #666; }

        /* Комментарии */
        .comments-section { background-color: #fff; padding: 30px 5%; margin-top: 40px; margin-bottom: 40px; }
        .comment-form { display: flex; gap: 15px; margin-bottom: 30px; }
        .comment-form .avatar { width: 50px; height: 50px; border-radius: 50%; background-color: #ddd; flex-shrink: 0; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; color: #888; }
        .comment-input-area { flex: 1; }
        .comment-input-area textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; resize: vertical; min-height: 80px; margin-bottom: 10px; outline: none; }
        .comment-input-area textarea:focus { border-color: #4CAF50; }
        
        .comment-list { display: flex; flex-direction: column; gap: 20px; }
        .comment-item { display: flex; gap: 15px; }
        .comment-item .avatar img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
        .comment-content { background-color: #f8f9fa; padding: 15px; border-radius: 8px; flex: 1; }
        .comment-header { display: flex; justify-content: space-between; margin-bottom: 5px; align-items: center; }
        .comment-author { font-weight: bold; color: #222; display: flex; align-items: center; }
        .comment-date { font-size: 0.8rem; color: #888; }
        .comment-text { font-size: 0.95rem; color: #444; line-height: 1.5; }
        
        /* Стили для ответов на комментарии */
        .comment-actions { margin-top: 10px; }
        .btn-reply-text { background: none; border: none; color: #888; font-size: 0.85rem; cursor: pointer; font-weight: 600; transition: color 0.2s; }
        .btn-reply-text:hover { color: #007bff; }
        .comment-replies { margin-top: 15px; border-left: 2px solid #dee2e6; padding-left: 20px; display: flex; flex-direction: column; gap: 15px; }
        .comment-item.reply .avatar img { width: 35px; height: 35px; }
        .comment-item.reply .comment-content { background-color: #fff; border: 1px solid #f0f0f0; }
        .author-badge { background-color: #4CAF50; color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-left: 8px; font-weight: normal; }

        /* --- КАСТОМНАЯ POP-UP ГАЛЕРЕЯ (LIGHTBOX) --- */
        .lightbox-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); z-index: 9999; display: none; flex-direction: column; opacity: 0; transition: opacity 0.3s ease; }
        .lightbox-overlay.active { display: flex; opacity: 1; }
        .lb-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 25px; color: white; background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent); }
        .lb-title { font-size: 1.2rem; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
        .lb-actions { display: flex; gap: 15px; }
        .lb-btn { background: none; border: none; color: white; font-size: 1.4rem; cursor: pointer; transition: color 0.2s; opacity: 0.8; }
        .lb-btn:hover { color: #4CAF50; opacity: 1; }
        .lb-btn.close-btn:hover { color: #dc3545; }
        .lb-body { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; padding: 20px; }
        .lb-img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.3s ease; }
        .lb-img.zoomed { transform: scale(1.5); cursor: zoom-out; }
        .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: white; width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: background 0.2s; }
        .lb-nav:hover { background: rgba(255,255,255,0.3); }
        .lb-prev { left: 20px; }
        .lb-next { right: 20px; }
        .lb-footer { padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: white; }
        .lb-counter { font-size: 1rem; color: #ccc; margin-left: auto; }

        /* ==========================================================================
           СТИЛИ ФУТЕРА (СКОПИРОВАНО С ГЛАВНОЙ) 
           ========================================================================== */
        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: 1024px) {
            .wallpaper-container { flex-direction: column; }
            .sidebar-col { width: 100%; flex-direction: row; flex-wrap: wrap; }
            .author-box { flex: 1; min-width: 300px; }
        }
        @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; }
            .user-dropdown { width: 280px; right: 0; }
            .action-bar { justify-content: center; }
            .action-buttons { justify-content: center; flex-wrap: wrap; width: 100%; }
            .tags-container { justify-content: center; }
            .lb-nav { width: 40px; height: 40px; font-size: 1.2rem; }
            .lb-prev { left: 10px; }
            .lb-next { right: 10px; }
            .lb-title { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
        }
        @media (max-width: 480px) {
            .btn-add { display: none; }
            .wallpaper-title { font-size: 1.5rem; }
        }
