/* =========================================================
   MYRLWEB — COMUNIDAD
   CSS VERSIÓN 5.0 — LIMPIO Y CONSOLIDADO

   OBJETIVO
   ---------------------------------------------------------
   • Un solo bloque por selector
   • Chat estilo WhatsApp
   • Burbujas compactas
   • Muro comunitario con scroll
   • Diseño responsive
   • Header, navegación y contenido incluidos
   • NO modifica JavaScript ni Firebase
   ========================================================= */


/* =========================================================
   VARIABLES Y BASE
   ========================================================= */

:root{
    --azul:#2563eb;
    --azul-oscuro:#1d4ed8;
    --morado:#7c3aed;
    --oscuro:#0f172a;
    --dorado:#d4a017;
    --fondo:#f1f5f9;
    --card:#ffffff;
    --texto:#1e293b;
    --texto-secundario:#64748b;
    --borde:#e2e8f0;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:system-ui,Arial,sans-serif;
    background:var(--fondo);
    color:var(--texto);
    padding-bottom:80px;
}


/* =========================================================
   HEADER
   ========================================================= */

.header{
    position:fixed;
    top:14px;
    left:50%;
    width:min(1200px,calc(100% - 32px));
    transform:translateX(-50%);

    min-height:64px;
    padding:10px 16px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    background:linear-gradient(
        135deg,
        #0d1b2a 0%,
        #1a2f4d 55%,
        #2b4f73 100%
    );

    color:#fff;

    border:1px solid rgba(212,160,23,.20);
    border-radius:20px;

    box-shadow:
        0 12px 30px rgba(15,23,42,.22);

    backdrop-filter:blur(14px);

    z-index:1000;
}

.logo{
    display:flex;
    align-items:center;
    gap:10px;
    margin-left:auto;

    color:#fff;
    font-size:24px;
    font-weight:800;
    letter-spacing:.4px;
}

.titulo{
    line-height:1;
    color:#fff;
}

.header-icons{
    display:flex;
    align-items:center;
    gap:8px;
}

.header-icons span{
    width:42px;
    height:42px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:13px;

    background:rgba(255,255,255,.07);
    border:1px solid rgba(255,255,255,.10);

    color:#fff;
    cursor:pointer;

    transition:
        background .3s ease,
        color .3s ease,
        transform .3s ease,
        border-color .3s ease;
}

.header-icons span:hover{
    background:rgba(124,58,237,.28);
    border-color:rgba(124,58,237,.45);
    color:#fff;
    transform:translateY(-2px);
}

.header-icons i{
    font-size:16px;
}

.menu-btn{
    width:44px;
    height:44px;

    display:flex;
    align-items:center;
    justify-content:center;

    margin-left:8px;

    border-radius:13px;

    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.12);

    color:#fff;
    cursor:pointer;

    transition:
        background .3s ease,
        transform .3s ease,
        border-color .3s ease;
}

.menu-btn:hover{
    background:rgba(124,58,237,.35);
    border-color:rgba(124,58,237,.55);
    transform:translateY(-2px);
}

.menu-btn i{
    font-size:19px;
}


/* =========================================================
   NAVEGACIÓN
   ========================================================= */

.menu{
    position:fixed;
    top:91px;
    left:50%;
    width:min(1200px,calc(100% - 32px));
    transform:translateX(-50%);

    display:flex;
    align-items:center;
    gap:8px;

    padding:8px 10px;

    overflow-x:auto;

    background:rgba(255,255,255,.94);
    backdrop-filter:blur(14px);

    border:1px solid rgba(124,58,237,.10);
    border-radius:16px;

    box-shadow:
        0 8px 22px rgba(15,23,42,.10);

    z-index:950;

    scrollbar-width:none;
}

.menu::-webkit-scrollbar{
    display:none;
}

.menu button{
    flex:0 0 auto;

    min-height:38px;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;

    padding:8px 14px;

    border:1px solid rgba(37,99,235,.08);
    border-radius:13px;

    background:#f1f5f9;
    color:#1a2f4d;

    font-size:13px;
    font-weight:700;
    white-space:nowrap;

    cursor:pointer;

    transition:
        background .3s ease,
        color .3s ease,
        transform .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}

.menu button i{
    min-width:auto;
    color:#1a2f4d;
    font-size:15px;
    transition:color .3s ease;
}

.menu button:hover{
    background:#e8e5ff;
    border-color:rgba(124,58,237,.18);
    transform:translateY(-2px);

    box-shadow:
        0 5px 12px rgba(37,99,235,.10);
}

.menu button:hover i{
    color:#7c3aed;
}

.menu button.activo{
    background:linear-gradient(
        135deg,
        #7c3aed,
        #2563eb
    );

    color:#fff;
    border-color:transparent;

    box-shadow:
        0 7px 16px rgba(124,58,237,.28);
}

.menu button.activo i{
    color:#fff;
}

.menu button.activo:hover{
    transform:translateY(-2px);

    box-shadow:
        0 9px 20px rgba(124,58,237,.34);
}


/* =========================================================
   CONTENIDO
   ========================================================= */

.app{
    max-width:700px;
    margin:auto;
    padding-top:145px;
}

.seccion{
    display:none;
}

.seccion.activa{
    display:block;
}


