
: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);
    --warm-glow: rgba(236, 72, 153, 0.15);
    --header-height: 70px;
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 12px;
}

* {
    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 {
    overflow: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.lg-heading {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    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);
}

.hidden { 
    display: none !important; 
}

/* =========================================
   1. ANIME SELECTOR (MOVED TO TOP)
   ========================================= */
.anime-selector-container {
    padding: 0; /* Remove container padding, we use margin on the select instead */
    animation: fadeIn 0.3s ease;
    width: 100%;
}

#animeSeriesSelect {
    /* Dimensions & Spacing (Matches .mobile-category-btn) */
    width: calc(100% - 40px);
    margin: 0 20px 15px; 
    padding: 14px 20px;
    
    /* Glassmorphism Visuals */
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12); /* var(--glass-border) */
    border-radius: 12px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;

    /* Custom Dropdown Arrow (Replaces default ugly arrow) */
    appearance: none;
    -webkit-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;
}

#animeSeriesSelect:focus {
    border-color: #38bdf8; /* Blue highlight on click */
    background-color: rgba(0, 0, 0, 0.6);
    outline: none;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* Dropdown Options (The list inside) */
#animeSeriesSelect option {
    background-color: #1a1a2e;
    color: white;
    padding: 10px;
}

/* === 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);
}

/* === HEADER & NAV === */
.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);
    opacity: 0;
    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%;
    max-width: 100%;
    margin: 0 auto;
    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;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.5px;
    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;
    z-index: 1;
    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;
}

@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;
    }
}

.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;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease;
    z-index: 1000;
    padding: 0;
}

.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);
}

/* === MAIN LAYOUT === */
#main-content-area {
    display: flex;
    gap: 0;
    padding: 0;
    flex-grow: 1;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    overflow: hidden;
    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;
    min-height: 0;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: none;
    position: relative;
}

#playerWrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#video {
    flex: 1;
    width: 100%;
    min-height: 0;
    background: black;
}

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

/* === SEARCH & CATEGORIES === */
.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);
}

#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;
    text-align: left;
    justify-content: space-between;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
}

.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;
    height: auto;
    overflow-y: auto;
    background-color: transparent;
    padding: 15px 15px 15px;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    will-change: transform;
    overscroll-behavior: contain;
}

.channel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateZ(0);
}

.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 cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 0.95rem;
}

.channel-button i,
.channel-button svg {
    font-size: 1.4rem;
    width: 24px;
    height: 24px;
}

.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,
.channel-button.selected {
    background: var(--accent-gradient) !important;
    background-color: #ec4899 !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 *,
.channel-button.selected * {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.channel-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #fff;
    flex-shrink: 0;
    padding: 2px;
}

.channel-name {
    flex-grow: 1;
    white-space: normal;
    text-align: left;
    line-height: 1.4;
    font-weight: 500;
}

/* === INFO SECTIONS === */
.info-section {
    width: 90%;
    max-width: 1100px;
    margin: 5rem auto;
    padding: 4rem 2rem;
    background: transparent;
    border: none;
    box-shadow: none;
    border-bottom: none;
    scroll-margin-top: calc(var(--header-height) + 30px);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

#about-us {
    margin-top: 1rem;
}

.nav-scroll-target {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

#contact.info-section {
    margin-top: 10px;
    padding-top: 0;
    margin-bottom: 0;
    padding-bottom: 4rem;
    background: transparent;
    border-radius: 30px 30px 0 0;
    border-bottom: none;
    border-top: none;
}

.info-section h2 {
    margin-top: 0;
    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;
    hyphens: none;
    -webkit-hyphens: none;
    line-height: 1.4;
    word-break: keep-all;
}

.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;
    align-items: flex-start;
}

.contact-social {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.contact-social h2.lg-heading {
    font-size: 3.2rem;
    margin-bottom: 1rem;
}

.contact-social p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

.contact-social .contact-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 5px 0;
}

@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;
    letter-spacing: 0.5px;
}

.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);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.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;
    margin: 0 auto;
    padding: 2rem 20px 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    white-space: pre-line;
    font-weight: 500;
    width: 100%;
    max-width: 1200px;
    position: relative;
    clear: both;
}

