/* --- SOHBET EFEKTLERİ, TEPKİLER VE OYUNLAR --- */

/* Yüklenme spiner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #00f3ff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ses bağlantı animasyonu */
.connecting-pulse {
    animation: connectingPulse 1.5s infinite;
}
@keyframes connectingPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; box-shadow: 0 0 10px #00f3ff; }
    100% { opacity: 0.6; }
}

/* XP rozetleri */
.xp-badge {
    font-size: 9px; padding: 2px 5px; border-radius: var(--radius-sm); margin-left: 6px; font-weight: bold;
    display: inline-block; vertical-align: middle; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.chat-xp-badge {
    font-size: 13px; margin-left: 5px; cursor: help; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.rank-1 { background: rgba(46, 213, 115, 0.15); color: #2ed573; border: 1px solid rgba(46, 213, 115, 0.3); }
.rank-2 { background: rgba(30, 144, 255, 0.15); color: #1e90ff; border: 1px solid rgba(30, 144, 255, 0.3); }
.rank-3 { background: rgba(255, 165, 2, 0.15); color: #ffa502; border: 1px solid rgba(255, 165, 2, 0.3); }
.rank-4 { background: rgba(255, 71, 87, 0.15); color: #ff4757; border: 1px solid rgba(255, 71, 87, 0.3); animation: pulse-red 2s infinite; }
.rank-5 { background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(218, 165, 32, 0.1)); color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.5); box-shadow: 0 0 10px rgba(255, 215, 0, 0.2); animation: pulse-gold 2s infinite; }

@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.3); } 70% { box-shadow: 0 0 0 4px rgba(255, 71, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); } }
@keyframes pulse-gold { 0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.3); } 70% { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); } }