/* =========================================================
   TARJETAS GENERALES
   ========================================================= */

.card{
    background:#fff;
    border-radius:18px;
    padding:20px;
    margin-bottom:15px;

    box-shadow:
        0 5px 20px rgba(0,0,0,.08);
}

.card h2,
.card h3{
    margin-top:0;
    color:#0f172a;
}

.destacado{
    border-left:5px solid var(--dorado);
}

.btn{
    background:var(--azul);
    color:#fff;
    border:none;
    padding:10px 18px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}


/* =========================================================
   PUBLICACIÓN GENÉRICA — LA NUBE
   ========================================================= */

.post{
    border-top:1px solid #e2e8f0;
    padding-top:15px;
    margin-top:15px;
}

.post-actions{
    display:flex;
    gap:15px;
    color:#2563eb;
    font-size:14px;
}


/* =========================================================
   BIENVENIDA
   ========================================================= */

.bienvenida-comunidad{
    position:relative;
    overflow:hidden;

    border:1px solid rgba(37,99,235,.10);

    background:linear-gradient(
        135deg,
        #fff 0%,
        #f8fafc 55%,
        #eef2ff 100%
    );
}

.bienvenida-icono{
    width:48px;
    height:48px;

    display:flex;
    align-items:center;
    justify-content:center;

    margin-bottom:12px;

    border-radius:15px;

    background:linear-gradient(
        135deg,
        #7c3aed,
        #2563eb
    );

    color:#fff;

    box-shadow:
        0 7px 16px rgba(124,58,237,.20);
}

.bienvenida-icono i{
    font-size:20px;
}

.bienvenida-comunidad h2{
    margin-bottom:8px;
}

.bienvenida-intro{
    font-size:16px;
    line-height:1.6;
    color:#334155;
    margin-bottom:8px;
}

.guia-comunidad{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-top:18px;
}

