/* ============================= */
/* RESET */
/* ============================= */

*{
margin:0;
padding:0;
box-sizing:border-box;
}

body{
font-family:"Helvetica Neue", Arial, sans-serif;
background:#0f0f10;
color:#e6e6e6;
line-height:1.7;
}

/* ============================= */
/* HEADER */
/* ============================= */

.navbar{
text-align:center;
padding:30px 0;
border-bottom:1px solid #262626;
}

.logo{
font-size:22px;
letter-spacing:3px;
font-weight:500;
color:#ffffff;
}

/* ============================= */
/* CONTENEDOR PRINCIPAL */
/* ============================= */

.container{

max-width:850px;
margin:60px auto;
padding:0 20px;

display:flex;
flex-direction:column;
align-items:center;

}

/* ============================= */
/* ESPACIADO ENTRE SECCIONES */
/* ============================= */

.perfil,
.historias,
.dedicatorias,
.publicaciones{
width:100%;
margin-bottom:80px;
}

/* ============================= */
/* SEPARADORES EDITORIALES */
/* ============================= */

.perfil,
.historias,
.dedicatorias{

/*border-bottom:1px solid #242424;
padding-bottom:70px;*/
position: relative;

padding-bottom:70px;
margin-bottom:80px;

}

/* línea divisoria con fade */

.perfil::after,
.historias::after,
.dedicatorias::after{

content:"";

position:absolute;

bottom:0;
left:50%;

transform:translateX(-50%);

width:80%;
height:1px;

background: linear-gradient(
to right,
transparent,
rgba(255,255,255,0.08),
rgba(255,255,255,0.25),
rgba(255,255,255,0.08),
transparent
);

}

/* ============================= */
/* BOTÓN FLOTANTE SUBIR */
/* ============================= */

#scrollTopBtn{

position:fixed;
right:30px;
bottom:30px;

width:46px;
height:46px;

border-radius:50%;
border:1px solid #2b2b2b;

background:#141414;
color:#dcdcdc;

display:flex;
align-items:center;
justify-content:center;

cursor:pointer;

transition:all .25s ease;

opacity:0;
pointer-events:none;

z-index:999;

}

#scrollTopBtn:hover{
background:#1d1d1d;
transform:translateY(-3px);
}

#scrollTopBtn .material-icons{
font-size:22px;
}


/* ============================= */
/* BOTONES LATERALES FIJOS */
/* ============================= */

.side-link{

position:fixed;
left:30px;

width:46px;
height:46px;

border-radius:50%;
border:1px solid #2b2b2b;

background:#141414;
color:#dcdcdc;

display:flex;
align-items:center;
justify-content:center;

cursor:pointer;

transition:all .25s ease;

z-index:999;

text-decoration:none;

}

.side-link:hover{
background:#1d1d1d;
transform:translateY(-3px);
}

/* POSICIONES */

.side-link-1{ bottom:160px; }
.side-link-2{ bottom:100px; }
.side-link-3{ bottom:40px; }

/* ============================= */
/* MODAL MENSAJE */
/* ============================= */

#modal-message{

position:fixed;
top:0;
left:0;

width:100%;
height:100%;

background:rgba(0,0,0,.7);

display:none;
align-items:center;
justify-content:center;

z-index:9999;

}

#modal-message.active{
display:flex;
}

/* CONTENIDO */

.modal-box{

width:90%;
max-width:420px;

background:#141414;

border-radius:12px;

padding:24px;

box-shadow:0 10px 40px rgba(0,0,0,.6);

position:relative;

}

/* CERRAR */

.modal-message-close{

position:absolute;
top:10px;
right:12px;

background:none;
border:none;

color:#fff;
font-size:26px;

cursor:pointer;

}

/* FORM */

#form-message{
display:flex;
flex-direction:column;
gap:16px;
}

#form-message textarea{

resize:none;
padding:12px;

border-radius:8px;
border:1px solid #2c2c2c;

background:#0f0f0f;
color:#e6e6e6;

}

#form-message input[type="file"]{
color:#cfcfcf;
}

/* BOTÓN */

.btn-send{

background:#1f1f1f;
border:1px solid #3a3a3a;

padding:10px;

border-radius:8px;

color:#fff;

cursor:pointer;

transition:.2s;
}

