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

.container {
    width: 100%;
    min-height: 100vh; /* Ensure full viewport height */
    background-image: url('task.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Keep the background fixed */
    padding: 10px;
    box-sizing: border-box;
}

/* To-Do App Styles */
.todo-app {
    width: 100%;
    max-width: 700px;
    background: lightgray;
    margin: 170px auto 20px;
    padding: 40px 30px 70px;
    border-radius: 10px;
    position: relative; /* Positioning within the viewport */
    z-index: 1; /* Ensure it stays above background */
}

.todo-app h2 {
    color: #002765;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.todo-app h2 img {
    width: 30px;
    margin-left: 10px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: center;
    background: floralwhite;
    border-radius: 30px;
    padding-left: 20px;
    margin: 25px;
}

input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px;
    font-size: 14px;
}

button {
    border: none;
    outline: none;
    padding: 16px 50px;
    background: red;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 60px;
    transition: background 0.3s ease, transform 0.3s ease; /* Add transition here */
}


ul li {
    list-style: none;
    font-size: 17px;
    padding: 12px 8px 12px 50px; /* Add extra padding on the left to make space for the checkbox */
    user-select: none;
    cursor: pointer;
    position: relative;
}

/* Target only the to-do list items */
.todo-app ul li::before {
    content: '';
    position: absolute;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background-image: url(unchecked.png);
    background-size: cover;
    background-position: center;
    top: 12px;
    left: 8px; /* Ensure the checkbox is placed on the left side */
}


ul li.checked {
    color: #555;
    text-decoration: line-through;
}

ul li.checked::before {
    background-image: url(checked.png);
}

ul li span {
    position: absolute;
    right: 0;
    top: 5px;
    width: 40px;
    height: 40px;
    font-size: 22px;
    color: #555;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
}

ul li span:hover {
    background: #edeef0;
}



nav {
    background: transparent;
    width: 80%; /* Adjust the width as per your design */
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align items to the left */
    position: fixed; /* Fix the nav at the top */
    top: 0; /* Align to the top of the viewport */
    left: 50%; /* Center the nav horizontally */
    transform: translateX(-50%); /* Adjust the position to be perfectly centered */
    z-index: 1000; /* Ensure it appears above other content */
}

.logo {
    width: 100px;
    /* You can also adjust margin or padding if needed for positioning */
}

.user-pic{
    width: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 30px; 
}
nav ul {
    width: 100%;
    text-align: right;
}

nav ul li {
    display: inline-block;
    list-style: none;
    margin: 10px 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: medium;
    padding: 5px 10px; /* Add padding to create space inside the box */
    border-radius: 20px; /* Round corners */
    transition: transform 0.3s ease, color 0.3s ease; /* Smooth transition for both transform and color */
}

nav ul li a:hover {
    background-color: #f44336; /* Red background on hover */
    color: white; /* White text color on hover */
    transform: scale(0.9); /* Zoom-out effect on text */
}
.sub-menu-wrap {
    position: absolute;
    top: 100%; /* Align it below the navigation bar */
    right: -10%;  /* Align to the right side of the parent container (the nav) */
    width: 320px; /* Adjust the width as needed */
    max-height: 0px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out; /* Smooth transition */
}
.sub-menu-wrap.open-menu{
    max-height: 400px;
    }
    .sub-menu{
        background: #fff;
        padding: 20px;
        margin: 10px;
    }
    .user-info{
        display: flex;
        align-items: center;
    }
    .user-info h3{
        font-weight: 500;
    }
    .user-info img{
        width: 60px;
        border-radius: 50%;
        margin-right: 15px;
    }
    .sub-menu hr{
        border: 0;
        height: 1px;
        width: 100%;
        background: #ccc;
        margin: 15px 0 10px;
    }
    .sub-menu-link{
        display: flex;
        align-items: center;
        text-decoration: none;
        color: #525252;
        margin: 12px 0 ;
    }
    .sub-menu-link p{
        width: 100%;
    }
    .sub-menu-link img{
        width: 40px;
        background: #e5e5e5;
        border-radius: 50%;
        padding: 8px;
        margin-right:  15px;
    }
    .sub-menu-link span{
        font-size: 22px;
        transition: transform 0.5s;
    }
    .sub-menu-link:hover span{
        transform: translateX(5px)
    }
    .sub-menu-link:hover p{
        font-weight: 600;
    }

 /* Logout Button Styles */
 #logout-button {
    position: absolute;
    top: 37px;
    right: 20px;
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 20px;
    cursor: pointer;
}

