/**
 * Futia SaaS — Community Chat Widget v2 — Redesign
 * Discord-inspired flat layout, compact 12px font, 400×720px panel
 */

/* ========================================
   Chat Widget Container
   ======================================== */
.futia-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: var(--font-primary, 'Sora', sans-serif);
}

/* ========================================
   Toggle Butonu
   ======================================== */
.futia-chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 20px rgba(139, 92, 246, 0.4),
        0 0 0 0 rgba(139, 92, 246, 0);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    animation: toggleGlow 3s ease-in-out infinite;
}

@keyframes toggleGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4), 0 0 0 0 rgba(139, 92, 246, 0.1); }
    50% { box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5), 0 0 0 8px rgba(139, 92, 246, 0); }
}

.futia-chat-toggle:hover {
    transform: scale(1.08);
    box-shadow:
        0 6px 28px rgba(139, 92, 246, 0.55),
        0 0 0 6px rgba(139, 92, 246, 0.08);
    animation: none;
}

.futia-chat-toggle .futia-chat-icon-close {
    display: none;
}

.futia-chat-widget.open .futia-chat-toggle .futia-chat-icon-open {
    display: none;
}

.futia-chat-widget.open .futia-chat-toggle .futia-chat-icon-close {
    display: inline;
}

.futia-chat-widget.open .futia-chat-toggle {
    transform: rotate(0);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    animation: none;
}

.futia-chat-widget.open .futia-chat-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* Okunmamis mesaj badge */
.futia-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.6);
    animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: none;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ========================================
   Chat Paneli
   ======================================== */
.futia-chat-panel {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 400px;
    height: 720px;
    background: rgba(12, 11, 20, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(139, 92, 246, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: chatSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.futia-chat-widget.open .futia-chat-panel {
    display: flex;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   Chat Header — Kompakt
   ======================================== */
.futia-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

/* Gradient alt cizgi */
.futia-chat-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4), transparent);
}

.futia-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.futia-chat-header-info > i {
    color: #8b5cf6;
    font-size: 16px;
}

.futia-chat-header-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.futia-chat-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.futia-chat-online {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.38);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.futia-chat-online:hover {
    color: rgba(255, 255, 255, 0.55);
}

.futia-chat-online-chevron {
    font-size: 8px;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.futia-chat-online-chevron.rotated {
    transform: rotate(180deg);
}

.futia-chat-online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
    animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.futia-chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 0;
}

.futia-chat-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.futia-chat-clear-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 0;
    margin-right: 2px;
}
.futia-chat-clear-btn:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}
.futia-chat-clear-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========================================
   Messages Area
   ======================================== */
.futia-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.2) transparent;
}

.futia-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.futia-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.futia-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.25);
    border-radius: 2px;
}

.futia-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.4);
}

/* Welcome mesaji */
.futia-chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.3);
    animation: welcomeFadeIn 0.6s ease 0.2s both;
}

@keyframes welcomeFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.futia-chat-welcome i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: welcomeFloat 3s ease-in-out infinite;
}

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

.futia-chat-welcome p {
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Tek Mesaj — Discord Flat Style
   ======================================== */
.futia-chat-msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    animation: msgFadeIn 0.2s ease;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
    position: relative;
}

.futia-chat-msg:hover {
    background: rgba(255, 255, 255, 0.02);
}

@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Kendi mesajlarin — Discord: herkes solda, own hafif bg ile ayirt --- */
.futia-chat-msg.own {
    background: rgba(139, 92, 246, 0.03);
}

.futia-chat-msg.own:hover {
    background: rgba(139, 92, 246, 0.06);
}

/* own: avatar ve isim gosterilir (Discord gibi herkes solda) */

/* --- Gruplu mesajlar (ardisik ayni kullanici) --- */
.futia-chat-msg.grouped {
    padding-top: 1px;
    padding-bottom: 1px;
}

.futia-chat-msg.grouped .futia-chat-avatar {
    visibility: hidden;
}

.futia-chat-msg.grouped .futia-chat-name {
    display: none;
}

/* Avatar — 28px kompakt */
.futia-chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(99, 102, 241, 0.3));
    flex-shrink: 0;
    letter-spacing: 0.3px;
    border: 1.5px solid rgba(139, 92, 246, 0.2);
    margin-top: 2px;
}