.guia-item{
    display:flex;
    align-items:flex-start;
    gap:12px;

    padding:12px;

    border-radius:13px;

    background:rgba(255,255,255,.75);
    border:1px solid rgba(37,99,235,.08);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.guia-item:hover{
    transform:translateY(-2px);
    border-color:rgba(124,58,237,.20);

    box-shadow:
        0 5px 14px rgba(15,23,42,.07);
}

.guia-item > i{
    flex-shrink:0;

    width:34px;
    height:34px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:10px;

    background:#eef2ff;
    color:#2563eb;
    font-size:15px;
}

.guia-item strong{
    display:block;
    margin-bottom:3px;

    color:#1e293b;
    font-size:14px;
}

.guia-item span{
    display:block;
    color:#64748b;
    font-size:12px;
    line-height:1.45;
}

.bienvenida-final{
    display:flex;
    align-items:flex-start;
    gap:10px;

    margin-top:18px;
    padding:13px 14px;

    border-radius:13px;

    background:rgba(212,160,23,.08);
    border:1px solid rgba(212,160,23,.18);

    color:#475569;
    font-size:13px;
    line-height:1.5;
}

.bienvenida-final i{
    flex-shrink:0;
    margin-top:2px;
    color:#d4a017;
}


/* =========================================================
   RESULTADOS DE BÚSQUEDA BÍBLICA
   ========================================================= */

.resultados-busqueda h3{
    margin-bottom:8px;
}

.resultado-biblia{
    padding:15px 5px;
    border-bottom:1px solid #e2e8f0;
    cursor:pointer;
    transition:background .2s ease;
}

.resultado-biblia:hover{
    background:#f8fafc;
}

.resultado-referencia{
    color:#1a2f4d;
    font-weight:800;
    margin-bottom:6px;
}

.resultado-texto{
    color:#334155;
    line-height:1.6;
}

.resultado-texto p{
    margin:0;
}


/* =========================================================
   COMUNIDAD — CABECERA
   ========================================================= */

.comunidad-header{
    display:flex;
    align-items:center;
    gap:15px;

    background:linear-gradient(
        135deg,
        #fff 0%,
        #f8fafc 60%,
        #eef2ff 100%
    );

    border:1px solid rgba(37,99,235,.10);
}

.comunidad-header-icono{
    width:52px;
    height:52px;

    flex-shrink:0;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:16px;

    background:linear-gradient(
        135deg,
        #7c3aed,
        #2563eb
    );

    color:#fff;

    box-shadow:
        0 7px 16px rgba(124,58,237,.20);
}

.comunidad-header-icono i{
    font-size:21px;
}


/* =========================================================
   TÍTULOS DE MÓDULO
   ========================================================= */

.modulo-titulo{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:18px;
}

.modulo-titulo h3{
    margin:0 0 3px;
}

.modulo-titulo span{
    display:block;
    color:#64748b;
    font-size:12px;
}

.modulo-icono{
    width:40px;
    height:40px;

    flex-shrink:0;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:12px;

    background:#eef2ff;
    color:#2563eb;
}

.modulo-icono i{
    font-size:16px;
}


/* =========================================================
   MIEMBROS
   ========================================================= */

.miembros-resumen{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;

    padding:12px 14px;

    border-radius:13px;

    background:#f8fafc;
    border:1px solid #e2e8f0;
}

.miembros-numero{
    display:flex;
    align-items:baseline;
    gap:6px;
}

.miembros-numero strong{
    font-size:24px;
    color:#0f172a;
}

.miembros-numero span{
    color:#64748b;
    font-size:13px;
}

.miembros-estado{
    display:flex;
    align-items:center;
    gap:6px;

    color:#16a34a;
    font-size:12px;
    font-weight:700;
}

.punto-online{
    width:8px;
    height:8px;

    display:inline-block;
    flex-shrink:0;

    border-radius:50%;

    background:#22c55e;

    box-shadow:
        0 0 0 3px rgba(34,197,94,.12);
}

.miembros-lista{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-top:12px;
}

.miembro-item{
    display:flex;
    align-items:center;
    gap:10px;

    min-width:0;

    padding:10px 12px;

    border-radius:12px;

    background:#f8fafc;
    border:1px solid #e2e8f0;
}

.miembro-avatar{
    width:38px;
    height:38px;

    flex-shrink:0;

    border-radius:50%;

    object-fit:cover;

    display:flex;
    align-items:center;
    justify-content:center;
}

.miembro-avatar-default{
    background:#e2e8f0;
    color:#64748b;
}

.miembro-avatar-default i{
    font-size:16px;
}

.miembro-datos{
    min-width:0;
    flex:1;
}

.miembro-datos strong{
    display:block;

    color:#1e293b;
    font-size:13px;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.miembro-datos span{
    display:block;

    margin-top:2px;

    color:#94a3b8;
    font-size:10px;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.miembro-online{
    width:9px;
    height:9px;

    flex-shrink:0;

    border-radius:50%;

    background:#22c55e;

    box-shadow:
        0 0 0 3px rgba(34,197,94,.12);
}

.miembro-placeholder,
.miembros-cargando{
    display:flex;
    align-items:center;
    gap:9px;

    padding:10px;

    border-radius:11px;

    background:#f8fafc;
    color:#64748b;
    font-size:13px;
}

.miembro-placeholder i,
.miembros-cargando i{
    width:30px;
    height:30px;

    display:flex;
    align-items:center;
    justify-content:center;

    flex-shrink:0;

    border-radius:50%;

    background:#e2e8f0;
}

.miembros-cargando i{
    color:#2563eb;
}

.miembro-placeholder .fa-spinner{
    color:#2563eb;
    animation:miembrosCargando 1s linear infinite;
}

@keyframes miembrosCargando{
    from{
        transform:rotate(0deg);
    }

    to{
        transform:rotate(360deg);
    }
}


/* =========================================================
   CHAT — ESTADO
   ========================================================= */

.chat-estado{
    display:flex;
    align-items:center;
    gap:7px;

    margin-bottom:10px;

    color:#16a34a;
    font-size:12px;
    font-weight:700;
}


/* =========================================================
   CHAT — ÁREA ESTILO WHATSAPP
   ========================================================= */

.comunidad-chat .chat-mensajes{
    display:flex;
    flex-direction:column;
    gap:5px;

    height:430px;

    overflow-y:auto;
    overflow-x:hidden;

    padding:14px 8px;

    border:1px solid #d8d2c8;
    border-radius:16px;

    background:#efeae2;

    box-sizing:border-box;

    scroll-behavior:smooth;
    overscroll-behavior:contain;

    scrollbar-width:thin;
    scrollbar-color:#cbd5e1 transparent;
}

.comunidad-chat .chat-mensajes::-webkit-scrollbar{
    width:6px;
}

.comunidad-chat .chat-mensajes::-webkit-scrollbar-track{
    background:transparent;
}

.comunidad-chat .chat-mensajes::-webkit-scrollbar-thumb{
    background:#cbd5e1;
    border-radius:10px;
}


/* =========================================================
   CHAT — CONTENEDOR DEL MENSAJE
   ========================================================= */

.comunidad-chat .chat-mensaje{
    display:flex;

    width:100%;
    max-width:none;

    margin:0;
    padding:0;

    box-sizing:border-box;

    background:transparent;
    border:0;
    border-radius:0;
    box-shadow:none;

    color:inherit;
}

.comunidad-chat .chat-mensaje-propio{
    justify-content:flex-end;
}

.comunidad-chat .chat-mensaje-otro{
    justify-content:flex-start;
}


/* =========================================================
   CHAT — BURBUJA
   ========================================================= */

.comunidad-chat .chat-burbuja{
    position:relative;

    display:block;

    width:fit-content !important;

    max-width:min(82%,560px);

    flex:0 0 auto;

    box-sizing:border-box;

    padding:2px 7px;

    border-radius:12px;

    box-shadow:
        0 1px 2px rgba(15,23,42,.07);

    word-wrap:break-word;
    overflow-wrap:anywhere;
}

.comunidad-chat .chat-mensaje-propio .chat-burbuja{
    background:#d9fdd3;
    color:#1f2937;

    border:1px solid #cfe9b9;

    border-bottom-right-radius:4px;
}

.comunidad-chat .chat-mensaje-otro .chat-burbuja{
    background:#fff;
    color:#1f2937;

    border:1px solid #e5e7eb;

    border-bottom-left-radius:4px;
}


/* =========================================================
   CHAT — NOMBRE
   ========================================================= */

.comunidad-chat .chat-nombre{
    margin:0 0 2px;

    color:#2563eb;

    font-size:11px;
    font-weight:700;

    line-height:1.25;
}


/* =========================================================
   CHAT — TEXTO
   ========================================================= */

.comunidad-chat .chat-texto{
    display:block;

    margin:0;
    padding:0;

    white-space:pre-line;

    word-break:normal;
    overflow-wrap:break-word;

    font-size:14px;
    line-height:1.45;

    text-align:justify;
    text-align-last:left;
}


/* =========================================================
   CHAT — HORA
   ========================================================= */

.comunidad-chat .chat-hora{
    float:right;

    margin-top:3px;
    margin-left:8px;

    padding-top:0;

    color:#94a3b8;

    font-size:9px;
    line-height:1;

    opacity:.70;
}

.comunidad-chat .chat-burbuja::after{
    content:"";
    display:block;
    clear:both;
}


/* =========================================================
   CHAT — MENSAJES ANTERIORES
   ========================================================= */

.chat-ver-anteriores{
    width:100%;

    margin-bottom:7px;
    padding:7px 12px;

    border:1px solid #dce3eb;
    border-radius:10px;

    background:#fff;
    color:#64748b;

    font-family:inherit;
    font-size:13px;

    cursor:pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.chat-ver-anteriores:hover:not(:disabled){
    background:#f8fafc;
    border-color:#bfdbfe;
    color:#2563eb;
}

.chat-ver-anteriores:disabled{
    opacity:.62;
    cursor:default;
}


/* =========================================================
   CHAT — ESCRIBIR
   ========================================================= */

.comunidad-chat .chat-escribir{
    display:flex;
    align-items:center;
    gap:8px;

    margin-top:9px;
    padding:7px;

    background:#f0f2f5;
    border-radius:15px;
}

.comunidad-chat .chat-escribir input{
    flex:1;
    min-width:0;

    height:46px;

    padding:12px 15px;

    border:1px solid #d5dce5;
    border-radius:22px;

    background:#fff;
    color:#1e293b;

    outline:none;

    font-family:inherit;
    font-size:14px;

    box-shadow:
        0 1px 2px rgba(0,0,0,.08);
}

.comunidad-chat .chat-escribir input::placeholder{
    color:#94a3b8;
}

.comunidad-chat .chat-escribir input:focus{
    border-color:#93c5fd;

    box-shadow:
        0 0 0 3px rgba(37,99,235,.09);
}

.comunidad-chat .chat-enviar{
    width:46px;
    height:46px;

    display:flex;
    align-items:center;
    justify-content:center;

    flex-shrink:0;

    border:0;
    border-radius:50%;

    background:linear-gradient(
        135deg,
        #7c3aed,
        #2563eb
    );

    color:#fff;

    cursor:pointer;

    font-size:16px;

    box-shadow:
        0 2px 6px rgba(37,99,235,.25);
}

.comunidad-chat .chat-enviar:hover:not(:disabled){
    background:linear-gradient(
        135deg,
        #6d28d9,
        #1d4ed8
    );

    transform:translateY(-1px);
}

.comunidad-chat .chat-enviar:active:not(:disabled){
    transform:scale(.96);
}

.comunidad-chat .chat-enviar:disabled{
    opacity:.58;
    cursor:default;
    box-shadow:none;
}

.chat-limite{
    margin-top:5px;
    padding-right:3px;

    text-align:right;

    color:#94a3b8;
    font-size:10px;
}


/* =========================================================
   CHAT — VACÍO
   ========================================================= */

.chat-vacio{
    min-height:180px;

    display:flex;
    flex-direction:column;

    align-items:center;
    justify-content:center;

    gap:7px;

    padding:20px;

    text-align:center;

    color:#667781;
}

.chat-vacio i{
    margin-bottom:5px;
    color:#8696a0;
    font-size:31px;
}

.chat-vacio strong{
    color:#475569;
    font-size:14px;
}

.chat-vacio span{
    font-size:13px;
}


/* =========================================================
   MURO — CREAR PUBLICACIÓN
   ========================================================= */

.crear-publicacion{
    padding:14px;

    border-radius:14px;

    background:#f8fafc;
    border:1px solid #e2e8f0;
}

.crear-publicacion textarea{
    width:100%;

    min-height:100px;

    box-sizing:border-box;

    resize:vertical;

    padding:12px;

    border:1px solid #cbd5e1;
    border-radius:11px;

    background:#fff;
    color:#1e293b;

    font-family:inherit;
    font-size:14px;
    line-height:1.5;

    outline:none;
}

.crear-publicacion textarea::placeholder{
    color:#94a3b8;
}

.crear-publicacion textarea:focus{
    border-color:#2563eb;

    box-shadow:
        0 0 0 3px rgba(37,99,235,.10);
}

.publicar-barra{
    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:10px;
    margin-top:8px;
}

.publicar-barra > span{
    color:#94a3b8;
    font-size:10px;
}


/* =========================================================
   PUBLICACIONES
   ========================================================= */

.comunidad-posts{
    display:flex;
    flex-direction:column;

    gap:10px;

    margin-top:14px;

    max-height:520px;

    overflow-y:auto;
    overflow-x:hidden;

    padding:2px 8px 4px 2px;

    box-sizing:border-box;

    overscroll-behavior:contain;

    scrollbar-width:thin;
    scrollbar-color:#cbd5e1 transparent;
}

.comunidad-posts::-webkit-scrollbar{
    width:6px;
}

.comunidad-posts::-webkit-scrollbar-track{
    background:transparent;
}

.comunidad-posts::-webkit-scrollbar-thumb{
    background:#cbd5e1;
    border-radius:10px;
}

.comunidad-post{
    flex:0 0 auto;

    padding:13px 14px;

    border:1px solid #e2e8f0;
    border-radius:14px;

    background:#fff;

    box-shadow:
        0 2px 7px rgba(15,23,42,.04);

    box-sizing:border-box;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.comunidad-post:hover{
    border-color:#d8e1eb;

    box-shadow:
        0 3px 10px rgba(15,23,42,.05);
}

.post-autor{
    display:flex;
    align-items:center;

    gap:9px;

    margin-bottom:8px;
}

.post-avatar{
    width:37px;
    height:37px;

    display:flex;
    align-items:center;
    justify-content:center;

    flex-shrink:0;

    border-radius:50%;

    background:#eff6ff;
    color:#2563eb;

    font-size:15px;
}

.post-autor strong{
    overflow:hidden;

    color:#1e293b;

    font-size:14px;
    font-weight:700;

    text-overflow:ellipsis;
    white-space:nowrap;
}

.post-texto{
    margin:0;

    color:#334155;

    white-space:pre-wrap;
    word-break:break-word;

    font-size:14px;
    line-height:1.5;
}

.comunidad-post .post-actions{
    display:flex;
    align-items:center;

    margin-top:10px;
    padding-top:9px;

    border-top:1px solid #f1f5f9;

    color:inherit;
    font-size:inherit;
}

.posts-vacio{
    min-height:140px;

    display:flex;
    flex-direction:column;

    align-items:center;
    justify-content:center;

    gap:7px;

    padding:20px;

    text-align:center;

    color:#64748b;

    border:1px dashed #cbd5e1;
    border-radius:14px;

    background:#f8fafc;
}

.posts-vacio i{
    margin-bottom:4px;
    color:#94a3b8;
    font-size:29px;
}

.posts-vacio strong{
    color:#475569;
    font-size:14px;
}

.posts-vacio span{
    font-size:13px;
}


/* =========================================================
   AMÉN
   ========================================================= */

.accion-amen{
    display:inline-flex;
    align-items:center;

    gap:5px;

    min-height:33px;

    padding:5px 10px;

    border:1px solid #e2e8f0;
    border-radius:10px;

    background:#fff;
    color:#64748b;

    font-family:inherit;
    font-size:13px;

    cursor:pointer;
}

.accion-amen:hover:not(:disabled){
    background:#f8fafc;
    border-color:#cbd5e1;
    color:#475569;
}

.accion-amen:active:not(:disabled){
    transform:scale(.97);
}

.accion-amen.activo{
    background:#eff6ff;
    border-color:#93c5fd;
    color:#2563eb;

    box-shadow:
        0 2px 6px rgba(37,99,235,.08);
}

.accion-amen.activo:hover:not(:disabled){
    background:#dbeafe;
    border-color:#60a5fa;
    color:#1d4ed8;
}

.accion-amen:disabled{
    opacity:.58;
    cursor:default;
}

.amen-icono{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    font-size:15px;
    line-height:1;
}

.amen-texto{
    font-weight:600;
}

.amen-contador{
    min-width:17px;

    margin-left:1px;

    text-align:center;

    color:inherit;

    font-size:12px;
    font-weight:700;
}


/* =========================================================
   CARGAR MÁS
   ========================================================= */

#comunidadCargarMas{
    width:100%;

    margin-top:11px;
    padding:9px 15px;

    border:1px solid #dce3eb;
    border-radius:11px;

    background:#fff;
    color:#64748b;

    font-family:inherit;
    font-size:13px;

    cursor:pointer;
}

#comunidadCargarMas:hover:not(:disabled){
    background:#f8fafc;
    border-color:#bfdbfe;
    color:#2563eb;
}

#comunidadCargarMas:disabled{
    opacity:.62;
    cursor:default;
}


/* =========================================================
   INFORMACIÓN
   ========================================================= */

.comunidad-info p{
    color:#475569;
    line-height:1.6;
    font-size:14px;
}

.comunidad-reglas{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));

    gap:8px;
    margin-top:15px;
}

