@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
        
:root {
    --neon-purple: #a855f7;
    --neon-cyan: #06b6d4;
    --neon-pink: #ec4899;
    --neon-blue: #3b82f6;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --card-bg: #13131f;
    --card-hover: #1a1a2e;
    --sidebar-bg: #0f0f16;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(168, 85, 247, 0.15);
    --glow-purple: 0 0 20px rgba(168, 85, 247, 0.4);
    --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.4);
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--darker-bg);
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-purple);
}

/* Neon Glow Effects */
.neon-text {
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5), 0 0 20px rgba(168, 85, 247, 0.3);
}

.neon-border {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2), inset 0 0 15px rgba(168, 85, 247, 0.1);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--darker-bg) 100%);
    border-right: 1px solid var(--border-color);
    z-index: 100;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, transparent 100%);
    flex-shrink: 0;
}

.nav-category {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid transparent;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-category:hover {
    background: rgba(168, 85, 247, 0.1);
    color: var(--text-primary);
    border-color: rgba(168, 85, 247, 0.2);
}

.nav-category.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: var(--neon-purple);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.nav-category i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.nav-count {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 2px 8px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    color: var(--neon-purple);
    font-weight: 600;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--glow-purple);
    touch-action: manipulation;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    width: calc(100% - 260px);
}

.main-content.expanded {
    margin-left: 0;
    width: 100%;
}

/* Header */
.tech-header {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    padding: 3rem 1.5rem;
}

.tech-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-purple), var(--neon-cyan), transparent);
}

.gradient-text {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-cyan) 50%, var(--neon-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Search Bar */
.tech-search {
    background: rgba(19, 19, 31, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.tech-search:focus-within {
    border-color: var(--neon-purple);
    box-shadow: var(--glow-purple);
}

/* AI Cards */
.ai-card {
    background: linear-gradient(145deg, rgba(19, 19, 31, 0.9) 0%, rgba(15, 15, 22, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.ai-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, transparent 50%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.ai-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.2), 0 0 0 1px rgba(168, 85, 247, 0.3);
}

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

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.ai-card:hover .card-glow {
    opacity: 1;
}

/* Type Badges */
.type-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.type-website {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.type-app {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.type-extension {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.9));
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Tags */
.tech-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.1);
    color: var(--neon-purple);
    transition: all 0.2s;
    display: inline-block;
}

.tech-tag:hover {
    background: rgba(168, 85, 247, 0.2);
    transform: translateY(-1px);
}

.tech-tag.cyan {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.1);
    color: var(--neon-cyan);
}

.tech-tag.green {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* Limitations Box */
.limitations-box {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left: 3px solid #fbbf24;
    border-radius: 0 12px 12px 0;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Buttons */
.tech-btn {
    background: linear-gradient(135deg, var(--neon-purple) 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.tech-btn::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;
}

.tech-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-purple);
}

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

.tech-btn:active {
    transform: translateY(0);
}

/* Support Button */
.support-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    touch-action: manipulation;
}

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

.support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

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

/* Favorites */
.fav-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.fav-btn:hover {
    background: rgba(236, 72, 153, 0.2);
    transform: scale(1.1) rotate(5deg);
}

.fav-btn.active {
    background: rgba(236, 72, 153, 0.3);
    color: var(--neon-pink);
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
}

/* Unity Assets Section */
.unity-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(19, 19, 31, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.unity-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff6b00, #ffb700, transparent);
}

.unity-card {
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.1) 0%, rgba(19, 19, 31, 0.9) 100%);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 16px;
    transition: all 0.3s ease;
    padding: 1.5rem;
}

.unity-card:hover {
    transform: translateY(-5px);
    border-color: #ff6b00;
    box-shadow: 0 15px 30px rgba(255, 107, 0, 0.2);
}

