 @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

 /*variables globales*/
 :root{
   --bg: linear-gradient(135deg, #667eea, #764ba2);
   --bgmain:#f9fafb;
   --text:#111827;
   --btntema:#6366f1;
   --textH2:#111827;
   --borMain: 1px solid #6366f1;
}
/*ESTILO OSCURO*/
.dark{
     --bg:#111827;
   --bgmain:#3b4554;
   --text:#111827;
   /* --text:#f9fafb; */
   --btntema: #f59e0b;
   --textH2:#f9fafb;
   --borMain: 1px solid #ababac;
}

/*-----------------------*/
 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     font-family: 'Inter', sans-serif;
 }

main{
   background: var(--card);
   color: var(--text);
   border: var(--borMain);
}

 body {
     /* font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; */
     min-height: 100vh;
     display: flex;
     justify-content: center;
     align-items: center;
     background: var(--bg);
     /* background: linear-gradient(135deg, #4f46e5, #7c3aed); */
     padding: 20px;
 }

 /* CONTENEDOR PRINCIPAL */
 main {
    position: relative;
     width: 100%;
     max-width: 420px;
     background: var(--bgmain);
     padding: 30px;
     border-radius: 20px;
     box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
 }

 h2 {
     text-align: center;
     margin-bottom: 20px;
     /* color: #1f2937; */
     color: var(--textH2);
     font-size: 28px;
     font-weight: 700;
 }

 /* FORM */
 .form {
     display: flex;
     gap: 10px;
     margin-bottom: 15px;
 }

 .form input {
     flex: 1;
     padding: 14px 16px;
     border: 1px solid #d1d5db;
     border-radius: 12px;
     outline: none;
     font-size: 15px;
     transition: 0.3s;
 }

 .form input:focus {
     border-color: #6366f1;
     box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
 }

 .form button {
     padding: 14px 18px;
     border: none;
     border-radius: 12px;
     background: #6366f1;
     color: white;
     font-weight: 600;
     cursor: pointer;
     transition: 0.3s;
 }

 .form button:hover {
     background: #4f46e5;
     transform: translateY(-1px);
 }

 /* BUSCADOR */
 body input[placeholder="Buscar"] {
     width: 100%;
     padding: 12px 15px;
     margin-bottom: 18px;
     border: 1px solid #d1d5db;
     border-radius: 12px;
     outline: none;
     font-size: 14px;
 }

 /* FILTROS */
 .cont_filtros {
     display: flex;
     gap: 10px;
     margin-bottom: 20px;
 }

 .filtro {
     flex: 1;
     padding: 10px;
     border: none;
     border-radius: 10px;
     background: #eef2ff;
     color: #4338ca;
     font-weight: 600;
     cursor: pointer;
     transition: 0.3s;
 }

 .filtro:hover {
     background: #6366f1;
     color: white;
 }

 /* LISTA */
 ul {
     width: 100%;
     display: flex;
     flex-direction: column;
     gap: 12px;
     list-style: none;
 }

 /* TAREA */
 ul li {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 15px;
     padding: 14px 16px;
     background: #f9fafb;
     border-radius: 14px;
     border: 1px solid #e5e7eb;
     transition: 0.3s;
     transition: all 0.2s ease;
 }


 ul li:hover {
     /* box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06); */
     transform: translateY(-2px);
     background: #f0f0ff;
 }

 /*evita que el texto se expanda sin control*/
 .editar {
     flex-grow: 1;
     color: var(--text);
     font-size: 15px;
     word-break: break-word;
 }

 /* BOTONES de la tarea*/
 .spBotones {
     display: flex;
     gap: 10px;
 }

 .spBotones button {
     width: 38px;
     height: 38px;
     border: none;
     border-radius: 10px;
     cursor: pointer;
     transition: 0.3s;
     font-size: 15px;
 }

 .spBotones button:nth-child(1) {
     background: #fee2e2;
     color: #dc2626;
 }

 .spBotones button:nth-child(1):hover {
     background: #dc2626;
     color: white;
 }

 .spBotones button:nth-child(2) {
     background: #dcfce7;
     color: #16a34a;
 }

 .spBotones button:nth-child(2):hover {
     background: #16a34a;
     color: white;
 }

 .spBotones button:nth-child(3) {
     /* background: #fee2e2; */
     color: #666;
 }

 .spBotones button:nth-child(3):hover {
     background: #666;
     color: white;
 }

 /* TAREA COMPLETADA */
 .completado .editar {
     text-decoration: line-through;
     color: #9ca3af;
 }

 /*BOTON CLICKEADO(ACTIVADO)*/
 .active{
    color: green;
    box-shadow: 0px 0px 7px green;
 }

 /*BOTON TEMA OSCURO-CLARO*/
 #tema{
    position: absolute;
    background-color: transparent;
    top: 10px;
    right: 10px;
    border: none;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    color: var(--btntema);
 }

 /*CONTENIDO EDITABLE*/
 .editar[contenteditable="true"] {
    outline: 2px solid #4caf50;
    border-radius: 4px;
    padding: 2px 4px;
}

.editar[contenteditable="true"]:focus {
    outline: 2px solid #4caf50;
    background-color: #f0f0f0;
}

/*animacion de cada tarea al crearse*/
.acordeon {
    /* max-height: 0; */
    overflow: hidden;
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.5s ease;
}


.acordeon.activo {
     /* max-height: 0; */
    opacity: 1;
    transform: scaleX(1);
}

/*Animacion de cada tarea al eliinar(falta implementar)*/

.acordeonDelet {
   max-height: 50px; 
    opacity: 1;
    transform: scaleX(1);
    overflow: hidden;
    transition: all 1s ease,opacity 0.7 ease;
}


.acordeonDelet.activo {
       max-height: 0; 
    opacity: 0;
    transform: scaleX(0);}



/*media querys*/
@media (max-width:620px){
    .form{
        flex-direction: column;
    }
    main{
        padding: 1rem;
    }
}