.comunidad-reglas > div{
    display:flex;
    align-items:center;

    gap:10px;

    padding:10px;

    border-radius:10px;

    background:#f8fafc;
    color:#475569;

    font-size:13px;
}

.comunidad-reglas i{
    width:30px;
    height:30px;

    display:flex;
    align-items:center;
    justify-content:center;

    flex-shrink:0;

    border-radius:9px;

    background:#eef2ff;
    color:#2563eb;
}


/* =========================================================
   LOADER
   ========================================================= */

#loader{
    position:fixed;
    inset:0;

    display:flex;
    align-items:center;
    justify-content:center;

    background:#fff;

    font-size:20px;
    color:#2563eb;

    z-index:5000;
}

#contenido{
    display:none;
}


/* =========================================================
   OVERLAY Y MENÚ LATERAL
   ========================================================= */

.overlay{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.45);

    opacity:0;
    visibility:hidden;

    transition:.30s;

    z-index:1800;
}

.overlay.activo{
    opacity:1;
    visibility:visible;
}

.menu-lateral{
    position:fixed;

    top:0;
    right:-300px;

    width:280px;
    height:100%;

    background:#fff;

    box-shadow:
        -4px 0 20px rgba(0,0,0,.25);

    transition:.30s;

    z-index:1900;

    overflow-y:auto;
}