/* === MODALS & OVERLAYS === */
.modal-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 10, 0.7);
    backdrop-filter: blur(10px);
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: rgba(20, 20, 25, 0.95);
    color: #fff;
    padding: 30px;
    border-radius: 24px;
    max-width: 500px;
    width: 85%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: none;
    height: auto !important;
    width: 90% !important;
    max-width: 650px !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    padding: 40px 30px !important;
    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;
}

.close-button:hover {
    background: #ef4444;
}

.modal-heading {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    overflow-y: auto;
    flex-grow: 1;
    margin-top: 0;
    padding-bottom: 10px;
    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;
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-cat-option:hover,
.mobile-cat-option.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.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;
    font-size: 1.1rem;
}

.category-modal-content {
    padding: 25px;
    width: 85%;
}

.category-modal-content .close-button {
    top: 15px;
    right: 15px;
}

.category-modal-content .modal-heading {
    margin-top: 0;
}

/* === QR MODAL === */
.qr-modal-content {
    background: white !important;
    color: #000 !important;
    border-radius: 16px;
    padding: 35px 20px 20px 20px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

#zoomedQrImage {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#qrModal .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 18px;
    border: none;
    box-shadow: none;
    transition: all 0.2s ease;
    z-index: 20;
    cursor: pointer;
}

#qrModal .close-button:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

/* === 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 cubic-bezier(0.175, 0.885, 0.32, 1.275);
    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);
}

/* === 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;
    transition: color 0.2s;
}

.close-notification-btn:hover {
    color: #fff;
}

/* === SKELETON LOADING === */
.skeleton,
.skeleton-effect {
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: transparent !important;
}

.skeleton {
    color: transparent !important;
}

.skeleton::after,
.skeleton-effect::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 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%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.skeleton-block {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.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; }
}

/* === ANIMATIONS === */
.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); }
}

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

.neon-bubble:hover {
    color: #38bdf8;
    transform: scale(1.2);
}

.donation-qr-code {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background-color: white;
    padding: 5px;
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.donation-qr-code:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.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);
}

.updates-container {
    margin-top: 3rem;
}

.updates-container .update-item {
    background: transparent;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    transition: opacity 2.5s cubic-bezier(0.16, 1, 0.3, 1), transform 2.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.updates-container .update-item:last-child {
    border-bottom: none;
}

.updates-container .update-item h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.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);
}

/* === MAINTENANCE OVERLAY === */
.maintenance-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out, backdrop-filter 0.6s ease;
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2147483647;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(0px);
}

.maintenance-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.maintenance-content {
    text-align: center;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    background: #111;
    border: 1px solid #333;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(0, 100, 255, 0.2);
    transform: scale(0.95);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.maintenance-overlay.active .maintenance-content {
    transform: scale(1);
}

.maintenance-icon i {
    font-size: 4rem;
    color: #3b82f6;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.maintenance-content h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
    font-family: sans-serif;
    font-weight: bold;
}

.maintenance-content p {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-family: sans-serif;
}

.maintenance-status {
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
/* === ANIME SELECTOR (Styled like Category Button) === */
.anime-selector-container {
    padding: 0; /* Remove container padding, we use margin on the select instead */
    animation: fadeIn 0.3s ease;
    width: 100%;
}

#animeSeriesSelect {
    /* Dimensions & Spacing (Matches .mobile-category-btn) */
    width: calc(100% - 40px);
    margin: 0 20px 15px; 
    padding: 14px 20px;
    
    /* Glassmorphism Visuals */
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12); /* var(--glass-border) */
    border-radius: 12px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;

    /* Custom Dropdown Arrow (Replaces default ugly arrow) */
    appearance: none;
    -webkit-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;
}

#animeSeriesSelect:focus {
    border-color: #38bdf8; /* Blue highlight on click */
    background-color: rgba(0, 0, 0, 0.6);
    outline: none;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* Dropdown Options (The list inside) */
#animeSeriesSelect option {
    background-color: #1a1a2e;
    color: white;
    padding: 10px;
}
/* Channel / Episode Button Style */
.channel-button {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.03); /* Dark glass background */
    border: 1px solid transparent;
    border-radius: 12px;
    color: #eee;
    display: flex;
    align-items: center;
    gap: 15px; /* Space between logo and text */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 0.95rem;
    min-height: 60px; /* Force consistent height */
}

.channel-button:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}


.channel-logo {
    width: 40px;         
    height: 40px;         
    border-radius: 8px;
    background-color: #222;
    flex-shrink: 0;       
    overflow: hidden;    
    position: relative;
    padding: 0;     
}