/* Sistem mesajları */
.system-msg { text-align: center; color: #888; font-size: 12px; background: rgba(255, 255, 255, 0.05); padding: 5px 15px; border-radius: var(--radius-sm); margin: 10px auto; width: fit-content; }

/* Yanıt butonları - hover geliştirmeleri */
.msg-reply-btn { 
    background: rgba(255,255,255,0.1); 
    border: none; 
    color: #aaa; 
    border-radius: var(--radius-sm); 
    padding: 4px 8px; 
    font-size: 11px; 
    cursor: pointer; 
    margin-left: 8px; 
    opacity: 0; 
    transition: all 0.2s ease; 
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.msg-me:hover .msg-reply-btn, .msg-other:hover .msg-reply-btn { opacity: 1; }
.msg-reply-btn:hover { 
    background: rgba(0, 243, 255, 0.3); 
    color: #00f3ff; 
    transform: scale(1.1); 
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

/* Tepki butonları - hover geliştirmeleri */
.msg-react-btn { 
    background: rgba(255,255,255,0.1); 
    border: none; 
    color: #aaa; 
    border-radius: var(--radius-sm); 
    padding: 4px 8px; 
    font-size: 11px; 
    cursor: pointer; 
    margin-left: 4px; 
    opacity: 0; 
    transition: all 0.2s ease; 
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.msg-me:hover .msg-react-btn, .msg-other:hover .msg-react-btn { opacity: 1; }
.msg-react-btn:hover { 
    background: rgba(255, 215, 0, 0.3); 
    transform: scale(1.1); 
    color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.reply-quote { font-size: 11px; color: #aaa; background: rgba(0,0,0,0.2); border-left: 3px solid #00f3ff; padding: 6px 10px; margin-bottom: 6px; border-radius: var(--radius-sm); display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mention-highlight { background: rgba(255, 165, 0, 0.2); color: #ffa502; padding: 0 4px; border-radius: var(--radius-sm); font-weight: bold; border: 1px solid rgba(255, 165, 0, 0.4); }

/* Emoji tepkileri */
.reactions-container { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.reaction-badge { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 2px 8px; font-size: 11px; cursor: pointer; color: #fff; display: flex; align-items: center; gap: 4px; transition: 0.2s; }
.reaction-badge:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); transform: scale(1.05); }
.reaction-badge.reacted { background: rgba(0, 123, 255, 0.25); border-color: rgba(0, 123, 255, 0.5); color: #00f3ff; }
.reaction-picker { position: absolute; background: rgba(22, 22, 26, 0.95); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); padding: 6px; display: none; gap: 4px; z-index: 1000; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.reaction-picker span { cursor: pointer; font-size: 18px; padding: 6px; transition: 0.2s; border-radius: var(--radius-sm); }
.reaction-picker span:hover { background: rgba(255,255,255,0.1); transform: scale(1.3) translateY(-2px); }

/* Sanal hediye */
.gift-btn { background: transparent; border: none; color: #ff9ff3; cursor: pointer; font-size: 16px; padding: 0 4px; transition: transform 0.2s; filter: drop-shadow(0 0 2px rgba(255, 159, 243, 0.5)); }
.gift-btn:hover { transform: scale(1.3); }
.gift-picker-menu { position: absolute; background: rgba(20, 20, 25, 0.95); backdrop-filter: blur(10px); border: 1px solid rgba(255, 159, 243, 0.3); border-radius: var(--radius-md); padding: 10px; display: none; flex-direction: column; gap: 5px; z-index: 2000; box-shadow: 0 10px 30px rgba(0,0,0,0.5); min-width: 150px; }
.gift-item { display: flex; align-items: center; gap: 10px; padding: 8px; cursor: pointer; border-radius: var(--radius-sm); font-size: 14px; color: #fff; font-weight: 500; transition: 0.2s; }
.gift-item:hover { background: rgba(255, 159, 243, 0.2); color: #ff9ff3; }
.msg-gift-box { background: linear-gradient(135deg, rgba(255, 159, 243, 0.1) 0%, rgba(255, 159, 243, 0.25) 100%); border: 1px solid rgba(255, 159, 243, 0.5); border-radius: var(--radius-md); padding: 12px 15px; text-align: center; box-shadow: 0 4px 15px rgba(255, 159, 243, 0.2); margin: 8px 0; width: 100%; max-width: 280px; }
.msg-gift-icon { font-size: 34px; margin-bottom: 6px; display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3)); animation: bounceGift 2s infinite ease-in-out; }
.msg-gift-text { font-size: var(--chat-font-size, 13px) !important; color: #fff; font-weight: 500; line-height: 1.4; }
.msg-gift-text strong { color: #ff9ff3; font-weight: 800; font-size: calc(var(--chat-font-size, 13px) + 2px) !important; }
@keyframes bounceGift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Yazıyor animasyonu */
.typing-indicator { margin-left: auto; background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 10px !important; font-size: 11px; font-style: italic; color: #888 !important; display: flex; align-items: center; gap: 6px; transition: opacity 0.3s; }
.typing-indicator strong { color: #00f3ff; font-weight: 600; font-style: normal; }
.typing-dots { display: flex; gap: 3px; align-items: center; }
.typing-dots span { width: 5px; height: 5px; background: #00f3ff; border-radius: 50%; animation: typingBounce 1.4s infinite ease-in-out both; }
.typing-dots span:nth-child(1) { animation-delay: -0.32s; } .typing-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

/* Günün sözü kartı */
.quote-center-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; z-index: 9999; pointer-events: none; }
.quote-center-card { background: linear-gradient(135deg, rgba(30, 25, 20, 0.98), rgba(40, 30, 25, 0.98)); border-top: 4px solid #ffa502; border-radius: var(--radius-lg); padding: 30px 40px; max-width: 450px; box-shadow: 0 15px 50px rgba(0,0,0,0.8), 0 0 20px rgba(255, 165, 2, 0.2); text-align: center; animation: quotePopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, quoteFadeOut 0.5s ease 9.5s forwards; pointer-events: auto; backdrop-filter: blur(10px); }
.quote-center-icon { font-size: 40px; color: rgba(255, 165, 2, 0.3); line-height: 0.5; margin-bottom: 15px; }
.quote-center-text { font-size: 17px; color: #eee; font-style: italic; line-height: 1.6; font-family: 'Georgia', serif; }
.quote-center-author { font-size: 14px; color: #ffa502; font-weight: bold; margin-top: 20px; padding-top: 15px; border-top: 1px dashed rgba(255, 165, 0, 0.3); }
.quote-center-info { font-size: 11px; color: #666; margin-top: 15px; font-family: sans-serif; }
@keyframes quotePopIn { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes quoteFadeOut { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(0.8); opacity: 0; } }

/* Zar animasyonu */
.dice-message { display: flex; align-items: center; gap: 10px; background: linear-gradient(90deg, rgba(210, 105, 30, 0.1), transparent); padding: 10px 15px; border-left: 3px solid #d2691e; border-radius: var(--radius-md); margin: 10px 0; font-weight: bold; }
.dice-wrapper { display: flex; gap: 5px; }
.dice-cube { width: 30px; height: 30px; background: #fff; color: #000; border-radius: var(--radius-sm); display: flex; justify-content: center; align-items: center; font-size: 20px; font-weight: 900; box-shadow: 0 4px 8px rgba(0,0,0,0.3); border: 1px solid #ddd; animation: rollDiceAnim 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.dice-cube.red { color: #e74c3c; } 
@keyframes rollDiceAnim { 0% { transform: translateY(-20px) rotate(-180deg) scale(0.5); opacity: 0; } 50% { transform: translateY(0) rotate(20deg) scale(1.2); opacity: 1; } 100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } }

/* Işık teması düzenlemeleri */
body.light-theme .reaction-picker { background: rgba(255,255,255,0.95); border-color: #ddd; }
body.light-theme .reaction-badge { background: #f0f2f5; border-color: #ccc; color: #333; }
body.light-theme .reaction-badge.reacted { background: #e3f2fd; border-color: #007bff; color: #007bff; }
body.light-theme .gift-picker-menu { background: rgba(255,255,255,0.95); border-color: #ff9ff3; }
body.light-theme .gift-item { color: #333; }
body.light-theme .gift-item:hover { background: #ffeaf6; }
body.light-theme .msg-gift-box { background: linear-gradient(135deg, #ffeaf6 0%, #ffd1eb 100%); color: #333; }
body.light-theme .msg-gift-text { color: #333; }
body.light-theme .msg-gift-text strong { color: #d1007a; }
body.light-theme .typing-indicator { color: #666 !important; }
body.light-theme .typing-indicator strong { color: #007bff; }
body.light-theme .typing-dots span { background: #007bff; }
body.light-theme .quote-center-card { background: linear-gradient(135deg, #fffaf0, #fff0d4); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }
body.light-theme .quote-center-text { color: #444; }
body.light-theme .quote-center-author { color: #d35400; border-top-color: rgba(211, 84, 0, 0.2); }
/* Mesaj İçi Aksiyon Butonları (Yanıtla, Emoji) Hover Efektleri */
.msg-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.msg-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.15) translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

body.light-theme .msg-action-btn {
    background: rgba(0, 0, 0, 0.04);
    color: #64748b;
}

body.light-theme .msg-action-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}