:root {
            --primary: #D63384;
            --primary-dark: #B52A6F;
            --primary-light: #F8BBD9;
            --primary-gradient: linear-gradient(135deg, #D63384, #E91E63, #9C27B0);
            --secondary: #5A5A5A;
            --light-bg: #FDF8F8;
            --text-dark: #2D3748;
            --text-light: #718096;
            --shadow: 0 8px 30px rgba(214, 51, 132, 0.15);
            --border-radius: 20px;
            --success: #48BB78;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #FFF 0%, #FDF8F8 100%);
            color: var(--text-dark);
            line-height: 1.6;
            min-height: 100vh;
        }

        /* Шапка как в чате */
        .header {
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            padding: 15px 25px;
            margin-bottom: 20px;
            border: 1px solid rgba(214, 51, 132, 0.1);
            max-width: 1400px;
            margin-left: auto;
            margin-right: auto;
            width: 100%;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1400px;
            margin: 0 auto;
        }

        .logo {
            font-size: 1.3rem;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 10px;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .logo a {
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 10px;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .logo i {
            font-size: 1.5rem;
        }

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

        .nav-link {
            color: var(--text-dark);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            padding: 8px 16px;
            border-radius: 12px;
            white-space: nowrap;
        }

        .nav-link:hover {
            color: var(--primary);
            background: rgba(214, 51, 132, 0.05);
        }

        .nav-link.active {
            color: var(--primary);
            background: rgba(214, 51, 132, 0.08);
        }

        .auth-links {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .login-link {
            color: var(--text-dark);
            text-decoration: none;
            font-weight: 500;
            padding: 8px 16px;
            border-radius: 10px;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            white-space: nowrap;
        }

        .login-link:hover {
            background: rgba(214, 51, 132, 0.05);
            color: var(--primary);
        }

        .register-link {
            background: var(--primary-gradient);
            color: white;
            text-decoration: none;
            font-weight: 600;
            padding: 10px 20px;
            border-radius: 10px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(214, 51, 132, 0.25);
            font-size: 0.9rem;
            white-space: nowrap;
        }

        .register-link:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(214, 51, 132, 0.35);
        }

        /* Мобильное меню */
        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--text-dark);
            cursor: pointer;
            padding: 5px;
        }

        .mobile-menu {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: white;
            z-index: 2000;
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
        }

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

        .mobile-menu-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 25px 20px;
            background: linear-gradient(135deg, #D63384 0%, #E91E63 50%, #9C27B0 100%);
            color: white;
            position: relative;
            overflow: hidden;
        }

        .mobile-menu-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
        }

        .mobile-menu-logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: bold;
            font-size: 1.3rem;
            color: white;
            position: relative;
            z-index: 1;
        }

        .mobile-menu-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            font-size: 1.5rem;
            color: white;
            cursor: pointer;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            position: relative;
            z-index: 1;
        }

        .mobile-menu-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .mobile-menu-content {
            flex: 1;
            padding: 20px;
            background: white;
        }

        .mobile-menu-section {
            margin-bottom: 30px;
        }

        .mobile-menu-section-title {
            font-weight: 600;
            margin-bottom: 15px;
            color: var(--text-dark);
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 10px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--primary-light);
        }

        .mobile-menu-section-title::before {
            content: '';
            width: 4px;
            height: 20px;
            background: var(--primary-gradient);
            border-radius: 2px;
        }

        .mobile-menu-link {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            color: var(--text-dark);
            text-decoration: none;
            transition: all 0.3s ease;
            border: none;
            background: white;
            width: 100%;
            text-align: left;
            font-size: 1rem;
            border-radius: 12px;
            margin-bottom: 8px;
            border: 1px solid #f0f0f0;
            position: relative;
            overflow: hidden;
        }

        .mobile-menu-link::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 0;
            background: var(--primary-gradient);
            transition: width 0.3s ease;
            z-index: 0;
        }

        .mobile-menu-link:hover {
            transform: translateX(5px);
            border-color: var(--primary-light);
            box-shadow: 0 4px 15px rgba(214, 51, 132, 0.1);
        }

        .mobile-menu-link:hover::before {
            width: 4px;
        }

        .mobile-menu-link.active {
            background: linear-gradient(135deg, rgba(214, 51, 132, 0.05) 0%, rgba(233, 30, 99, 0.05) 100%);
            border-color: var(--primary);
            color: var(--primary);
            font-weight: 600;
        }

        .mobile-menu-link.active::before {
            width: 4px;
        }

        .mobile-menu-link i {
            width: 20px;
            text-align: center;
            position: relative;
            z-index: 1;
            color: var(--primary);
        }

        .mobile-menu-link span {
            position: relative;
            z-index: 1;
        }

        .mobile-menu-link.active i {
            color: var(--primary);
        }

        /* Основной контент */
        .main-content {
            max-width: 1400px;
            margin: 0 auto 40px;
            padding: 0 20px;
        }

        /* Объединенный блок героя, создания персонажа и фильтров */
        .hero-container {
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            margin-bottom: 40px;
            border: 1px solid rgba(214, 51, 132, 0.1);
            overflow: hidden;
            position: relative;
        }

        .hero-gradient-top {
            background: var(--primary-gradient);
            padding: 40px;
            text-align: center;
            color: white;
            position: relative;
            overflow: hidden;
        }

        .hero-gradient-top::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Q50,80 0,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
            background-size: cover;
        }

        .hero-title {
            font-size: 3rem;
            font-weight: 800;
            margin-bottom: 16px;
            position: relative;
            z-index: 1;
            line-height: 1.1;
        }

        .hero-subtitle {
            font-size: 1.3rem;
            margin-bottom: 30px;
            opacity: 0.95;
            position: relative;
            z-index: 1;
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
        }

        .hero-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
            position: relative;
            z-index: 1;
        }

        .hero-btn {
            padding: 14px 28px;
            border-radius: 25px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
            border: none;
        }

        .hero-btn-primary {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .hero-btn-primary:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        }

        .hero-btn-secondary {
            background: white;
            color: var(--primary);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .hero-btn-secondary:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }

        .hero-content-bottom {
            padding: 40px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            align-items: start;
        }

        .create-character-card {
            background: linear-gradient(135deg, rgba(214, 51, 132, 0.03) 0%, rgba(233, 30, 99, 0.03) 100%);
            border-radius: var(--border-radius);
            padding: 30px;
            border: 1px solid rgba(214, 51, 132, 0.1);
            position: relative;
            overflow: hidden;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .create-character-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--primary-gradient);
        }

        .create-character-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 15px;
            color: var(--text-dark);
        }

        .create-character-description {
            font-size: 1rem;
            color: var(--text-light);
            margin-bottom: 25px;
            line-height: 1.6;
        }

        .character-features {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 25px;
        }

        .character-feature {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 10px;
            border: 1px solid rgba(214, 51, 132, 0.1);
        }

        .character-feature i {
            width: 24px;
            height: 24px;
            background: var(--primary-gradient);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.9rem;
            flex-shrink: 0;
        }

        .character-feature span {
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-dark);
        }

        .create-character-btn {
            background: var(--primary-gradient);
            color: white;
            border: none;
            padding: 14px 24px;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 15px rgba(214, 51, 132, 0.3);
            width: 100%;
            justify-content: center;
        }

        .create-character-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(214, 51, 132, 0.4);
        }

        .search-filters-card {
            background: white;
            border-radius: var(--border-radius);
            padding: 30px;
            border: 1px solid rgba(214, 51, 132, 0.1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            height: 100%;
        }

        .search-filters-title {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 20px;
            color: var(--text-dark);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .search-filters-title i {
            color: var(--primary);
        }

        .search-filters-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 15px;
            margin-bottom: 20px;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
        }

        .filter-label {
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-dark);
            font-size: 0.95rem;
        }

        .filter-input, .filter-select {
            padding: 12px 16px;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            background: white;
            color: var(--text-dark);
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .filter-input:focus, .filter-select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.1);
        }

        /* Теги */
        .tags-section {
            margin-top: 20px;
        }

        .tags-title {
            font-weight: 600;
            margin-bottom: 12px;
            color: var(--text-dark);
            font-size: 0.95rem;
        }

        .tags-container {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            max-height: 120px;
            overflow-y: auto;
            padding: 15px;
            background: rgba(214, 51, 132, 0.03);
            border-radius: 12px;
            border: 1px solid rgba(214, 51, 132, 0.1);
        }

        .tag-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 20px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.3s ease;
            color: var(--text-dark);
        }

        .tag-item:hover {
            background: rgba(214, 51, 132, 0.05);
            border-color: var(--primary-light);
        }

        .tag-item.active {
            background: var(--primary-gradient);
            color: white;
            border-color: var(--primary);
        }

        .tag-checkbox {
            width: 18px;
            height: 18px;
            border: 2px solid #e2e8f0;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .tag-item.active .tag-checkbox {
            background: white;
            border-color: white;
        }

        .tag-item.active .tag-checkbox::after {
            content: '✓';
            color: var(--primary);
            font-size: 12px;
            font-weight: bold;
        }

        /* Кнопка сброса */
        .reset-filters-btn {
            background: var(--primary-gradient);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 20px auto 0;
            box-shadow: 0 4px 15px rgba(214, 51, 132, 0.3);
            width: 100%;
            justify-content: center;
        }

        .reset-filters-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(214, 51, 132, 0.4);
        }

        /* Сетка персонажей */
        .characters-section {
            margin-bottom: 60px;
        }

        .section-title {
            text-align: center;
            font-size: 2.2rem;
            font-weight: 700;
            margin-bottom: 10px;
            color: var(--text-dark);
        }

        .section-subtitle {
            text-align: center;
            font-size: 1.1rem;
            color: var(--text-light);
            margin-bottom: 40px;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .characters-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 25px;
        }

        .character-card {
            background: white;
            border-radius: var(--border-radius);
            padding: 25px;
            box-shadow: var(--shadow);
            border: 1px solid rgba(214, 51, 132, 0.1);
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .character-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(214, 51, 132, 0.2);
        }

        .character-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--primary-gradient);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

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

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

        .character-avatar {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: var(--primary-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border: 3px solid white;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            flex-shrink: 0;
        }

        .character-avatars {
            display: flex;
            gap: 10px;
        }

        .character-avatars .character-avatar {
            width: 60px;
            height: 60px;
            border: 3px solid white;
        }

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

        .character-info {
            flex: 1;
            min-width: 0;
        }

        .character-name {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 5px;
            word-wrap: break-word;
        }

        .character-gender {
            font-size: 0.9rem;
            color: var(--text-light);
            display: flex;
            align-items: center;
            gap: 5px;
            margin-bottom: 8px;
        }

        .character-messages {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.85rem;
            color: var(--text-light);
        }

        .character-description {
            font-size: 0.95rem;
            color: var(--text-light);
            line-height: 1.5;
            margin-bottom: 15px;
        }

        .character-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }

        .character-tag {
            background: rgba(214, 51, 132, 0.1);
            color: var(--primary);
            padding: 4px 8px;
            border-radius: 10px;
            font-size: 0.75rem;
            font-weight: 500;
        }

        /* Кнопка "Показать еще" */
        .load-more-btn {
            background: var(--primary-gradient);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 25px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 30px auto;
            box-shadow: 0 4px 15px rgba(214, 51, 132, 0.3);
            width: 200px;
            justify-content: center;
        }

        .load-more-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(214, 51, 132, 0.4);
        }

        .load-more-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* Состояние пустого результата */
        .empty-state {
            text-align: center;
            padding: 50px 20px;
            color: var(--text-muted);
            grid-column: 1 / -1;
        }



        .empty-state h3 {
            font-size: 1.3rem;
            margin-bottom: 10px;
            color: var(--text-dark);
        }

        .empty-state p {
            font-size: 1rem;
            margin-bottom: 20px;
        }

        /* Футер */
        .footer {
            background: linear-gradient(135deg, #2D3748 0%, #4A5568 100%);
            color: white;
            padding: 50px 20px 30px;
            margin-top: 60px;
        }

        .footer-content {
            max-width: 1400px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 40px;
            margin-bottom: 30px;
        }

        .footer-section h3 {
            font-size: 1.2rem;
            margin-bottom: 20px;
            color: white;
        }

        .footer-links {
            list-style: none;
        }

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

        .footer-links a {
            color: #CBD5E0;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer-links a:hover {
            color: white;
        }

        .footer-bottom {
            max-width: 1400px;
            margin: 0 auto;
            text-align: center;
            padding-top: 30px;
            border-top: 1px solid #4A5568;
            color: #CBD5E0;
            font-size: 0.9rem;
        }

        /* Адаптивность */
        @media (max-width: 1024px) {
            .hero-title {
                font-size: 2.5rem;
            }
        }

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

            .mobile-menu-btn {
                display: block;
            }
        }

        @media (max-width: 768px) {
            .header {
                padding: 12px 20px;
            }

            .header-content {
                flex-direction: row;
                justify-content: space-between;
                gap: 0;
            }

            .logo {
                font-size: 1.2rem;
            }

            .logo i {
                font-size: 1.3rem;
            }

            .hero-gradient-top {
                padding: 30px 20px;
            }

            .hero-title {
                font-size: 2.2rem;
            }

            .hero-subtitle {
                font-size: 1.1rem;
            }

            .hero-content-bottom {
                grid-template-columns: 1fr;
                padding: 30px 20px;
                gap: 30px;
            }

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

            .character-header {
                flex-direction: column;
                text-align: center;
                gap: 10px;
            }

            .character-avatar {
                width: 80px;
                height: 80px;
            }

            .character-avatars .character-avatar {
                width: 70px;
                height: 70px;
            }
        }

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

            .section-title {
                font-size: 1.8rem;
            }

            .character-card {
                padding: 20px;
            }

            .hero-actions {
                flex-direction: column;
                align-items: center;
            }

            .hero-btn {
                width: 100%;
                max-width: 280px;
                justify-content: center;
            }
        }

        /* Дополнительные стили для хедера */
.profile-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.profile-link:hover {
    background: rgba(214, 51, 132, 0.05);
    color: var(--primary);
}

.logout-icon {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.logout-icon:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    transform: scale(1.1);
}
