/* ===================
   RESET
====================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*====================
  BODY
====================== */

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 58, 182, 0.5), transparent 35%),
        radial-gradient(circle at 80% 70%, rgba(1, 35, 109, 0.5), transparent 35%),
        linear-gradient(135deg, #000000, #00010f, #00033d);
}

.blur {
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
}

.blur1 {
    top: -120px;
    left: -120px;
    background: #2563eb;
}

.blur2 {
    top: -120px;
    right: -120px;
    background: #00bfff;
}

/*====================
  MAIN CONTAINER
====================== */

.container {
    width: min(1400px, 95%);
    min-height: 700px;
    max-width: 1400px;
    background: rgba(0, 8, 31, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 60px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
}

/*====================
  HEADER
====================== */

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    margin-bottom: 15px;
     user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

header h1 {
    font-size: 3.2rem;
    font-weight: 550;
    color: #f8fbff;
    letter-spacing: -1px;
    text-shadow: 0 0 8px rgba(255,255,255,0.4),
    0 0 18px rgba(90,130,255,0.9);
    margin: -30px 0 0  10px;
    opacity: 0.9;
}

header p {
    color: #94a3b8;
    font-size: 1.15rem;
    margin-top: 15px;
    opacity: 0.8;
}

/*====================
  LOGO
====================== */

.logo{
    text-align: center;
    justify-content: center;
    display: flex;
    font-size: 55px;
    color: #2563eb;
    margin-bottom: 20px;
}

/*====================
  LINE
====================== */

.line {
    width: 70px;
    height: 4px;
    background-color: #2563eb;
    border-radius: 20px;
    margin: 22px 0 12px 0;
}

/*====================
  TASK INPUT
====================== */

.tasks{
    margin-top: 15px;
}

.task-input {
    margin-bottom: 40px;
}

.task-input input {
    flex: 1;
    height: 60px;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.011);
    color: white;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    font-size: 17px;
    outline: none;
}

.task-input button {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 170px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 30px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(180deg, #022ef1 100%,
    #0339b8 60%, #0227a0 100%);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset,
    0 0 35px rgba(45,115,255,0.25),
    0 15px 40px rgba(20,70,220,0.20);
    color: white;
    font-size: 1.15rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.task-input button:hover {
    transform: translateY(-2px);
    box-shadow: 
    0 0 45px rgba(28, 56, 105, 0.3);
    background: linear-gradient(
        180deg, #184cff, #1f5cff,#1550ea
    );
}


.task-input button::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    border-radius: 16px 16px 40px 40px;
}

.task-input-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 21px;
    background: rgba(12,18,38,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.1),
    -12px -12px 35px rgba(70,140,255,0.05),
    12px -12px 35px rgba(70,140,255,0.05),
    -12px 12px 35px rgba(70,140,255,0.05),
    12px 12px 35px rgba(70,140,255,0.05);
}

