:root{ 
    --color: #39FF14;
    --fondo: #fffefb;
    --txt: #121212;
    --blanco: var(--fondo);
    --negro: var(--txt);
    --transition: 0.1s linear;
    --sombra: -webkit-box-shadow: 3px 3px 0px var(--txt); 
    --sombra: box-shadow: 3px 3px 0px var(--txt);
}

*{
    box-sizing: border-box;
    font-family: "Archivo", sans-serif;
    scroll-behavior: smooth !important;
}

body{
    background-color: var(--fondo);
    color: var(--txt);
    margin:0;
}

html{
  scrollbar-gutter: stable;
}

/* ESTILOS -------------------------- */

.color{
  color: var(--color);
}

/* ORGANIZACIÓN --------------------------- */
#logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

#logo-svg {
    width: 60px; 
    height: auto;
    color: var(--color); 
    display: block;
}

#logo-svg:hover{
  transform: scale(1.1);
}

#logo-svg.winking .eye-right {
    display: none; 
}

#logo-svg.winking .logo-group::after {
    content: '';
    position: absolute; 
}

header{
    display: flex;
    justify-content: space-between;
    align-items: end;
    height: 70px;
    margin: auto;
    padding: 0 50px;
    align-items: center;
   position:relative;
    background-color: var(--negro);
    color: var(--blanco);
    border-bottom: 3px solid var(--blanco);
}

nav{display: inline-block;}

nav ul{
    display: flex;
    flex-direction: row;
    text-transform: uppercase;
    list-style-type: none;
    justify-content: space-between;
    align-items: end;
    padding:0;
    margin-right:50px;
    gap: 30px;
}

nav ul a{
    border: 2px solid var(--blanco);
    background-color: var(--negro);
    padding: 5px 10px;
    border-radius: 50px;
    box-shadow: 3px 3px var(--blanco);
}

nav ul a:hover{
    box-shadow: 3px 3px var(--color);
    font-weight: 600;
    transition: var(--transition);
}
a{
    text-decoration: none;
    color:var(--blanco);
}



/* HERO---------------------------------------- */

.hero{
    height:80vh;
    background-color:var(--fondo);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: crosshair;
}

.hero-content{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index:2;
  user-select: none; 
    -webkit-user-select: none;
  pointer-events: none;
}

h1{
  text-align: center;
}

.hero-content h1 .color{
  pointer-events: auto; 
    cursor: pointer;
}

#pintar{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height:100%;
  z-index: 1;
  opacity: 1;
  pointer-events: none;
  touch-action: none;
  
}

h1{
  color:var(--txt);
  font-size: 5rem;
  font-weight: 900;
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: var(--fondo);
}

.hero-content h2{
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: var(--fondo);
  font-weight: 800;
  font-size: 2.2rem !important;
  text-align:center;
}

#borrar {
    position: absolute;
    bottom: 20px;
    right: 20px; 
    z-index: 3; 
    background: var(--fondo);
    border: 2px solid var(--txt); 
    box-shadow: 3px 3px var(--txt);
    color: var(--txt);           
    width: 50px;
    height: 50px;
    border-radius: 50%; 
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#borrar:hover {
    box-shadow: 3px 3px var(--color);             /* El icono se vuelve blanco */
}


/* MARQUEE --------------------------- */
.marquee {
  width: 100%;
  height: 4rem;
  overflow: hidden; 
  background-color: var(--txt); 
  color: var(--fondo);
  /* border-top: 3px solid var(--txt);
  border-bottom: 3px solid var(--txt); */
  padding: 15px 0;
  white-space: nowrap; 
  position: relative;
  display: flex;
  align-items: center;
}

.marquee-contenido {
  display: flex;
  min-width: 100%;
  animation: scroll-loop 30s linear infinite;
}

.marquee-contenido span {
  font-weight: 800;
  font-size: 1.5rem;
}

@keyframes scroll-loop {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%); 
  }
}

.marquee:hover .marquee-contenido {
  animation-play-state: paused;
}

