@font-face {
    font-weight: 400; /* Соответствует значению normal */
    font-family: "Lucida Grande";
    src: url("fonts/LucidaGrande/lucidagrande.ttf");
}
@font-face {
    font-weight: 700; /* Соответствует значению bold */
    font-family: "Lucida Grande";
    src: url("fonts/LucidaGrande/lucidagrande_bold.ttf");
}

@font-face {
    font-weight: 400;
    font-style: normal;
    font-family: "Anonymous Pro";
    src: url("fonts/AnonymousPro/AnonymousPro-Regular.ttf");
}
@font-face {
    font-weight: 400;
    font-style: italic;
    font-family: "Anonymous Pro";
    src: url("fonts/AnonymousPro/AnonymousPro-Italic.ttf");
}
@font-face {
    font-weight: 700;
    font-style: normal;
    font-family: "Anonymous Pro";
    src: url("fonts/AnonymousPro/AnonymousPro-Bold.ttf");
}
@font-face {
    font-weight: 700;
    font-style: italic;
    font-family: "Anonymous Pro";
    src: url("fonts/AnonymousPro/AnonymousPro-BoldItalic.ttf");
}

:root {
    --primary-light: #a8e6ff; /* Светло-голубой */
    --secondary-light: #ffd1a8; /* Мягкий персиковый */

    --primary-dark: #1e3a5f; /* Глубокий синий */
    --secondary-dark: #178582; /* Изумрудный */

    --bg-light: white;
    --bg-dark: #121212;

    --box-light: white;
    --box-dark: #1e1e1e;

    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(255, 255, 255, 0.1);
}

.d-block {
    display: block!important;
}
.mt-15 {
    margin-top: 15px!important;
}
.text-center {
    text-align: center!important;
}

html, body {
    min-height: 100vh;
}

body {
    --body-bg: #edeef0;
    background-color: var(--body-bg);
    background: radial-gradient(circle at center, var(--primary-light), var(--secondary-light));
    transition: background 0.5s ease-in-out;

    /* Паттерн из точек поверх градиента */
    background-image: radial-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 10px 10px;

    font: 12px / 18px "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Verdana, sans-serif;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
    body {
        background: radial-gradient(circle at center, var(--primary-dark), var(--secondary-dark));
    }
}

body.twallpaper .tgme_background_wrap {
    display: none;
}
.tgme_page {
    position: relative;
    margin: 0px 7px 16px;
    padding: 4px 0 32px;
    color: var(--text-color);
    background: var(--box-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    transition: all .15s ease .15s;
    font-size: 14px;
    line-height: 1.5;
}
.tgme_page_content_block,
.tgme_page_content_block p {
    position: relative;
    margin: 0px 0px 7px;
    padding: 0px 16px;
    font-size: 14px;
    line-height: 1.5;
}
.tgme_page_title {
    padding: 0px 16px;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    margin: 20px 0 10px 0;
    position: relative;
}
h1 {
    font-size: 20px;
    margin-top: 32px;
    margin-bottom: 12px;
}
h2 {
    font-size: 20px;
    margin-top: 32px;
    margin-bottom: 12px;
}
h3 {
    font-size: 20px;
    margin-top: 32px;
    margin-bottom: 10px;
}
h4 {
    font-size: 16px;
    margin-top: 29px;
    margin-bottom: 7px;
}
h5 {
    font-size: 16px;
    margin-top: 29px;
    margin-bottom: 7px;
}

.tgme_main {
    padding: 82px 10px 0px;
}
.tgme_widget_message_wrap {
    padding: 6px 0;
}
.tgme_widget_message {
    padding-right: 0;
}
.tgme_widget_message .tgme_widget_message_user {
    display: none;
}
.tgme_widget_message .tgme_widget_message_bubble {
    max-width: 475px;
    border-radius: 10px;
}
.tgme_widget_message .tgme_widget_message_bubble,
.tgme_widget_message .tgme_widget_message_inline_keyboard {
    margin-left: 0px;
}
.tgme_widget_message .tgme_widget_message_bubble .tgme_widget_message_bubble_tail {
    display: none;
}

.tgme_widget_message pre,
.tgme_widget_message code {
    font-family: "Anonymous Pro", monospace;
}

.tgme_header_right_column .tgme_right_column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 16px;
}
.tgme_right_column .tgme_footer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
}
.tgme_right_column .tgme_footer_column {
    display: block;
    vertical-align: top;
    padding: 0;
}
.tgme_footer .tgme_footer_column a {
    font-size: 1.2rem;
    line-height: 1.6rem;
}
@media (prefers-color-scheme: dark) {
    .tgme_footer .tgme_footer_column a {
        color: var(--text-color);
    }
}

footer {
    margin-top: -15px;
}
footer .tgme_footer {
    padding-top: 0;
}