.futia-chat-msg.admin .futia-chat-avatar {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

/* Avatar resmi */
.futia-chat-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.futia-chat-avatar:has(img) {
    font-size: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.futia-chat-avatar.clickable:hover {
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.5);
    transform: scale(1.1);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* Mesaj baloncugu — Discord flat: bg yok */
.futia-chat-bubble {
    max-width: 300px;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    position: relative;
    overflow: visible;
    min-width: 0;
}

/* Admin mesajlari — ince sol cizgi */
.futia-chat-msg.admin .futia-chat-bubble {
    border-left: 2px solid rgba(139, 92, 246, 0.4);
    padding-left: 8px;
}

/* Kullanici adi — inline + zaman ayni satir */
.futia-chat-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1px;
    display: inline;
    line-height: 1.3;
}

.futia-chat-msg.admin .futia-chat-name {
    color: #a78bfa;
}

.futia-chat-admin-badge {
    font-size: 8px;
    padding: 1px 6px;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    vertical-align: middle;
    margin-left: 4px;
}

/* Mesaj icerigi */
.futia-chat-text {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
    word-break: break-word;
}

/* Mesaj meta — zaman + butonlar */
.futia-chat-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
    gap: 4px;
}

/* Zaman */
.futia-chat-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* ========================================
   Giris Yap Bari (Guest)
   ======================================== */
.futia-chat-login-bar {
    padding: 10px 16px;
    background: rgba(139, 92, 246, 0.04);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.futia-chat-login-bar i {
    font-size: 12px;
    color: rgba(139, 92, 246, 0.5);
}

.futia-chat-login-bar a {
    color: #8b5cf6;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.futia-chat-login-bar a:hover {
    color: #06b6d4;
    text-shadow: 0 0 6px rgba(6, 182, 212, 0.3);
}

/* ========================================
   Admin Kontrolleri — Mesaj Sil, Ban, Purge
   ======================================== */
.futia-chat-admin-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.futia-chat-msg:hover .futia-chat-admin-actions {
    opacity: 1;
}

.futia-chat-action-btn {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 9px;
    transition: all 0.2s ease;
    padding: 0;
}

/* Mesaj sil butonu */
.futia-chat-delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: rgba(239, 68, 68, 0.55);
}

.futia-chat-delete-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #ef4444;
    transform: scale(1.12);
}

/* Ban butonu */
.futia-chat-ban-btn {
    background: rgba(251, 146, 60, 0.1);
    color: rgba(251, 146, 60, 0.55);
}

.futia-chat-ban-btn:hover {
    background: rgba(251, 146, 60, 0.22);
    color: #fb923c;
    transform: scale(1.12);
}

/* Purge (tum mesajlari sil) butonu */
.futia-chat-purge-btn {
    background: rgba(245, 158, 11, 0.1);
    color: rgba(245, 158, 11, 0.55);
}

.futia-chat-purge-btn:hover {
    background: rgba(245, 158, 11, 0.22);
    color: #f59e0b;
    transform: scale(1.12);
}

/* Kullanici bilgi butonu */
.futia-chat-info-btn {
    background: rgba(59, 130, 246, 0.1);
    color: rgba(59, 130, 246, 0.55);
}

.futia-chat-info-btn:hover {
    background: rgba(59, 130, 246, 0.22);
    color: #3b82f6;
    transform: scale(1.12);
}

/* Pin butonu (admin actions) */
.futia-chat-pin-btn {
    background: rgba(139, 92, 246, 0.12);
    color: rgba(139, 92, 246, 0.55);
}

.futia-chat-pin-btn:hover {
    background: rgba(139, 92, 246, 0.22);
    color: #8b5cf6;
    transform: scale(1.12);
}

/* ========================================
   Sabitlenmiş Mesaj Barı
   ======================================== */
.futia-chat-pinned-bar {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    background: rgba(139, 92, 246, 0.08);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    border-left: 3px solid #8b5cf6;
    flex-shrink: 0;
    gap: 10px;
    cursor: pointer;
    animation: msgFadeIn 0.2s ease;
}