.btn-send:hover{
background:#2a2a2a;
}


/* ============================= */
/* PERFIL */
/* ============================= */

.perfil{

display:flex;
align-items:center;
justify-content:center;

gap:40px;

max-width:720px;

}

.perfil-foto img{

width:160px;
height:160px;

border-radius:50%;
object-fit:cover;

border:2px solid #2c2c2c;

}

.perfil-info{
text-align:center;
}

.perfil-info h2{
font-weight:500;
margin-bottom:10px;
}

.perfil-info p{
color:#b8b8b8;
max-width:400px;
margin:0 auto;
}

/* TITULOS DE SECCION */

.perfil,
.historias,
.dedicatorias,
.publicaciones h3{

text-align:center;

font-size:14px;

letter-spacing:3px;

text-transform:uppercase;

font-weight:500;

color:#9a9a9a;

margin-bottom:35px;

}


/* ============================= */
/* HISTORIAS */
/* ============================= */

.historias-wrapper{
position:relative;
display:flex;
align-items:center;
width:100%;
}

.historias-viewport{
overflow:hidden;
width:100%;
position:relative;
}

/* ============================= */
/* GRADIENTE LATERAL */
/* ============================= */

.historias-viewport::before,
.historias-viewport::after{

content:"";
position:absolute;
top:0;
height:100%;
width:80px;

pointer-events:none;
z-index:3;

}

.historias-viewport::before{

left:0;

background:linear-gradient(
to right,
#0f0f0f 0%,
rgba(15,15,15,0) 100%
);

}

.historias-viewport::after{

right:0;

background:linear-gradient(
to left,
#0f0f0f 0%,
rgba(15,15,15,0) 100%
);

}

/* ============================= */
/* CONTENEDOR HISTORIAS */
/* ============================= */

.historias-container{
display:flex;
gap:26px;

overflow-x:auto;
overflow-y:hidden;

scroll-behavior:smooth;

padding:10px 0 14px;

cursor:grab;
}

/* ocultar scrollbar */

.historias-container::-webkit-scrollbar{
display:none;
}

.historias-container{
-ms-overflow-style:none;
scrollbar-width:none;
}

/* ============================= */
/* HISTORIA */
/* ============================= */

.historia{
display:flex;
flex-direction:column;
align-items:center;

cursor:pointer;

flex-shrink:0;

transition:transform .25s;
}

.historia:hover{
transform:translateY(-6px);
}

/* ============================= */
/* ANILLO */
/* ============================= */

.historia-ring{
width:86px;
height:86px;

border-radius:50%;
padding:3px;

background:linear-gradient(
135deg,
#e5e5e5,
#9a9a9a,
#f4f4f4
);

display:flex;
align-items:center;
justify-content:center;

margin-bottom:8px;
}

.historia-ring img{
width:78px;
height:78px;

border-radius:50%;
object-fit:cover;

border:2px solid #121212;
}

/* TEXTO HISTORIA */

.historia span{
font-size:13px;
color:#bcbcbc;
letter-spacing:.4px;
}

/* ============================= */
/* FLECHAS CARRUSEL */
/* ============================= */

.historias-arrow{

position:absolute;
top:50%;

transform:translateY(-50%);

width:44px;
height:44px;

border-radius:50%;

border:none;

display:flex;
align-items:center;
justify-content:center;

cursor:pointer;

background:rgba(0,0,0,.55);

color:#fff;

z-index:5;

transition:background .2s;

}

.historias-arrow:hover{
background:rgba(0,0,0,.8);
}

.historias-arrow.left{left:-10px;}
.historias-arrow.right{right:-10px;}


/* ============================= */
/* STORY VIEWER */
/* ============================= */

#story-viewer{

position:fixed;
top:0;
left:0;

width:100%;
height:100%;

background:#000;

display:none;

flex-direction:column;

z-index:9999;

}

#story-viewer.active{
display:flex;
}


/* ============================= */
/* BARRA PROGRESO */
/* ============================= */

.story-progress{

display:flex;
gap:6px;

padding:16px;

position:absolute;
top:0;
left:0;
width:100%;

z-index:5;

}

.story-progress div{

flex:1;
height:3px;

background:rgba(255,255,255,.3);

overflow:hidden;

border-radius:2px;

}