.tgme_workarea {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    min-height: 100vh;

    /* Волны Apple-style */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff30' fill-opacity='1' d='M0,256L60,218.7C120,181,240,107,360,74.7C480,43,600,53,720,74.7C840,96,960,128,1080,160C1200,192,1320,224,1380,240L1440,256L1440,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.tgme_mobile_action_menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    height: 0;
    transition: height 0.3s ease;
}
.tgme_mobile_action_menu.opened {
    height: auto; /* Разрешаем контенту задавать высоту */
    max-height: 75vh; /* Максимальная высота */
    overflow: visible; /* Разрешаем контенту выходить за пределы */
}
.tgme_mobile_action_menu:not(.opened) .tgme_action_menu_wrap {
    pointer-events: none; /* Блокируем взаимодействие в закрытом состоянии */
}
.tgme_action_block_overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.tgme_mobile_action_menu.opened .tgme_action_block_overlay {
    opacity: 1;
    visibility: visible;
}

.tgme_action_block_wrap {
    position: absolute;
    z-index: 10;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
}
.tgme_action_block_wrap .tgme_action_main_button {
    flex-grow: 1;
}
.tgme_action_menu_button a.tgme_action_button {
    display: block;
    padding: 0;
    height: 42px;
    width: 42px;
    border-radius: 22px;
    background: var(--accent-btn-color);
    background-color: var(--accent-btn-color);
    background-image: url(/local/assets/images/three-dots-menu.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    transition: all 0.3s ease-in-out;
}
.tgme_mobile_action_menu.opened .tgme_action_menu_button a.tgme_action_button {
    background-image: url(/local/assets/images/close.svg);
}
.tgme_action_menu_wrap {
    transition: transform 0.3s ease;
    max-height: 75vh;
    overflow-y: auto;
    position: relative;
}
.tgme_mobile_action_menu.opened .tgme_action_menu_wrap {
    transform: translateY(0);
}
.tgme_action_menu_content {
    background: var(--box-bg);
    color: var(--text-color);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 10px 10px 0 0;
    padding-bottom: 74px;
    max-height: 75vh;
    overflow-y: auto;
}
.tgme_action_menu_content .tgme_channel_info {
    box-shadow: none;
    border-radius: 0;
    background: none;
    color: inherit;
}

@media (max-width: 500px) {
    .tgme_mobile_action_menu {
        display: block;
    }

    #tgme-channel-message-container {
        margin-bottom: 58px;
    }
    .tgme_channel_history {
        margin-bottom: 52px;
    }
}


.tgme_widget_message_reactions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 6px;
    font-size: 11px;
    line-height: 13px;
    font-weight: 700;
    margin: 10px 0;
}
.tgme_widget_message_reaction {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    background-color: var(--tme-table-accent-bg-color);
    padding: 4px 8px;
    border-radius: 1rem;
}
.tgme_widget_message_reaction_emoji {}
.tgme_widget_message_reaction_count {
    font-size: 12px;
    color: var(--text-color);
}

.tgme_widget_message_comments {
    --comments-icon-svg: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPgo8c3ZnIHdpZHRoPSI4MDBweCIgaGVpZ2h0PSI4MDBweCIgdmlld0JveD0iMCAwIDE4IDE4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGZpbGw9IiM3ZDdmODEiIGQ9Ik0xNS4zLDIuMDJBMi44NDUsMi44NDUsMCwwLDAsMTUsMkgzQTMuMDA5LDMuMDA5LDAsMCwwLDAsNXY1YTMuMDA5LDMuMDA5LDAsMCwwLDMsM3YyYTEsMSwwLDAsMCwuNTguOTFBMS4wNTksMS4wNTksMCwwLDAsNCwxNmEuOTY5Ljk2OSwwLDAsMCwuNjUtLjI0TDcuODQsMTNIMTVhMi44MjksMi44MjksMCwwLDAsLjMtLjAyQTMsMywwLDAsMCwxOCwxMFY1QTMsMywwLDAsMCwxNS4zLDIuMDJaIi8+Cjwvc3ZnPg==');
    display: inline-block;
    vertical-align: top;
    white-space: nowrap;
    margin-left: 10px;
}
.tgme_widget_message_comments:after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--comments-icon-svg) no-repeat 0 0;
    background-size: contain;
    margin-left: 5px;
    margin-bottom: -2px;
}

.tgme_widget_message_one_media,
.tgme_widget_message_document_wrap {
    padding: 0px 5px;
}

.tgme_widget_message_voice_player,
.tgme_widget_message_voice_player * {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
}

.tgme_message_fwd_from {
    margin-right: 2px;
}
.tgme_message_fwd_from + .tgme_widget_message_owner_name {
    padding-left: 18px;
    background-image: url(/local/assets/images/forward.svg);
    background-repeat: no-repeat;
    background-size: 16px;
    background-position: left center;
}

.tgme_error_message {
    display: flex;
    align-items: center;
    background: rgba(245, 245, 245, 0.96);
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    color: rgba(0, 0, 0, 0.8);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    margin: 16px 16px 0;
    max-width: 480px;
    padding: 16px 20px;
    backdrop-filter: blur(8px);
    position: relative;
    gap: 14px;
}