.menu-lateral.abierto{
    right:0;
}

.menu-header{
    height:70px;

    display:flex;
    align-items:center;

    gap:15px;

    padding:20px;

    background:linear-gradient(
        90deg,
        #0d1b2a,
        #1a2f4d
    );

    color:#fff;
}

.menu-header h2{
    margin:0;
}

.cerrar{
    cursor:pointer;
    font-size:22px;
}

.menu-lateral button{
    width:100%;

    display:block;

    border:none;
    background:none;

    padding:16px 22px;

    text-align:left;

    font-size:15px;

    cursor:pointer;

    transition:.20s;
}

.menu-lateral button:hover{
    background:#ede9fe;
    color:#6d28d9;
}

.menu-lateral hr{
    border:none;
    border-top:1px solid #e5e7eb;
    margin:8px 0;
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media(max-width:900px){

    .comunidad-reglas{
        grid-template-columns:1fr;
    }

}


/* =========================================================
   RESPONSIVE — MÓVIL
   ========================================================= */

@media(max-width:600px){

    .header{
        top:8px;
        left:8px;
        width:calc(100% - 16px);
        transform:none;

        min-height:58px;
        padding:8px 10px;

        border-radius:17px;
    }

    .logo{
        font-size:20px;
    }

    .header-icons{
        gap:5px;
    }

    .header-icons span{
        width:37px;
        height:37px;
        border-radius:11px;
    }

    .header-icons i{
        font-size:14px;
    }

    .menu-btn{
        width:39px;
        height:39px;
        border-radius:11px;
    }


    .menu{
        top:74px;
        left:8px;

        width:calc(100% - 16px);

        transform:none;

        padding:7px;
        border-radius:14px;
        gap:6px;
    }

    .menu button{
        min-height:36px;
        padding:7px 11px;
        border-radius:11px;
        font-size:12px;
    }

    .menu button i{
        font-size:14px;
    }


    .app{
        padding-left:12px;
        padding-right:12px;
        padding-top:145px;
    }


    .bienvenida-comunidad{
        padding:17px;
    }

    .guia-comunidad{
        grid-template-columns:1fr;
        gap:8px;
    }

    .guia-item{
        padding:11px;
    }


    .comunidad-header{
        align-items:flex-start;
        padding:17px;
    }

    .comunidad-header-icono{
        width:45px;
        height:45px;
        border-radius:13px;
    }

    .comunidad-header h2{
        font-size:20px;
    }


    .miembros-lista{
        grid-template-columns:1fr;
    }

    .miembros-resumen{
        align-items:flex-start;
        flex-direction:column;
    }

    .miembro-item{
        padding:10px;
    }

    .miembro-avatar{
        width:36px;
        height:36px;
    }


    .comunidad-chat .chat-mensajes{
        height:380px;
        padding:11px 7px;
        border-radius:15px;
        gap:5px;
    }

    .comunidad-chat .chat-burbuja{
        max-width:88%;
        padding:2px 7px;
        border-radius:11px;
    }

    .comunidad-chat .chat-mensaje-propio .chat-burbuja{
        border-bottom-right-radius:4px;
    }

    .comunidad-chat .chat-mensaje-otro .chat-burbuja{
        border-bottom-left-radius:4px;
    }

    .comunidad-chat .chat-texto{
        font-size:14px;
        line-height:1.45;
    }

    .comunidad-chat .chat-nombre{
        font-size:11px;
    }

    .comunidad-chat .chat-hora{
        font-size:9px;
        margin-left:8px;
    }

    .comunidad-chat .chat-escribir{
        gap:7px;
    }

    .comunidad-chat .chat-escribir input{
        height:44px;
        padding:0 13px;
        border-radius:22px;
    }

    .comunidad-chat .chat-enviar{
        width:44px;
        height:44px;
    }


    .crear-publicacion{
        padding:11px;
        border-radius:14px;
    }

    .crear-publicacion textarea{
        min-height:100px;
        padding:11px;
        border-radius:12px;
    }

    .publicar-barra{
        align-items:flex-start;
        flex-direction:column;
    }

    .publicar-barra .btn{
        width:100%;
    }


    .comunidad-posts{
        max-height:500px;
        gap:8px;
        padding-right:6px;
    }

    .comunidad-post{
        padding:11px 12px;
        border-radius:13px;
    }

    .post-autor{
        gap:8px;
        margin-bottom:7px;
    }

    .post-avatar{
        width:36px;
        height:36px;
    }

    .post-texto{
        font-size:14px;
        line-height:1.5;
    }

    .comunidad-post .post-actions{
        margin-top:9px;
        padding-top:8px;
    }

    .accion-amen{
        min-height:32px;
        padding:5px 9px;
    }

    .comunidad-reglas{
        grid-template-columns:1fr;
    }

}


/* =========================================================
   MÓVILES MUY PEQUEÑOS
   ========================================================= */

@media(max-width:380px){

    .comunidad-chat .chat-mensajes{
        height:360px;
        padding-left:7px;
        padding-right:7px;
    }

    .comunidad-chat .chat-burbuja{
        max-width:91%;
    }

    .comunidad-chat .chat-escribir input{
        font-size:13px;
    }

    .comunidad-chat .chat-nombre{
        font-size:11px;
    }

}


/* =========================================================
   COMPATIBILIDAD CON CLASES DE MENSAJES
   =========================================================
   Se mantienen estos alias para que versiones anteriores
   de comunidad.js no pierdan el estilo.
   ========================================================= */

.comunidad-chat .chat-mensaje.propio{
    justify-content:flex-end;
}

.comunidad-chat .chat-mensaje.otro{
    justify-content:flex-start;
}

.comunidad-chat .chat-mensaje.propio .chat-burbuja{
    background:#d9fdd3;
    color:#1f2937;
    border:1px solid #cfe9b9;
    border-bottom-right-radius:4px;
}

.comunidad-chat .chat-mensaje.otro .chat-burbuja{
    background:#fff;
    color:#1f2937;
    border:1px solid #e5e7eb;
    border-bottom-left-radius:4px;
}

.comunidad-chat .chat-mensaje-nombre{
    display:block;
    margin:0 0 2px;
    color:#2563eb;
    font-size:11px;
    font-weight:700;
    line-height:1.25;
}

.comunidad-chat .chat-mensaje-hora{
    display:block;
    margin-top:3px;
    text-align:right;
    color:#94a3b8;
    font-size:9px;
}

/* =========================================================
   CHAT — PANTALLA COMPLETA REAL v5.1
   ---------------------------------------------------------
   El chat sale del contenedor .app (700px) visualmente
   mediante position:fixed y ocupa toda la ventana.
   ========================================================= */

body.chat-pantalla-activa{
    overflow:hidden;
}

.comunidad-chat.pantalla-completa{
    position:fixed !important;
    inset:0 !important;

    width:100vw !important;
    max-width:none !important;
    height:100dvh !important;
    min-height:100dvh !important;

    margin:0 !important;
    padding:20px !important;

    border-radius:0 !important;

    z-index:3000 !important;

    display:flex !important;
    flex-direction:column !important;

    overflow:hidden !important;

    background:#fff !important;
}

/* Cabecera del chat */

.comunidad-chat.pantalla-completa .modulo-titulo{
    flex:0 0 auto;
    margin-bottom:12px;
    padding-right:48px;
}

/* Estado */

.comunidad-chat.pantalla-completa .chat-estado{
    flex:0 0 auto;
    margin-bottom:10px;
}

/* Área de mensajes: ocupa TODO el espacio libre */

.comunidad-chat.pantalla-completa .chat-mensajes{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;

    width:100% !important;

    overflow-y:auto !important;
    overflow-x:hidden !important;
}

/* Zona de escritura */

.comunidad-chat.pantalla-completa .chat-escribir{
    flex:0 0 auto;
    margin-top:10px;
}

.comunidad-chat.pantalla-completa .chat-limite{
    flex:0 0 auto;
}

/* Botón salir */

.comunidad-chat.pantalla-completa .chat-salir-btn{
    display:flex !important;
    position:absolute;
    top:18px;
    right:18px;
    z-index:10;
}

/* Botón expandir desaparece mientras está abierto */

.comunidad-chat.pantalla-completa .chat-pantalla-btn{
    display:none !important;
}

/* Fondo de la página y elementos externos quedan detrás */

body.chat-pantalla-activa .header,
body.chat-pantalla-activa .menu,
body.chat-pantalla-activa .menu-lateral,
body.chat-pantalla-activa .overlay,
body.chat-pantalla-activa .player{
    z-index:1;
}

/* Escritorio grande */

@media(min-width:601px){

    .comunidad-chat.pantalla-completa{
        padding:24px 28px !important;
    }

    .comunidad-chat.pantalla-completa .chat-mensajes{
        padding-left:16px;
        padding-right:16px;
    }
}

/* Móvil */

@media(max-width:600px){

    .comunidad-chat.pantalla-completa{
        padding:10px !important;
        padding-top:max(10px,env(safe-area-inset-top)) !important;
        padding-bottom:max(10px,env(safe-area-inset-bottom)) !important;
    }

    .comunidad-chat.pantalla-completa .modulo-titulo{
        margin-bottom:8px;
        padding-right:42px;
    }

    .comunidad-chat.pantalla-completa .chat-mensajes{
        padding:10px 6px;
        border-radius:13px;
    }

    .comunidad-chat.pantalla-completa .chat-escribir{
        margin-top:7px;
    }

    .comunidad-chat.pantalla-completa .chat-salir-btn{
        top:10px;
        right:10px;
    }
}

/* =========================================================
   AUDITORIO — DISEÑO VISUAL
   ========================================================= */

.auditorio-header{

    display:flex;

    align-items:center;

    gap:15px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8fafc 60%,
            #eef2ff 100%
        );

    border:
        1px solid
        rgba(37,99,235,.10);
}