.unity-badge {
    background: linear-gradient(135deg, #ff6b00, #ffb700);
    color: black;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a2e, #13131f);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* AdBlock Modal */
.adblock-modal {
    border: 2px solid #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.3), 0 0 60px rgba(239, 68, 68, 0.1);
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: #ef4444; box-shadow: 0 0 30px rgba(239, 68, 68, 0.3); }
    50% { border-color: #fbbf24; box-shadow: 0 0 40px rgba(251, 191, 36, 0.4); }
}

.adblock-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: shake 0.5s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

@keyframes shake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Login Button */
.login-btn {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    color: var(--neon-purple);
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.login-btn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
    border-color: var(--neon-purple);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
}

/* Code Block */
.code-block {
    background: #1e1e2e;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.code-header {
    background: rgba(168, 85, 247, 0.1);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* RTB Ad Containers */
.rtb-ad-container {
    min-height: 280px;
    width: 100%;
    display: block;
}

.rtb-ad-container.between-cards {
    grid-column: 1 / -1;
    min-height: 280px;
    margin: 20px 0;
}

.rtb-ad-container.above-search {
    max-width: 728px;
    min-height: 90px;
    margin: 0 auto 20px;
}

.rtb-ad-container.corner {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 300px;
    min-height: 280px;
    z-index: 50;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Filter Chips */
.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border: none;
    outline: none;
}

.filter-chip:hover, .filter-chip.active {
    background: rgba(168, 85, 247, 0.2);
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

/* Service Counter */
.service-counter {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: 600;
    color: var(--neon-purple);
    white-space: nowrap;
}

/* Support Author Button */
.support-author-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 28px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: pulse 2s infinite;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.support-author-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   ШЕФ ИИшница v5 — TOP RIGHT + FIXED AVATARS + WORKING BUTTONS
   ═══════════════════════════════════════════════════════════ */

/* AVATAR CROP — для Шефа в чате (без сковороды, только лицо) */
.bubble-avatar-crop {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6), 0 0 20px rgba(168, 85, 247, 0.3);
    flex-shrink: 0;
    background: var(--dark-bg);
    position: relative;
}

.bubble-avatar-crop img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    object-position: center 10%;
    position: absolute;
    top: -10%;
    left: -10%;
}

.bubble-avatar-crop.lg {
    width: 44px;
    height: 44px;
}

/* Главная аватарка — на всю аву, белый фон как прозрачный (mix-blend-mode) */
.agent-avatar-main {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center center;
    border: 3px solid var(--neon-cyan);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6), 0 0 60px rgba(168, 85, 247, 0.3);
    flex-shrink: 0;
    display: block;
    /* Белый фон прозрачный: умножается на фон страницы */
    mix-blend-mode: multiply;
    filter: contrast(1.08) saturate(1.1);
}

/* Контейнер логотипа — прозрачный фон, аватар на весь круг */
.logo-container {
    position: relative;
    display: inline-block;
    width: clamp(80px, 20vw, 130px);
    height: clamp(80px, 20vw, 130px);
    padding: 0;
    background: transparent;
    border-radius: 50%;
    overflow: hidden;
}

.logo-container::before {
    content: '';
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(6, 182, 212, 0.2) 40%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

/* FLOATING TOGGLE BUTTON — ВВЕРХУ СПРАВА */
.agent-float-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f16 100%);
    border: 2px solid rgba(168, 85, 247, 0.6);
    border-radius: 50px;
    padding: 8px 18px 8px 8px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(168, 85, 247, 0.4);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.agent-float-btn:hover {
    transform: translateY(2px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 30px rgba(168,85,247,0.6);
    border-color: var(--neon-purple);
}

.agent-float-btn:active {
    transform: translateY(1px) scale(0.98);
}

.agent-float-btn.chat-open {
    padding: 8px;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    justify-content: center;
}

.agent-float-btn.chat-open .agent-float-label,
.agent-float-btn.chat-open .agent-float-avatar {
    display: none;
}

.agent-float-btn.chat-open .agent-float-close-x {
    display: flex;
}

.agent-float-avatar {
    flex-shrink: 0;
    pointer-events: none;
}

.agent-float-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    pointer-events: none;
}

.agent-float-close-x {
    display: none;
    font-size: 1.2rem;
    color: #94a3b8;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Бейдж непрочитанных */
.agent-unread-badge {
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--neon-pink);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--dark-bg);
    animation: pulse 2s infinite;
    pointer-events: none;
}

/* FLOATING PANEL — чат сверху справа */
.agent-float-panel {
    position: fixed;
    top: 85px;
    right: 20px;
    z-index: 9998;
    width: min(400px, calc(100vw - 40px));
    max-height: calc(100vh - 100px);
    background: linear-gradient(145deg, #1a1a2e 0%, #13131f 100%);
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.8), 0 0 40px rgba(168,85,247,0.2);
    transform: scale(0.9) translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    transform-origin: top right;
}

.agent-float-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan), var(--neon-purple));
    animation: shimmer 3s infinite;
}

.agent-float-panel.panel-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* CHAT HEADER */
.agent-float-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid rgba(168,85,247,0.2);
    background: rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.agent-float-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    margin: 0;
}

.agent-float-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin: 2px 0 0 0;
}

.agent-float-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    margin-left: auto;
}

.agent-float-close-btn:hover {
    background: rgba(168,85,247,0.25);
    color: white;
    border-color: var(--neon-purple);
}

/* ONLINE DOT */
.agent-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.agent-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #13131f;
    animation: pulse 2s infinite;
}

/* MESSAGES AREA */
.agent-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    max-height: 400px;
}

