/* --- 1. ZMIENNE I KONFIGURACJA BAZOWA --- */
:root {
    --bg-dark: #0a0a0a;
    --panel-bg: #161616;
    --neon-red: #ff2b2b;
    --neon-red-glow: rgba(255, 43, 43, 0.4);
    --text-main: #e0e0e0;
    --text-muted: #888;
    --glass-border: rgba(255, 255, 255, 0.05);
}


/* 1. Space Vibes (Kosmiczny Granat + Neonowy Błękit) */
body.theme-space {
    --bg-dark: #050b14;
    --panel-bg: #0a1526;
    --neon-red: #00d2ff; 
    --neon-red-glow: rgba(0, 210, 255, 0.4);
    --text-main: #e0f2fe;
    --text-muted: #608eb8;
    --glass-border: rgba(0, 210, 255, 0.1);
}

/* 2. Italo / Retro Wave (Ciemny Fiolet + Róż) */
body.theme-italo {
    --bg-dark: #120420;
    --panel-bg: #210b38;
    --neon-red: #ff00ff; 
    --neon-red-glow: rgba(255, 0, 255, 0.4);
    --text-main: #fae8ff;
    --text-muted: #a67cbf;
    --glass-border: rgba(255, 0, 255, 0.1);
}

/* 3. 80s Miami Sunset (Głęboki granat i flamingowy róż) */
body.theme-80s {
    --bg-dark: #081226;
    --panel-bg: #11203d;
    --neon-red: #ff2a75; 
    --neon-red-glow: rgba(255, 42, 117, 0.4);
    --text-main: #e2e8f0;
    --text-muted: #7ca1d1;
    --glass-border: rgba(255, 42, 117, 0.15);
}

/* 4. 90s Matrix Hacker (Smolista czerń i terminalowa zieleń) */
body.theme-90s {
    --bg-dark: #000000;
    --panel-bg: #0a0a0a;
    --neon-red: #00ff41; 
    --neon-red-glow: rgba(0, 255, 65, 0.4);
    --text-main: #e0e0e0;
    --text-muted: #008f11;
    --glass-border: rgba(0, 255, 65, 0.1);
}