.story-progress span{

display:block;

height:100%;
width:0%;

background:white;

}


/* ============================= */
/* HEADER HISTORIA */
/* ============================= */

.story-header{

position:absolute;

top:30px;
left:0;

width:100%;

text-align:center;

color:white;

padding:0 20px;

z-index:5;

}

/* LETRA */

#story-lyrics{

font-size:18px;

font-style:italic;

margin-bottom:10px;

opacity:.95;

}

/* META */

.story-meta{

display:flex;

flex-direction:column;

align-items:center;

gap:6px;

font-size:14px;

opacity:.85;

}

/* CANCIÓN */

#story-song{

display:flex;

align-items:center;

gap:6px;

}

/* UBICACIÓN */

#story-location{

display:flex;

align-items:center;

gap:6px;

}

/* ICONOS */

#story-song .material-icons,
#story-location .material-icons{

font-size:16px;

opacity:.9;

}

/* ============================= */
/* CONTENIDO MEDIA */
/* ============================= */

.story-content{

flex:1;

display:flex;

align-items:center;
justify-content:center;

padding-top:120px;
padding-bottom:60px;

}

/* IMAGEN / VIDEO */

.story-content img,
.story-content video{

max-width:90%;
max-height:80vh;

object-fit:contain;

border-radius:10px;

}

/* ============================= */
/* BOTÓN CERRAR */
/* ============================= */

.story-close{

position:absolute;

top:18px;
right:28px;

background:none;
border:none;

color:white;

font-size:34px;

cursor:pointer;

z-index:6;

}

/* ============================= */
/* MUTE */
/* ============================= */

.story-mute{

position:absolute;

bottom:30px;
right:30px;

width:48px;
height:48px;

border-radius:50%;

border:none;

background:rgba(0,0,0,.5);

color:white;

display:flex;
align-items:center;
justify-content:center;

cursor:pointer;

z-index:6;

}

.story-mute:hover{

background:rgba(0,0,0,.8);

}

/* ============================= */
/* NAVEGACIÓN */
/* ============================= */

.story-nav{

position:absolute;

top:50%;

transform:translateY(-50%);

width:60px;
height:60px;

border-radius:50%;

background:rgba(0,0,0,.35);

border:none;

color:white;

display:flex;
align-items:center;
justify-content:center;

cursor:pointer;

transition:background .2s;

}

.story-nav:hover{
background:rgba(0,0,0,.6);
}

.story-nav.left{
left:30px;
}

.story-nav.right{
right:30px;
}

/* ============================= */
/* DOTS POR IMAGEN */
/* ============================= */

.story-dots{
    position:absolute;
    bottom:80px;
    left:50%;
    transform:translateX(-50%);

    display:flex;
    gap:8px;
    z-index:10;
}

.story-dots span{
    width:8px;
    height:8px;
    border-radius:50%;
    background:rgba(255,255,255,.3);
    transition:.3s;
}

.story-dots span.active{
    background:#fff;
    transform:scale(1.4);
}


/* ============================= */
/* DEDICATORIAS */
/* ============================= */

.dedicatorias{

display:flex;
flex-direction:column;
align-items:center;

margin-top:20px;

}

/* HEADER */

.dedicatoria-header{

display:flex;
justify-content:center;
align-items:center;

gap:30px;

margin-bottom:40px;

}

/* BOTONES */

.dedicatoria-header button{

background:none;
border:none;

cursor:pointer;

color:#a8a8a8;

transition:all .25s ease;

padding:8px;

}

.dedicatoria-header button:hover{

color:#ffffff;
transform:scale(1.15);

}

.material-icons{
font-size:24px;
}

/* SELECTOR FECHA */

#date-selector{

border:none;
border-bottom:1px solid #444;

padding:6px;

font-size:14px;

background:transparent;
color:#e6e6e6;

}

#date-selector:focus{
outline:none;
border-bottom:1px solid #ffffff;
}

#date-selector::-webkit-calendar-picker-indicator{
filter:invert(1);
opacity:.8;
cursor:pointer;
}

#date-selector::-webkit-calendar-picker-indicator:hover{
opacity:1;
}

/* CONTENEDOR CARTA */