.agent-messages::-webkit-scrollbar { 
    width: 4px; 
}
.agent-messages::-webkit-scrollbar-thumb { 
    background: rgba(168,85,247,0.4); 
    border-radius: 2px; 
}

/* AGENT bubble */
.agent-bubble {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeInUp 0.3s ease forwards;
    max-width: 100%;
}

.bubble-content {
    background: linear-gradient(135deg, rgba(168,85,247,0.15) 0%, rgba(6,182,212,0.1) 100%);
    border: 1px solid rgba(168,85,247,0.3);
    border-radius: 4px 18px 18px 18px;
    padding: 12px 16px;
    color: #f1f5f9;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: calc(100% - 50px);
    word-wrap: break-word;
}

/* USER bubble */
.user-bubble {
    display: flex;
    justify-content: flex-end;
    animation: fadeInUp 0.25s ease forwards;
    max-width: 100%;
}

.user-bubble-content {
    background: linear-gradient(135deg, var(--neon-purple), #7c3aed);
    border-radius: 18px 4px 18px 18px;
    padding: 12px 16px;
    color: white;
    font-size: 0.9rem;
    max-width: 80%;
    box-shadow: 0 4px 15px rgba(168,85,247,0.3);
    word-wrap: break-word;
}

/* TYPING dots */
.agent-typing {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeInUp 0.25s ease forwards;
}

.typing-dots {
    display: flex;
    gap: 5px;
    align-items: center;
    background: rgba(168,85,247,0.12);
    border: 1px solid rgba(168,85,247,0.25);
    border-radius: 4px 18px 18px 18px;
    padding: 14px 18px;
    min-width: 60px;
}

.typing-dots span {
    width: 8px; 
    height: 8px;
    border-radius: 50%;
    background: var(--neon-purple);
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%,80%,100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* CHIPS */
.agent-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 4px 50px;
}

.agent-chips span {
    background: rgba(168,85,247,0.12);
    border: 1px solid rgba(168,85,247,0.3);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.agent-chips span:hover {
    background: rgba(168,85,247,0.25);
    color: white;
    transform: translateY(-1px);
    border-color: var(--neon-purple);
}

/* RECOMMENDATION tags */
.rec-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(6,182,212,0.15);
    border: 1px solid rgba(6,182,212,0.35);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.78rem;
    color: var(--neon-cyan);
    font-weight: 600;
    margin: 2px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.rec-tag:hover {
    background: rgba(6,182,212,0.25);
}

/* INPUT AREA */
.agent-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid rgba(168,85,247,0.15);
    background: rgba(0,0,0,0.25);
    flex-shrink: 0;
}

.agent-input {
    flex: 1;
    background: rgba(19,19,31,0.95);
    border: 2px solid rgba(168,85,247,0.25);
    border-radius: 14px;
    padding: 12px 16px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    min-width: 0;
}

.agent-input:focus {
    border-color: var(--neon-purple);
    box-shadow: 0 0 16px rgba(168,85,247,0.25);
}

.agent-input::placeholder { 
    color: #475569; 
}

.agent-send-btn {
    width: 44px; 
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    border: none; 
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.agent-send-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(168,85,247,0.5);
}

.agent-send-btn:active {
    transform: translateY(0) scale(0.95);
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    .rtb-ad-container.corner {
        display: none;
    }
    
    .agent-float-btn {
        top: 16px;
        right: 16px;
    }
    
    .agent-float-panel {
        top: 75px;
        right: 16px;
        width: calc(100vw - 32px);
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .tech-header {
        padding: 2.5rem 1rem 1.5rem;
    }
    
    .tech-header h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .tech-header p {
        font-size: 0.95rem;
    }
    
    #cardsContainer {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sticky.top-0 {
        padding: 0.75rem;
    }
    
    .filter-chip {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .login-btn span { 
        display: none; 
    }
    
    .ai-card {
        margin: 0;
    }
    
    .unity-section {
        padding: 1.25rem;
    }
    
    .unity-section .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .support-author-btn {
        bottom: 16px;
        right: 16px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .agent-float-panel {
        max-height: calc(100vh - 90px);
    }
    
    .agent-messages {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .tech-header h1 {
        font-size: 1.75rem;
    }
    
    .unity-section .grid {
        grid-template-columns: 1fr;
    }
    
    .filter-chip:nth-child(n+4) {
        display: none;
    }
    
    .agent-float-btn {
        padding: 6px 12px 6px 6px;
    }
    
    .agent-float-label {
        font-size: 0.8rem;
    }
    
    .bubble-content,
    .user-bubble-content {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
    
    .agent-chips {
        padding-left: 46px;
    }
    
    .agent-chips span {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

/* Utility classes */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hidden {
    display: none !important;
}