/* ==========================================================
   estilo.css — estructura y contenido
   El FONDO vive aparte, en fondo.css
   ========================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: #f3effa;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- columna principal ---------- */

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 64px 20px 72px;
}

/* ---------- base de toda ventana ---------- */

.ventana {
  border-radius: 22px;
  background: var(--tinte, rgba(12, 8, 28, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}


/* ==========================================================
   VENTANA 1 · PERFIL  (arriba, angosta y centrada)
   ========================================================== */

.perfil {
  width: min(640px, 100%);
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 26px;
}

/* foto cuadrada, esquinas redondeadas */
.foto {
  flex: 0 0 auto;
  width: 156px;
  height: 156px;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.45),
    0 0 0 5px rgba(255, 255, 255, 0.05);
  display: block;
}

.datos { min-width: 0; }

.datos h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.usuario {
  margin: 2px 0 12px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: rgba(243, 239, 250, 0.55);
}

.bio {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(243, 239, 250, 0.82);
}


/* ==========================================================
   FILA DE ABAJO · DOS VENTANAS LADO A LADO
   2/3 para fotos, 1/3 para canciones
   ========================================================== */

.fila {
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 26px;
  align-items: stretch;   /* las dos ventanas terminan a la misma altura */
}

.fotos,
.canciones,
.pasatiempos,
.publicar {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- nombre de la ventana ---------- */

.titulo {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(243, 239, 250, 0.5);
}


/* ==========================================================
   FILA 2 · ESPEJADA: pasatiempos (1/3) + publicar (2/3)
   ========================================================== */

.fila-inversa {
  grid-template-columns: 1fr 2fr;
  /* alto fijo: publicaciones no crece al publicar */
  grid-template-rows: 560px;
}

/* la izquierda son dos ventanas apiladas que juntas
   igualan el alto del compositor */
.columna {
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-height: 0;
}

.columna .canciones {
  flex: 1;
  min-height: 0;
}


/* ---------- estado ---------- */

.estado {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.estado-cuerpo {
  display: flex;
  align-items: center;      /* foto centrada respecto al cartel */
  gap: 12px;
}

/* mini foto de perfil, como en TheSlap */
.estado-foto {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  display: block;
}

.estado-caja {
  flex: 1;
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.estado-texto {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
}

.estado-pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.estado-sintiendo {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(243, 239, 250, 0.55);
}

.estado-sintiendo strong {
  color: #ffd166;
  font-weight: 600;
}

.actualizar {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: #7c5cff;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.actualizar:hover { background: #8f73ff; }


/* ---------- lista de pasatiempos, estilo Facebook ---------- */

.pasatiempos {
  padding: 14px 18px;
}

/* banda horizontal centrada */
.lista-pasatiempos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.pasa {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

/* el primero visible no lleva separador a la izquierda */
.pasa.primero {
  border-left: 0;
}

/* sin esto, el display:flex le gana al [hidden] del navegador */
.pasa[hidden] {
  display: none;
}

.pasa .texto {
  flex: 0 1 auto;
  text-align: center;
  font-size: 14px;
}

.pasa .barra {
  height: 8px;
  background: rgba(255, 255, 255, 0.72);
}


/* ---------- compositor de ideas ---------- */

.compositor {
  flex: 0 0 auto;
  display: flex;
}

.caja {
  flex: 1;
  width: 100%;
  min-height: 72px;
  padding: 4px 2px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f3effa;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
}

.caja::placeholder {
  color: rgba(243, 239, 250, 0.38);
}

/* barra de herramientas */
.herramientas {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.icono {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(243, 239, 250, 0.85);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icono:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.icono.emoji { font-size: 17px; }
.icono.gif   { font-size: 10.5px; font-weight: 700; }

.contador {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(243, 239, 250, 0.38);
  font-variant-numeric: tabular-nums;
}

.boton {
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: #7c5cff;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.boton:hover { background: #8f73ff; }


/* ---------- publicaciones ---------- */

.posts {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 18px;
  padding-right: 12px;              /* aire para la barrita */
  border-top: 1px solid rgba(255, 255, 255, 0.1);

  /* se queda con el alto que sobra en la ventana:
     ni más, ni menos. El tamaño de la ventana no cambia. */
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

/* barrita de scroll */
.posts::-webkit-scrollbar {
  width: 8px;
}

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

.posts::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.posts::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.38);
}

.post {
  display: flex;
  gap: 12px;
}

.post-foto {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.post-cuerpo { min-width: 0; }

.post-cabecera {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.post-nombre {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}

.post-usuario,
.post-hora {
  font-size: 12px;
  color: rgba(243, 239, 250, 0.42);
}

.post-texto {
  margin: 3px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(243, 239, 250, 0.87);
}


/* ==========================================================
   MOSAICO · 1 foto grande + 4 pequeñas
   ========================================================== */

.mosaico {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* fotos en blanco por ahora */
.hueco {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* la primera ocupa 2 columnas y 2 filas */
.hueco.grande {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}


/* ==========================================================
   LISTA DE CANCIONES
   ========================================================== */

.lista {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.fila-cancion {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.num {
  width: 22px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(243, 239, 250, 0.42);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

/* barra del título, vacía */
.barra {
  flex: 1;
  min-width: 0;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

/* barra de la duración, vacía */
.tiempo {
  width: 30px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  flex: 0 0 auto;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* se apilan cuando ya no caben lado a lado */
@media (max-width: 900px) {
  .fila {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* apiladas, el alto vuelve a mandarlo el contenido */
  .fila-inversa { grid-template-rows: auto; }

  main { padding: 44px 16px 56px; gap: 20px; }
}

@media (max-width: 560px) {
  .ventana { border-radius: 18px; }

  .perfil {
    flex-direction: column;
    text-align: center;
    gap: 18px;
    padding: 24px 20px;
  }

  .foto {
    width: 132px;
    height: 132px;
    border-radius: 16px;
  }

  .datos h1 { font-size: 22px; }

  /* en móvil la grande pasa a banner ancho */
  .mosaico { grid-template-columns: repeat(2, 1fr); gap: 9px; }

  .hueco.grande {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 2 / 1;
  }

  .fotos, .canciones, .pasatiempos, .publicar { padding: 16px; }
}


/* ==========================================================
   EDITOR EN VIVO
   ========================================================== */

/* ---------- textos que se pueden escribir ---------- */

.texto {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
}

/* cuando está vacío, muestra una pista */
.texto:empty::before {
  content: attr(data-ph);
  color: rgba(243, 239, 250, 0.32);
  pointer-events: none;
}

[contenteditable] {
  outline: none;
  cursor: text;
}

[contenteditable]:hover {
  background: rgba(255, 255, 255, 0.05);
}

[contenteditable]:focus {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.65);
}

/* ---------- foto de perfil clickeable ---------- */

.js-perfil {
  cursor: pointer;
}

.js-perfil:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

/* ---------- huecos del mosaico ---------- */

.hueco {
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  background-color: #ffffff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: filter 0.15s ease;
}

.hueco::after {
  content: "+";
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: rgba(0, 0, 0, 0.2);
}

.hueco:hover {
  filter: brightness(0.95);
}

.hueco.lleno::after {
  content: none;
}

/* ---------- carátula de cada canción ---------- */

.tapa {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 7px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background-color: rgba(255, 255, 255, 0.05);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
}

.tapa::after {
  content: "+";
  font-size: 14px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.35);
}

.tapa:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.tapa.lleno {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.18);
}

.tapa.lleno::after {
  content: none;
}

/* ---------- fila de canción más compacta ---------- */

.fila-cancion {
  padding: 4px 10px;
  gap: 8px;
}

.num {
  width: 18px;
  font-size: 11px;
}

.texto.duracion {
  flex: 0 0 auto;
  width: 32px;
  text-align: right;
  font-size: 11.5px;
  color: rgba(243, 239, 250, 0.5);
}


/* ==========================================================
   BOTÓN DE FONDO Y FEED VACÍO
   ========================================================== */

/* ---------- controles flotantes ---------- */

.controles {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.btn-flotante {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;

  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 8, 28, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);

  color: rgba(243, 239, 250, 0.85);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;

  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-flotante:hover {
  background: rgba(32, 23, 60, 0.9);
  color: #fff;
  transform: translateY(-1px);
}

.btn-flotante span {
  font-size: 14px;
  line-height: 1;
}

/* ---------- rueda de color ---------- */

.paleta {
  width: 246px;
  padding: 16px 16px 12px;
  border-radius: 20px;
  background: rgba(12, 8, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55);
}

.paleta[hidden] {
  display: none;
}

.paleta-titulo {
  margin: 0 0 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(243, 239, 250, 0.5);
}

#rueda {
  display: block;
  width: 100%;
  height: auto;
}

#rueda path {
  cursor: pointer;
  transition: opacity 0.12s ease;
}

#rueda path:hover {
  opacity: 0.78;
}

.paleta-pie {
  margin: 10px 0 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
  color: rgba(243, 239, 250, 0.38);
}

/* mensaje cuando no hay publicaciones */
.vacio {
  margin: 0;
  padding: 22px 0;
  font-size: 13px;
  text-align: center;
  color: rgba(243, 239, 250, 0.38);
}


/* ==========================================================
   SELECTOR DE DISEÑO DEL MOSAICO
   ========================================================== */

.cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

/* el título ya no lleva su propia línea */
.cabecera .titulo {
  margin: 0;
  padding: 0;
  border: 0;
}

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

.mini {
  width: 28px;
  height: 28px;
  padding: 3px;
  display: grid;
  grid-auto-rows: 1fr;
  gap: 1.5px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mini i {
  display: block;
  border-radius: 1.5px;
  background: rgba(255, 255, 255, 0.45);
}

.mini:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

.mini.activo {
  border-color: #7c5cff;
  background: rgba(124, 92, 255, 0.22);
}

.mini.activo i {
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 560px) {
  .cabecera {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* ==========================================================
   DISTRIBUCIÓN
   ========================================================== */



/* la ventana de fotos ocupa todo el ancho */
.ancho-total {
  width: min(1160px, 100%);
}

/* fotos a media anchura, con caja fija: no se mueve al cambiar de diseño */
.mitad {
  width: 580px;
  max-width: 100%;
  height: 450px;
}

/* el mosaico se centra verticalmente en su caja */
.fotos .mosaico {
  flex: 1;
  min-height: 0;
  align-content: center;
}

/* pasatiempos: de seis en fila a tres y luego dos */
@media (max-width: 900px) {
  .lista-pasatiempos {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .lista-pasatiempos {
    grid-template-columns: repeat(2, 1fr);
  }
}