.task-input-wrapper::before {
    content: "";
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    background: radial-gradient(circle,
    rgba(50,140,255,0.15) 80%,
    rgba(30,90,255,0.05) 1%,
    transparent 75%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

.task-input-wrapper input {
    flex:1;
}

.task-input-wrapper button {
    flex-shrink: 0;
}

.task-completed label,
.task-completed .badge  {
    opacity: .6;
}

.task-completed label {
    text-decoration: line-through;
    opacity: .6;
}

.task label,
.task .badge {
    transition: all .35s ease;
}

.task {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease, transform .35s ease;
    ;
}

.task-hidden {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

.task-list {
    
    overflow-y: auto;
}
/*====================
  FILTERS
====================== */

.filters{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 25px;
}

.filter-button {
    display: flex;
    align-items: center;
}

.filter-buttons button {
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
    border: 0px solid rgba(255,255,255,0.08);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 9px 25px;
    border-radius: 999px;
    margin-top: -10px;
    box-shadow: 
    0 2px 10px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.05);
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.filter-buttons .active {
    background:linear-gradient(180deg, #022ef1 100%,
    #0339b8 60%, #0227a0 100%);
    border:none;
    color: #fff;
}

.filter-buttons .active:hover {
    box-shadow: 
    0 0 45px rgba(50,120,255,0.30);
    background: linear-gradient(
        180deg, #184cff, #1f5cff,#1550ea
    );
}

.filter-buttons button:not(.active):hover {
    background: linear-gradient(180deg, #2b2f45, #23283d);
    box-shadow: 0 0 18 rgba(120,120,120,0.15),
    0 8px 18px rgba(0,0,0.25);
}

.clear-completed {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.clear-completed:hover {
    color: white;
}

/*====================
  TASKS
====================== */

.task {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(5, 17, 61, 0.55);
    border: 1px solid rgba(2, 18, 59, 0.5);
    backdrop-filter: blur(18px);
    transition: 0.3s;
}

.task:hover{
    transform:translateY(-1px);
    border-color: rgba(121, 139, 187, 0.18);
    box-shadow: 
    2px 10px 20px rgba(0,0,0,0.30),
    2px 5px 18px rgba(50,110,255,0.13);
}

.task-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.task label,
.task p{
    color: white;
    text-shadow: 0 0 15px rgba(255,255,255,0.3),
    0 0 10px rgba(90,130,255,0.9);
    font-size: 17px;
    font-weight: 500;
    margin: 0;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.task label:hover {
    cursor: pointer;
}

.task span{
    background: #0b0864;
    color:#c5b0ff;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

.task input[type="checkbox"]{
    appearance: none;
    -webkit-appearance: none;
    width:22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(180,190,255,0.35);
    background: transparent;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;;
    margin: 0;
}

.task input[type="checkbox"]:hover {
    border-color: #2d7cff;
    box-shadow: 0 0 12px rgba(45,124,255,0.35);
}

.task input[type="checkbox"]:checked{
     background: linear-gradient(
        180deg,
        #2f86ff 0%,
        #2268f3 100%
    );
    border-color: #2f86ff;
    box-shadow: 0 0 14px rgba(47,134,255,0.45);
}
.task input[type="checkbox"]:checked:before{
    content: "\2714";
    color: white;
   
    border-color: #2f86ff;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;

}

.task-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.task-left p{
    margin: 0;
    cursor: pointer;
}

.task-left label {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    letter-spacing: -0.3px;
}

.task-list {
    min-height: 367.5px;
    max-height: 4300px;
    overflow-y: auto;
    margin-bottom: 0px;
}

.task-category {
    height: 50px;
    padding:  0 10px 0 16px;
    border: none;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    color: white;
    font-size: 15px;
    font-weight: 550;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.task-category:hover {
    background: rgba(131, 169, 201, 0.45);
    box-shadow: 0 0 12px rgba(152, 206, 250, 0.45);
    transform: translateY(-2px);
}

.task-category:focus {
    outline: none;
    background: rgba(131, 169, 201, 0.45);
    box-shadow: 0 0 12px rgba(152, 206, 250, 0.45);
}

.task-category option{
    background: #1d2f5f;
    color:white;
    
}

.task-removing {
    opacity: 0;
    transform: translateX(-30px);
    transition: all .35s ease;
}

.task-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-date{
    margin-top:4px;
    font-size:12px;
    color:#8c97aa;
    letter-spacing:.3px;
    opacity:.8;
}

.task-completed label {
    text-decoration: line-through;
    color: #8b8b8b;
}

.task-completed .task-date {
    color: #6b7280;
}

/*====================
  BADGE
====================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    margin-left: 20px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    user-select: none;
    letter-spacing: .4px;
}

.badge.study {
    background: #110f63;
    color: #dddff8;;
}

.badge.important {
    background: #04270b;
    color: rgb(101, 224, 107);
}

.badge.health {
    background: #1b1905;
    color:#fbff2c;
}

.badge.personal {
    background: #330846;
    color:#f2dbfc;
}

.badge.work {
    background-color: rgb(15, 87, 163);
    color: rgb(223, 239, 255);
}

/*====================
  DELETE BUTTON
====================== */

.delete-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.delete-btn:hover {
    color: #fff;
    transform: scale(1.08);
}

.delete-btn i{
    font-size: 20px;
}

/*====================
  FOOTER
====================== */

footer {
    display: flex;
    justify-content: center;
    margin-top: 43px;
    margin-bottom: -15px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.total-tasks,
.completed-tasks{
    color: #2f86ff;
    font-weight: 700;
}

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

@media (max-width: 1200px){

    .container{
        width:95%;
        padding:40px;
    }

    header h1{
        font-size:2.8rem;
    }

}

@media (max-width:992px){

    .container{
        padding:30px;
    }

    .task-input-wrapper{
        flex-wrap:wrap;
    }

    .task-input input{
        width:100%;
    }

    .task-category{
        flex:1;
    }

    .task-input button{
        width:100%;
    }

}

@media (max-width: 768px) {

    body {
        padding: 20px;
    }

    .container {
        width: 100%;
        padding: 25px;
        border-radius: 20px;
    }

    header h1 {
        font-size: 2.2rem;
        text-align: center;
    }

    header p {
        font-size: 1rem;
        text-align: center;
    }

    .task-input-wrapper {
        display: grid;
        flex-direction: column;
        gap: 16px;
        padding: 18px;
    }

    .task-input button {
        grid-column: 1 / 3;
        width: 100%;
        min-height: 45px;
    }

    .task-input input {
        width: 100%;
        min-height: 55px;
    }

    .task-category {
        width: 100%;
        min-height: 55px;
    }
    

    .filters {
        flex-direction: column;
        gap: 18px;
        align-items: stretch;
        margin-top: 5px;
    }

    .filter-buttons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .clear-completed {
        width: 100%;
        text-align: center;
    }

    .task {
        min-height: 50px;
        gap: 15px;
    }

    .task-left {
        width: 100%;
        flex-wrap: wrap;
    }

    .delete-btn {
        align-self: flex-end;
    }

    footer {
        text-align: center;
    }
}

@media (max-width: 480px) {

    body {
        padding: 12px;
    }

    .container {
        width: 100%;
        padding: 18px;
        border-radius: 18px;
    }

    header {
        margin-bottom: 20px;
    }

    header h1 {
        font-size: 1.9rem;
        margin: 0;
        text-align: center;
    }

    header p {
        font-size: 0.95rem;
        margin-top: 10px;
        text-align: center;
    }

    .line {
        width: 55px;
        margin-top: 18px;
    }

    .task-input-wrapper {
        padding: 14px;
        gap: 12px;
    }

    .task-input input,
    .task-category,
    .task-input button {
        width: 100%;
        height: 30px;
        font-size: 15px;
    }

    .task-category {
        height: 10px;
    }

    .filters {
        gap: 15px;
    }

    .filter-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .filter-buttons button {
        padding: 8px 18px;
        font-size: 14px;
    }

    .clear-completed {
        width: 100%;
        text-align: center;
        font-size: 14px;
    }

    .task {
        padding: 16px;
        gap: 14px;
    }

    .task-left {
        width: 100%;
        align-items: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }

    .task-info {
        flex: 1;
        min-width: 0;
    }

    .task-left label {
        font-size: 15px;
        line-height: 1.4;
        word-break: break-word;
    }

    .task-date {
        font-size: 11px;
    }

    .badge {
        margin-left: 0;
        margin-top: 6px;
        font-size: 10px;
        padding: 5px 10px;
    }

    .delete-btn {
        align-self: flex-end;
        font-size: 18px;
    }

    .delete-btn i {
        font-size: 18px;
    }

    footer {
        margin-top: 25px;
        text-align: center;
        font-size: 14px;
        line-height: 1.6;
    }
}

/*====================
  CUSTOM SCROLLBAR
======================*/

.task-list {
    max-height: 330px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #2f86ff transparent;
}

.task-list::-webkit-scrollbar {
    width: 8px;
}

.task-list::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
}

.task-list::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        #3b82f6 0%,
        #2563eb 100%
    );
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background .3s ease;
}

.task-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        #60a5fa 0%,
        #3b82f6 100%
    );
    background-clip: content-box;
}

.task-list::-webkit-scrollbar-corner {
    background: transparent;
}