.channel-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* Ensures image covers the square without stretching */
    display: block;
}

/* ========= Messenger ============ */

/* === MAIN WRAPPER (POSITION FIXED) === */
.mm-wrapper {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    top: auto !important;
    z-index: 2147483647 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
    width: auto !important;
    height: auto !important;
}

.mm-fab,
#mm-panel {
    pointer-events: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.mm-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient, linear-gradient(135deg, #3b82f6, #2563eb));
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 10000;
    margin-top: 10px;
}

.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 {
    width: 380px;
    height: 600px;
    max-height: 75vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-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 cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    transform: scale(1);
}

#mm-panel.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    visibility: hidden;
}

/* === HEADER === */
.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; /* Prevent header shrinking */
}

.mm-header-user {
    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);
    display: block; 
}

.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;
    padding: 0;
}

.mm-header-status {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
    padding: 0;
}

.mm-header-actions {
    display: flex;
    align-items: center; 
    gap: 10px;
    height: 100%;
}

#mm-admin-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s;
}
#mm-admin-btn-container:hover {
    background: rgba(255,255,255,0.1);
}

.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;
}

/* === CHAT AREA (SCROLLING FIX) === */
#mm-chat-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;
    /* This enables smooth "flick" scrolling on mobile */
    -webkit-overflow-scrolling: touch; 
    scroll-behavior: smooth;
}

/* === FOOTER === */
.mm-footer {
    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-wrap: nowrap;
    flex-shrink: 0; /* Prevent footer shrinking */
}

.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;
    line-height: 20px;
    overflow: hidden;
    font-family: sans-serif;
}

/* === SETUP VIEW === */
#mm-setup-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    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;
    position: relative;
    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;
    border-radius: 50%;
}

.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;
    font-weight: 500;
    transition: 0.3s;
    font-family: sans-serif;
}

.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;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    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;
    box-shadow: none;
    transform: none;
}

.mm-error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 20px;
}

/* ==========================================
   MESSAGE BUBBLES & BORDERLESS MEDIA FIX
   ========================================== */
.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 {
    display: none;
}
/* ADDED: Ensure sender name is hidden for own messages unless explicitly shown */
.mm-msg.mm-own .mm-sender-name {
    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;
    /* KEY FIX: Set position relative for reaction badge absolute positioning */
    position: relative; 
}

.mm-sender-name {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 2px;
    margin-left: 4px;
}

/* ADDED: Metadata (Name/Status) toggle logic for mobile tap */
./* Modified to allow full list of names to show */
.mm-msg .mm-sender-name,
.mm-msg.mm-own .mm-msg-status {
    opacity: 0; 
    max-height: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    pointer-events: none;
    line-height: 1.4; /* Improve readability for list of names */
}

/* When Toggled (Tapped): Allow full height for Seen By list */
.mm-msg.show-meta .mm-sender-name,
.mm-msg.mm-own.show-meta .mm-msg-status {
    opacity: 1;
    max-height: 500px; /* Large enough to fit many names */
    pointer-events: auto;
    margin-top: 5px;
}

/* Format the timestamp and Seen By list */
.mm-msg-status {
    display: flex;
    flex-direction: column; 
    gap: 2px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Ensure own status shows up when not showing meta (default delivered/sending status) */
.mm-msg.mm-own .mm-msg-status {
    opacity: 1;
    max-height: 20px;
    pointer-events: auto;
    margin-top: 2px; /* Small gap below bubble */
    font-size: 0.7rem;
    min-height: 12px;
}


/* --- BUBBLE STYLING (Standard) --- */
.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;
    max-width: 100%;
    
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;

    position: relative !important;
    overflow: visible !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;
}

/* --- BORDERLESS MEDIA FIX (Strict) --- */
.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;
    /* Fix for bottom gap in some browsers */
    vertical-align: bottom; 
}

/* --- DESKTOP HOVER TOOLS --- */
.mm-desktop-tools {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
    padding: 6px 10px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.mm-msg:hover .mm-desktop-tools {
    opacity: 1;
    visibility: visible;
}

.mm-msg.mm-own .mm-desktop-tools {
    right: 100%;
    left: auto;
    margin-right: 15px; 
    flex-direction: row-reverse;
}

.mm-msg.mm-other .mm-desktop-tools {
    right: auto;
    left: 100%;
    margin-left: 15px; 
}

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

.mm-tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #3b82f6;
    transform: scale(1.15);
}

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

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

