@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&display=swap");

/* ---------- RESET Y ESTILOS BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #efeae2;
    margin: 0;
    overflow-x: hidden;
}

/* Header estilo WhatsApp */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #008069;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    z-index: 10;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.left i {
    font-size: 20px;
    cursor: pointer;
}
.left img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.text h1 {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.text p {
    font-size: 12px;
    opacity: 0.9;
}
.right {
    display: flex;
    gap: 22px;
    font-size: 20px;
}
.right i {
    cursor: pointer;
}

/* Main chat - fondo sólido #efeae2 (sin imagen rota) */
main {
    padding-top: 70px;
    padding-bottom: 80px;
    background-image: url('../img/fondo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Fecha central */
.date {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}
.date p {
    background: #d9fdd3;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #54656f;
    font-weight: 500;
    box-shadow: 0px 0px 1px 0px #00000021;
}

/* ---------- ESTILOS DE MENSAJES (REALISTAS) ---------- */
/* Contenedor de cada mensaje de OTRO participante */
.user2 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 85%;
    margin: 8px 0 8px 15px;
    position: relative;
}

/* Burbuja gris/blanca */
.user2-box {
    background-color: #ffffff;
    border-radius: 18px;
    padding: 8px 12px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    position: relative;
    word-wrap: break-word;
    width: 100%;
}

/* Cola izquierda */
.user2-box::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 12px;
    width: 12px;
    height: 18px;
    background-color: #ffffff;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%);
}

/* Número de teléfono dentro de la burbuja */
.user2 .number {
    font-size: 12px;
    font-weight: 700;
    color: #075E54;
    margin-bottom: 4px;
    display: block;
    line-height: 1.3;
}

/* Texto del mensaje */
.msg-text {
    font-size: 14px;
    color: #111111;
    line-height: 1.4;
    margin: 2px 0 4px 0;
}

/* Hora */
.hora {
    font-size: 10px;
    color: #667781;
    text-align: right;
    margin-top: 4px;
    display: block;
}

/* Mensajes de video */
.user {
    margin: 8px 0 8px 15px;
    max-width: 85%;
}
.video {
    background-color: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    position: relative;
    max-width: 280px;
}
.video img {
    width: 100%;
    display: block;
}
.videodetails {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 8px;
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 11px;
}
.download {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Mensajes de sistema */
/* Mensajes de sistema (como los de WhatsApp) */
.system-msg {
    background-color: #e9ecef;   /* Gris suave, igual al de WhatsApp */
    color: #54656f;              /* Gris oscuro, legible */
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;         /* Bordes redondeados */
    margin: 12px auto;
    width: fit-content;
    max-width: 85%;
    text-align: center;
    font-weight: normal;
    box-shadow: none;
    display: table;              /* Para centrar exacto */
}

/* Modal */
.modal {
    position: fixed;
    left: 0;
    top: 0;
    background: #000000b3;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.info {
    background: #fff;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 25px 20px 30px;
    text-align: center;
}
.profile {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
}
.title {
    font-size: 22px;
    margin-bottom: 5px;
}
.created {
    font-size: 14px;
    color: #747272;
    margin-bottom: 20px;
}
.reactions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}
.reactions img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -10px;
}
.reactions img:first-child { margin-left: 0; }
.total {
    margin-left: 10px;
    font-weight: 600;
    color: #444;
}
#join, #invite, #get {
    display: block;
    width: 90%;
    background: #008069;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    margin: 10px auto;
    cursor: pointer;
}
.bar {
    width: 90%;
    height: 15px;
    background: #eee;
    border-radius: 10px;
    margin: 15px auto;
    overflow: hidden;
    border: 1px solid #ddd;
}
.fill {
    height: 100%;
    background: #25D366;
    width: 0%;
    transition: width 0.5s;
}
.percentage {
    font-weight: bold;
    color: #008069;
    margin-bottom: 10px;
}