.auditorio-header-icono{

    width:52px;
    height:52px;

    flex-shrink:0;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:16px;

    background:
        linear-gradient(
            135deg,
            #7c3aed,
            #2563eb
        );

    color:#ffffff;

    box-shadow:
        0 7px 16px
        rgba(124,58,237,.20);
}


.auditorio-header-icono i{

    font-size:21px;

}


/* =========================================================
   SALA
   ========================================================= */

.auditorio-sala-cabecera{

    display:flex;

    align-items:center;
    justify-content:space-between;

    gap:12px;

}


.auditorio-en-vivo{

    display:flex;

    align-items:center;

    gap:7px;

    color:#16a34a;

    font-size:12px;

    font-weight:700;

}


.auditorio-punto{

    width:8px;
    height:8px;

    display:inline-block;

    border-radius:50%;

    background:#22c55e;

    box-shadow:
        0 0 0 3px
        rgba(34,197,94,.12);

}


/* =========================================================
   HABLANDO AHORA
   ========================================================= */

.auditorio-hablando{

    display:flex;

    align-items:center;

    gap:12px;

    margin-top:16px;

    padding:14px;

    border-radius:14px;

    background:#f8fafc;

    border:1px solid #e2e8f0;

}


.auditorio-hablando-icono{

    width:42px;
    height:42px;

    flex-shrink:0;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:12px;

    background:#eef2ff;

    color:#2563eb;

}