.futia-chat-pinned-bar > i {
    color: #8b5cf6;
    font-size: 12px;
    flex-shrink: 0;
}

.futia-chat-pinned-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.futia-chat-pinned-name {
    font-size: 11px;
    font-weight: 700;
    color: #a78bfa;
    white-space: nowrap;
    flex-shrink: 0;
}

.futia-chat-pinned-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.futia-chat-pinned-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    font-size: 11px;
    cursor: pointer;
    padding: 3px;
    border-radius: 5px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.futia-chat-pinned-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* ========================================
   Admin Kullanici Bilgi Tooltip
   ======================================== */
.futia-chat-user-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: rgba(18, 16, 28, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 200px;
    max-width: 260px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    z-index: 10003;
    animation: tooltipFadeIn 0.15s ease;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.futia-chat-user-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: rgba(18, 16, 28, 0.96);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.futia-chat-user-tooltip strong {
    color: #fff;
    font-weight: 600;
}

.futia-chat-user-tooltip .tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}

.futia-chat-user-tooltip .tooltip-label {
    color: rgba(255, 255, 255, 0.4);
}

.futia-chat-user-tooltip .tooltip-ban {
    color: #ef4444;
    font-weight: 600;
}

/* ========================================
   Ban Bilgi Bari
   ======================================== */
.futia-chat-banned-bar {
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.06);
    border-top: 1px solid rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(239, 68, 68, 0.7);
    font-size: 12px;
    flex-shrink: 0;
}

.futia-chat-banned-bar i {
    font-size: 13px;
    color: #ef4444;
}

/* ========================================
   Ban Modal
   ======================================== */
.futia-chat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.futia-chat-modal {
    width: 340px;
    background: rgba(18, 16, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(139, 92, 246, 0.06);
    animation: chatSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.futia-chat-modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.futia-chat-modal-header i {
    color: #fb923c;
    font-size: 14px;
}

.futia-chat-modal-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.futia-chat-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.futia-chat-modal-body {
    padding: 16px;
}

.futia-chat-ban-target {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 12px 0;
}

.futia-chat-ban-target strong {
    color: #fff;
    font-weight: 700;
}

.futia-chat-ban-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.futia-chat-ban-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.futia-chat-ban-option i {
    font-size: 12px;
    color: rgba(251, 146, 60, 0.5);
}

.futia-chat-ban-option:hover {
    background: rgba(251, 146, 60, 0.08);
    border-color: rgba(251, 146, 60, 0.25);
    color: #fff;
    transform: translateY(-1px);
}

.futia-chat-ban-option:hover i {
    color: #fb923c;
}

.futia-chat-ban-permanent {
    border-color: rgba(239, 68, 68, 0.1);
}

.futia-chat-ban-permanent i {
    color: rgba(239, 68, 68, 0.5);
}

.futia-chat-ban-permanent:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

.futia-chat-ban-permanent:hover i {
    color: #ef4444;
}

/* ========================================
   Toast Bildirimi
   ======================================== */
.futia-chat-toast {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(34, 197, 94, 0.9);
    color: #fff;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.futia-chat-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   Input Area — Kompakt
   ======================================== */
.futia-chat-input-area {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    position: relative;
}

.futia-chat-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 2px 3px 2px 4px;
    transition: all 0.25s ease;
}

/* Emoji Toggle Butonu */
.futia-chat-emoji-toggle {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.futia-chat-emoji-toggle:hover,
.futia-chat-emoji-toggle.active {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
}

/* Emoji Picker Panel */
.futia-chat-emoji-picker {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    margin-bottom: 6px;
    overflow: hidden;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

/* Emoji Tab Bar */
.futia-chat-emoji-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3px 5px;
    gap: 1px;
    overflow-x: auto;
    scrollbar-width: none;
}

.futia-chat-emoji-tabs::-webkit-scrollbar {
    display: none;
}

.futia-chat-emoji-tab {
    background: none;
    border: none;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.45;
    transition: all 0.15s ease;
    line-height: 1;
}

.futia-chat-emoji-tab:hover {
    opacity: 0.75;
    background: rgba(255, 255, 255, 0.05);
}

.futia-chat-emoji-tab.active {
    opacity: 1;
    background: rgba(139, 92, 246, 0.18);
}

/* Emoji Grid — 8 kolon, 18px emoji */
.futia-chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1px;
    padding: 6px;
    max-height: 170px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.futia-chat-emoji-grid::-webkit-scrollbar {
    width: 4px;
}

.futia-chat-emoji-grid::-webkit-scrollbar-track {
    background: transparent;
}

.futia-chat-emoji-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.futia-chat-emoji-item {
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.12s ease;
    user-select: none;
}

.futia-chat-emoji-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: scale(1.15);
}

.futia-chat-input-wrap:focus-within {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.08);
}

#futia-chat-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    padding: 8px 0;
    height: 36px;
    box-sizing: border-box;
}