/* 5. Light Mode (Zwykły Jasny motyw) */
body.theme-light {
    --bg-dark: #f0f2f5;
    --panel-bg: #ffffff;
    --neon-red: #ff2b2b; 
    --neon-red-glow: rgba(255, 43, 43, 0.2);
    --text-main: #1a1a1a; 
    --text-muted: #666666;
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* 6. Studio Silver (Szczotkowane aluminium i pomarańcz) */
body.theme-studio {
    --bg-dark: #e2e8f0;
    --panel-bg: #f8fafc;
    --neon-red: #ff6b00; 
    --neon-red-glow: rgba(255, 107, 0, 0.2);
    --text-main: #1e293b;
    --text-muted: #475569;
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* 7. Vintage Acoustic (Ciepły beż, drewno i złoto/bursztyn) */
body.theme-vintage {
    --bg-dark: #f4f1ea; 
    --panel-bg: #ffffff;
    --neon-red: #b8860b; 
    --neon-red-glow: rgba(184, 134, 11, 0.2);
    --text-main: #3e2723; 
    --text-muted: #8d6e63;
    --glass-border: rgba(139, 69, 19, 0.1);
}

/* ==========================================
   NAPRAWA JASNYCH TEŁ (PEŁNA ZGODNOŚĆ)
   Dotyczy motywów: light, studio, vintage
   ========================================== */

body.theme-light .chat-header,
body.theme-studio .chat-header,
body.theme-vintage .chat-header { background: rgba(255, 255, 255, 0.95) !important; }

body.theme-light .message-bubble.is-other .text-content,
body.theme-studio .message-bubble.is-other .text-content,
body.theme-vintage .message-bubble.is-other .text-content { 
    background: #f0f2f5 !important; 
    color: #1a1a1a !important; 
    border: 1px solid #e0e0e0 !important; 
}

body.theme-light .input-row,
body.theme-studio .input-row,
body.theme-vintage .input-row { 
    background: #ffffff !important; 
    border-color: #d0d0d0 !important; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

body.theme-light #msg-input,
body.theme-studio #msg-input,
body.theme-vintage #msg-input { color: #1a1a1a !important; }

body.theme-light #msg-input::placeholder,
body.theme-studio #msg-input::placeholder,
body.theme-vintage #msg-input::placeholder { color: #888 !important; }

body.theme-light .chat-extra-tools,
body.theme-studio .chat-extra-tools,
body.theme-vintage .chat-extra-tools { background: #f8f9fa !important; border-top: 1px solid #ddd !important; }

body.theme-light .extra-btn,
body.theme-studio .extra-btn,
body.theme-vintage .extra-btn { background: #ffffff !important; color: #333 !important; border: 1px solid #e0e0e0 !important; }

body.theme-light .nav-links,
body.theme-studio .nav-links,
body.theme-vintage .nav-links { background: #f0f2f5 !important; border: 1px solid #e0e0e0 !important; }

body.theme-light .nav-link,
body.theme-studio .nav-link,
body.theme-vintage .nav-link { color: #555 !important; }

body.theme-light .stat-card,
body.theme-studio .stat-card,
body.theme-vintage .stat-card { background: #f0f2f5 !important; border: 1px solid #e0e0e0 !important; }

body.theme-light .stat-value,
body.theme-studio .stat-value,
body.theme-vintage .stat-value { color: #1a1a1a !important; }

body.theme-light #powiadomienieWP,
body.theme-studio #powiadomienieWP,
body.theme-vintage #powiadomienieWP { color: #1a1a1a !important; background: #ffeaea !important; }

body.theme-light .system-wiesio,
body.theme-studio .system-wiesio,
body.theme-vintage .system-wiesio { color: #cc0000 !important; background: #ffeaea !important; }

body.theme-light #bot-informator,
body.theme-studio #bot-informator,
body.theme-vintage #bot-informator { background: #ffffff !important; border-bottom: 1px solid #e0e0e0 !important; }

body.theme-light #bot-informator-text,
body.theme-studio #bot-informator-text,
body.theme-vintage #bot-informator-text { color: #1a1a1a !important; }

body.theme-light .online-stats-container,
body.theme-studio .online-stats-container,
body.theme-vintage .online-stats-container { background: #f8f9fa !important; border-top: 1px solid #e0e0e0 !important; }

body.theme-light .shop-item-card,
body.theme-studio .shop-item-card,
body.theme-vintage .shop-item-card { background: #f8f9fa !important; border: 1px solid #e0e0e0 !important; color: #1a1a1a !important; }

body.theme-light .popup-window,
body.theme-studio .popup-window,
body.theme-vintage .popup-window { background: #ffffff !important; border-color: #e0e0e0 !important; color: #1a1a1a !important; }

body.theme-light .popup-window h2,
body.theme-studio .popup-window h2,
body.theme-vintage .popup-window h2 { color: #1a1a1a !important; }


/* Wygląd przełącznika motywów */
.theme-switcher {
    display: flex;
    gap: 8px;
    margin-right: 15px; /* Odstęp od ikonki wylogowania itp. */
}
.theme-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #333;
    cursor: pointer;
    transition: 0.2s;
}
.theme-btn:hover { transform: scale(1.2); }

* { box-sizing: border-box; }

html {
    /* BLOKADA SYSTEMOWEGO POWIĘKSZANIA CZCIONKI (SAMSUNG / ANDROID / iOS) */
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background: radial-gradient(circle at center, #1a0a0a 0%, #0a0a0a 100%);
    overflow-x: hidden;
    overflow-y: auto; 
    
    /* Zabezpieczenie dla samego body */
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

/* --- 2. GŁÓWNY KONTENER --- */
.chat-container {
    display: flex;
    flex-direction: column;
    width: 95vw;
    max-width: 1000px;
    height: 90vh;
    background: var(--panel-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

@media (min-width: 769px) {
    body { align-items: center; }
}

/* =========================================================
   3. NAGŁÓWEK CZATU (NOWA, PROFESJONALNA BELKA) 
   ========================================================= */
.chat-header {
    flex-shrink: 0;
    padding: 12px 20px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 43, 43, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap; 
}

.header-section {
    display: flex;
    align-items: center;
}

/* --- LEWA STRONA (Radio Info) --- */
.radio-info {
    gap: 8px;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* --- ŚRODEK (Statystyki Punktowe) --- */
.header-stats {
    display: flex;
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    transition: 0.3s;
}

.stat-card:hover {
    border-color: rgba(255, 43, 43, 0.4);
    background: rgba(255, 43, 43, 0.05);
}

.stat-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

/* --- PRAWA STRONA (Użytkownik i Menu) --- */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-msg {
    font-size: 12px;
    color: #bbb;
    text-align: right;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.welcome-msg .author {
    font-size: 15px;
    margin-bottom: 0;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 5px;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    color: #aaa;
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-left: 0 !important;
}

.nav-link:hover {
    background: rgba(255, 43, 43, 0.2);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(255, 43, 43, 0.4);
}

#chat-window { flex: 1; overflow-y: auto; }

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch !important; 
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
.chat-messages::-webkit-scrollbar-thumb { background: var(--neon-red); border-radius: 10px; box-shadow: 0 0 10px var(--neon-red); }

.chat-input-area {
    flex-shrink: 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
}

/* --- 3. WIADOMOŚCI I TREŚĆ --- */
.message, .message-bubble, .system-wiesio, .message-item.system {
    width: 100% !important; 
    max-width: 100% !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 10px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-left: 3px solid rgba(255, 43, 43, 0.3);
    margin-bottom: 10px;
    transition: 0.3s ease;
    word-break: break-word;
}

.message-bubble:hover {
    border-left-width: 6px;
    background: rgba(255, 255, 255, 0.04);
}

.message-admin {
    border-left: 4px solid var(--neon-red) !important;
    background: linear-gradient(90deg, rgba(255, 43, 43, 0.15) 0%, transparent 100%) !important;
    box-shadow: inset 5px 0 15px rgba(255, 43, 43, 0.05);
}

.message-presenter {
    border-left: 4px solid #cc0000 !important;
    background: linear-gradient(90deg, rgba(204, 0, 0, 0.1) 0%, transparent 100%) !important;
}

.message-mention { background: rgba(255, 165, 0, 0.15) !important; border-left: 4px solid #ffa500 !important; }
.mention-me { background: #ffa500; color: #fff; padding: 2px 5px; border-radius: 4px; font-weight: bold; }

.message-header { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; margin-bottom: 5px; }
.author { font-weight: bold; color: var(--neon-red); font-size: 0.9em; margin-bottom: 4px; display: block; }
.time { font-size: 0.7em; color: var(--text-muted); float: right; margin-top: 5px; }

.avatar-container { position: relative; display: flex; align-items: center; }
.user-avatar { width: 40px; height: 40px; min-width: 40px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(255, 43, 43, 0.3); background-color: #222; }

.winner-nick { color: #ffd700 !important; font-weight: 800; text-shadow: 0 0 10px rgba(255, 215, 0, 0.6); background: linear-gradient(90deg, #ffd700, #fff, #ffd700); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: shine 3s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.veteran-badge { color: #ffd700; margin-right: 5px; font-size: 0.9em; filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.4)); }

/* --- 4. REAKCJE I EDIT --- */
.message-wrapper { position: relative; padding-right: 40px; }
.reaction-trigger-area { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity 0.2s; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.message-wrapper:hover .reaction-trigger-area { opacity: 1; }
.reaction-trigger-area.always-visible { opacity: 1 !important; visibility: visible !important; position: relative !important; right: 0 !important; top: 0 !important; transform: none !important; margin-left: 10px; }

.react-btn { color: var(--neon-red) !important; font-size: 1.1rem; transition: 0.3s ease; text-shadow: 0 0 5px var(--neon-red-glow); }
.react-btn:hover { transform: scale(1.2); color: #fff !important; }

.messenger-picker { display: none; position: absolute; bottom: 30px; right: 0; background: #1a1a1a; border: 1px solid #ff2b2b; border-radius: 20px; padding: 5px 10px; z-index: 9999; }
.messenger-picker.active { display: flex !important; gap: 8px; animation: pickerReveal 0.2s ease-out forwards; }
.messenger-picker span { cursor: pointer; font-size: 1.2rem; transition: 0.2s; }
.messenger-picker span:hover { transform: scale(1.3) translateY(-5px); text-shadow: 0 0 10px #fff; }
@keyframes pickerReveal { from { opacity: 0; transform: translateY(10px) scale(0.8); } to { opacity: 1; transform: translateY(0) scale(1); } }

.reactions-display { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.reaction-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 43, 43, 0.15); border: 1px solid rgba(255, 43, 43, 0.4); padding: 2px 8px; border-radius: 12px; font-size: 0.85rem; cursor: default; transition: background 0.2s; animation: popIn 0.3s forwards; }
.reaction-badge:hover { transform: translateY(-2px) scale(1.05); background: rgba(255, 43, 43, 0.3); box-shadow: 0 4px 10px var(--neon-red-glow); }
.reaction-count { font-size: 0.75rem; color: #fff; font-weight: bold; margin-left: 4px; }
@keyframes popIn { 0% { transform: scale(0); } 80% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* --- 5. WPISYWANIE --- */
#message-form { display: block; background: none; border: none; padding: 0; }
.input-row { display: flex; align-items: center; gap: 10px; background: #1a1a1a; padding: 8px 15px; border-radius: 30px; border: 1px solid #333; transition: 0.3s ease; position: relative; overflow: hidden; z-index: 1; }
.input-row:focus-within { border-color: var(--neon-red); box-shadow: 0 0 15px var(--neon-red-glow); }
.input-row::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background: var(--neon-red); transition: all 0.4s ease; box-shadow: 0 0 10px var(--neon-red); }
.input-row:focus-within::after { left: 0; width: 100%; }

.input-tools { display: flex; gap: 12px; align-items: center; }
.tool-btn { background: none !important; border: none !important; color: var(--text-muted); font-size: 1.25rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; padding: 5px; }
.tool-btn:hover { color: var(--neon-red); transform: scale(1.1) translateY(-1px); }

#msg-input { flex: 1; background: none; border: none; color: #fff; padding: 8px 0; font-size: 16px; outline: none; }
#msg-input::placeholder { transition: opacity 0.3s; }
#msg-input:focus::placeholder { opacity: 0.3; }

#send-btn { background: none !important; border: none !important; color: var(--neon-red); font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.3s ease; padding: 0; margin: 0; }
#send-btn:hover { color: #fff; filter: drop-shadow(0 0 8px var(--neon-red)); transform: scale(1.1) rotate(-10deg); }

.edit-input-modern { width: 100%; background: rgba(0,0,0,0.5) !important; border: 1px solid var(--neon-red) !important; color: #fff !important; padding: 8px !important; border-radius: 8px !important; outline: none !important; font-family: inherit; font-size: 0.95rem; box-shadow: 0 0 10px var(--neon-red-glow); margin-top: 5px; }

/* --- 6. SYSTEM POPUP (MOCNO ZOPTYMALIZOWANY) --- */
.popup-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 999999 !important;
}

.popup-window {
    background: #0b0b0b !important;
    border: 2px solid var(--neon-red) !important;
    border-radius: 15px !important;
    width: 95% !important;
    max-width: 800px !important; 
    padding: 25px !important;
    position: relative !important;
    box-shadow: 0 0 30px var(--neon-red-glow) !important;
    margin: auto !important;
    max-height: 95vh !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box;
}

.popup-window h2 { color: #fff; text-align: center; margin-bottom: 15px; margin-top: 0; text-transform: uppercase; font-size: 1.2rem; letter-spacing: 1px; }

/* Kluczowe ustawienia dla ramek z pozdrowieniami i ramówką */
.popup-window iframe {
    width: 100% !important;
    max-width: 600px !important;
    height: 600px !important; 
    border: none !important;
    flex-grow: 1 !important;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
    background: transparent;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.popup-close-btn { display: block; width: 100%; margin-top: 15px; padding: 10px; background: #1a1a1a; border: 1px solid #333; color: #888; border-radius: 6px; cursor: pointer; transition: 0.3s; font-weight: bold; }
.popup-close-btn:hover { background: var(--neon-red); color: #fff; border-color: var(--neon-red); }

/* --- ZDJĘCIA W CZACIE I POWIĘKSZANIE --- */
.chat-image-wrapper { margin: 10px 0; width: fit-content; max-width: 100%; }
.chat-img { display: block; max-width: 200px; max-height: 150px; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--glass-border); transition: 0.2s; }
.chat-img:hover { transform: scale(1.03); box-shadow: 0 0 15px var(--neon-red-glow); opacity: 0.8; }

.image-preview-window { max-width: 550px !important; width: 90% !important; background: #000 !important; border: 1px solid #444 !important; padding: 10px !important; border-radius: 12px !important; box-shadow: 0 0 30px rgba(0, 0, 0, 0.9) !important; position: relative; }
#previewImg { display: block; max-width: 100%; max-height: 75vh; height: auto; margin: 0 auto; border-radius: 6px; }
.image-preview-window .close-player { position: absolute; top: -15px; right: -15px; background: #ff2b2b; color: white; width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; font-size: 20px; border: 2px solid #000; }
.image-preview-window img { box-shadow: 0 0 25px rgba(255, 43, 43, 0.5); border: 2px solid rgba(255, 255, 255, 0.1); }

/* Najwyższa warstwa obrazka */
#image-overlay { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; background: rgba(0, 0, 0, 0.95) !important; display: none; justify-content: center; align-items: center; z-index: 2147483646 !important; cursor: zoom-out; }
#overlay-img { position: relative !important; z-index: 2147483647 !important; max-width: 90vw !important; max-height: 85vh !important; width: auto !important; height: auto !important; display: block !important; visibility: visible !important; opacity: 1 !important; object-fit: contain; border: 4px solid #ff2b2b; box-shadow: 0 0 50px rgba(255, 43, 43, 0.8); background-color: #000; }

/* --- 7. PRZYCISKI DOLNE (RAMÓWKA/SKLEP) --- */
.chat-extra-tools {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto; 
    padding: 12px;
    padding-bottom: 8px;
    background: rgba(0, 0, 0, 0.6);
    border-top: 1px solid rgba(255, 43, 43, 0.2);
    border-radius: 0 0 15px 15px;
}
.chat-extra-tools::-webkit-scrollbar { height: 4px; }
.chat-extra-tools::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 4px; }
.chat-extra-tools::-webkit-scrollbar-thumb { background: var(--neon-red); border-radius: 4px; }

.extra-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap !important;
    transition: all 0.3s ease;
}
.extra-btn i { font-size: 14px; color: #ff2b2b; text-shadow: 0 0 5px rgba(255, 43, 43, 0.5); transition: transform 0.3s; }
.extra-btn:hover { background: rgba(255, 43, 43, 0.15); border-color: #ff2b2b; box-shadow: 0 0 15px rgba(255, 43, 43, 0.3); transform: translateY(-2px); }
.extra-btn:active { transform: scale(0.92); }
.extra-btn:hover i { transform: rotate(15deg) scale(1.2); }

.btn-player { border-color: rgba(255, 43, 43, 0.4); background: rgba(255, 43, 43, 0.05); }
.btn-player i { animation: pulse-red 2s infinite; }

/* --- 8. SKLEP --- */
.shop-modal { width: 95%; max-width: 850px !important; background: #0f0f0f; border: 2px solid var(--neon-red); box-shadow: 0 0 40px rgba(255, 43, 43, 0.2); }
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 10px; max-height: 70vh; overflow-y: auto; margin: 20px 0; }
.shop-item-card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 25px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: all 0.3s ease; justify-content: space-between; }
.shop-item-card:hover { background: rgba(255, 43, 43, 0.05); border-color: var(--neon-red); transform: translateY(-5px); }
.shop-item-card h4 { color: var(--neon-red); text-shadow: 0 0 5px var(--neon-red-glow); margin-bottom: 10px; }
.item-price-tag { color: #ffd700; font-weight: bold; font-size: 1.1rem; display: block; margin: 10px 0; }
.btn-buy { width: 100%; padding: 8px; border-radius: 20px; border: none; background: var(--neon-red); color: #fff; font-weight: bold; cursor: pointer; }
.btn-buy:disabled { background: #444; cursor: not-allowed; }

/* --- 9. PANEL EMOTEK --- */
.emotes-popover { position: absolute; bottom: 85px; left: 20px; width: 320px; height: 380px; backdrop-filter: blur(10px); background: rgba(20, 20, 20, 0.9); border: 1px solid var(--neon-red); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); z-index: 1000; display: none; flex-direction: column; overflow: hidden; }
.emotes-search-box { display: none !important; }
.emotes-favorites { padding: 8px 12px; background: rgba(255, 43, 43, 0.08); border-bottom: 1px solid #333; }
.favorites-label { font-size: 10px; color: var(--neon-red); text-transform: uppercase; font-weight: bold; display: block; margin-bottom: 6px; }
.fav-row-layout { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 8px; padding: 5px 0; }
.emotes-grid { display: grid !important; grid-template-columns: repeat(7, 1fr) !important; gap: 4px; padding: 10px; overflow-y: auto; flex: 1; }
.emote-item { font-size: 24px; cursor: pointer; display: flex; justify-content: center; align-items: center; aspect-ratio: 1/1; border-radius: 8px; transition: background 0.2s, transform 0.1s; }
.emote-item:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.1); }

/* --- 10. MATRIX MODE I KOMUNIKATY SYSTEMOWE --- */
body.matrix-mode { background: #050505 !important; position: relative; overflow-x: hidden; }
body.matrix-mode::before { content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(255, 43, 43, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 43, 43, 0.05) 1px, transparent 1px); background-size: 30px 30px; z-index: -1; pointer-events: none; }
body.matrix-mode::after { content: ""; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255, 43, 43, 0.03) 0%, transparent 70%); animation: matrixRotate 20s linear infinite; z-index: -1; }
@keyframes matrixRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
body.matrix-mode .message-bubble { border-color: rgba(255, 43, 43, 0.2); box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); }

.system-wiesio { background: rgba(255, 43, 43, 0.08) !important; border: 1px solid rgba(255, 43, 43, 0.4) !important; color: #fff; padding: 15px; border-radius: 12px; margin: 15px 0; text-align: center; font-weight: 600; animation: neon-pulse 2s infinite ease-in-out; }
.system-message-content { display: flex; align-items: center; justify-content: center; gap: 12px; }
.system-message-content i { color: var(--neon-red); font-size: 1.3rem; }
@keyframes neon-pulse { 0% { border-color: rgba(255, 43, 43, 0.3); box-shadow: 0 0 5px rgba(255, 43, 43, 0.1); } 50% { border-color: rgba(255, 43, 43, 0.8); box-shadow: 0 0 15px rgba(255, 43, 43, 0.4); } 100% { border-color: rgba(255, 43, 43, 0.3); box-shadow: 0 0 5px rgba(255, 43, 43, 0.1); } }
.legend-entry-bubble { background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent); border-top: 1px solid rgba(255, 215, 0, 0.3); border-bottom: 1px solid rgba(255, 215, 0, 0.3); padding: 15px 0; margin: 10px 0; text-align: center; animation: legendPulse 2s infinite; }
.legend-glow { text-shadow: 0 0 10px rgba(255, 215, 0, 0.8); }
@keyframes legendPulse { 0% { opacity: 0.8; } 50% { opacity: 1; transform: scale(1.02); } 100% { opacity: 0.8; } }

/* --- 11. INNE ELEMENTY (CYTATY, YOUTUBE, ONLINE) --- */
.reply-preview-bar { display: flex; align-items: center; justify-content: space-between; background: rgba(255, 43, 43, 0.08); border-left: 4px solid var(--neon-red); border-radius: 8px 8px 0 0; padding: 8px 15px; margin-bottom: -15px; padding-bottom: 20px; z-index: 0; }
.reply-content-box { display: flex; flex-direction: column; overflow: hidden; }
.reply-user { color: var(--neon-red); font-size: 0.75rem; font-weight: 600; margin-bottom: 2px; }
.reply-text { color: #aaa; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-close-btn { background: none; border: none; color: #888; font-size: 1.2rem; cursor: pointer; transition: 0.2s; padding: 0 5px; }
.reply-close-btn:hover { color: var(--neon-red); transform: scale(1.2); }
.message-quote-box { background: rgba(0, 0, 0, 0.25); border-left: 3px solid var(--neon-red); padding: 6px 10px; border-radius: 4px; margin-bottom: 8px; cursor: pointer; transition: background 0.2s; }
.message-quote-box:hover { background: rgba(255, 43, 43, 0.15); }
.quote-author { color: var(--neon-red); font-size: 0.75rem; font-weight: bold; margin-bottom: 3px; }
.quote-text { color: #aaa; font-size: 0.8rem; font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes highlightFlash { 0% { background-color: rgba(255, 43, 43, 0.4); box-shadow: 0 0 15px var(--neon-red); } 100% { background-color: rgba(255, 255, 255, 0.02); box-shadow: none; } }
.highlight-flash { animation: highlightFlash 2s ease-out; }

.yt-preview-box { position: relative; width: 100%; max-width: 320px; border-radius: 12px; overflow: hidden; cursor: pointer; margin-top: 10px; border: 1px solid var(--glass-border); box-shadow: 0 4px 10px rgba(0,0,0,0.3); background: #000; }
.yt-thumbnail { width: 100%; display: block; opacity: 0.8; transition: all 0.3s ease; }
.yt-preview-box:hover .yt-thumbnail { opacity: 1; transform: scale(1.05); }
.yt-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(255, 43, 43, 0.9); color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 0 15px rgba(255, 43, 43, 0.6); transition: 0.3s; pointer-events: none; }
.yt-preview-box:hover .yt-play-btn { background: #ff0000; transform: translate(-50%, -50%) scale(1.1); }
#yt-lightbox-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); z-index: 99999; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.yt-lightbox-content { position: relative; width: 90%; max-width: 800px; aspect-ratio: 16/9; background: #000; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.yt-lightbox-content iframe { width: 100%; height: 100%; border-radius: 12px; }
.yt-lightbox-close { position: absolute; top: -40px; right: 0; color: white; font-size: 35px; cursor: pointer; transition: 0.2s; }
.yt-lightbox-close:hover { color: var(--neon-red); }

.online-stats-container { padding: 10px 15px; background: rgba(0, 0, 0, 0.4); border-top: 1px solid var(--glass-border); font-size: 0.85rem; }
.online-header { color: var(--neon-red); font-weight: bold; text-transform: uppercase; margin-bottom: 5px; font-size: 0.75rem; }
.online-users-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 5px; }
.online-user { font-weight: 600; text-shadow: 0 0 5px rgba(255, 255, 255, 0.1); }
.dot-sep { color: #444; }
.online-guests { font-size: 0.8rem; color: #777; font-style: italic; }
.loading-dots { color: #555; animation: pulse 1.5s infinite; }
.user-custom-status { font-size: 0.7rem; color: var(--neon-red); text-transform: uppercase; letter-spacing: 1px; font-weight: bold; margin-top: -2px; opacity: 0.8; }

/* =========================================================
   12. NOWOCZESNY WYGLĄD 2026 (MESSENGER + NEON + HOVER)
   ========================================================= */
.chat-messages { gap: 6px !important; padding: 15px 15px !important; }
.message-item, .message-wrapper { display: flex !important; flex-direction: row !important; align-items: flex-end !important; background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin-bottom: 4px !important; width: 100% !important; }
.message-item .user-avatar { width: 32px !important; height: 32px !important; min-width: 32px !important; border-radius: 50% !important; margin-right: 12px !important; margin-bottom: 2px !important; border: 1px solid var(--neon-red) !important; box-shadow: 0 0 6px var(--neon-red-glow) !important; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }
.message-content-wrapper { display: flex !important; flex-direction: column !important; flex: 1 !important; max-width: 100% !important; }
.message-header { display: flex !important; flex-direction: row !important; align-items: baseline !important; gap: 8px !important; background: transparent !important; border: none !important; padding: 0 0 4px 4px !important; margin: 0 !important; }
.message-header .author { font-size: 0.8rem !important; color: var(--neon-red) !important; text-shadow: 0 0 3px var(--neon-red-glow) !important; margin: 0 !important; }
.message-header .time { font-size: 0.65rem !important; }
.message-bubble, .message-item.system { background-color: rgba(20, 20, 20, 0.8) !important; color: var(--text-main) !important; padding: 10px 15px !important; border-radius: 12px !important; font-size: 0.95rem !important; line-height: 1.4 !important; width: 100% !important; margin: 0 !important; border: 1px solid rgba(255, 43, 43, 0.15) !important; border-left: 3px solid rgba(255, 43, 43, 0.5) !important; box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important; transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }

/* MIKROINTERAKCJE */
.message-item:hover .message-bubble { background-color: #1a1a1a !important; border: 1px solid rgba(255, 43, 43, 0.4) !important; border-left: 3px solid var(--neon-red) !important; box-shadow: 0 4px 15px rgba(255, 43, 43, 0.15), 0 2px 4px rgba(0,0,0,0.6) !important; transform: translateY(-2px) !important; }
.message-item:hover .user-avatar { box-shadow: 0 0 12px var(--neon-red-glow), 0 0 5px var(--neon-red) !important; transform: scale(1.1) !important; }
.system-wiesio { background-color: rgba(255, 43, 43, 0.1) !important; color: #ff5555 !important; border-radius: 12px !important; padding: 10px 15px !important; border: 1px solid rgba(255, 43, 43, 0.4) !important; width: 100% !important; transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }
.message-item:hover .system-wiesio { background-color: rgba(255, 43, 43, 0.2) !important; box-shadow: 0 4px 15px rgba(255, 43, 43, 0.3) !important; transform: translateY(-2px) !important; }

/* POWIADOMIENIE I ZALOGUJ SIĘ */
#powiadomienieWP { background: rgba(255, 43, 43, 0.15) !important; border: 1px solid rgba(255, 43, 43, 0.4) !important; border-left: 4px solid var(--neon-red) !important; color: #fff !important; padding: 12px 15px !important; margin: 10px 15px !important; border-radius: 8px !important; font-size: 0.95rem !important; font-weight: 500 !important; display: flex; align-items: center; gap: 10px; box-shadow: 0 0 10px rgba(255, 43, 43, 0.2) !important; animation: pulse-alert 2s infinite !important; z-index: 10; }
#powiadomienieWP i { color: var(--neon-red) !important; font-size: 1.2rem !important; text-shadow: 0 0 8px var(--neon-red-glow) !important; }
@keyframes pulse-alert { 0% { box-shadow: 0 0 5px rgba(255, 43, 43, 0.2); } 50% { box-shadow: 0 0 15px rgba(255, 43, 43, 0.6); } 100% { box-shadow: 0 0 5px rgba(255, 43, 43, 0.2); } }
.btn-user.btn-profile { display: inline-flex !important; align-items: center !important; justify-content: center !important; background: rgba(255, 43, 43, 0.1) !important; color: #fff !important; text-decoration: none !important; padding: 8px 20px !important; border: 1px solid var(--neon-red) !important; border-radius: 20px !important; font-size: 13px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: 1px !important; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; box-shadow: 0 0 10px rgba(255, 43, 43, 0.2) !important; white-space: nowrap !important; }
.btn-user.btn-profile:hover { background: var(--neon-red) !important; color: #fff !important; box-shadow: 0 0 20px var(--neon-red-glow) !important; transform: translateY(-2px) !important; }

/* =========================================================
   13. OSTATECZNA, HYPER-KOMPAKTOWA WERSJA MOBILNA
   ========================================================= */
@media (max-width: 768px) {
    /* Ustawienia okna głównego - likwidacja obciętego dołu */
    html, body { height: 100%; overflow: hidden; align-items: flex-start; }
    .main-container, .content-wrapper { display: flex; flex-direction: column; width: 100% !important; padding: 0; margin: 0; }
    body .chat-container { width: 100vw; height: 100dvh !important; max-height: 100% !important; border-radius: 0; border: none; display: flex !important; flex-direction: column !important; }

    /* Nagłówek - Bardzo płaski i mały */
    body .chat-container .chat-header { display: flex !important; flex-wrap: wrap !important; padding: 6px 10px !important; gap: 5px 10px !important; align-items: center !important; justify-content: space-between !important; min-height: 40px !important; background: #0b0b0b !important; border-bottom: 1px solid rgba(255, 43, 43, 0.2) !important; }
    body .chat-container .header-section.user-meta { order: 1 !important; margin: 0 !important; flex: 1 !important; }
    body .chat-container .user-menu { display: flex !important; gap: 8px !important; align-items: center !important; }
    
    /* Zmniejszony przycisk Zaloguj i Ikonki Profilu */
    body .chat-container .btn-user.btn-profile { padding: 5px 12px !important; font-size: 11px !important; border-width: 1px !important; }
    body .chat-container .nav-link { width: 28px !important; height: 28px !important; font-size: 12px !important; margin-left: 0 !important; }
    
    body .chat-container .header-section.radio-info { order: 2 !important; flex: 0 0 auto !important; display: flex !important; align-items: center !important; }
    body .chat-container .online-status { font-size: 12px !important; } /* Mniejsze OKO */

    body .chat-container .header-section.header-stats { order: 3 !important; width: 100% !important; display: flex !important; flex-direction: row !important; justify-content: space-between !important; gap: 8px !important; margin-top: 4px !important; }
    body .chat-container .stat-card { flex: 1 !important; padding: 4px !important; min-width: 0 !important; flex-direction: row !important; align-items: center !important; justify-content: center !important; gap: 4px !important; }
    body .chat-container .stat-label { margin: 0 !important; font-size: 8px !important; }
    body .chat-container .stat-value { font-size: 11px !important; margin: 0 !important; }
    body .chat-container .header-label, body .chat-container .live-dot, body .chat-container .welcome-msg { display: none !important; }

    /* Powiadomienie - Cieńsze i mniejsza czcionka */
    body .chat-container #powiadomienieWP { position: relative !important; flex-shrink: 0 !important; margin: 6px 10px !important; padding: 8px 10px !important; z-index: 50 !important; width: calc(100% - 20px) !important; box-sizing: border-box !important; font-size: 11px !important; min-height: 30px !important; }
    body .chat-container #powiadomienieWP i { font-size: 13px !important; }

    /* Dymki czatu na telefony - Ostre zagęszczenie */
    .chat-messages { margin-top: 0 !important; flex-grow: 1 !important; padding: 6px 10px !important; overflow-y: auto !important; gap: 4px !important;}
    .message-wrapper { gap: 5px; }
    .message-item, .message-wrapper { margin-bottom: 2px !important; }
    .message-bubble, .system-wiesio, .message-item.system { max-width: 100% !important; padding: 6px 10px !important; font-size: 15px !important; line-height: 1.3 !important; border-radius: 8px !important; margin-left: 0 !important; margin-right: 0 !important; width: 100% !important; }
    .message-header { flex-direction: column; align-items: flex-start; padding: 0 0 2px 2px !important; gap: 2px !important; }
    .user-avatar { width: 28px !important; height: 28px !important; min-width: 28px !important; margin-right: 8px !important; border-width: 1px !important; }
    .author { font-size: 12px !important; }
    .user-custom-status { font-size: 8px; }
    .time { font-size: 9px !important; }

    /* Pancerny pasek dolny - Zgnieciony w pionie */
    .chat-extra-tools { display: flex !important; width: 100% !important; box-sizing: border-box !important; flex-wrap: nowrap !important; overflow: hidden !important; padding: 4px !important; gap: 2px !important; justify-content: space-between !important; flex-shrink: 0 !important; }
    .extra-btn { flex: 1 1 0 !important; width: 24% !important; min-width: 0 !important; padding: 4px 2px !important; white-space: normal !important; min-height: 45px !important; font-size: 8px !important; line-height: 1.1 !important; justify-content: center !important; align-items: center !important; text-align: center !important; word-break: break-word !important; overflow: hidden !important; border-radius: 4px !important; }
    .extra-btn i { margin-bottom: 2px !important; font-size: 14px !important; }

    /* Pole wpisywania - Mniejsze marginesy */
    .chat-input-area { flex-shrink: 0 !important; padding: 6px !important; }
    .input-row { display: flex !important; flex-wrap: nowrap !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; padding: 4px 8px !important; gap: 0 !important; border-radius: 20px !important; }
    .input-tools { width: 25% !important; flex: 0 0 25% !important; display: flex !important; justify-content: space-evenly !important; align-items: center !important; }
    .tool-btn { font-size: 16px !important; padding: 2px !important; }
    #msg-input { width: 60% !important; flex: 0 0 60% !important; box-sizing: border-box !important; font-size: 14px !important; padding: 4px 6px !important; margin: 0 !important; }
    #send-btn { width: 15% !important; flex: 0 0 15% !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 18px !important; margin: 0 !important; padding: 0 !important; background: transparent !important; border: none !important; }

    /* Statystyki Online na samym dole - Miniatura */
    .online-stats-container { padding: 6px 10px !important; font-size: 10px !important; }
    .online-header { font-size: 9px !important; margin-bottom: 2px !important; }

    /* Poprawki mniejszych elementów i ukrycie EQ */
    .popup-window { width: 95vw !important; padding: 15px !important; max-height: 85vh !important; margin: 10px auto !important; }
    .popup-window iframe { height: 450px !important; max-width: 100% !important; }
    .popup-close-btn { padding: 12px !important; font-size: 14px !important; font-weight: bold; }
    .shop-modal { width: 95% !important; max-height: 90vh; }
    .shop-grid, #shop-items-container { grid-template-columns: 1fr !important; gap: 15px; }
    .sidebar, .menu-left, .radio-schedule { width: 100% !important; position: static !important; display: block; margin-bottom: 20px; }
    .admin-container, .profile-container { margin: 10px auto; padding: 15px; width: 95%; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    #btn-eq, #eq-btn, #equalizer-btn, .btn-eq, button[onclick*="Equalizer"], button[onclick*="eq"], #equalizer-panel, .equalizer-wrapper { display: none !important; }
}

@media (max-width: 400px) {
    .avatar-container { display: none; }
    .message-bubble { max-width: 100%; }
}

/* =========================================================
   14. DYNAMICZNA WIELKOŚĆ CZCIONKI (ZOOM Z SUWAKA)
   ========================================================= */
.message-bubble, .system-wiesio, .message-item.system {
    font-size: var(--chat-font-size, 14px) !important;
}
@media (max-width: 768px) {
    .message-bubble, .system-wiesio, .message-item.system {
        font-size: var(--chat-font-size, 13px) !important;
    }
}

/* =========================================================
   15. PODŚWIETLANIE WYWOŁAŃ (@NICK)
   ========================================================= */
.message-bubble.mention-highlight {
    border: 1px solid var(--neon-red) !important;
    background-color: rgba(255, 43, 43, 0.25) !important;
    box-shadow: 0 0 15px var(--neon-red-glow) !important;
    animation: pulse-mention 2s infinite !important;
}

@keyframes pulse-mention { 
    0% { box-shadow: 0 0 5px rgba(255, 43, 43, 0.2); } 
    50% { box-shadow: 0 0 15px rgba(255, 43, 43, 0.6); } 
    100% { box-shadow: 0 0 5px rgba(255, 43, 43, 0.2); } 
}

/* =========================================================
   16. SKRZYNKA WYWOŁAŃ (STICKY MENTIONS INBOX)
   ========================================================= */
#mentions-inbox {
    position: fixed !important; /* Zmiana na fixed - ignoruje ramki czatu! */
    bottom: 85px !important;
    right: 20px !important;
    z-index: 99999 !important; /* Najwyższy możliwy priorytet */
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    max-width: 350px !important;
    pointer-events: none !important;
}

@media (max-width: 768px) {
    #mentions-inbox {
        bottom: 120px; /* Wyżej na telefonach ze względu na przyciski dolne */
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

.sticky-mention {
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid var(--neon-red);
    border-left: 4px solid var(--neon-red);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8), 0 0 10px var(--neon-red-glow);
    pointer-events: auto; /* Przywraca klikanie dla samej wiadomości */
    animation: slideInRight 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sticky-mention-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #aaa;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 4px;
}

.sticky-mention-text {
    font-size: 13px;
    color: #fff;
    line-height: 1.4;
    max-height: 55px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.sticky-mention-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.sticky-btn {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.sticky-btn.reply { background: rgba(255, 43, 43, 0.15); color: var(--neon-red); border: 1px solid var(--neon-red); }
.sticky-btn.reply:hover { background: var(--neon-red); color: #fff; }
.sticky-btn.close { background: rgba(255, 255, 255, 0.1); color: #ccc; }
.sticky-btn.close:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

@keyframes slideInRight { 
    from { transform: translateX(100%); opacity: 0; } 
    to { transform: translateX(0); opacity: 1; } 
}

/* =========================================================
   17. WYGLĄD MESSENGER (PRAWO/LEWO)
   ========================================================= */
/* Usuwamy stare obramowania i tła z głównego kontenera dymka */
.message-bubble:not(.system-wiesio) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
}
.message-bubble:not(.system-wiesio):hover {
    background: transparent !important;
    transform: none !important;
}

.message-wrapper {
    display: flex !important;
    width: 100% !important;
    padding-right: 0 !important;
}

.message-body {
    display: flex;
    flex-direction: column;
    max-width: 85%; /* Dymki nie zajmują całego ekranu */
}

/* --- CZYJEŚ WIADOMOŚCI (LEWA STRONA) --- */
.message-bubble.is-other .message-wrapper {
    flex-direction: row !important;
}
.message-bubble.is-other .message-body {
    align-items: flex-start;
}
.message-bubble.is-other .text-content {
    background: rgba(30, 30, 30, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 18px 18px 18px 4px !important; /* Płaski lewy dolny róg */
    padding: 10px 15px !important;
    display: inline-block;
    margin-top: 4px;
}

/* --- MOJE WIADOMOŚCI (PRAWA STRONA) --- */
.message-bubble.is-mine .message-wrapper {
    flex-direction: row-reverse !important;
}
.message-bubble.is-mine .avatar-container,
.message-bubble.is-mine .author,
.message-bubble.is-mine .user-custom-status,
.message-bubble.is-mine .fa-shield-halved {
    display: none !important; /* Ukrywamy swój nick i awatar */
}
.message-bubble.is-mine .message-body {
    align-items: flex-end;
}
.message-bubble.is-mine .message-header {
    flex-direction: row-reverse;
    padding-bottom: 0 !important;
}
.message-bubble.is-mine .text-content {
    background: linear-gradient(135deg, var(--neon-red), #b30000) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 18px 18px 4px 18px !important; /* Płaski prawy dolny róg */
    padding: 10px 15px !important;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 43, 43, 0.3) !important;
    text-shadow: none !important;
    margin-top: 4px;
}
.message-bubble.is-mine .reaction-trigger-area {
    position: relative !important;
    opacity: 1 !important; 
    margin-right: 10px;
}
.message-bubble.is-mine .messenger-picker {
    right: auto !important;
    left: 0 !important; 
}

/* Reakcje i data pod dymkiem */
.message-footer {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.message-bubble.is-mine .message-footer {
    flex-direction: row-reverse;
}

/* --- POLE WPISYWANIA (PIGUŁKA) --- */
.chat-input-area {
    background: transparent !important;
    border-top: none !important;
    padding: 10px 15px 25px 15px !important; 
}
.input-row {
    background: rgba(15, 15, 15, 0.95) !important;
    border: 1px solid rgba(255, 43, 43, 0.3) !important;
    border-radius: 30px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.7) !important;
}

/* POPRAWKI MOBILNE */
@media (max-width: 768px) {
    .message-body { max-width: 92%; }
    .message-bubble.is-mine .text-content, 
    .message-bubble.is-other .text-content {
        padding: 8px 12px !important;
    }
    .chat-input-area { padding: 5px 10px 10px 10px !important; }
}

/* --- AUTOMATYCZNE GIFY I OBRAZKI NA CZACIE --- */
.chat-auto-img {
    max-width: 100%;       /* Obrazek nigdy nie wyjdzie poza dymek */
    max-height: 200px;     /* Ograniczamy wysokość, żeby nie zajmował całego ekranu */
    border-radius: 12px;   /* Zaokrąglone rogi pasujące do Messengera */
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.chat-auto-img:hover {
    transform: scale(1.02); /* Lekkie powiększenie po najechaniu myszką */
}

/* Wersja mobilna - trochę mniejsze obrazki */
@media (max-width: 768px) {
    .chat-auto-img {
        max-height: 150px;
    }
}

/* --- KAFELKI Z PODGLĄDEM LINKÓW (RICH PREVIEW) --- */
.rich-preview-container {
    margin-top: 10px;
    display: block;
}

.rich-preview-card {
    display: flex;
    flex-direction: column;
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s;
    max-width: 320px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.rich-preview-card:hover {
    transform: scale(1.02);
    border-color: var(--neon-red);
}

.rich-img {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rich-info {
    padding: 10px 12px;
}

.rich-domain {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.rich-title {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Maksymalnie 2 linijki tytułu */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rich-desc {
    font-size: 11px;
    color: #aaa;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- WYSZUKIWARKA GIPHY --- */
#btn-giphy {
    background: transparent;
    border: 1px solid #ff1a1a;
    color: #ff1a1a;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    margin-right: 5px;
}
#btn-giphy:hover {
    background: #ff1a1a;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 26, 26, 0.5);
}

.giphy-modal {
    position: absolute;
    bottom: 80px; /* Unosi się nad polem wpisywania - dostosuj w razie potrzeby */
    left: 20px;
    width: 320px;
    height: 420px;
    background: #0b0f1a;
    border: 1px solid rgba(255, 26, 26, 0.5);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    overflow: hidden;
}

.giphy-header {
    display: flex;
    padding: 12px;
    background: #11141f;
    border-bottom: 1px solid #222;
}

.giphy-header input {
    flex: 1;
    background: #1a1e29;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    outline: none;
    font-family: 'Inter', sans-serif;
}
.giphy-header input:focus {
    border-color: #ff1a1a;
}

.giphy-header button {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 18px;
    padding: 0 10px;
    transition: 0.2s;
}
.giphy-header button:hover { color: #ff1a1a; }

.giphy-results {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dwie kolumny na gify */
    gap: 8px;
}

.giphy-item {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    background: #222;
}
.giphy-item:hover {
    transform: scale(1.05);
    border: 2px solid #ff1a1a;
}

.giphy-footer {
    text-align: center;
    font-size: 10px;
    color: #666;
    padding: 5px;
    background: #11141f;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ==========================================
   NAPRAWA PASKA WPISYWANIA
   ========================================== */

/* Ulepszenie wyglądu samego przycisku, by pasował do pigułki */
#btn-giphy {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important; /* Zabezpiecza przed zgnieceniem */
    margin-right: 0 !important;
    border-radius: 20px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    height: 100% !important;
}

/* Uwolnienie paska na telefonach z "sztywnych procentów" */
@media (max-width: 768px) {
    .input-row { 
        gap: 8px !important; 
        padding: 4px 8px !important; 
    }
    
    .input-tools { 
        width: auto !important; 
        flex: 0 0 auto !important; 
        gap: 6px !important; 
        justify-content: flex-start !important; 
    }
    
    #btn-giphy { 
        padding: 4px 8px !important; 
        font-size: 11px !important; 
        border-width: 1px !important; 
    }
    
    #btn-giphy i { 
        font-size: 11px !important; 
    }
    
    /* Input ma teraz rozkaz: "Zabierz całą wolną przestrzeń, która została" */
    #msg-input { 
        width: auto !important; 
        flex: 1 1 auto !important; 
        min-width: 50px !important; 
        padding: 6px !important; 
    }
    
    #send-btn { 
        width: auto !important; 
        flex: 0 0 auto !important; 
        padding: 0 5px !important; 
    }
}

/* --- BOT INFORMATOR --- */
#bot-informator {
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 1px solid rgba(255, 43, 43, 0.3);
    padding: 8px 15px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    flex-shrink: 0;
}
#bot-informator i {
    color: var(--neon-red);
    font-size: 16px;
    animation: botPulse 2s infinite;
}
#bot-informator-text {
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bot-live, .bot-upcoming {
    display: inline-block; /* To zapobiega ucinaniu ramki! */
    line-height: 1.2;
    padding: 3px 8px; /* Trochę więcej oddechu dla tekstu */
    border-radius: 4px;
    margin-right: 6px;
    font-size: 11px;
    font-weight: bold;
    vertical-align: middle; /* Idealne wyrównanie do reszty tekstu w pasku */
}

.bot-live { 
    color: #00ff00; 
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5); 
    border: 1px solid #00ff00; 
}

.bot-upcoming { 
    color: #ffd700; 
    border: 1px solid #ffd700; 
}

@keyframes botPulse {
    0% { transform: scale(1); text-shadow: 0 0 5px var(--neon-red-glow); }
    50% { transform: scale(1.1); text-shadow: 0 0 15px var(--neon-red); }
    100% { transform: scale(1); text-shadow: 0 0 5px var(--neon-red-glow); }
}

@media (max-width: 768px) {
    #bot-informator { font-size: 11px; padding: 6px 10px; }
    #bot-informator i { font-size: 13px; }
}




.reaction-badge {
    position: relative;
    cursor: help; /* Kursor zmienia się na "znak zapytania" / "pomoc" */
}

/* Tworzenie mrocznego dymka z tekstem */
.reaction-badge[data-users]:hover::after {
    content: attr(data-users); /* Pobiera listę nicków z JavaScriptu */
    position: absolute;
    bottom: 130%; /* Pojawia się tuż nad emotką */
    left: 50%;
    transform: translateX(-50%);
    background: #0a0a0a;
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    border: 1px solid var(--neon-red);
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
    pointer-events: none; /* Dymek nie blokuje klikania */
    z-index: 1000;
    font-weight: normal;
    opacity: 0;
    animation: fadeInTooltip 0.2s forwards;
    text-shadow: none;
}

/* Mała neonowa strzałka w dół (ogonek dymka) */
.reaction-badge[data-users]:hover::before {
    content: '';
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--neon-red) transparent transparent transparent;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    animation: fadeInTooltip 0.2s forwards;
}

@keyframes fadeInTooltip {
    to { opacity: 1; }
}

/* ==========================================
   NAPRAWA CYTATÓW (ODPOWIEDZI) W JASNYCH MOTYWACH
   ========================================== */

/* Delikatnie przyciemniamy tło samego okienka cytatu */
body.theme-light .message-quote-box,
body.theme-studio .message-quote-box,
body.theme-vintage .message-quote-box {
    background: rgba(0, 0, 0, 0.06) !important; 
    border-left-color: var(--neon-red) !important; /* Lewa kreska cytatu przyjmie kolor akcentu danego motywu */
}

/* Wymuszamy ciemniejszy kolor dla "Odpowiedź do: Nick" */
body.theme-light .message-quote-box .quote-author,
body.theme-studio .message-quote-box .quote-author,
body.theme-vintage .message-quote-box .quote-author {
    color: #555555 !important;
    font-weight: bold !important;
}

/* Wymuszamy niemal czarny, bardzo czytelny kolor dla treści cytatu */
body.theme-light .message-quote-box .quote-text,
body.theme-studio .message-quote-box .quote-text,
body.theme-vintage .message-quote-box .quote-text {
    color: #1a1a1a !important;
}