.auditorio-hablando strong{

    display:block;

    color:#1e293b;

    font-size:14px;

}


.auditorio-hablando span{

    display:block;

    margin-top:3px;

    color:#64748b;

    font-size:12px;

}


/* =========================================================
   OYENTES
   ========================================================= */

.auditorio-oyentes{

    display:flex;

    align-items:center;

    gap:12px;

    margin-top:10px;

    padding:13px 14px;

    border-radius:13px;

    background:#f8fafc;

    border:1px solid #e2e8f0;

}


.auditorio-oyentes-icono{

    width:38px;
    height:38px;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:11px;

    background:#eef2ff;

    color:#2563eb;

}


.auditorio-oyentes-datos{

    display:flex;

    flex:1;

    align-items:center;
    justify-content:space-between;

}


.auditorio-oyentes-datos strong{

    color:#334155;

    font-size:13px;

}


.auditorio-oyentes-datos span{

    color:#64748b;

    font-size:13px;

}


.auditorio-oyentes-datos b{

    color:#0f172a;

}


/* =========================================================
   COLA
   ========================================================= */

.auditorio-cola-contador{

    padding:13px 14px;

    border-radius:13px;

    background:#f8fafc;

    border:1px solid #e2e8f0;

}


.auditorio-cola-contador > div:first-child{

    display:flex;

    align-items:baseline;

    gap:4px;

}