.star {
  color: var(--color);
  margin: 0 40px;  
  transition: color 0.3s linear, transform 0.3s ease;
  display: inline-block;
}

.marquee:hover .star {
  transform: rotate(90deg);
}



/* PROYECTOS -----------------------º */

.proyectos h2{
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
}

.proyectos{
  padding: 30px;
  margin:auto;
}

#proyectos-ind{
  display: flex;
  justify-content: space-around;
  width: 100%;
  flex-wrap: wrap;
  margin:auto;
  gap: 1%;
}

.tarjeta{
  border: 2px solid var(--negro);
  box-shadow: 3px 3px 0 var(--txt);
  background-color: var(--blanco);
  color: var(--negro);
  border-radius: 10px;
  min-height: 450px;
  width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: scale 0.1s linear;
  padding: 20px;
  padding-top: 120px;
  margin-bottom: 30px;
  position: relative;
  cursor: pointer;
}

.enlace-tarjeta::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Aseguramos que esté por encima de los textos */
    z-index: 5; 
}

.tarjeta:hover{
  scale: 1.02;
  box-shadow: 3px 3px 0 var(--color);
}

h3{
  font-size: 1.7rem;
  font-style: italic;
}



/* FOOTER ------------------------------- */

footer{
  background-color: var(--negro);
  color: var(--blanco); 
  height: 25vh;
  display:flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-top: 3px solid var(--blanco);
}

footer p{
  margin: 5px;
}

footer :last-child{
  margin-top: 20px;
}

footer a{
    border: 2px solid var(--blanco);
    background-color: var(--negro);
    padding: 5px 10px;
    border-radius: 50px;
    box-shadow: 3px 3px var(--blanco);
}


footer a:hover{
    box-shadow: 3px 3px var(--color);
    font-weight: 600;
    transition: var(--transition);
}

a{
    text-decoration: none;
    color:var(--blanco);

}


/* COLOR PICKER------------------ */

.personalizacion{
    border: 2px solid var(--txt);
    background-color: var(--fondo);
    box-shadow: 3px 3px 0 var(--txt);
    border-radius: 10px;
    padding: 10px;
    height: 60px;
    display:flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: fixed;
    bottom: 20px;
    left:20px;
    z-index:5;
    cursor: pointer;
}

i{
   margin: 2px;
}

input[type="color"]{
    height: 30px;
    width:30px;
    padding: 0;
    margin: 0;
    border: 2px solid var(--txt);
    box-shadow: 3px 3px var(--txt);
    border-radius: 50%;
    margin-bottom: 20px;
    cursor:pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius:50%;
}
.tooltiptext{
  visibility: hidden;
  width: 130px;
  background-color: var(--txt);
  border: 2px solid var(--fondo);
  color: var(--fondo);
  text-align: center;
  padding: 5px 0;
  border-radius: 10px;
  position: absolute;
  bottom: 70px;
  z-index: 1;
  transition: opacity 1s;
  transition-delay: 1s;
}

.personalizacion:hover .tooltiptext {
  visibility: visible;
  opacity: 0;
}

/* CAMBIO DE TEMA ----------------- */
body:has(#tema:checked) {
  --txt: #fffefb;
  --fondo: #121212;
  --sombra: 3px 3px var(--txt);
}

.tema-label {
  width: 60px;
  height: 30px;
  background-color: var(--txt);
  display: flex;
  border-radius: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  position: relative;
  cursor: pointer;
}

.ball {
  width: 22px;
  height: 22px;
  background-color: var(--color);
  position: absolute;
  border-radius: 50%;
  transition: transform var(--transition);
}

#tema:checked + .tema-label .ball {
  transform: translateX(28px);
}

.tema-input {
  display: none;
}

.oscuro, .claro{
    color:var(--fondo)
}

/* ARRIBA -----------------------------------------*/