.dedicatoria-texto{

max-width:720px;
width:100%;

margin:0 auto;

padding:60px 70px;

min-height:320px;
max-height:420px;

border:1px solid #2c2c2c;
border-bottom:none;

border-radius:8px 8px 0 0;

background:#141414;

overflow-y:auto;

display:block;
align-items:center;
justify-content:center;

text-align:center;

box-shadow:
0 0 0 1px rgba(255,255,255,0.02),
0 10px 40px rgba(0,0,0,0.6),
inset 0 0 40px rgba(255,255,255,0.02);

}

/* TEXTO POÉTICO */

.dedicatoria-texto p{

font-family:"Playfair Display", serif;

max-width:600px;

font-size:18px;

line-height:2.2;

font-weight:400;

letter-spacing:.4px;

color:#ececec;

}

/* SCROLL */

.dedicatoria-texto::-webkit-scrollbar{
width:6px;
}

.dedicatoria-texto::-webkit-scrollbar-thumb{

background:#3a3a3a;
border-radius:10px;

}

.dedicatoria-texto::-webkit-scrollbar-thumb:hover{
background:#555;
}

/* POEMA */
#poem{
    padding-top: 6px;
    line-height: 1.6;
    margin: 0;
    white-space:pre-line;
}

#poem img{
    display:block;
    margin:16px auto;
    max-width:100%;
    height:auto;
    border-radius:6px;
}

/* AUTOR */
.author{
    display: block;
    margin-top: 12px;

    font-size: 14px;
    font-style: italic;
    color: #666;

    text-align: right;
}

.author::before{
    content: "— ";
}

/* ============================= */
/* BARRA MUSICAL DEDICATORIA */
/* ============================= */

.music-bar{

max-width:720px;
width:100%;

height:60px;

margin:0 auto;
margin-top:-1px;

border:1px solid rgba(255,255,255,0.08);
border-top:none;

border-radius:0 0 8px 8px;

background:#111;

display:flex;
align-items:center;
justify-content:center;

position:relative;

overflow:hidden;

box-sizing:border-box;

box-shadow:0 6px 18px rgba(0,0,0,0.45);
background:linear-gradient(to bottom,#111,#0d0d0d);
border-color:rgba(255,255,255,0.06);

}

/* TEXTO DESPLAZABLE */

.music-track{

width:100%;

white-space:nowrap;
overflow:hidden;

font-size:14px;
letter-spacing:1px;

color:#9a9a9a;

}

.music-track span{

display:inline-block;

padding-left:100%;

animation:musicScroll 18s linear infinite;

}

@keyframes musicScroll{

0%{
transform:translateX(0);
}

100%{
transform:translateX(-100%);
}

}

/* BOTON PLAY */

#music-play{

position:absolute;

left:50%;
top:50%;

transform:translate(-50%,-50%);

width:46px;
height:46px;

border-radius:50%;

border:1px solid #3a3a3a;

background:#141414;

display:flex;
align-items:center;
justify-content:center;

cursor:pointer;

}

#music-play .material-icons{
color:#e6e6e6;
}

.music-link{

position:absolute;
right:14px;

display:flex;
align-items:center;
justify-content:center;

width:34px;
height:34px;

background:#0f0f10;

border-radius:6px;
border:1px solid rgba(255,255,255,0.12);

color:#cfcfcf;
text-decoration:none;

transition:all .25s ease;

}

.music-link:hover{

background:#181818;
color:#ffffff;

}


/* ============================= */
/* PUBLICACIONES */
/* ============================= */
.publicaciones {
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%;
  max-width:720px; /* coincide con dedicatorias */
  margin:0 auto 80px auto;
  padding:0 10px; /* pequeño padding para que no toque bordes */
  box-sizing:border-box;
}

#feed {
    width:100%;
}

