:root {
  /* 🎨 Colores principales */
  --color-primary: #4F46E5;        /* Azul principal (marca) */
  --color-primary-hover: #6366F1;  /* Hover botones principales */

  /* 🌑 Fondos */
  --color-bg: #0F172A;             /* Fondo general de la página */
  --color-container: #1E293B;      /* Contenedor principal */
  --color-card: #334155;           /* Tarjetas (tareas) */
  --color-input: #020617;          /* Fondo de inputs */

  /* ✍️ Textos */
  --color-text-main: #F1F5F9;      /* Texto principal */
  --color-text-secondary: #94A3B8; /* Subtítulo / texto secundario */

  /* ✅ Estados */
  --color-success: #22C55E;        /* Tarea completada */
  --color-danger: #EF4444;         /* Eliminar */
  --color-warning: #F59E0B;        /* Opcional (alertas) */

  /* 🧊 Bordes y detalles */
  --color-border: #475569;         /* Bordes sutiles */
  --color-overlay: rgba(0, 0, 0, 0.6); /* Fondo modal */

  /* ✨ Sombras */
    --shadow-main: 0 4px 10px rgba(0,0,0,0.3);

  /* 🔘 Extras */
  --radius: 10px;                  /* Bordes redondeados */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-bg);
    position: relative;
    z-index: 10;
}

/* HEADER */

.header {
    background-color: var(--color-primary);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.header__title {
    margin: auto;
    font-weight: bold;
    font-style: italic;
    text-align: center;
    letter-spacing: 5px;
    color: var(--color-text-main);
}

.subtitle {
    color: var(--color-text-secondary);
    margin-top: 10px;
}

/* MAIN */

.main {
    position: relative;
    background-color: var(--color-container);
    text-align: center;
    margin: auto;
    width: 100%;
    max-width: 400px;
    min-height: 500px;
    margin: 100px auto 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-main);
    z-index: 10;
}

.main__header {
    display: flex;
    justify-content:space-between;
    align-items: center;
    margin-top: 7px;
}

.main__title {
    color: var(--color-text-secondary);
    font-weight: 400;
    letter-spacing: 2px;
}

.btn-filter {
    width: 100px;
    height: 25px;
    background-color: var(--color-primary);
    color: var(--color-text-main);
    border: none;
    cursor: pointer;
}

.add__task {
    display: flex;
    gap: 10px;
    align-items: center;
}
.new__task {
    margin: auto;
    width: 80%;
    height: 30px;
    text-align: center;
    background-color: var(--color-input);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.btn-add {
    width: 80px;
    height: 30px;
    background-color: var(--color-primary);
    border: none;
    color: var(--color-text-main);
    cursor:pointer;
}

.btn-add,.btn-filter {
    border-radius: var(--radius);
}

.btn-filter:hover, .btn-add:hover{
    background-color: var(--color-primary-hover);
}

button {
    transition: all 0.2s ease;
}

.list {
    color: #fff;
    list-style: none;
    margin-top: 15px;
    max-height: 355px;
    overflow-y: auto;
    scrollbar-width: none;
    overflow-x: hidden;
}


.message {
    margin: auto;
}


.task {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-card);
    margin: 10px 0;
    padding: 10px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.task:hover {
    transform: scale(1.02);
}

.complete {
    text-decoration: line-through;
    color: var(--color-success);
    opacity: 0.5;
}

.btn-delete {
    height: 30px;
    width: 70px;
    background-color: var(--color-danger);
    color: var(--color-text-main);
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    opacity: 1;
}

.check {
    cursor: pointer;
}



/* FILTER */


.modal__filter {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 5px solid var(--color-border);
    margin: auto;
    color: var(--color-text-main);
    font-family:'Times New Roman';
    display: none;
}

.closed__filter {
    width: 35px;
    height: 35px;
    background-color: var(--color-danger);
    border: var(--color-border);
    border-radius: 10px;
    color: var(--color-text-main);
    font-size: 20px;
    margin-top: 5px;
    margin-left: 91%;
    cursor: pointer;
}

.closed__filter:hover {
    transform: scale(1.1);
}

.filter__title {
    margin-top: 40px;
    font-size: 35px;
}

.filters {
    margin: auto;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 40px;
    font-size: 30px
}

.filter {
    cursor: pointer;
}

.filter:hover {
    opacity: 0.5;
    text-decoration: underline;
}

/* Contadores */

.counter {
    color: var(--color-text-main);
    max-width: 400px;
    min-height: 30px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: auto;
    justify-content: space-between;
    margin-top: 20px;
    background-color: var(--color-container);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 15px;
    animation: aparicion 1s ease 0.1s backwards;
}

@keyframes aparicion {
    from {
        opacity: 0;
        margin-top: 0;
    }
    to {
        opacity: 1;
        margin-top: 20px;
    }
}

@keyframes desaparicion {
    from {
        opacity: 1;
        margin-top: 20px;
    }
    to {
        opacity: 0;
        margin-top: 0;;
    }
}

@media screen and (min-width: 300px) {
    .header {
        padding: 10px;
    }
    .main {
        max-width: 350px;
        margin-top: 15px;
        max-height: 100px;
    }
    .counter {
        margin-top: 15px;
        justify-content: space-evenly;
        font-size: 10px;
    }
    .modal__filter {
        max-width: 90%;
        max-height: 95%;
    }
}

@media screen and (min-width: 600px) {
    .main {
        max-width: 500px;
        margin-top: 40px;
        max-height: 600px;
    }
    .counter {
        max-width: 500px;
    }
}

@media screen and (min-width: 900px) {
    .main {
        max-width: 600px;
        margin-top: 20px;
    }
    .counter {
        max-width: 600px;
    }
}



/* MODIFICAR TAREA */

.modify {
    background-color: #3468;
    padding: 4px;
    border-radius:var(--radius);
    color: var(--color-text-main);
    text-align: center;
    transform: scale(1.5); 
    transition: all 0.2s ease;
}

.modify:focus {
    outline: none;
    border: 1px solid var(--color-primary);
    box-shadow: 0 0 5px var(--color-primary);
}

.animation__delete {
    animation: eliminar 0.5s ease 0.1s backwards;
}

@keyframes eliminar {
    from {
        opacity: 1;
    }
    to {
        transform: translateX(-300px);
        opacity: 0;
    }
}