.arriba{
  position: fixed;
  border: 2px solid var(--txt);
  background-color: var(--fondo);
  color: var(--txt);
  box-shadow: 3px 3px 0 var(--txt);
  border-radius: 10px;
  bottom: 20px;
  right: 20px;
  z-index:5;
  cursor:pointer;
}

.arriba a{
  display: block;
  padding:10px;
}

.arriba i{
  color: var(--txt)
}

.arriba:hover{
  box-shadow: 3px 3px 0 var(--color);
}


/* LOGROS ----------------------------------------------------------*/

.tally-trigger .icon-x {
    display: none; }

.tally-trigger .icon-copa {
    display: inline-block;
}

body.tally-abierto .icon-copa {
    display: none;
}

body.tally-abierto .icon-x {
    display: inline-block;
}

.tally-trigger i {
    transition: transform 0.3s ease;
}

body.tally-abierto .tally-trigger i {
    transform: rotate(90deg);
}

h4{
  padding: 10px;
}


#tally-abrir{
  border:none;
  background-color: var(--fondo);
  color: var(--txt);
  border: 2px solid var(--txt);
  box-shadow: 3px 3px 0 var(--txt);
  border-radius: 50px;
  width:40px;
  height:40px;
  position: fixed;
  top: 14px;
  right: 25px;
  z-index: 21;
  font-size: 1.1rem;
}

#tally-abrir:hover{
  box-shadow: 3px 3px 0 var(--color);
}

.tally-lista{
  display: flex;
  flex-wrap: wrap;      
  gap: 15px;             
  list-style: none;
  padding: 20px;
  justify-content: center;
  margin-bottom: 0;
}

.tally-item{
  width: 40%;
  margin-bottom: 10px;
  border-radius: 12px;
  display: flex;          /* Flex interno para centrar el icono */
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color:grey;
  /* color: var(--fondo); */
  cursor: help;
  transition: all 0.3s ease;
}

.tally-item.active {
  color: var(--color);
}

.tally-sidebar {
    position: fixed;
    top: 100px;
    right: -200px; /* Escondido a la derecha (ajusta según el ancho que quieras) */
    width: 200px;
    height: 520px;
    background: var(--negro);
    z-index: 20;
    border-radius: 15px 0 0 15px;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}

.tally-sidebar.open {
    right: 0; /* Vuelve a la pantalla */
}

.tally-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--negro);
    z-index: 19;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.tally-overlay.active {
    opacity: 0.75;
    pointer-events: auto;
}

.tally-header{
  color: var(--blanco);
  padding:0 5px;
  text-align: center;
}

h5{
  margin: 0;
  font-size: 2rem;
  font-style: italic;
  font-weight: 300;
}

.hint-box{
  color: var(--blanco);
  font-style: italic;
  margin: 0 10px;
  margin-top:0;
  text-align: center;
}

.animar-copa .icon-copa {
    animation: copa-color-flash 0.6s ease-out;
}

@keyframes copa-color-flash {
    0% { color: inherit; }
    50% { color: var(--color) }
    100% { color: inherit; }
}

body.tally-master-mode #tally-abrir {
    background-color: var(--color) !important;
    border-color: var(--color) !important;
    box-shadow: 0 0 15px rgba(var(--color-rgb), 0.4);
}

body.tally-master-mode #tally-abrir i {
    color: white !important; /* Icono blanco fijo al final */
}

#tally-abrir .icon-x {
    color: inherit;
}




#tally-abrir {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid var(--color);
 }



/* RESPONSIVE ---------------------------------------------------------------------- */

@media screen and (max-width:650px) {
  h1{
    font-size: 3.5rem;
  }
  nav{
    display: none;
  }
  header{
    justify-content: center;
  }
  .tarjeta{
    width: 330px;
  }
  .hero-content h2{
    font-size: 1.3rem;
  }
  footer{
    padding-bottom: 80px;
    height: 250px;
}
}

@media screen and (max-width: 1250px) and (min-width:770px){
  .tarjeta{
    width: 25%;
  }
  footer{
    padding-bottom: 50px;
    height: 200px;
}
}