/* --- ORTAK BİLEŞENLER (toolbar, modal, toast vb.) --- */

.chat-toolbar { background: #1a1a1a; padding: 8px; display: flex; gap: 10px; border-bottom: 1px solid #333; border-top: 1px solid #333; position: relative; align-items: center; }
.toolbar-btn { background: #333; color: white; border: none; padding: 5px 10px; border-radius: var(--radius-sm); cursor: pointer; font-weight: bold; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.toolbar-btn:hover { background: #555; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
.toolbar-btn.active { background: #007bff; color: white; box-shadow: 0 0 10px #007bff; }

/* Emoji ve GIF picker geliştirmeleri */
.toolbar-popup { 
    position: absolute; 
    bottom: 45px; 
    left: 10px; 
    background: #222; 
    border: 1px solid #444; 
    border-radius: var(--radius-md); 
    padding: 10px; 
    display: none; 
    width: 260px; 
    max-height: 300px; 
    overflow-y: auto; 
    z-index: 100; 
    box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
}
.emoji-item { 
    font-size: 24px; 
    cursor: pointer; 
    display: inline-block; 
    padding: 5px; 
    transition: transform 0.2s; 
}
.emoji-item:hover { transform: scale(1.3); }

/* GIF picker - 3 sütunlu grid yapısı */
#gif-picker {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 10px;
}
.gif-item { 
    width: 100%; 
    height: auto; 
    aspect-ratio: 1/1;
    object-fit: cover;
    cursor: pointer; 
    border-radius: var(--radius-sm); 
    transition: opacity 0.2s, transform 0.2s;
}
.gif-item:hover { 
    opacity: 0.8; 
    transform: scale(1.05); 
}

.chat-toolbar .font-size-btn { background: rgba(0, 243, 255, 0.1) !important; color: #00f3ff !important; border: 1px solid rgba(0, 243, 255, 0.3) !important; font-weight: 800; padding: 4px 8px !important; border-radius: var(--radius-sm) !important; }
.chat-toolbar .font-size-btn:hover { background: rgba(0, 243, 255, 0.25) !important; box-shadow: 0 0 10px rgba(0, 243, 255, 0.4); transform: scale(1.05); }

/* DM kutuları */
.dm-box { position: fixed; bottom: 0; width: 260px; background: #1e1e1e; border: 1px solid #333; border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); display: flex; flex-direction: column; box-shadow: 0 -5px 15px rgba(0,0,0,0.5); z-index: 1000; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); overflow: hidden; }
.dm-box.collapsed { transform: translateY(calc(100% - 38px)); }
.dm-header { background: #007bff; color: white; padding: 0 12px; height: 38px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.dm-header:hover { background: #0056b3; }
.dm-body { height: 250px; padding: 10px; overflow-y: auto; background: #111; display: flex; flex-direction: column; }
.dm-footer { padding: 8px; background: #222; border-top: 1px solid #333; width: 100%; box-sizing: border-box; display: flex; }
.dm-footer input { flex: 1; min-width: 0; box-sizing: border-box; margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid #444; background: #000; color: white; font-size: 13px; outline: none; transition: border 0.3s; }
.dm-footer input:focus { border: 1px solid #00f3ff; }

/* Modal pencereler */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 2000; }
.modal-content { background: #16161a; width: 100%; max-width: 400px; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.1); box-shadow: var(--shadow-glass); overflow: hidden; animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes modalPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.02); }
.modal-header h3 { margin: 0; font-size: 16px; color: #fff; display: flex; align-items: center; gap: 8px;}
.close-btn { background: transparent; border: none; color: #888; font-size: 16px; cursor: pointer; transition: 0.2s; border-radius: var(--radius-sm); }
.close-btn:hover { color: #ff4757; transform: scale(1.2); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 15px; }

/* İkon butonlar (üst sağdaki küçük butonlar) */
.icon-action-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); width: 30px; height: 30px; border-radius: var(--radius-sm); display: flex; justify-content: center; align-items: center; font-size: 14px; cursor: pointer; color: #fff; padding: 0; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.icon-action-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-1px) scale(1.05); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }

/* Toast bildirimleri */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.custom-toast { background: rgba(22, 22, 26, 0.95); color: #fff; padding: 16px 20px; border-radius: var(--radius-md); box-shadow: 0 10px 30px rgba(0,0,0,0.5); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 12px; animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), fadeOut 0.4s ease 4.6s forwards; backdrop-filter: blur(10px); min-width: 250px; max-width: 350px; border: 1px solid rgba(255,255,255,0.05); border-left: 4px solid #007bff; }
.custom-toast:hover { animation-play-state: paused; opacity: 1 !important; }
.custom-toast.toast-success { border-left-color: #0aff00; } .custom-toast.toast-error { border-left-color: #ff4757; } .custom-toast.toast-warning { border-left-color: #f39c12; } .custom-toast.toast-info { border-left-color: #00f3ff; }
.toast-icon { font-size: 22px; flex-shrink: 0; }
@keyframes toastSlideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; display: none; } }

/* Duyuru bandı (marquee) */
.marquee-wrapper { background: #0a0a0c; border-bottom: 1px solid #ff4757; color: #fff; padding: 8px 0; display: flex; align-items: center; overflow: hidden; position: relative; box-shadow: 0 2px 10px rgba(255, 71, 87, 0.2); z-index: 10; width: 100%; flex-shrink: 0; }
.marquee-label { background: #ff4757; color: #fff; font-weight: 800; padding: 8px 15px; font-size: 12px; text-transform: uppercase; position: absolute; left: 0; z-index: 2; box-shadow: 2px 0 10px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 5px; }
.marquee-content { white-space: nowrap; font-weight: 600; font-size: 14px; text-shadow: 0 0 5px rgba(255,255,255,0.5); animation: scroll-marquee 25s linear infinite; padding-left: 100%; }
.marquee-content:hover { animation-play-state: paused; cursor: default; }
@keyframes scroll-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* Üst oda listesi */
.top-rooms-bar { background: #111114; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 8px 16px; overflow-x: auto; display: flex; align-items: center; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
.top-rooms-bar::-webkit-scrollbar { height: 4px; }
.horizontal-room-list { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; width: max-content; }
.horizontal-room-list .room-item { padding: 5px 12px; border-radius: var(--radius-sm); background-color: #1a1a20; border: 1px solid rgba(255, 255, 255, 0.1); white-space: nowrap; font-weight: 600; font-size: 11.5px; transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.2); cursor: pointer; color: #aaa; }
.horizontal-room-list .room-item:hover { background-color: #22222a; border-color: rgba(255, 255, 255, 0.2); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
.horizontal-room-list .room-item.active-room { background-color: rgba(0, 243, 255, 0.1); border: 1px solid rgba(0, 243, 255, 0.4); box-shadow: 0 0 10px rgba(0, 243, 255, 0.15); color: #00f3ff; }
.room-hash { font-size: 12px; opacity: 0.5; font-weight: 300; }

/* Işık teması (light) ayarları */
body.light-theme .modal-content { background: #fff; border: 1px solid #ccc; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }
body.light-theme .modal-header { border-bottom: 1px solid #eee; background: #f8f9fa; }
body.light-theme .modal-header h3 { color: #333; }
body.light-theme .icon-action-btn { background: #ffffff; border: 1px solid #e0e0e0; color: #333; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
body.light-theme .icon-action-btn:hover { background: #f8f9fa; border-color: #ccc; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
body.light-theme .custom-toast { background: rgba(255, 255, 255, 0.95); color: #333; box-shadow: 0 5px 20px rgba(0,0,0,0.15); border-color: #ddd; }
body.light-theme .chat-toolbar .font-size-btn { background: #e3f2fd !important; color: #007bff !important; border-color: #007bff !important; }
body.light-theme .chat-toolbar .font-size-btn:hover { background: #cce5ff !important; box-shadow: 0 0 8px rgba(0, 123, 255, 0.3); }
body.light-theme .marquee-wrapper { background: #fff; border-bottom: 2px solid #e63946; }
body.light-theme .marquee-content { color: #333; text-shadow: none; }
body.light-theme .top-rooms-bar { background: #ffffff; border-bottom: 1px solid #ddd; }
body.light-theme .horizontal-room-list .room-item { background-color: #f8f9fa; border: 1px solid #ccc; color: #555; }
body.light-theme .horizontal-room-list .room-item:hover { background-color: #e9ecef; color: #000; }