.auditorio-cola-contador strong{

    color:#0f172a;

    font-size:24px;

}


.auditorio-cola-contador span{

    color:#64748b;

    font-size:13px;

}


.auditorio-cola-barra{

    width:100%;

    height:7px;

    margin-top:9px;

    overflow:hidden;

    border-radius:10px;

    background:#e2e8f0;

}


.auditorio-cola-progreso{

    height:100%;

    border-radius:10px;

    background:
        linear-gradient(
            90deg,
            #7c3aed,
            #2563eb
        );

    transition:width .3s ease;

}


/* =========================================================
   LISTA DE ESPERA
   ========================================================= */

.auditorio-cola-lista{

    margin-top:10px;

}


.auditorio-cola-vacia{

    display:flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    min-height:70px;

    padding:14px;

    border-radius:12px;

    background:#f8fafc;

    color:#64748b;

    font-size:13px;

    text-align:center;

}


.auditorio-cola-vacia i{

    color:#94a3b8;

}


/* =========================================================
   ACCIONES
   ========================================================= */

.auditorio-acciones{

    display:flex;

    gap:8px;

    margin-top:12px;

}


.auditorio-btn-hablar{

    flex:1;

}


.auditorio-btn-salir{

    padding:10px 15px;

    border:1px solid #e2e8f0;

    border-radius:10px;

    background:#f8fafc;

    color:#475569;

    font-weight:700;

    cursor:pointer;

}


.auditorio-btn-salir:hover{

    background:#eef2ff;

    color:#2563eb;

}


/* =========================================================
   INFORMACIÓN
   ========================================================= */

.auditorio-info{

    display:flex;

    align-items:flex-start;

    gap:12px;

}


.auditorio-info-icono{

    width:36px;
    height:36px;

    flex-shrink:0;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:10px;

    background:#eef2ff;

    color:#2563eb;

}


.auditorio-info p{

    margin:0;

    color:#475569;

    font-size:13px;

    line-height:1.6;

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media(max-width:600px){

    .auditorio-header{

        align-items:flex-start;

        padding:17px;

    }


    .auditorio-header-icono{

        width:45px;
        height:45px;

        border-radius:13px;

    }


    .auditorio-sala-cabecera{

        align-items:flex-start;

    }


    .auditorio-en-vivo{

        padding-top:4px;

    }


    .auditorio-acciones{

        flex-direction:column;

    }


    .auditorio-btn-salir{

        width:100%;

    }

}