#logout-button:hover {
    background: #e53935;
}  




/* Dropdown Menu Styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 80%; /* Position the menu below the "Features" */
    left: 0;
    background-color: transparent;
    list-style: none;
    /* border: 1px solid #ccc; */
    border-radius: 4px;
    padding: 0; /* Remove extra padding */
    margin: 0; /* Remove default margin */
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
    width: 210px; /* Adjust width of dropdown */
}

.dropdown-menu li {
    padding: 8px 15px; /* Adjust padding for better alignment */
    font-size: 18px; /* Adjust font size */
    line-height: 1.2; /* Ensure proper line spacing */
    white-space: nowrap; /* Prevent text wrapping */
}

.dropdown-menu li a {
    text-decoration: none;
    color: white;
    display: block;
    width: 100%; /* Ensure the link takes full width */
    text-align: left; /* Align text to the left */
}

.dropdown-menu li:hover {
    background-color: transparent; /* Highlight on hover */
    cursor: pointer;
}

/* Show dropdown when toggled */
.dropdown-menu.show {
    display: block;
}

#clear-all-button {
    margin-top: 10px;
    padding: 10px;
    background-color: red;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    position: absolute;
    right: 10px;
}

#clear-all-button:hover {
    background-color: darkred;
}


/* Message Box Styles */
/* .message {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px;
    font-size: 16px;
    color: white;
    border-radius: 5px;
    width: 300px;
    text-align: center;
    opacity: 0;
    animation: fadeInOut 4s forwards;
    z-index: 1000;
}

Success Message Style
.message.success {
    background-color: #4CAF50;
}

Error Message Style
.message.error {
    background-color: #f44336;
}

Info Message Style
.message.info {
    background-color: #2196F3;
}

Animation for Fading In and Out
@keyframes fadeInOut {
    0% {
        opacity: 0;
        top: 10px;
    }
    20% {
        opacity: 1;
        top: 20px;
    }
    80% {
        opacity: 1;
        top: 20px;
    }
    100% {
        opacity: 0;
        top: 10px;
    }
} */


/* Message Box Styles */
.message {
    position: fixed;
    bottom: 20px; /* Position at the bottom of the screen */
    right: 20px; /* Position at the right of the screen */
    padding: 15px;
    font-size: 16px;
    color: white;
    border-radius: 5px;
    width: 300px;
    text-align: center;
    opacity: 0;
    animation: fadeInOut 4s forwards;
    z-index: 1000;
}

/* Success Message Style */
.message.success {
    background-color: #4CAF50;
}

/* Error Message Style */
.message.error {
    background-color: #f44336;
}

/* Info Message Style */
.message.info {
    background-color: #2196F3;
}

/* Animation for Fading In and Out */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        bottom: 10px;
    }
    20% {
        opacity: 1;
        bottom: 20px;
    }
    80% {
        opacity: 1;
        bottom: 20px;
    }
    100% {
        opacity: 0;
        bottom: 10px;
    }
}

/* Task Completion Style */
li.checked {
    text-decoration: line-through; /* Strike-through the task text */
    background-color: lightgreen; /* Light green when completed */
    transition: background-color 0.3s ease, text-decoration 0.3s ease;
    animation: completeTask 0.3s ease; /* Animation when completing a task */
}

/* Keyframes for task completion animation */
@keyframes completeTask {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05); /* Slightly scale up */
        opacity: 0.8; /* Fade out slightly */
    }
    100% {
        transform: scale(1);
        opacity: 1; /* Return to normal size */
    }
}

#calendar-container {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#task-date {
    padding: 5px;
    font-size: 16px;
}
