* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #f0f2f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 30px 0;
}

.main-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  width: 100%;
  /* 👇 ESTO ACHICA TODO EL TAMAÑO GENERAL AL 85% (Podes probar cambiando a 0.8 o 0.9 si querés más chico o más grande) */
  zoom: 0.85; 
}

.phone-container {
  width: 100%;
  max-width: 380px;
  height: 80vh;
  background-color: #efeae2;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Header */
.chat-header {
  background-color: #ffffff;
  color: #3b4a54;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-arrow {
  font-size: 16px;
  color: #54656f;
}

/* Fotos de perfil redondas más chicas */
.avatar {
  width: 35px;
  height: 35px;
  min-width: 35px;
  min-height: 35px;
  border-radius: 50%;
  object-fit: cover;
}

.header-info h3 {
  font-size: 15px;
  font-weight: 500;
  color: #111b21;
}

.header-info .status {
  font-size: 11px;
  color: #57534D;
}

.header-right {
  display: flex;
  gap: 14px;
  align-items: center;
}

.header-icon {
  font-size: 16px;
  color: #54656f;
  cursor: pointer;
}

/* Fondo de WhatsApp */
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background-image: url('Imagenes/Fondo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.date-divider {
  text-align: center;
  margin: 6px 0;
}

.date-divider span {
  background-color: #ffffff;
  color: #54656f;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 6px;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

/* Mensajes */
.message {
  max-width: 80%;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.3;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.message.sent {
  align-self: flex-end;
  background-color: #d9fdd3;
  color: #111b21;
  border-top-right-radius: 2px;
}

.message.received {
  align-self: flex-start;
  background-color: #ffffff;
  color: #111b21;
  border-top-left-radius: 2px;
}

.message.media img {
  width: 100%;
  max-width: 220px;
  border-radius: 5px;
  margin-top: 3px;
  display: block;
}

.time {
  font-size: 9px;
  color: #667781;
  float: right;
  margin-left: 6px;
  margin-top: 3px;
}

.ticks {
  color: #53bdeb;
}

/* Estilos de mensajes grupales */
.group-msg {
  display: flex;
  gap: 5px;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.sender-avatar {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: 2px;
}

.msg-content {
  background-color: #ffffff;
  padding: 5px 8px;
  border-radius: 7px;
  border-top-left-radius: 2px;
  flex: 1;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.msg-content.no-avatar {
  margin-left: 29px;
}

.sender-name {
  display: block;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 2px;
}

/* Colores de cada personaje del grupo */
.color-cuti { color: #0070e0; }
.color-lichenzo { color: #5b8c00; }
.color-lauta { color: #d91c78; }
.color-enano { color: #e53935; }
.color-leandru { color: #1e8e3e; }

/* ==========================================
   BARRAS INFERIORES
   ========================================== */

.chat-footer {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-footer .icon {
  color: #54656f;
  font-size: 18px;
}

.chat-footer input {
  flex: 1;
  background-color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: #111b21;
  outline: none;
}

.chat-footer input::placeholder {
  color: #8696a0;
}

/* 1. Celular de Julián */
.chat-footer-julian {
  background-color: #F0F9FF;
}
.chat-footer-julian .send-btn {
  background-color: #92D3FF;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  font-size: 14px;
}

/* 2. Celular del Grupo */
.chat-footer-grupo {
  background-color: #FFEED9;
}
.chat-footer-grupo .send-btn {
  background-color: #ffd321;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  font-size: 14px;
}

/* Bloques de texto narrativo */
.texto-historia {
  width: 100%;
  max-width: 480px;
  background-color: #ffffff;
  padding: 20px 24px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  color: #222222;
}

/* Subtítulo del capítulo */
.texto-historia h2 {
  font-size: 16px;
  font-weight: 600;
  color: #111b21;
  margin-bottom: 14px;
  border-bottom: 2px solid #f0f2f5;
  padding-bottom: 6px;
  text-align: center;
}

/* Espaciado ajustado entre párrafos */
.texto-historia p {
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 6px; /* Espacio pequeño entre párrafos */
}

/* Estilo para los diálogos y acciones rápidas */
.texto-historia p.dialogo {
  font-weight: 500;
  color: #111b21;
  margin-bottom: 4px;
}

.texto-historia p.accion {
  color: #667781;
  font-size: 12px;
  margin-bottom: 4px;
  margin-left: 10px;
}

.texto-historia p:last-child {
  margin-bottom: 0;
}