/* ==========================================
   DESKTOP OVERLAY MENUS
   ========================================== */
.mm-reaction-popup {
    position: fixed !important; 
    z-index: 2147483647 !important;
    background: #1e1f22; 
    padding: 6px 8px;
    border-radius: 50px;
    display: flex;
    gap: 5px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5); 
    border: 1px solid rgba(255,255,255,0.1);
    animation: popIn 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    max-width: 95vw;
}

.mm-reaction-item {
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0 4px;
    line-height: 1;
}

.mm-reaction-item:hover { transform: scale(1.3); }

.mm-context-menu {
    position: fixed !important; 
    z-index: 2147483647 !important;
    background: #1e1f22;
    border-radius: 12px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    min-width: 140px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    animation: fadeIn 0.1s ease;
}

.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; }

/* --- MEDIA STYLES (Standard) --- */
.mm-msg-img {
    max-width: 200px;
    border-radius: 12px;
    margin-top: 5px;
    cursor: pointer;
}
.mm-msg-video-container {
    border-radius: 12px;
    overflow: hidden;
    margin-top: 5px;
}

/* ==========================================
   MOBILE BOTTOM SHEET (TRANSPARENT STYLE)
   ========================================== */
#mm-action-sheet, .mm-action-sheet {
    position: fixed; 
    inset: 0; 
    z-index: 10000;
    background: rgba(0,0,0,0) !important; 
    display: none;
    flex-direction: column; 
    justify-content: flex-end; 
    align-items: center;
    pointer-events: auto;
}

#mm-action-sheet.show, .mm-action-sheet.show { display: flex; }

.mm-sheet-content {
    width: 100%;
    background-color: #1f1f1f;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px 0 30px 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    animation: slideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10002;
    position: relative;
    pointer-events: auto; 
}

.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;
    
    /* Animation base state */
    opacity: 0;
    transform: scale(0.5) translateY(20px);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;

    /* ✅ NEW: Safety styles for Mobile */
    max-width: 90vw;       /* Never be wider than 90% of screen */
    overflow-x: auto;      /* Allow scrolling if screen is tiny */
    white-space: nowrap;   /* Keep emojis in a single row */
    
    /* Hide scrollbar for cleanliness */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.mm-reaction-popover::-webkit-scrollbar { 
    display: none; 
}


.mm-sheet-row {
    display: flex;
    flex-direction: row;
    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;
    padding: 0;
}

.mm-sheet-btn i { font-size: 24px; color: #3b82f6; margin-bottom: 4px; }
.mm-sheet-btn span { font-size: 13px; color: #e0e0e0; font-weight: 400; font-family: sans-serif; }
.mm-sheet-btn:active { opacity: 0.7; transform: scale(0.95); }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ==========================================
   RESPONSIVE & MOBILE FULL SCREEN
   ========================================== */
@media (max-width: 480px) {
    .mm-wrapper {
        bottom: 20px !important; 
        right: 20px !important; 
        width: auto !important;
        height: auto !important;
        z-index: 2147483647;
    }
    .mm-wrapper.chat-open .mm-fab { display: none !important; }
    #mm-panel {
        position: fixed !important; 
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100dvh !important;
        max-height: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .mm-footer {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        background: #0f172a;
    }
}

/* === ATTACHMENT BAR === */
#mm-attachment-bar {
    max-height: 250px;       
    overflow: hidden;        
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

#mm-att-img {
    max-height: 200px !important;
    width: auto !important;
    max-width: 100%;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}

#mm-att-vid {
    max-height: 200px !important;
    width: auto !important;
    max-width: 100%;
    border-radius: 8px;
    display: block;
}

#mm-remove-att {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- MISC: LIGHTBOX, LOADING, ETC --- */
.mm-msg.mm-sending { opacity: 0.6; }

#mm-lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    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 ease;
}

#mm-lightbox.show { opacity: 1; pointer-events: auto; }

#mm-lightbox-content {
    max-width: 95%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

body.mm-open {
    overflow: hidden !important;
    overscroll-behavior-y: none !important;
    position: fixed;
    width: 100%;
}

@keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* === MOBILE RESPONSIVE FIX === */
@media (max-width: 992px) {
    #main-content-area {
        flex-direction: column;
        height: auto;
        padding: 0; 
        gap: 0; 
        scroll-margin-top: 90px !important;
    }
    #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);
        margin-top: 0;
        background: #0b0b10;
        backdrop-filter: none !important;
    }
    .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; }
}

/* ==========================================
   MESSENGER STYLE REACTION LIST MODAL
   ========================================== */
#mm-reaction-view {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #242526;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    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 cubic-bezier(0.1, 0.7, 0.1, 1);
}

#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;
}
.mm-reaction-user-row:active { background: rgba(255,255,255,0.05); }

.mm-reaction-user-row[onclick] {
    cursor: pointer;
    background-color: #33363b;
    transition: background-color 0.15s;
}

.mm-reaction-user-row[onclick]: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;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
}
.mm-reaction-tab.active { background: rgba(255,255,255,0.1); color: #2e89ff; }

.mm-reaction-icon { 
    font-size: 28px;
    cursor: pointer; 
    transition: transform 0.2s; 
    user-select: none;
}
.mm-reaction-icon:active { transform: scale(1.3); }

@keyframes popIn { 
    from { transform: scale(0.5); opacity: 0; } 
    to { transform: scale(1); opacity: 1; } 
}

/* ==========================================
   REACTION COUNT PILL (Updated: No Border)
   ========================================== */
.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 cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


/* Positioning for the OTHER user's message (MOVED TO RIGHT) */
.mm-other .mm-msg-group .mm-reaction-badge {
    left: auto;   
    right: 0;  
    transform: translateX(calc(50% - 5px)); 
}


/* Positioning for OWN user: Keep on RIGHT side */
.mm-own .mm-msg-group .mm-reaction-badge {
    right: 0;     
    left: auto;    
    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); } }

/* ==========================================
   UNSENT MESSAGE STYLE
   ========================================== */
.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;
    font-size: 0.9rem;
    padding: 8px 12px;
    box-shadow: none !important;
}

/* ==========================================
   CAMERA OVERLAY & PREVIEW UI
   ========================================== */
#mm-camera-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}
#mm-camera-layer.hidden { display: none !important; }

#mm-camera-video {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

/* Controls */
.camera-top-bar {
    position: absolute; top: 20px; width: 100%;
    display: flex; justify-content: space-between; padding: 0 20px;
    box-sizing: border-box; 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;
    font-size: 14px; 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; font-size: 13px; cursor: pointer;
    transition: color 0.3s;
}
.mode-switch span.active-mode {
    color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.6);
}

#cam-shutter-btn {
    width: 70px; height: 70px; border-radius: 50%;
    border: 4px solid white; background: transparent;
    transition: all 0.2s ease; cursor: pointer;
}
#cam-shutter-btn:active { transform: scale(0.95); background: rgba(255,255,255,0.2); }
#cam-shutter-btn.recording {
    background: #ef4444; border-color: #ef4444;
    transform: scale(1.1); animation: pulseRecord 1.5s infinite;
}
@keyframes pulseRecord {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Preview Screen (Borderless) --- */
#mm-cam-preview-container {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000; z-index: 20;
    display: flex; flex-direction: column;
}
#mm-cam-preview-container.hidden { display: none !important; }

#mm-preview-img, #mm-preview-video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
#mm-preview-img.hidden, #mm-preview-video.hidden { display: none; }

/* Preview Action Buttons */
.preview-actions {
    position: absolute; bottom: 30px; width: 100%;
    display: flex; justify-content: space-between; padding: 0 30px;
    box-sizing: border-box; z-index: 30; pointer-events: none;
}
.preview-actions button {
    pointer-events: auto; cursor: pointer; border: none; font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.preview-btn-close {
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.2); color: white;
    backdrop-filter: blur(5px); font-size: 18px;
}
.preview-btn-send {
    padding: 12px 24px; border-radius: 30px;
    background: #3b82f6; color: white; font-size: 16px;
    display: flex; align-items: center; gap: 8px;
}

/* ==========================================
   MESSAGE STATUS & ADAPTIVE LAYOUT
   ========================================== */

/* 1. Base Container for Status Items (Text + Avatar) */
/* This holds the timestamp/seen text AND the avatar together */
.mm-status-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
    width: 100%;
    margin-top: 5px; /* Default spacing (No Emoji) */
    transition: margin-top 0.2s ease;
    pointer-events: none; /* Let clicks pass through */
}

