        /* CSS Reset */
        *, *::before, *::after { box-sizing: border-box; }
        * { margin: 0; padding: 0; border: none; }
        ul[class], ol[class] { list-style: none; padding: 0; }
        body, h1, h2, h3, h4, p, ul[class], ol[class], li, figure, figcaption, blockquote, dl, dd { margin: 0; }
        body { min-height: 100vh; scroll-behavior: smooth; text-rendering: optimizeSpeed; line-height: 1.5; }
        img { max-width: 100%; display: block; }
        input, button, textarea, select { font: inherit; }

        :root {
            --accent-color: #7F3CBF;
            --header-bg: #262833;
            --text-primary: #f0f0f0;
            --text-secondary: #d0d0d0;
            --bg-dark: rgba(20, 20, 22, 0.85);
            --bg-card: rgba(40, 40, 42, 0.9);
        }

        body {
            font-family: Arial, sans-serif;
            background: url('images/background.webp') no-repeat center center fixed;
            background-size: cover;
            color: var(--text-primary);
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            min-width: 360px;
        }

        .container {
            background-color: var(--bg-dark);
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        header {
            height: 16.67vh;
            min-height: 80px;
            max-height: 120px;
            display: flex;
            align-items: center;
            padding: 0 clamp(15px, 5vw, 80px);
            background-color: var(--header-bg);
            border-bottom: 2px solid var(--accent-color);
            flex-shrink: 0;
        }

        .header-content {
            display: flex;
            align-items: center;
            gap: clamp(10px, 3vw, 20px);
            width: 100%;
        }

        .header-icon {
            width: clamp(35px, 8vh, 60px);
            height: clamp(35px, 8vh, 60px);
            flex-shrink: 0;
            background: var(--header-bg) url('images/logo/conversejs-gold-gradient.svg') no-repeat center center;
            background-size: contain;
            border-radius: 50%;
            border: 1.4px solid var(--accent-color);
        }

        .header-text {
            flex: 1;
            min-width: 0;
        }

        h1 {
            font-size: clamp(1.4em, 4vw, 2.2em);
            margin-bottom: 0.2em;
            color: var(--text-primary);
            line-height: 1.2;
            word-wrap: break-word;
        }

        h2 {
            font-size: clamp(1em, 2.5vw, 1.4em);
            color: var(--text-secondary);
            font-weight: normal;
            line-height: 1.2;
        }

        main {
            flex: 1;
            padding: clamp(15px, 3vh, 30px) clamp(15px, 5vw, 80px);
            display: flex;
            flex-direction: column;
            gap: clamp(8px, 1.5vh, 15px);
            overflow: hidden;
        }

        /* Правильное обтекание иконки */
        .description {
            line-height: 1.6;
            position: relative;
            min-height: 3.2em;
            margin-bottom: 0.7em;
        }

        .xmpp-icon {
            float: left;
            width: 3.2em;
            height: 3.2em;
            shape-margin: 0.75em;
            margin: 0.2em 0.8em 0.2em 0;
            background: var(--header-bg) url('images/logo/xmpp.svg') no-repeat center center;
            background-size: contain;
            border: 1.4px solid var(--accent-color);
            border-radius: 6px;
            shape-outside: margin-box;
        }

        .description-text {
            display: flow-root;
            font-size: clamp(0.8em, 2vw, 1em);
        }

        .description-text p {
            margin-bottom: 0.4em;
        }

        .description-chat {
            line-height: 1.6;
            position: relative;
            min-height: 3.2em;
            margin-bottom: 0.7em;
        }

        .description-chat-text {
            display: flow-root;
            font-size: clamp(0.8em, 2vw, 1em);
        }

        .description-chat-text p {
            margin-bottom: 0.4em;
        }

        .clients-section h3 {
            font-size: clamp(1.1em, 2.5vw, 1.3em);
            margin-bottom: 0.5em;
        }

        .clients-list {
            list-style: none;
            display: flex;
            flex-wrap: wrap;
            gap: clamp(8px, 1.5vw, 15px);
        }

        .clients-list a {
            color: var(--accent-color);
            text-decoration: none;
            padding: clamp(5px, 1vh, 8px) clamp(10px, 2vw, 15px);
            border: 1px solid var(--accent-color);
            border-radius: 4px;
            transition: all 0.3s ease;
            font-size: clamp(0.8em, 1.8vw, 0.9em);
            white-space: nowrap;
        }

        .clients-list a:hover {
            background-color: var(--accent-color);
            color: #FFCEFE;
        }

        .content-section {
            display: flex;
            flex-direction: column;
            gap: clamp(10px, 2vh, 20px);
            flex: 1;
            overflow: hidden;
            min-height: 0;
        }

        .scroll-frame {
            flex: 1;
            overflow-y: auto;
            padding: clamp(10px, 2vh, 15px);
            background-color: var(--bg-card);
            border-radius: 4px;
            border: 1px solid rgba(127, 60, 191, 0.3);
            min-height: 120px;
        }

        .legacy-info {
            line-height: 1.6;
            font-size: clamp(0.85em, 1.8vw, 0.95em);
        }

        .legacy-info h4 {
            margin-bottom: 0.8em;
            font-size: clamp(1em, 2.2vw, 1.1em);
        }

        .legacy-info p {
            margin-bottom: 0.8em;
        }

        .spoiler {
            margin-bottom: 0;
            flex-shrink: 0;
        }

        .spoiler-summary {
            cursor: pointer;
            padding: clamp(10px, 2vh, 12px) clamp(12px, 2vw, 15px);
            background-color: rgba(50, 50, 52, 0.8);
            border-radius: 4px;
            user-select: none;
            display: flex;
            align-items: center;
            border-left: 3px solid var(--accent-color);
            transition: all 0.3s ease;
            font-size: clamp(0.9em, 2vw, 1em);
        }

        .spoiler-summary:hover {
            background-color: rgba(60, 60, 62, 0.9);
        }

        .spoiler-summary::before {
            content: "▶";
            margin-right: 10px;
            font-size: 0.8em;
            transition: transform 0.3s ease;
            color: var(--accent-color);
        }

        .spoiler-summary.active::before {
            transform: rotate(90deg);
        }

        .spoiler-content {
            padding: clamp(10px, 2vh, 15px);
            background-color: var(--bg-card);
            border-radius: 0 0 4px 4px;
            border-left: 3px solid var(--accent-color);
            border-right: 1px solid rgba(240, 240, 240, 0.1);
            border-bottom: 1px solid rgba(240, 240, 240, 0.1);
            max-height: 40vh;
            overflow-y: auto;
            display: none;
        }

        .spoiler-content.open {
            display: block;
        }

        .websocket-list {
            list-style: none;
            line-height: 1.6;
        }

        .websocket-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: clamp(5px, 0.8vh, 6px) 0;
            border-bottom: 1px solid rgba(240, 240, 240, 0.1);
            gap: 10px;
        }

        .websocket-address {
            flex: 1;
            font-family: monospace;
            font-size: clamp(0.8em, 1.8vw, 0.9em);
            word-break: break-all;
        }

        .copy-btn {
            background-color: var(--accent-color);
            color: white;
            border: none;
            padding: clamp(4px, 1vh, 5px) clamp(8px, 1.5vw, 10px);
            border-radius: 3px;
            cursor: pointer;
            font-size: clamp(0.7em, 1.6vw, 0.8em);
            transition: background-color 0.3s ease;
            white-space: nowrap;
        }

        .copy-btn:hover {
            background-color: #6a2fa3;
        }

        footer {
            height: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 5px;
            background-color: var(--header-bg);
            font-size: clamp(0.7em, 1.8vw, 0.9em);
            color: #a0a0a0;
            border-top: 2px solid var(--accent-color);
            flex-shrink: 0;
        }

        /* Стили для скроллбара */
        .scroll-frame::-webkit-scrollbar,
        .spoiler-content::-webkit-scrollbar {
            width: 8px;
        }

        .scroll-frame::-webkit-scrollbar-track,
        .spoiler-content::-webkit-scrollbar-track {
            background: var(--bg-card);
        }

        .scroll-frame::-webkit-scrollbar-thumb,
        .spoiler-content::-webkit-scrollbar-thumb {
            background: var(--accent-color);
            border-radius: 4px;
        }

