.clan-description, .clan-chat {
    flex: 1 1 550px;
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--shadow);
}

.clan-description h2, .clan-chat h2 {
    margin-bottom: 15px;
    font-size: 22px;
}

.clan-description p {
    line-height: 1.6;
    overflow: visible !important;
    font-size: 16px;
    opacity: 0.9;
}

.chat-box {
    height: 300px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 10px;
    overflow-y: auto;
    width: 100%;
}

@media (min-width: 767px) {
    .chat-box {
        width: 350px;
    }
}

#chatInput {
    background: transparent !important;
    --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
    --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    --tw-shadow-color: #e5e7eb;
}

.message {
    margin-bottom: 8px;
    color: #000000c7;
}

.message span {
    font-weight: bold;
}

.chat-input {
    margin-top: 10px;
    display: flex;
    color: #000000c7;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 15px;
}

.chat-input button {
    background: var(--color-accent);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.25s;
}

.chat-input button:hover {
    background: var(--color-accent-dark);
}

#messageMenu {
    position: fixed;
    display: none;
    z-index: 9999999999999999999999999;
    background: #ffffff;
    border-radius: 6px;
    color: rgba(0, 0, 0, 0.65);
    padding: 5px 0;
    min-width: 130px;
    --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    --tw-shadow-color: #e5e7eb;
    --tw-shadow: var(--tw-shadow-colored);
}

#messageMenu:hover {
    background: rgb(255, 255, 255);
    color: rgba(0, 0, 0, 0.55);
}

.active-message {
    background: rgba(120, 180, 255, 0.18) !important;
    box-shadow: 0 0 12px rgba(120, 180, 255, 0.55) !important;
    transition: background .3s, box-shadow .3s !important;
}

.message {
    position: relative;
    padding: 6px 8px;
    margin-bottom: 5px;
    background: rgba(149, 147, 147, 0.05);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn .3s forwards;
    transition: background .2s;
}

.message.reply-target {
    background: rgba(120, 180, 255, 0.15);
}

.message span {
    font-weight: bold;
    margin-right: 4px;
}

.message .reply-btn {
    position: absolute;
    right: 83px;
    top: 4px;
    opacity: 0;
    cursor: pointer;
    font-size: 13px;
    color: #aaa;
    transition: opacity .2s;
}

.message:hover .reply-btn {
    opacity: 1;
}

.reply-preview {
    background: rgba(90, 150, 255, 0.1);
    padding: 5px 8px;
    border-left: 3px solid #5caeff;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reply-preview span {
    font-weight: 500;
}

.reply-preview button {
    border: none;
    background: transparent;
    color: #ccc;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.messagse {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.chat-ban-box {
    padding: 12px 16px;
    border-left: 4px solid #e63946;
    background: rgba(230, 57, 70, 0.09);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
    width: 100%;
}

.chat-ban-title {
    font-weight: 600;
    color: #e63946;
    margin-bottom: 3px;
}

.chat-ban-timer {
    opacity: .8;
}

.chat-empty {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-empty-inner {
    text-align: center;
    max-width: 260px;
    margin: auto;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.05);
}

.chat-empty-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.chat-empty-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.chat-empty-text {
    font-size: 14px;
    opacity: .7;
    line-height: 1.4;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 10px;
}

.chat-message.admin .chat-avatar {
    background: #4b6cff;
    color: #fff;
}

.chat-box .message [data-msg] > div:last-child, .reply {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.chat-avatar {
    min-width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
}

.chat-content {
    max-width: 85%;
}

.chat-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    opacity: .8;
}

.chat-text {
    font-size: 14px;
    line-height: 1.45;
}

.chat-fab {
    min-width: 70px;
    min-height: 70px;
    display: inline-flex;
    border: none;
    border-radius: 1000px;
    box-shadow: 12px 12px 24px rgba(79, 209, 197, .64);
    transition: all 0.3s ease-in-out 0s;
    position: relative;
    padding: 10px;
}

.chat-fab::after {
    content: '';
    border-radius: 100%;
    border: 6px solid rgba(0, 0, 0, 0.4);
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ring 3s infinite;
}

/* === КРАСИВАЯ КНОПКА FAB === */
.fancy-fab{
    width:55px;
    height:55px;
    border-radius:50%;
    position:fixed;
    bottom:28px;
    right:28px;
    cursor:pointer;
    z-index:99999;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#0e0502;
    border:1px solid rgba(255,122,24,.5);
    box-shadow:0 12px 30px rgba(0,0,0,.7);
    overflow:visible;
}

/* Анимационное кольцо */
.fancy-fab::before{
    content:"";
    position:absolute;
    background:url("/assets/panel/images/chat.svg") no-repeat center;
    inset:-6px;
    border-radius:50%;
    border:2px solid rgba(255,122,24,.7);
    box-shadow:0 0 25px rgba(255,122,24,.6);
    animation:pulse 2.5s infinite;
    z-index:0;
}

/* Иконка */
.fancy-fab::after{
    content:"";
    position:absolute;
    inset:0;
    border-radius:50%;
    background:url("/assets/panel/images/chat.svg") no-repeat center;
    background-size:60%;
    filter:drop-shadow(0 0 8px rgba(255,122,24,.9));
    z-index:2;
    pointer-events:none;
    top: 45px;
    left: 45px;
}


.fancy-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.fancy-fab.opened {
    background: #fff url("data:image/svg+xml,%3Csvg fill='none' stroke='%23000' stroke-width='3' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E") no-repeat center;
    background-size: 45%;
}


/* === КРАСИВЫЙ BADGE === */
.fancy-fab-badge {
    display: none;
    position: absolute;
    top: -6px;
    right: -10px;

    min-width: 30px;
    height: 30px;

    padding: 0 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff2b2b, #b30000);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 30px;
    text-align: center;

    box-shadow: 0 0 12px rgba(255, 0, 0, 0.55);
    pointer-events: none;
}


/* === ОКНО ЧАТА === */
.chat-popup {
    position: fixed;
    bottom: 100px;
    right: 28px;
    max-width: 400px;
    width: 100%;

    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    z-index: 99999;

    border: 1px solid rgba(0, 0, 0, 0.1);
    transform: scale(0.85);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;

    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.chat-popup.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}


/* === КНОПКА ЗАКРЫТИЯ В ОКНЕ === */
.chat-popup-header {
    padding: 8px 12px;
    text-align: right;
    cursor: pointer;
    font-size: 20px;
    color: #555;
    user-select: none;
    position: absolute;
    right: 20px;
    top: 6px;
    width: 24px;
    height: 24px;
    background-size: 60%;
    opacity: .7;
}

.chat-popup-header:hover {
    opacity: 1;
}

@keyframes ring {
    0% {
        width: 30px;
        height: 30px;
        opacity: 1;
    }
    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}