/* 2. ADAPTIVE LOGIC: If Reaction Exists, push everything down */
/* The JS adds 'has-reaction' class when an emoji is present */
.mm-msg-group.has-reaction .mm-status-container {
    margin-top: 28px; /* Push down to clear the reaction badge */
}

/* 3. The "Seen by..." Text (Hidden by default) */
.mm-msg-status {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: right;
    min-height: 0;
}

/* Show Text on Tap */
.mm-msg.show-meta .mm-msg-status {
    opacity: 1;
    max-height: 500px; /* Expand to show full list */
    margin-bottom: 3px; /* Space between text and avatar icon */
}

/* 4. The Floating Avatar Icon */
.mm-status-seen {
    display: flex;
    justify-content: flex-end;
    height: 14px;
    width: 100%;
}

/* The Avatar Image Itself */
.mm-status-avatar {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 2px; /* Align with right edge */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 2px rgba(0,0,0,0.5); 
}

/* Hide status for other people's messages */
.mm-msg.mm-other .mm-msg-status {
    display: none !important; 
}
.mm-msg.mm-other .mm-status-container {
    display: none !important;
}


/* ==========================================
   FIXED REPLY BAR (Above Input)
   ========================================== */
#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;
    font-weight: 500;
    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;
}

/* ==========================================
   MENTION LIST (New Feature)
   ========================================== */
#mm-mention-list {
    position: absolute;
    bottom: 70px; /* Position above the input bar */
    left: 15px;
    right: 15px;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10005;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    display: none; /* Hidden by default */
    flex-direction: column;
}

.mm-mention-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.mm-mention-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mm-mention-item:last-child {
    border-bottom: none;
}

.mm-mention-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.mm-mention-name {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
}

.mm-mention-bot-badge {
    background: #8b5cf6; /* Purple for AI */
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: bold;
}
/* MENTION LIST POPUP */
#mm-mention-list {
    position: absolute;
    bottom: 70px; /* Above the input bar */
    left: 20px;
    width: 200px;
    background: #27282b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    display: none; /* Hidden by default */
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.mm-mention-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mm-mention-item:hover {
    background: rgba(255,255,255,0.1);
}
.mm-mention-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}
/* Update this section in your CSS */
#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; /* Ensure hand cursor shows */
    margin-right: 5px; /* Spacing from close button */
}

#mm-admin-btn-container i {
    color: #94a3b8; /* Default gray color */
    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; /* Blue on hover */
}

/* ✅ FIX: FORCE RIGHT ALIGNMENT */
.mm-msg.mm-own .mm-msg-group {
    align-items: flex-end !important; /* Fixed syntax error */
    display: flex;
    flex-direction: column;
    position: relative;
}

.mm-msg.mm-other .mm-msg-group {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* NICKNAME OUTSIDE & ON TOP */
.mm-sender-name-top {
    font-size: 0.75rem; /* Small text (approx 12px) */
    color: #94a3b8;    /* Light Gray */
    margin-bottom: 4px;
    margin-left: 4px;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Admin Name Color */
.mm-sender-name-top.admin {
    color: #38bdf8; /* Light Blue for Admin */
}

/* Hide name for your own messages */
.mm-own .mm-sender-name-top {
    display: none;
}
.mm-msg-reply-preview {
    display: flex;
    flex-direction: column;
    border-left: 3px solid #60a5fa; /* Blue accent line */
    background: rgba(0, 0, 0, 0.2); 
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
}
.mm-msg.mm-own .mm-msg-reply-preview {
    border-left-color: #fff; /* White line for own bubbles */
    background: rgba(255, 255, 255, 0.15);
}
#mm-messages-container > :first-child {
    margin-top: auto !important;
}
media-preview-modal {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.95);
            z-index: 1000000;
            display: flex;
            flex-direction: column;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
        }
        .media-preview-modal.show {
            opacity: 1;
            pointer-events: auto;
        }
        .media-preview-header {
            padding: 15px;
            text-align: right;
        }
        .media-preview-btn {
            background: #333; color: white; border: none;
            width: 40px; height: 40px; border-radius: 50%;
            font-size: 18px; cursor: pointer;
            margin-left: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .media-preview-content {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: auto;
        }
        .media-preview-content img,
        .media-preview-content video {
            max-width: 95%;
            max-height: 90vh;
            object-fit: contain;
        }
        .hidden { display: none !important; }