/* Стили для статьи о Jabber - не влияют на другие блоки */
.jabber-article {
    line-height: 1.3;
    font-size: clamp(0.85em, 1.8vw, 0.95em);
}

.jabber-article h4 {
    margin-bottom: 1em;
    font-size: clamp(1em, 2.2vw, 1.1em);
    color: #B48CED;
    border-bottom: 1px solid rgba(127, 60, 191, 0.3);
    padding-bottom: 0.5em;
}

.jabber-article .history-item {
    margin-bottom: 1.2em;
}

.history-man-item {
    margin-bottom: 0.8em;
}

.history-man-item p {
    margin-bottom: 0.5em;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(127, 60, 191, 0.3);
    padding-bottom: 0.6em;
}

.history-man-item h4 {
    margin-bottom: 0.2em;
    font-size: clamp(1em, 2.2vw, 1.1em);
    color: #B48CED;
    padding-bottom: 0.2em;
}

.jabber-article .history-item h5 {
    margin-bottom: 0.8em;
    font-size: clamp(0.95em, 2vw, 1.05em);
    color: var(--text-primary);
    font-weight: bold;
}

.jabber-article .feature-list {
    list-style: none;
    padding-left: 1.2em;
    margin: 0.8em 0;
}

.jabber-article .feature-list li {
    position: relative;
    margin-bottom: 0.6em;
    padding-left: 0.5em;
    line-height: 1.3;
}

