
#manga-chat-container {
    animation: chatFadeIn 0.5s ease-out;
}

@keyframes chatFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#chat-messages {
    display: flex;
    flex-direction: column;
}

#chat-messages > .chat-msg:first-child {
    margin-top: auto;
}

.chat-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    position: relative;
    padding: 0 4px;
}

.chat-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.chat-avatar img.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-avatar .profile-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 10;
    transform: scale(1.15); 
}

.chat-vip-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #0c0a09;
    font-size: 8px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 4px;
    border: 1.5px solid #0c0a09;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    z-index: 20;
    text-transform: uppercase;
    line-height: 1;
    pointer-events: auto;
    user-select: none;
}

.chat-bubble {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px 16px 16px 16px;
    padding: 10px 16px;
    max-width: 90%;
    position: relative;
    transition: all 0.2s;
    margin-top: 4px;
}

.chat-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: flex-start;
}

.chat-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 2px;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

#manga-chat-container .level-badge-wrapper {
    margin-left: 0 !important;
}

#manga-chat-container .user-equipped-badges {
    margin-left: 0 !important;
}

#manga-chat-container .level-badge {
    padding: 1px 5px !important;
    gap: 2px !important;
    line-height: 1 !important;
}

.chat-bubble-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.own-msg .chat-bubble {
    border-radius: 4px 16px 16px 16px;
}

.chat-bubble:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

#manga-chat-container .chat-username {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    display: inline-flex;
    align-items: center;
    cursor: pointer !important;
}

#manga-chat-container .chat-username .admin-username,
#manga-chat-container .chat-avatar,
#manga-chat-container .chat-avatar * {
    cursor: pointer !important;
}

#manga-chat-container .level-badge-wrapper,
#manga-chat-container .level-badge,
#manga-chat-container .level-badge-wrapper *,
#manga-chat-container .level-badge * {
    cursor: default !important;
    text-decoration: none !important;
    display: inline-flex !important;
}

#manga-chat-container .ue-badge-trigger,
#manga-chat-container .ue-badge-trigger * {
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-flex !important;
}

#manga-chat-container .chat-username:hover {
    text-decoration: underline;
}

.chat-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    word-break: break-word;
}

.chat-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
    display: flex;
    justify-content: flex-end;
}

.chat-bubble-sticker {
    background: transparent;
    border: none;
    padding: 0;
    max-width: 90%;
    position: relative;
    margin-top: 4px;
}

.chat-sticker-container {
    background: linear-gradient(135deg, rgba(80, 80, 100, 0.4) 0%, rgba(50, 50, 70, 0.6) 100%);
    border-radius: 12px;
    padding: 12px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    user-select: none;
    -webkit-user-select: none;
}

.mc-chat-sticker {
    width: 140px;
    height: 140px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    pointer-events: none; 
    -webkit-user-drag: none;
}

@media (max-width: 640px) {
    .mc-chat-sticker {
        width: 110px;
        height: 110px;
    }
}

.chat-admin-menu {
    position: relative;
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-msg:hover .chat-admin-menu {
    opacity: 1;
}

.mc-dots-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.mc-dots-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.mc-dropdown {
    position: absolute;
    top: 0;
    right: 100%;
    margin-right: 8px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    min-width: 120px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-admin-menu:hover .mc-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.mc-dropdown button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    text-align: left;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.mc-dropdown button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.mc-dropdown button.mc-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.mc-dropdown button.mc-ban:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.mc-dropdown button.mc-pin:hover {
    color: #fbbf24;
}


.mc-panel {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    z-index: 99999;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#emoji-panel {
    width: 320px !important;
    height: 400px !important;
    right: 15px;
    bottom: 75px;
}

#sticker-panel {
    width: 320px !important;
    height: 400px !important;
    right: 15px;
    bottom: 75px;
}


.mc-panel-header {
    padding: 15px 15px 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.03), transparent);
}

.mc-panel-search-wrapper {
    position: relative;
    display: flex;
    items-center;
}

.mc-panel-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
    pointer-events: none;
}

.mc-panel-search {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 10px 12px 10px 38px !important;
    color: #fff !important;
    font-size: 14px !important;
    outline: none !important;
    transition: all 0.2s;
}

.mc-panel-search:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}


.mc-panel-categories {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.mc-panel-categories::-webkit-scrollbar {
    display: none;
}

.mc-cat-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: none;
    padding: 0;
}

.mc-cat-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.mc-cat-btn.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}


.mc-panel-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 15px 15px 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.mc-panel-body::-webkit-scrollbar {
    width: 6px;
}

.mc-panel-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.mc-section-title {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 15px 0 10px 2px;
}

.mc-emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.mc-sticker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.emoji-item {
    font-size: 22px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
    user-select: none;
}

.emoji-item:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.15);
}

.emoji-item:active {
    transform: scale(0.9);
}

.sticker-item {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    padding: 8px;
    transition: all 0.2s;
    background: linear-gradient(135deg, rgba(80, 80, 100, 0.2) 0%, rgba(50, 50, 70, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticker-item:hover {
    background: linear-gradient(135deg, rgba(80, 80, 100, 0.4) 0%, rgba(50, 50, 70, 0.6) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.sticker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .mc-chat-sticker {
        width: 110px;
        height: 110px;
    }
}

@keyframes flameFlicker {
    0% {
        filter: brightness(1) drop-shadow(0 0 2px rgba(255, 68, 68, 0.5));
    }

    100% {
        filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 68, 68, 0.8));
    }
}

#chat-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.mc-toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
}

.mc-toast.success {
    border-left: 3px solid #10b981;
}

.mc-toast.error {
    border-left: 3px solid #ef4444;
}

.mc-toast.warning {
    border-left: 3px solid #f59e0b;
}

.mc-toast.fade-out {
    animation: toastFadeOut 0.4s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastFadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Chat Admin & VIP Badge Stilleri */
#manga-chat-container .admin-tag-wrapper {
    background-color: rgba(168, 85, 247, 0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(168, 85, 247, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    align-self: center;
    box-shadow: 0 0 8px rgba(216, 180, 254, 0.5), 0 0 15px rgba(168, 85, 247, 0.3);
    vertical-align: middle;
    user-select: none;
}

#manga-chat-container .admin-tag-text {
    font-weight: 700;
    background-image: linear-gradient(to right, #C084FC, #F472B6, #FBCFE8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 0.65rem;
    line-height: 1;
    display: block;
}

#manga-chat-container .crown-icon {
    width: 0.75rem;
    height: 0.75rem;
    color: #E9D5FF;
    fill: currentColor;
    flex-shrink: 0;
}

#manga-chat-container .vip-tag-wrapper {
    background-color: rgba(245, 158, 11, 0.25);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(245, 158, 11, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    align-self: center;
    box-shadow: 0 0 8px rgba(253, 230, 138, 0.5), 0 0 15px rgba(245, 158, 11, 0.3);
    vertical-align: middle;
    user-select: none;
}

#manga-chat-container .vip-tag-text {
    font-weight: 700;
    background-image: linear-gradient(to right, #FDE68A, #FBBF24, #F59E0B);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 0.65rem;
    line-height: 1;
    display: block;
}