/* --- 1. VARIABLES & GLOBALS --- */

:root {
    --bg-color: #08080c;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    --accent-color: #8b5cf6;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(24px);
    --header-height: 70px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    background-color: var(--bg-color);
    height: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

body::before {
    content: "";
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.15), transparent 40%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 40%),
        radial-gradient(circle at bottom center, rgba(236, 72, 153, 0.08), transparent 50%),
        linear-gradient(to bottom, #0f172a, #020617);
    background-size: 100% 100%;
    z-index: -1;
    pointer-events: none;
}

body.mobile-menu-active, body.mm-open { overflow: hidden !important; overscroll-behavior-y: none !important; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

/* --- 2. SCROLLBARS --- */
.scrollable-list::-webkit-scrollbar, #mm-messages-container::-webkit-scrollbar { width: 6px; }
.scrollable-list::-webkit-scrollbar-track, #mm-messages-container::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 10px; }
.scrollable-list::-webkit-scrollbar-thumb, #mm-messages-container::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.5); border-radius: 10px; }
.scrollable-list::-webkit-scrollbar-thumb:hover, #mm-messages-container::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }
#mm-messages-container { overflow-x: hidden !important; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #3b82f6 rgba(0,0,0,0.3); }

/* --- 3. HEADER & NAVIGATION --- */
.page-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background-color: rgba(5, 5, 10, 0.7); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeDownEntry 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeDownEntry { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.top-nav { width: 100%; padding: 0 25px; display: flex; justify-content: space-between; align-items: center; height: var(--header-height); }
.nav-left { display: flex; align-items: center; gap: 30px; }
.nav-logo { display: flex; align-items: center; gap: 12px; cursor: pointer; transition: transform 0.3s ease; }
.nav-logo:hover { transform: scale(1.05); }
.nav-logo img { height: 40px; width: auto; filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.3)); }
.logo-text { font-size: 1.5em; font-weight: 800; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 15px rgba(236, 72, 153, 0.5)); }

