/* Feline Union TV Overlay Styles */

/* Floating pill */
#fu-tv-pill {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 2147483647 !important;
    cursor: pointer !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#fu-tv-pill:hover { transform: scale(1.08); }
.fu-pill-inner {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: rgba(17, 17, 24, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 50px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(167,139,250,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #f0e6d3; font-size: 14px; font-weight: 600; user-select: none;
}
#fu-tv-pill.live .fu-pill-inner {
    border-color: rgba(214, 40, 40, 0.6);
    box-shadow: 0 4px 24px rgba(214,40,40,0.3), 0 0 0 1px rgba(214,40,40,0.2);
    animation: fu-pill-glow 2s ease-in-out infinite;
}
@keyframes fu-pill-glow {
    0%, 100% { box-shadow: 0 4px 24px rgba(214,40,40,0.3), 0 0 0 1px rgba(214,40,40,0.2); }
    50% { box-shadow: 0 4px 32px rgba(214,40,40,0.5), 0 0 0 2px rgba(214,40,40,0.3); }
}
.fu-pill-icon { width: 20px !important; height: 20px !important; object-fit: contain !important; overflow: hidden; }
.fu-pill-text { letter-spacing: 0.5px; }
.fu-pill-live {
    display: none;
    align-items: center; gap: 5px;
    color: #d62828; font-weight: 800; font-size: 11px;
    letter-spacing: 1px; text-transform: uppercase;
}
#fu-tv-pill.live .fu-pill-live {
    display: inline-flex;
}
.fu-pill-dot {
    width: 8px; height: 8px; background: #d62828; border-radius: 50%;
    animation: fu-dot-pulse 1.5s ease-in-out infinite;
}
@keyframes fu-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

/* Fullscreen overlay */
#fu-tv-overlay {
    position: fixed; inset: 0; z-index: 2147483646; background: #000;
    display: flex; flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#fu-tv-overlay.entering { animation: fu-overlay-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fu-overlay-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.fu-tv-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px; background: rgba(10, 10, 15, 0.95);
    border-bottom: 1px solid rgba(167, 139, 250, 0.15); flex-shrink: 0;
}
.fu-tv-header-left { display: flex; align-items: center; gap: 10px; }
.fu-tv-logo { width: 28px; height: 28px; object-fit: contain; }
.fu-tv-title { color: #f0e6d3; font-weight: 700; font-size: 15px; }
.fu-tv-badge {
    background: #d62828; color: white; font-size: 10px; font-weight: 800;
    padding: 2px 8px; border-radius: 4px; letter-spacing: 1px;
    animation: fu-dot-pulse 1.5s ease-in-out infinite;
}
.fu-tv-viewers { color: #888; font-size: 13px; }
.fu-tv-close {
    background: rgba(255,255,255,0.1); border: none; color: #f0e6d3;
    font-size: 24px; width: 36px; height: 36px; border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.fu-tv-close:hover { background: rgba(255,255,255,0.2); }
.fu-tv-video { position: relative; flex: 1; min-height: 0; background: #000; }
#fu-jitsi-container { position: absolute; inset: 0; width: 100%; height: 100%; }
#fu-jitsi-container iframe { width: 100% !important; height: 100% !important; }

/* Reactions */
.fu-reactions-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 10; }
.fu-reaction {
    position: absolute; bottom: 0; pointer-events: none;
    will-change: transform, opacity; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
    animation: fu-gravity var(--dur) ease-out forwards;
}
@keyframes fu-gravity {
    0%   { transform: translate(0,0) scale(0) rotate(0deg); opacity:0; }
    8%   { transform: translate(calc(var(--wx)*0.1), calc(var(--peak)*0.3)) scale(1.15) rotate(var(--r1)); opacity:1; }
    25%  { transform: translate(calc(var(--wx)*0.35), calc(var(--peak)*0.7)) scale(1) rotate(var(--r2)); opacity:0.9; }
    45%  { transform: translate(calc(var(--wx)*0.55), var(--peak)) scale(0.9) rotate(var(--r1)); opacity:0.5; }
    65%  { transform: translate(calc(var(--wx)*0.75), calc(var(--peak)*0.85)) scale(0.75) rotate(var(--r2)); opacity:0.2; }
    100% { transform: translate(var(--wx), calc(var(--peak)*0.6)) scale(0.5) rotate(0deg); opacity:0; }
}

/* Emote bar */
.fu-tv-emote-bar {
    display: none; padding: 8px 12px; background: rgba(10, 10, 15, 0.95);
    border-top: 1px solid rgba(167, 139, 250, 0.15); flex-shrink: 0;
    overflow-x: auto; white-space: nowrap; gap: 6px;
}
.fu-tv-emote-bar.active { display: flex; }
.fu-emote-btn {
    width: 36px; height: 36px; border-radius: 8px; border: none;
    background: rgba(255,255,255,0.06); cursor: pointer; padding: 4px;
    transition: all 0.15s; flex-shrink: 0;
}
.fu-emote-btn:hover { background: rgba(167,139,250,0.2); transform: scale(1.15); }
.fu-emote-btn img { width: 100%; height: 100%; object-fit: contain; }

/* Hide pill when overlay is open */
#fu-tv-pill.hidden { display: none !important; }

/* Mobile */
@media (max-width: 640px) {
    #fu-tv-pill { bottom: 16px !important; right: 16px !important; }
    .fu-pill-inner { padding: 8px 14px; font-size: 13px; }
}