.jabber-article .feature-list li::before {
    content: "▪";
    position: absolute;
    left: -1em;
    color: var(--accent-color);
    font-size: 1.2em;
}

.jabber-article .feature-title {
    font-weight: bold;
    color: #B48CED;
}

.jabber-article .conclusion {
    margin-top: 1.5em;
    padding: 1em;
    background-color: rgba(127, 60, 191, 0.1);
    border-left: 3px solid var(--accent-color);
    border-radius: 0 4px 4px 0;
}

.jabber-article .conclusion p {
    margin: 0;
    font-style: italic;
}

/* Улучшенные отступы для статьи */
.jabber-article p {
    margin-bottom: 0.8em;
    text-align: justify;
}

/* Сохраняем оригинальные стили для legacy-info */
/*.legacy-info {
    line-height: 1.6;
    font-size: clamp(0.85em, 1.8vw, 0.95em);
}

.legacy-info h4 {
    margin-bottom: 0.8em;
    font-size: clamp(1em, 2.2vw, 1.1em);
}

.legacy-info p {
    margin-bottom: 0.8em;
}*/

        /* Мобильная адаптация */
        @media (max-width: 768px) and (orientation: portrait) {
            header {
                height: auto;
                min-height: 70px;
                padding: 10px 15px;
            }

            .header-content {
                align-items: center;
            }

            .header-icon {
                width: 40px;
                height: 40px;
            }

            main {
                padding: 10px;
                gap: 15px;
            }

            .description {
                min-height: 2.8em;
            }

            .xmpp-icon {
                width: 2.8em;
                height: 2.8em;
            }

            .clients-list {
                justify-content: center;
            }

            .websocket-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 5px;
            }

            .copy-btn {
                align-self: flex-end;
            }
        }

        @media (max-height: 600px) {
            header {
                height: auto;
                min-height: 60px;
                padding: 8px 15px;
            }

            main {
                padding: 10px 15px;
                gap: 10px;
            }

            .spoiler-content {
                max-height: 30vh;
            }
        }

        @media (max-width: 400px) {
            .header-content {
                flex-direction: column;
                text-align: center;
                gap: 5px;
            }

            .header-icon {
                margin: 0 auto;
            }

            .description {
                display: flex;
                flex-direction: column;
            }

            .xmpp-icon {
                float: none;
                align-self: flex-start;
                margin-bottom: 10px;
            }
        }