#futia-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.futia-chat-send {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.futia-chat-send:hover {
    transform: scale(1.06);
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.4);
}

.futia-chat-send:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.futia-chat-char-count {
    text-align: right;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.12);
    margin-top: 2px;
    padding-right: 4px;
}

/* ========================================
   Online Kullanici Paneli — Kompakt
   ======================================== */
.futia-chat-online-panel {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 140px;
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.15) transparent;
}

.futia-chat-online-panel::-webkit-scrollbar {
    width: 3px;
}

.futia-chat-online-panel::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.2);
    border-radius: 2px;
}

.futia-chat-online-list {
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.futia-chat-online-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.futia-chat-online-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.futia-chat-online-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.2));
    flex-shrink: 0;
    position: relative;
}

.futia-chat-online-avatar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid rgba(12, 11, 20, 0.97);
}

.futia-chat-online-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.futia-chat-online-avatar-initials {
    font-size: 9px;
    font-weight: 700;
    color: #fff;
}

.futia-chat-online-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.futia-chat-online-admin-badge {
    font-size: 7px;
    padding: 1px 5px;
    border-radius: 6px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.futia-chat-online-empty {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
    padding: 8px 0;
}

.futia-chat-online-item.clickable:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* ========================================
   Online Kullanici Bilgi Popup (Admin)
   ======================================== */
.futia-chat-online-popup {
    position: absolute;
    left: 12px;
    right: 12px;
    background: rgba(18, 16, 28, 0.97);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    z-index: 10010;
    animation: tooltipFadeIn 0.15s ease;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.futia-chat-online-popup-header {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.futia-chat-online-popup .tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}

.futia-chat-online-popup .tooltip-label {
    color: rgba(255, 255, 255, 0.4);
}

.futia-chat-online-popup .tooltip-ban {
    color: #ef4444;
    font-weight: 600;
}

.futia-chat-online-popup-link {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #a78bfa;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.futia-chat-online-popup-link:hover {
    color: #c4b5fd;
}

/* ========================================
   Typing Gostergesi — Kompakt
   ======================================== */
.futia-chat-typing-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.015);
    flex-shrink: 0;
}

.futia-chat-typing-dots {
    display: flex;
    gap: 2px;
    align-items: center;
}

.futia-chat-typing-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.45);
    animation: typingDot 1.4s infinite ease-in-out;
}

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

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

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-3px); opacity: 1; }
}

.futia-chat-typing-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    font-style: italic;
}

/* ========================================
   Reply Bar (Input ustunde) — Kompakt
   ======================================== */
.futia-chat-reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.04);
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    border-left: 3px solid #8b5cf6;
    flex-shrink: 0;
}

.futia-chat-reply-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.futia-chat-reply-info > i {
    color: #8b5cf6;
    font-size: 11px;
    flex-shrink: 0;
}

.futia-chat-reply-name {
    font-size: 11px;
    font-weight: 700;
    color: #8b5cf6;
    white-space: nowrap;
}

.futia-chat-reply-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.futia-chat-reply-cancel {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    font-size: 11px;
    cursor: pointer;
    padding: 3px;
    border-radius: 5px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.futia-chat-reply-cancel:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* ========================================
   Reply Referansi (Mesaj icinde) — 11px italic
   ======================================== */
.futia-chat-reply-ref {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    margin-bottom: 3px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.06);
    border-left: 2px solid rgba(139, 92, 246, 0.3);
    cursor: pointer;
    transition: background 0.2s ease;
    overflow: hidden;
}