.post {
  width:100%;
  margin-bottom:60px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* TEXTO */
.post-texto {
  width:100%;
  max-width:640px; /* ancho similar a dedicatorias, deja margen visual */
  margin:18px 0 0 0;
  padding:0 18px;   /* mantiene un poco de espacio lateral */
  box-sizing:border-box;
  text-align:left;
}

.post-texto p{
  font-size:18px;
  color:#d0d0d0;
  text-align:left;
  line-height:1.9;
  white-space:pre-line;
  margin-top:12px;
}

/* MEDIA DEL POST */
.post-media {
  position:relative;
  width:100%;
  max-width:720px; /* mismo que sección */
  aspect-ratio:4/5;
  max-height:600px;
  overflow:visible; /* importante: permite que flechas/indicadores se vean */
  background:#000;
  border-radius:6px;
}

/* VIDEO */
.post-media video {
  position:relative;
  width:100%;
  height:100%;
  object-fit:contain; /* mantiene video completo */
  border-radius:6px;
  display:block;
}

/* CARRUSEL */
.carousel-track {
  position:relative;
  width:100%;
  height:100%;
}

.carousel-track img {
  display:none;
  width:100%;
  height:100%;
  object-fit:contain; /* mantiene todo dentro del contenedor */
  border-radius:6px;
}

.carousel-track img.active {
  display:block;
}

/* FLECHAS */
.nav {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(0,0,0,0.4);
  border:none;
  border-radius:25%;
  color:white;
  font-size:28px;
  padding:6px 12px;
  cursor:pointer;
  z-index:10;
}

.prev { left:10px; }
.next { right:10px; }

/* INDICADORES */
.carousel-indicators {
  position:absolute;
  bottom:10px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  z-index:10;
}

.dot {
  height:8px;
  width:8px;
  background:#888;
  border-radius:50%;
  cursor:pointer;
}

.dot.active {
  background:white;
}

/* FEED LOADER */
#feed-loader{
  text-align:center;
  padding:30px;
  color:#aaa;
  font-size:16px;
}

/* ============================= */
/* LIKE OVERLAY (INSTAGRAM STYLE) */
/* ============================= */

/* Asegura contexto para overlay */
.post-media{
  position:relative;
}

/* CONTENEDOR DEL BOTÓN */
.post-actions{
  position:absolute;
  bottom:96px;
  right:10px;
  z-index:20;
}

/* BOTÓN LIKE */
.like-btn{
  background:rgba(0, 0, 0, 0.3); /* fondo oscuro translúcido */
  border:none;
  border-radius:50%;
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all 0.2s ease;
}

/* ICONO */
.like-btn .material-icons{
  font-size:22px;
  color:rgba(255,255,255,0.85); /* gris claro */
  transition:all 0.2s ease;
}

/* HOVER */
.like-btn:hover{
  background:rgba(0,0,0,0.6);
  transform:scale(1.05);
}

/* ESTADO LIKED */
.like-btn.liked{
  background:rgba(0,0,0,0.4);
}

.like-btn.liked .material-icons{
  color:#e74c3c; /* rojo */
}

/* MODAL PUBLICACIONES*/
.modal{
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease;
  z-index: 3000;
}

.modal.active{
  opacity:1;
  pointer-events:auto;
}

.modal-content{
  background:#141414;
  border-radius:12px;
  max-width:500px;
  width:90%;
  padding:30px;
  position:relative;
  box-shadow:0 10px 40px rgba(0,0,0,0.7);
}

.modal-close{
  position:absolute;
  top:15px;
  right:15px;
  background:none;
  border:none;
  cursor:pointer;
  color:#ccc;
  font-size:24px;
}

.modal h3{
  text-align:center;
  margin-bottom:25px;
  font-size:18px;
  letter-spacing:2px;
  color:#e6e6e6;
}

.form-group{
  margin-bottom:20px;
  display:flex;
  flex-direction:column;
}

.form-group label{
  font-size:14px;
  margin-bottom:6px;
  color:#b8b8b8;
}

.form-group input[type="file"],
.form-group select,
.form-group textarea{
  background:#0f0f10;
  border:1px solid #2c2c2c;
  color:#e6e6e6;
  border-radius:6px;
  padding:8px 10px;
}

.form-group input[type="file"]{
  padding:6px;
}

.form-group textarea{
  resize:none;
}

.helper-text{
  font-size:12px;
  color:#777;
  margin-top:4px;
}

#preview{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

#preview img, #preview video{
  width:80px;
  height:80px;
  object-fit:cover;
  border-radius:6px;
}

.btn-submit{
  background:#1d1d1d;
  color:#fff;
  border:none;
  width:100%;
  padding:10px;
  border-radius:8px;
  cursor:pointer;
  transition:all .25s;
}

.btn-submit:hover{
  background:#2b2b2b;
}