/* Для темного фона */
@media (prefers-color-scheme: dark) {
    .tgme_error_message {
        background: rgba(68, 68, 68, 0.96);
        border-color: rgba(255, 255, 255, 0.15);
        color: rgba(255, 255, 255, 0.85);
    }
}

/* Вариант с запрещенным контентом */
.tgme_error_message.error-restricted {
    border-color: rgba(211, 47, 47, 0.25);
    background: rgba(255, 235, 235, 0.95);
}

@media (prefers-color-scheme: dark) {
    .tgme_error_message.error-restricted {
        border-color: rgba(239, 83, 80, 0.3);
        background: rgba(91, 31, 31, 0.95);
    }
}

.tgme_head_brand {
    display: block;
    width: 36px;
    height: 36px;
    margin: 0;
    background-image: url(/local/assets/images/tggo-logo.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border-radius: 50%;
}

@media (prefers-color-scheme: dark) {
    .tgme_head_brand {
        background-color: #FFF;
    }
}

.tgme_widget_message_reactions .tgme_reaction_paid {
    color: #E98111;
    background: rgba(255, 188, 46, 0.2);
}

.icon-telegram-stars {
    width: 1.25em;
    height: 1.25em;
    background-image: url('data:image/svg+xml,%3Csvg%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20width%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cdefs%3E%3Cpath%20id%3D%22a%22%20d%3D%22m6.02%204.99%202.21-4.42c.25-.51.86-.72%201.37-.46.2.1.36.27.46.47l2.08%204.26c.17.34.5.58.88.63l4.36.52c.59.08%201.02.62.95%201.22-.03.24-.14.47-.32.65l-3.45%203.42c-.14.13-.2.33-.18.53l.57%204.61c.09.66-.38%201.27-1.03%201.35-.25.03-.5-.02-.72-.14l-3.64-2c-.26-.14-.58-.15-.85-.01l-3.77%201.95c-.53.27-1.18.06-1.45-.48-.11-.2-.14-.43-.11-.65l.3-2.12c.15-1.04.79-1.93%201.71-2.41l4.19-2.15c.11-.06.15-.2.1-.31-.05-.09-.14-.14-.24-.12l-5.12.74c-.78.11-1.58-.11-2.19-.62l-1.71-1.4c-.49-.4-.56-1.12-.17-1.62.19-.22.45-.37.74-.41l4.38-.57c.28-.03.52-.21.65-.46z%22%2F%3E%3ClinearGradient%20id%3D%22b%22%20x1%3D%2225%25%22%20x2%3D%2274.92%25%22%20y1%3D%22.825%25%22%20y2%3D%22107.86%25%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffd951%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ffb222%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22c%22%20x1%3D%2250%25%22%20x2%3D%2250%25%22%20y1%3D%220%25%22%20y2%3D%2299.8%25%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23e58f0d%22%2F%3E%3Cstop%20offset%3D%22.9996%22%20stop-color%3D%22%23eb7915%22%2F%3E%3C%2FlinearGradient%3E%3Cfilter%20id%3D%22d%22%20height%3D%22110.6%25%22%20width%3D%22110.3%25%22%20x%3D%22-5.2%25%22%20y%3D%22-5.3%25%22%3E%3CfeOffset%20dx%3D%221%22%20dy%3D%221%22%20in%3D%22SourceAlpha%22%20result%3D%22shadowOffsetInner1%22%2F%3E%3CfeComposite%20in%3D%22shadowOffsetInner1%22%20in2%3D%22SourceAlpha%22%20k2%3D%22-1%22%20k3%3D%221%22%20operator%3D%22arithmetic%22%20result%3D%22shadowInnerInner1%22%2F%3E%3CfeColorMatrix%20in%3D%22shadowInnerInner1%22%20type%3D%22matrix%22%20values%3D%220%200%200%200%201%200%200%200%200%201%200%200%200%200%201%200%200%200%200.657%200%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate%281.389%201.389%29%22%3E%3Cuse%20fill%3D%22url%28%23b%29%22%20fill-rule%3D%22evenodd%22%20xlink%3Ahref%3D%22%23a%22%2F%3E%3Cuse%20fill%3D%22%23000%22%20filter%3D%22url%28%23d%29%22%20xlink%3Ahref%3D%22%23a%22%2F%3E%3Cuse%20stroke%3D%22url%28%23c%29%22%20stroke-width%3D%22.89%22%20xlink%3Ahref%3D%22%23a%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.tgme_page_channel .registry-status {
    position: absolute;
    right: 5px;
    bottom: 15px;
    padding: 2px 4px;
    background-color: #52eadb !important;
    color: #000 !important;
    border-radius: 5px;
    line-height: 1em;
    font-size: 1em;
    font-weight: bold;
    font-family: 'Arial Black';
    text-decoration: none!important;
    opacity: 0.8;
    transition: all 0.5s ease;
}
.tgme_page_channel .registry-status:hover {
    opacity: 1;
    background-color: #52eadb;
    color: #000;
    text-decoration: none!important;
}