.nav-pages { position: relative; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.03); padding: 5px; border-radius: 50px; border: 1px solid var(--glass-border); }
.nav-highlight { position: absolute; top: 5px; left: 5px; height: calc(100% - 10px); background: #3b82f6; box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); border-radius: 40px; transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); width: 0; opacity: 0; pointer-events: none; }
.nav-pages a { position: relative; z-index: 2; font-weight: 500; font-size: 0.9rem; text-transform: uppercase; color: var(--text-muted); padding: 8px 18px; border-radius: 40px; transition: all 0.3s ease; }
.nav-pages a.active-link { color: #fff; }

.nav-links { display: flex; align-items: center; gap: 20px; }
#viewerCounter { display: flex; align-items: center; gap: 8px; color: #a5b4fc; background: rgba(99, 102, 241, 0.1); padding: 6px 14px; border-radius: 50px; border: 1px solid rgba(99, 102, 241, 0.2); font-size: 0.9rem; font-weight: 600; }

.click-here-link { font-weight: 600; color: #000; background: linear-gradient(90deg, #e2e8f0, #fff); padding: 10px 24px; border-radius: 50px; font-size: 0.9rem; transition: all 0.3s ease; box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15); }
.click-here-link:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); color: #3b82f6; }

.hamburger { display: none; flex-direction: column; justify-content: space-around; width: 28px; height: 22px; cursor: pointer; z-index: 1001; }
.hamburger span { display: block; height: 2.5px; width: 100%; background: #fff; border-radius: 2px; transition: all 0.3s ease; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.mobile-nav-pages { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 30px; position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.8); backdrop-filter: blur(15px); opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.4s ease; z-index: 1000; }
.mobile-nav-pages.active { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-nav-pages a { font-size: 1.8rem; font-weight: 700; text-transform: uppercase; color: #fff; padding: 10px 20px; transition: 0.3s; }
.mobile-nav-pages a:hover { color: var(--accent-color); transform: scale(1.1); }

/* --- 4. MAIN LAYOUT & SIDEBAR --- */
#main-content-area { display: flex; flex-grow: 1; height: calc(100vh - var(--header-height)); margin-top: var(--header-height); opacity: 0; animation: fadeUpEntry 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards; scroll-margin-top: 90px !important; }
@keyframes fadeUpEntry { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.main-player-section { flex: 1; display: flex; flex-direction: column; background: #000; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); position: relative; }
#playerWrapper { position: relative; flex: 1; display: flex; flex-direction: column; }
#video { flex: 1; width: 100%; background: black; }

.sidebar { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--glass-bg); backdrop-filter: var(--glass-blur); border-left: 1px solid var(--glass-border); max-width: 100vw; overflow-x: hidden; }

.search-container { position: relative; display: flex; align-items: center; margin: 20px; }
.search-container input { flex: 1; padding: 12px 40px 12px 16px; border-radius: 12px; border: 1px solid var(--glass-border); background-color: rgba(0, 0, 0, 0.3); color: white; width: 100%; font-size: 0.95rem; font-family: 'Outfit', sans-serif; transition: all 0.3s ease; }
.search-container input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); background-color: rgba(0, 0, 0, 0.5); outline: none; }
#clearSearch { position: absolute; right: 12px; cursor: pointer; color: #666; transition: 0.2s; font-size: 1.5rem; display: flex; align-items: center; }
#clearSearch:hover { color: #fff; }

.category-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 15px; border-bottom: 1px solid var(--glass-border); }
.category-button { background: rgba(255, 255, 255, 0.05); color: #ccc; border: 1px solid transparent; border-radius: 50px; padding: 6px 14px; cursor: pointer; font-weight: 500; font-size: 0.8rem; transition: all 0.3s ease; flex: 1 0 auto; }
.category-button:hover { background: rgba(255, 255, 255, 0.1); color: white; }
.category-button.active { background: var(--accent-gradient); color: white; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); }
.mobile-category-btn { display: none; width: calc(100% - 40px); padding: 14px 20px; margin: 0 20px 15px; background: rgba(255, 255, 255, 0.05); color: white; border: 1px solid var(--glass-border); border-radius: 12px; font-size: 0.95rem; cursor: pointer; justify-content: space-between; align-items: center; font-family: 'Outfit', sans-serif; }

.clear-fav-btn { width: calc(100% - 40px); padding: 10px; margin: 0 20px 15px; background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 12px; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.clear-fav-btn:hover { background: rgba(239, 68, 68, 0.2); color: #ff6b6b; }
#channelCount { padding: 10px 20px; font-weight: 600; font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }

.scrollable-list { flex: 1; overflow-y: auto; padding: 15px; -webkit-overflow-scrolling: touch; }
.channel-list { display: flex; flex-direction: column; gap: 8px; }

.channel-button { width: 100%; padding: 12px; background-color: rgba(255, 255, 255, 0.03); border: 1px solid transparent; border-radius: 12px; color: #eee; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: all 0.3s ease; min-height: 60px; font-size: 0.95rem; }
.channel-button:hover { background-color: rgba(255, 255, 255, 0.08); transform: translateX(4px); border-color: rgba(255, 255, 255, 0.1); }
.channel-button.active { background: var(--accent-gradient) !important; color: #ffffff !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; box-shadow: 0 0 20px rgba(236, 72, 153, 0.6) !important; transform: translateX(5px) scale(1.02) !important; z-index: 10; }
.channel-button.active * { color: #ffffff !important; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }

.channel-logo { width: 40px; height: 40px; border-radius: 8px; background-color: #222; flex-shrink: 0; overflow: hidden; }
.channel-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.channel-name { flex-grow: 1; white-space: normal; text-align: left; line-height: 1.4; font-weight: 500; }
.favorite-star { font-size: 1.2rem; cursor: pointer; }

/* Anime Selector */
.anime-selector-container { width: 100%; animation: fadeIn 0.3s ease; }
#animeSeriesSelect { width: calc(100% - 40px); margin: 0 20px 15px; padding: 14px 20px; background-color: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); border-radius: 12px; color: white; font-family: 'Outfit', sans-serif; font-size: 0.95rem; font-weight: 500; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 20px center; background-size: 10px; transition: all 0.3s ease; }
#animeSeriesSelect:focus { border-color: #38bdf8; background-color: rgba(0, 0, 0, 0.6); outline: none; box-shadow: 0 0 15px rgba(56, 189, 248, 0.2); }
#animeSeriesSelect option { background-color: #1a1a2e; color: white; padding: 10px; }

/* --- 5. INFO & CONTENT SECTIONS --- */
.info-section { width: 90%; max-width: 1100px; margin: 5rem auto; padding: 4rem 2rem; scroll-margin-top: calc(var(--header-height) + 30px); position: relative; }
.nav-scroll-target { scroll-margin-top: calc(var(--header-height) + 20px); }
#contact.info-section { margin-top: 10px; padding-top: 0; padding-bottom: 4rem; border-radius: 30px 30px 0 0; }
.info-section h2 { margin-bottom: 1rem; font-weight: 800; text-align: center; }
.info-section h3 { font-size: 1.5rem; margin: 2.5rem 0 1rem; color: #fff; font-weight: 700; line-height: 1.4; }
.info-section p { margin-bottom: 1.5rem; font-size: 1.1rem; color: #cbd5e1; line-height: 1.8; font-weight: 300; }

.contact-container { display: flex; flex-wrap: wrap; gap: 4rem; justify-content: center; }
.contact-social { flex: 1; min-width: 300px; text-align: center; }
.contact-social h2.lg-heading { font-size: 3.2rem; }
.contact-social .contact-links { display: flex; gap: 20px; justify-content: center; padding: 5px 0; }

.lg-heading { 
    font-size: 3rem !important; 
    margin-bottom: 1.5rem; 
    text-align: center; 
    font-weight: 800; 
    letter-spacing: -1px; 
    background: linear-gradient(to right, #fff, #cbd5e1); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
}
.contact-social h2.lg-heading { font-size: 3.2rem !important; }

.neon-bubble { 
    font-size: 2.2rem !important; 
    color: #fff !important; 
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5)); 
    transition: 0.3s; 
}
.neon-bubble:hover { 
    color: #38bdf8 !important; 
    transform: scale(1.2); 
}

@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-12px); } 100% { transform: translateY(0px); } }
.social-link { display: inline-block; animation: float 3s ease-in-out infinite; transition: transform 0.3s ease; }
.social-link:nth-child(n+2) { animation-delay: calc((var(--n) - 1) * 0.2s); }
.social-link:nth-child(1) { --n: 1; } .social-link:nth-child(2) { --n: 2; } .social-link:nth-child(3) { --n: 3; } .social-link:nth-child(4) { --n: 4; }
.social-link:hover { animation-play-state: paused; transform: translateY(-5px) scale(1.1); filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6)); }

.contact-form { flex: 1.2; min-width: 320px; padding: 2rem; }
.contact-form label { display: block; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.contact-form input, .contact-form textarea { width: 100%; padding: 16px; margin-top: 10px; border-radius: 12px; border: 1px solid var(--glass-border); background-color: rgba(0, 0, 0, 0.2); color: #fff; font-size: 1rem; font-family: 'Outfit', sans-serif; transition: all 0.3s ease; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent-color); background-color: rgba(0, 0, 0, 0.4); outline: none; }
.contact-form button { padding: 16px; border: none; border-radius: 12px; background: var(--accent-gradient); color: #fff; cursor: pointer; transition: all 0.3s ease; font-size: 1rem; font-weight: 700; text-transform: uppercase; margin-top: 30px; width: 100%; box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3); }
.contact-form button:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5); }

.copyright-text { text-align: center; padding: 2rem 20px 1rem; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; width: 100%; }
.donation-qr-code { max-width: 200px; width: 100%; border-radius: 12px; background: white; padding: 5px; cursor: pointer; transition: transform 0.3s; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }
.donation-qr-code:hover { transform: scale(1.05); }

/* --- 6. MODALS & OVERLAYS --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(5, 5, 10, 0.7); backdrop-filter: blur(10px); z-index: 2000; display: flex; align-items: center; justify-content: center; visibility: hidden; opacity: 0; transition: all 0.4s ease; }
.modal-overlay.active { visibility: visible; opacity: 1; }
.modal-content { background: rgba(20, 20, 25, 0.95); color: #fff; padding: 40px 30px; border-radius: 24px; max-width: 650px; width: 90%; text-align: center; position: relative; border: 1px solid var(--glass-border); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); max-height: 85vh; overflow-y: auto; display: flex; flex-direction: column; align-items: center; }
.modal-content::-webkit-scrollbar { display: none; }
@keyframes modalPop { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.close-button { position: absolute; top: 15px; right: 15px; font-size: 24px; cursor: pointer; color: #fff; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.1); border-radius: 50%; z-index: 10; border: none; }
.close-button:hover { background: #ef4444; }

.modal-heading { font-size: 1.5rem; margin-bottom: 20px; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.modal-countdown { position: absolute; top: 15px; left: 15px; background: var(--accent-gradient); color: white; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }

.mobile-category-list { display: flex; flex-direction: column; gap: 10px; width: 100%; overflow-y: auto; scrollbar-width: none; }
.mobile-category-list::-webkit-scrollbar { display: none; }
.mobile-cat-option { background: rgba(255, 255, 255, 0.08); color: white; padding: 16px; border-radius: 16px; font-weight: 600; text-align: left; cursor: pointer; transition: 0.2s; border: none; display: flex; justify-content: space-between; align-items: center; }
.mobile-cat-option:hover, .mobile-cat-option.active { background: var(--accent-gradient); box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3); }

/* QR & Install Modals */
.qr-modal-content { background: white !important; color: #000 !important; padding: 35px 20px 20px 20px; max-width: 400px; }
#zoomedQrImage { width: 100%; border-radius: 8px; }
#qrModal .close-button { top: 10px; right: 10px; width: 32px; height: 32px; background: #f3f4f6; color: #374151; transition: all 0.2s ease; }
#qrModal .close-button:hover { background: #ef4444; color: white; transform: rotate(90deg); }

#installModal { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: auto; }
#installModal .modal-content { background: #1e1e1e; max-width: 400px; }

/* Cookies Banner */
.cookie-banner { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 800px; background: rgba(15, 15, 15, 0.98); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px; padding: 20px; z-index: 2147483647 !important; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.8); animation: slideUp 0.5s ease-out; }
.cookie-content { display: flex; align-items: center; gap: 15px; flex: 1; min-width: 280px; }
.cookie-text h4 { margin: 0 0 5px 0; color: #fff; }
.cookie-text p { margin: 0; font-size: 0.9rem; color: #ccc; line-height: 1.4; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions button { padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: 600; border: none; transition: transform 0.2s; }
.cookie-actions button:hover { transform: scale(1.05); }
.btn-primary { background: #3b82f6; color: white; }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: white; }
@keyframes slideUp { from { transform: translate(-50%, 100%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Notification Banner */
.notification-banner { position: fixed; top: 85px; left: 50%; transform: translateX(-50%) translateY(-40px); width: 90%; max-width: 500px; padding: 16px 24px; border-radius: 16px; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(12px); border: 1px solid rgba(56, 189, 248, 0.2); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); color: white; z-index: 9999; opacity: 0; pointer-events: none; transition: all 0.5s ease; display: flex; align-items: center; gap: 15px; }
.notification-banner.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.notification-banner.info { border-left: 4px solid #38bdf8; }
.close-notification-btn { background: none; border: none; color: #94a3b8; font-size: 1.2rem; cursor: pointer; }
.close-notification-btn:hover { color: #fff; }

/* Back to Top */
#backToTopBtn { position: fixed; bottom: 90px !important; right: 25px !important; z-index: 1500 !important; width: 50px; height: 50px; border: none; border-radius: 12px; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer; font-size: 20px; display: none; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); transition: all 0.4s ease; opacity: 0; transform: translateY(20px); }
#backToTopBtn.show { display: flex; opacity: 1; transform: translateY(0); }
#backToTopBtn:hover { transform: translateY(-5px); background: var(--accent-gradient); box-shadow: 0 15px 35px rgba(99, 102, 241, 0.6); }

/* Skeleton Loading */
.skeleton, .skeleton-effect { position: relative; overflow: hidden; background-color: rgba(255, 255, 255, 0.05); border-color: transparent !important; color: transparent !important; }
.skeleton::after, .skeleton-effect::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.05) 20%, rgba(255, 255, 255, 0.1) 60%, rgba(255, 255, 255, 0) ); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton-text { height: 14px; width: 60%; border-radius: 4px; }
.skeleton-block { width: 36px; height: 36px; border-radius: 8px; }
.skeleton i, .skeleton img, .skeleton span { opacity: 0; }
.skeleton-fade-out { animation: fadeOut 0.5s ease-out forwards !important; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 1; } }

/* Scroll Reveals & Animations */
.scroll-reveal { opacity: 1; transition: opacity 2.5s cubic-bezier(0.16, 1, 0.3, 1), transform 2.5s cubic-bezier(0.16, 1, 0.3, 1); will-change: opacity, transform; }
.scroll-reveal.reveal-init { opacity: 0; }
.scroll-reveal.reveal-init.pop-up { transform: scale(0.8) translateY(30px); }
.scroll-reveal.reveal-init.slide-left { transform: translateX(-60px); }
.scroll-reveal.reveal-init.slide-right { transform: translateX(60px); }
.scroll-reveal.active { opacity: 1; transform: scale(1) translateX(0) translateY(0); }

.now-playing-animate { animation: pulseHighlight 0.35s ease-in-out; }
@keyframes pulseHighlight { 0% { transform: scale(1); } 50% { transform: scale(1.1); color: var(--accent-color); } 100% { transform: scale(1); } }

.updates-container { margin-top: 3rem; }
.updates-container .update-item { padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); transition: opacity 2.5s ease, transform 2.5s ease; }
.updates-container .update-item.reveal-init { opacity: 0; }
.updates-container .update-item.reveal-init:nth-child(odd) { transform: translateX(-80px); }
.updates-container .update-item.reveal-init:nth-child(even) { transform: translateX(80px); }
.updates-container .update-item.active { opacity: 1; transform: translateX(0); }

/* --- 7. TV FOCUS OUTLINES --- */
@media (hover: hover) {
    .focusable-element:focus:not(:focus-visible), .focusable-element.tv-focus { outline: 3px solid #38bdf8 !important; outline-offset: 1px; box-shadow: 0 0 10px rgba(56, 189, 248, 0.5) !important; }
}
@media (hover: none) {
    .focusable-element:focus:not(:focus-visible), .focusable-element.tv-focus { outline: none !important; box-shadow: none !important; }
}

/* --- 8. MINI MESSENGER --- */
.mm-wrapper { position: fixed !important; bottom: 20px !important; right: 20px !important; z-index: 2147483647 !important; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
.mm-fab { pointer-events: auto; width: 60px; height: 60px; border-radius: 50%; background: var(--accent-gradient); color: white; border: none; cursor: pointer; font-size: 24px; display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease; z-index: 10000; margin-top: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.5); }
.mm-fab:hover { transform: scale(1.1); }
.mm-badge { position: absolute; top: -5px; right: -5px; background: #ef4444; color: white; font-size: 10px; font-weight: bold; padding: 4px 8px; border-radius: 10px; border: 2px solid #000; }
.mm-wrapper.chat-open .mm-fab { display: none !important; }

#mm-panel { pointer-events: auto; width: 380px; height: 600px; max-height: 75vh; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(12px); border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; overflow: hidden; position: relative; margin-bottom: 15px; transition: all 0.3s ease; opacity: 1; transform: scale(1); box-shadow: 0 8px 30px rgba(0,0,0,0.5); }
#mm-panel.hidden { opacity: 0; transform: scale(0.9); pointer-events: none; visibility: hidden; }

.mm-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; height: 65px; background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid rgba(255, 255, 255, 0.05); flex-shrink: 0; }
.mm-header-user, .mm-header-actions { display: flex; align-items: center; gap: 12px; height: 100%; }
.mm-header-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(59, 130, 246, 0.5); }
.mm-header-info { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.mm-header-name { font-weight: 700; font-size: 1rem; color: #fff; margin: 0; }
.mm-header-status { font-size: 11px; color: #94a3b8; margin: 0; }
#mm-admin-btn-container { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; transition: background 0.2s; cursor: pointer; }
#mm-admin-btn-container i { color: #94a3b8; font-size: 14px; transition: color 0.2s; }
#mm-admin-btn-container:hover { background: rgba(255,255,255,0.1); }
#mm-admin-btn-container:hover i { color: #38bdf8; }
.mm-close-btn { background: none; border: none; color: #94a3b8; font-size: 1.2rem; cursor: pointer; transition: color 0.2s; }
.mm-close-btn:hover { color: #fff; }

#mm-chat-view, #mm-setup-view { flex: 1; display: flex; flex-direction: column; overflow: hidden; height: 100%; }
#mm-messages-container { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 15px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
#mm-messages-container > :first-child { margin-top: auto !important; }

.mm-footer { position: relative; padding: 12px; background: rgba(0, 0, 0, 0.3); border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ==========================================
   MENTION SYSTEM (Facebook Messenger Style)
   ========================================== */
#mm-mention-list {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 12px;
    width: 260px;
    max-height: 220px;
    background: #1e1e22;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    display: none;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 rgba(0,0,0,0.3);
}
#mm-mention-list::-webkit-scrollbar { width: 6px; }
#mm-mention-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 10px; }
#mm-mention-list::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.5); border-radius: 10px; }

.mm-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    color: #fff;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mm-mention-item:hover,
.mm-mention-item.active {
    background: rgba(59,130,246,0.15);
}
.mm-mention-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.mm-mention-item .mm-mention-bot-badge {
    background: #8b5cf6;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: 700;
}

.mm-btn-icon { background: none; border: none; color: #94a3b8; font-size: 1.1rem; padding: 8px; cursor: pointer; border-radius: 50%; transition: 0.2s; flex-shrink: 0; }
.mm-btn-icon:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.mm-btn-send { background: #3b82f6; color: white; border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.mm-btn-send:hover { background: #2563eb; }
.mm-input-wrapper { flex-grow: 1; background: rgba(255, 255, 255, 0.05); border-radius: 20px; padding: 0 12px; display: flex; align-items: center; }
#mm-message-input { width: 100%; background: none; border: none; color: white; padding: 10px 0; outline: none; resize: none; height: 40px; font-family: sans-serif; }

#mm-setup-view { align-items: center; padding-top: 80px; text-align: center; }
.mm-setup-content { width: 85%; max-width: 320px; display: flex; flex-direction: column; align-items: center; }
.mm-icon-circle { width: 110px; height: 110px; background: rgba(59, 130, 246, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 25px; font-size: 35px; color: #3b82f6; border: 2px dashed rgba(59,130,246,0.5); cursor: pointer; overflow: hidden; transition: all 0.3s ease; }
.mm-icon-circle:hover { border-color: #fff; background: rgba(59,130,246,0.2); transform: scale(1.05); }
.mm-icon-circle img { width: 100%; height: 100%; object-fit: cover; }
.mm-input-group { width: 100%; margin-bottom: 15px; }
.mm-input-group input { width: 100%; padding: 16px; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 16px; color: white; text-align: center; font-size: 1.1rem; transition: 0.3s; }
.mm-input-group input:focus { border-color: #3b82f6; outline: none; background: rgba(0, 0, 0, 0.6); }
#mm-join-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; border: none; border-radius: 16px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); }
#mm-join-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6); }
#mm-join-btn:disabled { opacity: 0.5; cursor: not-allowed; background: #334155; }
.mm-error-msg { color: #ef4444; font-size: 0.9rem; margin-bottom: 15px; min-height: 20px; }

/* Messenger Bubbles */
.mm-msg { display: flex; gap: 10px; max-width: 75%; position: relative; overflow: visible !important; animation: fadeIn 0.3s ease; }
.mm-msg.mm-own { align-self: flex-end; flex-direction: row-reverse; }
.mm-msg.mm-own .mm-avatar, .mm-msg.mm-own .mm-sender-name, .mm-own .mm-sender-name-top { display: none; }
.mm-avatar { width: 28px; height: 28px; border-radius: 50%; margin-top: auto; object-fit: cover; }
.mm-msg-group { display: flex; flex-direction: column; position: relative; align-items: flex-start; }
.mm-msg.mm-own .mm-msg-group { align-items: flex-end !important; }

.mm-sender-name-top { font-size: 0.75rem; color: #94a3b8; margin-bottom: 4px; margin-left: 4px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.mm-sender-name-top.admin { color: #38bdf8; }

.mm-msg-bubble { padding: 10px 14px; background: rgba(255, 255, 255, 0.08); border-radius: 18px 18px 18px 4px; color: #e2e8f0; font-size: 0.95rem; word-break: break-word; line-height: 1.4; position: relative !important; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.mm-msg.mm-own .mm-msg-bubble { background: #3b82f6; color: white; border-radius: 18px 18px 4px 18px; }
.mm-unsent-msg { background: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(255, 255, 255, 0.15); color: #94a3b8 !important; font-style: italic; box-shadow: none !important; }
.mm-msg-bubble.mm-image-bubble { padding: 0 !important; background: transparent !important; border: none !important; box-shadow: none !important; border-radius: 12px; overflow: hidden; }
.mm-msg-bubble.mm-image-bubble img, .mm-msg-bubble.mm-image-bubble video { display: block; max-width: 100%; border-radius: 12px; }

/* Status & Seen By */
.mm-status-container { display: flex; flex-direction: column; align-items: flex-end; position: relative; width: 100%; margin-top: 5px; transition: margin-top 0.2s ease; pointer-events: none; }
.mm-msg-group.has-reaction .mm-status-container { margin-top: 28px; }
.mm-msg-status { opacity: 0; max-height: 0; overflow: hidden; transition: all 0.3s ease; text-align: right; display: flex; flex-direction: column; gap: 2px; font-size: 0.7rem; color: rgba(255, 255, 255, 0.6); }
.mm-msg.show-meta .mm-msg-status { opacity: 1; max-height: 500px; margin-bottom: 3px; pointer-events: auto; }
.mm-msg.mm-own .mm-msg-status { opacity: 1; max-height: 20px; pointer-events: auto; margin-top: 2px; }
.mm-msg.mm-own.show-meta .mm-msg-status { max-height: 500px; }
.mm-msg.mm-other .mm-msg-status, .mm-msg.mm-other .mm-status-container { display: none !important; }
.mm-status-seen { display: flex; justify-content: flex-end; height: 14px; width: 100%; }
.mm-status-avatar { width: 12px; height: 12px; border-radius: 50%; object-fit: cover; margin-right: 2px; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 0 2px rgba(0,0,0,0.5); }

/* Reactions */
.mm-reaction-badge { position: absolute; bottom: -10px; background: #2b2d31; color: #e2e8f0; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; border: none !important; box-shadow: 0 2px 5px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 4px; cursor: pointer; z-index: 10; white-space: nowrap; animation: scaleIn 0.2s ease; }
.mm-other .mm-msg-group .mm-reaction-badge { right: 0; transform: translateX(calc(50% - 5px)); }
.mm-own .mm-msg-group .mm-reaction-badge { right: 0; transform: translateX(calc(50% - 10px)); z-index: 20; }
.mm-reaction-badge:active { transform: scale(0.9); }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }

/* Replies */
.mm-msg-reply-preview { display: flex; flex-direction: column; border-left: 3px solid #60a5fa; background: rgba(0, 0, 0, 0.2); padding: 6px 10px; border-radius: 4px; margin-bottom: 8px; cursor: pointer; }
.mm-msg.mm-own .mm-msg-reply-preview { border-left-color: #fff; background: rgba(255, 255, 255, 0.15); }
#mm-reply-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background-color: #2c2d30; border-bottom: 1px solid #3c3f44; flex-shrink: 0; }
#mm-reply-bar.hidden { display: none; }
.mm-reply-content { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; white-space: nowrap; }
.mm-reply-label { font-size: 11px; color: #94a3b8; }
#mm-reply-to-name { font-weight: bold; color: #38bdf8; }
#mm-reply-text-preview { font-size: 12px; color: #a1a1a1; overflow: hidden; text-overflow: ellipsis; }
#mm-cancel-reply { background: none; border: none; color: #94a3b8; font-size: 18px; cursor: pointer; padding: 0 5px; flex-shrink: 0; }

/* ==========================================
   DESKTOP HOVER TOOLS (ULTIMATE FIX)
   ========================================== */
/* 1. Ensure the bubble is the anchor point */
.mm-msg-bubble {
    position: relative !important;
    overflow: visible !important;
}

/* 2. The Tools Container */
.mm-desktop-tools {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(5px) !important;
    padding: 6px 10px !important;
    border-radius: 50px !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    white-space: nowrap !important; /* Prevents icons from stacking on top of each other */
}

/* Show on hover */
.mm-msg:hover .mm-desktop-tools {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 3. YOUR messages (Bubble is on the right, force tools 10px to the LEFT) */
.mm-msg.mm-own .mm-desktop-tools {
    right: calc(100% + 10px) !important;
    left: auto !important;
    flex-direction: row-reverse !important;
}

/* 4. THEIR messages (Bubble is on the left, force tools 10px to the RIGHT) */
.mm-msg.mm-other .mm-desktop-tools {
    left: calc(100% + 10px) !important;
    right: auto !important;
    flex-direction: row !important;
}

/* Tool Buttons */
.mm-tool-btn {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    font-size: 15px !important;
    padding: 6px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: 0.2s !important;
}

.mm-tool-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #38bdf8 !important;
    transform: scale(1.15) !important;
}

.mm-msg.mm-own .mm-tool-btn i.fa-reply {
    transform: scaleX(-1) !important;
}

@media (hover: none) {
    .mm-desktop-tools { display: none !important; }
}

.mm-reaction-popup, .mm-context-menu { position: fixed !important; z-index: 2147483647 !important; background: #1e1f22; border-radius: 50px; display: flex; box-shadow: 0 8px 25px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); pointer-events: auto; }
.mm-reaction-popup { padding: 6px 8px; gap: 5px; animation: popIn 0.15s ease; max-width: 95vw; }
.mm-context-menu { border-radius: 12px; padding: 5px; flex-direction: column; min-width: 140px; animation: fadeIn 0.1s ease; }
.mm-reaction-item { font-size: 24px; cursor: pointer; transition: transform 0.2s; padding: 0 4px; }
.mm-reaction-item:hover { transform: scale(1.3); }
.mm-ctx-item { background: transparent; border: none; color: #e2e8f0; padding: 10px 15px; text-align: left; font-size: 14px; cursor: pointer; border-radius: 8px; display: flex; align-items: center; gap: 10px; }
.mm-ctx-item:hover { background: rgba(255,255,255,0.1); }
.mm-ctx-item.delete { color: #ef4444; }

/* Reaction Full List View */
#mm-reaction-view { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #242526; border-radius: 16px 16px 0 0; z-index: 2147483647; display: flex; flex-direction: column; max-height: 60vh; box-shadow: 0 -4px 20px rgba(0,0,0,0.5); transform: translateY(100%); transition: transform 0.3s ease; }
#mm-reaction-view.show { transform: translateY(0); }
.mm-reaction-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.mm-reaction-title { color: white; font-size: 16px; font-weight: 700; }
.mm-reaction-close { background: rgba(255,255,255,0.1); border: none; color: #e4e6eb; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; }
#mm-reaction-list { flex: 1; overflow-y: auto; padding: 10px 0; }
.mm-reaction-user-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; transition: background 0.2s; cursor: pointer; }
.mm-reaction-user-row:hover { background-color: #44474b; }
.mm-reaction-user-left { display: flex; align-items: center; gap: 12px; }
.mm-reaction-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.mm-reaction-name { color: white; font-size: 15px; font-weight: 500; }
.mm-reaction-subtitle { color: #b0b3b8; font-size: 12px; margin-top: 2px; }
.mm-reaction-emoji-display { font-size: 24px; }
.mm-reaction-footer { display: flex; gap: 10px; padding: 10px 20px; border-top: 1px solid rgba(255,255,255,0.1); overflow-x: auto; }
.mm-reaction-tab { background: transparent; border: none; color: #b0b3b8; font-weight: 600; padding: 8px 16px; border-radius: 20px; cursor: pointer; }
.mm-reaction-tab.active { background: rgba(255,255,255,0.1); color: #2e89ff; }

/* Action Sheet (Mobile Menu) */
#mm-action-sheet { position: fixed; inset: 0; z-index: 10000; background: transparent !important; display: none; flex-direction: column; justify-content: flex-end; align-items: center; pointer-events: auto; }
#mm-action-sheet.show { display: flex; }
.mm-sheet-content { width: 100%; background-color: #1f1f1f; border-radius: 20px 20px 0 0; padding: 20px 0 30px; box-shadow: 0 -5px 20px rgba(0,0,0,0.3); animation: slideUp 0.25s ease; position: relative; pointer-events: auto; }
.mm-sheet-row { display: flex; justify-content: space-evenly; align-items: center; width: 100%; }
.mm-sheet-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; gap: 8px; min-width: 60px; }
.mm-sheet-btn i { font-size: 24px; color: #3b82f6; }
.mm-sheet-btn span { font-size: 13px; color: #e0e0e0; }

.mm-reaction-popover { position: fixed; display: flex; background: #27282b; border-radius: 50px; padding: 5px 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); z-index: 2147483647 !important; opacity: 0; transform: scale(0.5) translateY(20px); transition: all 0.2s ease; pointer-events: auto; max-width: 90vw; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.mm-reaction-popover.show { opacity: 1; transform: scale(1) translateY(0); }
.mm-reaction-popover::-webkit-scrollbar { display: none; }

/* Camera UI */
#mm-camera-layer { position: absolute; inset: 0; background: #000; z-index: 2000; display: flex; flex-direction: column; }
#mm-camera-video { width: 100%; height: 100%; object-fit: cover; }
.camera-top-bar { position: absolute; top: 20px; width: 100%; display: flex; justify-content: space-between; padding: 0 20px; z-index: 10; }
.cam-icon { background: rgba(0,0,0,0.4); border: none; color: white; padding: 10px; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; }
.camera-bottom-bar { position: absolute; bottom: 30px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px; z-index: 10; }
.mode-switch { background: rgba(0,0,0,0.5); padding: 8px 16px; border-radius: 20px; display: flex; gap: 20px; backdrop-filter: blur(4px); }
.mode-switch span { color: #bbb; font-weight: 600; cursor: pointer; }
.mode-switch span.active-mode { color: #fff; }
#cam-shutter-btn { width: 70px; height: 70px; border-radius: 50%; border: 4px solid white; background: transparent; cursor: pointer; }
#cam-shutter-btn.recording { background: #ef4444; border-color: #ef4444; animation: pulseRecord 1.5s infinite; }
@keyframes pulseRecord { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.9); opacity: 0.8; } }

/* Lightbox & Media Previews */
#mm-lightbox, .media-preview-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 10000; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
#mm-lightbox.show, .media-preview-modal.show { opacity: 1; pointer-events: auto; }
#mm-lightbox-content, .media-preview-content img, .media-preview-content video { max-width: 95%; max-height: 85vh; border-radius: 8px; object-fit: contain; }
.mm-lightbox-header { position: absolute; top: 20px; right: 20px; display: flex; gap: 10px; z-index: 10001; }
.mm-lightbox-btn { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }

#mm-attachment-bar { padding: 10px; background: rgba(0,0,0,0.3); display: flex; justify-content: center; position: relative; }
#mm-att-img, #mm-att-vid { max-height: 200px !important; border-radius: 8px; }
#mm-remove-att { position: absolute; top: 10px; right: 15px; background: rgba(0,0,0,0.6); color: white; width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; }

/* Mobile Chat Adjustments */
@media (max-width: 480px) {
    .mm-wrapper { bottom: 20px !important; right: 20px !important; }
    #mm-panel { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100dvh !important; max-height: none !important; border-radius: 0 !important; margin: 0 !important; }
    .mm-footer { padding-bottom: max(12px, env(safe-area-inset-bottom)); background: #0f172a; }
}

@media (max-width: 992px) {
    #main-content-area { flex-direction: column; height: auto; padding: 0; gap: 0; }
    #video { height: auto; aspect-ratio: 16/9; }
    .sidebar { width: 100%; height: auto; max-height: 60vh; border-left: none; border-top: 1px solid var(--glass-border); background: #0b0b10; }
    .category-bar, .nav-pages, .click-here-link { display: none; }
    .mobile-category-btn, .hamburger { display: flex; }
    .info-section { width: 92%; margin: 2rem auto; padding: 2rem 0; }
    .contact-container { flex-direction: column; gap: 3rem; }
}

.custom-stream-loader {
    position: absolute !important;
    inset: 0 !important;
    background: #000 !important; /* Solid black to hide any player flashes */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 50 !important;
    pointer-events: none !important;
    opacity: 1;
    transition: opacity 0.5s ease-out !important; 
}

.custom-stream-loader.fade-out {
    opacity: 0 !important;
}

.loader-channel-logo {
    width: 120px;   
    height: 80px;     
    object-fit: contain; 
    background: transparent; 
    padding: 0;         
    margin-bottom: 15px;
    border-radius: 0;    
    animation: pulseLogo 1.5s infinite ease-in-out;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.8)); 
}

.loader-text {
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulseText 1.5s infinite ease-in-out;
    text-shadow: 0 4px 10px rgba(0,0,0,0.9); 
}

@keyframes pulseLogo {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 5px 25px rgba(56,189,248,0.4)); }
    100% { transform: scale(0.9); opacity: 0.8; }
}

@keyframes pulseText {
    0% { opacity: 0.5; }
    50% { opacity: 1; text-shadow: 0 0 15px rgba(255,255,255,0.8); }
    100% { opacity: 0.5; }
}

/* ==========================================
   FOOTER & STATS — TIGHT & CENTERED
   ========================================== */

/* Remove ALL extra bottom padding from contact section */
#contact.info-section {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Footer — single centered column, minimal spacing */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 20px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
    gap: 10px;
    width: 100%;
    margin: 0;
}

/* Stats row — centered, muted, compact */
.footer-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Icons — subtle gray, no loud gradient */
.stat-item i {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: var(--text-muted) !important;
    margin-right: 0;
}

/* Numbers — bright white */
.footer-stats span span {
    color: var(--text-color);
    font-weight: 600;
    margin-left: 4px;
}

/* Copyright — CENTERED GRADIENT PILL like the Send button */
.footer-copyright {
    margin: 0;
    padding: 12px 32px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    text-align: center;
    width: fit-content;
    max-width: 90%;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-copyright:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* Mobile — everything stacks & centers */
@media (max-width: 480px) {
    .footer-bottom {
        padding: 8px 15px 10px;
        gap: 8px;
    }
    .footer-stats {
        gap: 10px;
        font-size: 0.7rem;
    }
    .footer-copyright {
        padding: 10px 24px;
        font-size: 0.65rem;
        width: 100%;
        max-width: 280px;
    }
}

/* ==========================================
   NATIVE AD BANNER
   ========================================== */
.ad-banner-section {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    background: transparent;
}

.ad-banner-container {
    width: 90%;
    max-width: 1100px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.ad-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    opacity: 0.6;
    align-self: flex-start;
}

/* Ensure the ad container div centers its content */
#container-ab2fdf06b5b343c25c1d7974d6e0f019 {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .ad-banner-container {
        width: 92%;
        padding: 15px;
        border-radius: 16px;
    }
}