.futia-chat-reply-ref:hover {
    background: rgba(139, 92, 246, 0.12);
}

.futia-chat-reply-ref > i {
    color: rgba(139, 92, 246, 0.45);
    font-size: 9px;
    flex-shrink: 0;
}

.futia-chat-reply-ref-name {
    font-size: 10px;
    font-weight: 700;
    color: rgba(139, 92, 246, 0.6);
    white-space: nowrap;
    font-style: italic;
}

.futia-chat-reply-ref-text {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
}

/* Mesaj highlight (reply scroll) */
.futia-chat-msg-highlight {
    animation: msgHighlight 1.5s ease;
}

@keyframes msgHighlight {
    0% { background: rgba(139, 92, 246, 0.15); border-radius: 6px; }
    100% { background: transparent; }
}

/* ========================================
   Emoji Reactions — Kompakt
   ======================================== */
.futia-chat-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 2px;
    min-height: 0;
}

.futia-chat-reaction-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.futia-chat-reaction-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.futia-chat-reaction-item.active {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
}

.futia-chat-reaction-emoji {
    font-size: 12px;
    line-height: 1;
}

.futia-chat-reaction-count {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
}

.futia-chat-reaction-item.active .futia-chat-reaction-count {
    color: #8b5cf6;
}

/* Reply butonu (hover'da gorunur) */
.futia-chat-reply-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.18);
    font-size: 11px;
    cursor: pointer;
    padding: 3px 4px;
    border-radius: 5px;
    transition: all 0.2s ease;
    opacity: 0;
}

.futia-chat-msg:hover .futia-chat-reply-btn {
    opacity: 1;
}

.futia-chat-reply-btn:hover {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

/* Reaction butonu (hover'da gorunur) */
.futia-chat-reaction-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.18);
    font-size: 11px;
    cursor: pointer;
    padding: 3px 4px;
    border-radius: 5px;
    transition: all 0.2s ease;
    opacity: 0;
}

.futia-chat-msg:hover .futia-chat-reaction-btn {
    opacity: 1;
}

.futia-chat-reaction-btn:hover {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

/* Reaction Picker */
.futia-chat-reaction-picker {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    display: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    padding: 6px 8px;
    width: 170px;
    background: rgba(18, 16, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    z-index: 10002;
}

@keyframes pickerFadeIn {
    from { opacity: 0; transform: translateY(4px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.futia-chat-emoji-option {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.15s ease;
    line-height: 1;
}

.futia-chat-emoji-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.18);
}

/* Meta actions container */
.futia-chat-meta-actions {
    display: flex;
    align-items: center;
    gap: 1px;
    position: relative;
    overflow: visible;
}

/* ========================================
   Responsive — Mobil (Tam ekran native app)
   ======================================== */
@media (max-width: 480px) {
    .futia-chat-widget {
        bottom: 12px;
        right: 12px;
    }

    .futia-chat-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        animation: none;
    }

    .futia-chat-widget.open .futia-chat-toggle {
        display: none;
    }

    .futia-chat-toggle {
        width: 50px;
        height: 50px;
        font-size: 19px;
    }

    .futia-chat-bubble {
        max-width: 260px;
    }

    .futia-chat-header {
        padding: 10px 14px;
        padding-top: max(10px, env(safe-area-inset-top, 10px));
    }

    .futia-chat-messages {
        padding: 8px 10px;
    }

    .futia-chat-input-area {
        padding: 8px 10px;
        padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
    }

    .futia-chat-online-panel {
        max-height: 120px;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
    .futia-chat-panel {
        width: 380px;
        height: 640px;
    }

    .futia-chat-bubble {
        max-width: 280px;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .futia-chat-toggle,
    .futia-chat-panel,
    .futia-chat-msg,
    .futia-chat-welcome,
    .futia-chat-welcome i,
    .futia-chat-online-dot,
    .futia-chat-typing-dots span,
    .futia-chat-badge,
    .futia-chat-toast,
    .futia-chat-emoji-item,
    .futia-chat-emoji-option,
    .futia-chat-action-btn,
    .futia-chat-ban-option,
    .futia-chat-send,
    .futia-chat-msg-highlight,
    .futia-chat-user-tooltip {
        animation: none !important;
        transition: none !important;
    }
}
