* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* font-family: 'Work Sans', sans-serif; */
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding-top: 3%;
}

/* Body light or darker themes */
/* Standard Theme */
.standard {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    transition: 0.3s linear;
}

/* Standard Theme Animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Light Theme */
.light {
    background-image: linear-gradient(100deg, #d4f1ff, #ffffff);
    color: #1a150e;
    transition: 0.3s linear;
}

/* Dark Theme */
.darker {
    background-image: linear-gradient(100deg, #001214, #001f29);
    color: white;
    transition: 0.3s linear;
}

/* Header, Form, Date and Time sections arrangement */
#header,
#form,
#datetime {
    margin: 0 1rem;
    min-height: 10vh;
    width: 100%;
}

.date-time-parent
{
    margin-top: 1rem;
}

/* Header parent div */
#header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    font-size: 1.5rem;
    min-height: 25vh;
    width: 100%;
}

/* Theme buttons div */
.flexrow-container {
    display: flex;
    align-self: flex-end;
    align-items: center;
    justify-content: space-around;
    margin-right: 3%;
}

.theme-selector {
    border: 1px solid #d1dae3;
    border-radius: 100%;
    height: 35px;
    margin: 0 8px;
    transition: transform 150ms ease-in-out, box-shadow 200ms ease-in-out;
    width: 35px;
}

.theme-selector:hover {
    box-shadow: white 0 0 8px;
    cursor: pointer;
}

.theme-selector:active {
    transform: scale(0.95);
}

.standard-theme {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
}

.light-theme {
    background-image: linear-gradient(100deg, #d4f1ff, #ffffff);
    border: 1px solid #000;
}

.darker-theme {
    background-image: linear-gradient(100deg, #001214, #001f29);
}

/* Header Title */
#title {
    border-right: solid 3px rgba(0, 0, 0, 0.75);
    white-space: pre;
    overflow: hidden;
    letter-spacing: 0.20rem;
    margin-top: 50px;
    margin-bottom: 20px;
    font-family: "Saira", sans-serif;
    font-weight: 500;
    font-size: 50px;
    max-width: 880px;
}

/* Standard, Light Theme title Animation */
#title {
    animation: animated-text 2s steps(11, end) 0.5s 1 normal both,
        animated-cursor 750ms steps(11, end) infinite;
}

/* Dark Theme title Animation */
#title.darker-title {
    animation: animated-text 2s steps(11, end) 0.5s 1 normal both,
        darker-animated-cursor 750ms steps(11, end) infinite;
}

/* Text Animation */
@keyframes animated-text {
    from {
        width: 0%;
    }

    to {
        width: 880px;
    }
}

/* Cursor Animations */
@keyframes animated-cursor {
    from {
        border-right-color: rgba(0, 0, 0, 0.75);
    }

    to {
        border-right-color: transparent;
    }
}

@keyframes darker-animated-cursor {
    from {
        border-right-color: #fff;
    }

    to {
        border-right-color: transparent;
    }
}

/* Input Form Styling */
form {
    display: flex;
    font-size: 1.7rem;
    justify-content: center;
    margin: 15px 0;
    padding: 0.8rem;
    width: 100%;
}

form input {
    padding: 10px;
    font-size: 17px;
    border: none;
    outline: none;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 12px;
    max-width: 500px;
    transition: background-color 200ms ease-in-out;
    width: 100%;
}

/* Input themes */
form input.standard-input {
    background-color: #181a1a;
    color: rgb(247, 226, 223);
}

form input.light-input {
    background-color: #AEB1B4;
    color: #1a150e;
}

form input.light-input::placeholder {
    color: #1a150e;
    opacity: 0.6;
}

form input.darker-input {
    background-color: #01394c;
    color: white;
}

form input.darker-input::placeholder {
    color: white;
    opacity: 0.6;
}

form input:hover {
    cursor: text;
}

form input.standard-input:hover {
    background-color: rgb(0, 0, 0);
}

form input.light-input:hover {
    background-color: #919699;
}

form input.darker-input:hover {
    background-color: #013141;
}

/* Submit Button Styling */
button {
    border: none;
    outline: none;
    transition: box-shadow 200ms ease, background-color 200ms ease-in-out;
}

form button {
    padding: 10px;
    font-size: 18px;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 5px;
    min-width: 100px;
}

button:hover {
    cursor: pointer;
}

/* Button themes */
button.standard-button {
    background-color: rgb(247, 226, 223);
    color: rgb(0, 0, 0);
}

button.standard-button:hover {
    background-color: white;
    box-shadow: #fff8 0 0 10px;
}

button.light-button {
    background-color: #1a150e;
    color: #f0f0f0;
}

button.light-button:hover {
    background-color: #f0f0f0;
    color: #1a150e;
}

button.darker-button {
    background-color: #002837;
    color: white;
}

button.darker-button:hover {
    background-color: #001f2930;
}

.update-btn {
    width: 38px;
    height: 38px;
    border: none; /* Remove the default border */
    cursor: pointer; /* Change cursor to pointer on hover */
    background-color:#ffffff ; /* Transparent background */
    color: #000; /* Set a blue color for the text */
    padding: 8px 12px; /* Add padding for better clickability */
    border-radius: 50%; /* Round the corners */
    margin: 5px 2px 5px 3px;
}

/* Tasks Parent Div */
#myUnOrdList {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
}

/* List of tasks (ul) */
.todo-list {
    min-width: 25%;
    list-style: none;
}

.todo {
    margin: 1rem;
    font-size: 19px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35em 0.5em;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 5px;
    border-top-right-radius: 12px;
    transition: background-color 200ms ease-in-out;
}

.todo li {
    padding: 7px;
    font-size: 20px;
    flex: 1;
    /* To push the trash and the check button to the right */
    border-radius: 30px;
    /* wraps the links */
    overflow-wrap: anywhere;
}

.check-btn,
.delete-btn {
    font-size: 19px;
    cursor: pointer;
    width: 2em;
    height: 2em;
    border-radius: 80%;
    margin: 5px 3px;
}

.todo-item {
    padding: 0rem 0.5rem;
}

.fa-trash,
.fa-check {
    pointer-events: none;
}

.completed {
    transition: 0.2s;
    text-decoration: line-through;
    opacity: 0.5;
}

.fall {
    transition: 1s;
    transform: translateY(45rem) rotateZ(45deg);
    opacity: 0;
}

/* Task themes */
.standard-todo {
    background-color: rgb(26, 27, 27);
    color: #f0f0f0;
}

.light-todo {
    background-color: #AEB1B4;
}

.darker-todo {
    background-color: #01394c;
}

/* Github Link Icon */
.github-corner svg {
    color: #fff;
    position: absolute;
    top: 28px;
    border: 0;
    left: 25px;
    transform: rotate(-45deg);
    cursor: auto;
}

.github-corner svg path {
    cursor: pointer;
}

.github-corner:hover .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(-25deg);
    }

    40% {
        transform: rotate(10deg);
    }

    60% {
        transform: rotate(-25deg);
    }

    80% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}


/* About Page Link Icon */
.about-page {
    margin-top: auto;
    font-size: 35px;
    border-radius: 100%;
    display: flex;
    justify-content: flex-end;
    width: 93%;
    padding-bottom: 2.5rem;
    padding-right: 1rem;
}

.about-page a:hover {
    opacity: 0.5;
}

/* Responsive design */
@media only screen and (max-width: 1000px) {
    .flexrow-container {
        align-self: unset;
        margin-right: 0;
    }
}

@media only screen and (max-width: 800px) {
    #header {
        font-size: 2rem;
    }

    #title {
        animation: animated-text 3s steps(16, end) 0.5s 1 normal both,
            animated-cursor 750ms steps(16, end) infinite;
        margin-bottom: 10px;
        margin-top: 30px;
        max-width: 330px;
    }
}

@media only screen and (max-width: 600px) {
    #header {
        font-size: 1.5rem;
    }

    #title {
        animation: animated-text 3.5s steps(16, end) 0.5s 1 normal both,
            animated-cursor 750ms steps(16, end) infinite;
        max-width: 350px;
        font-size: 16px;
        margin-top: 150px;
    }

    .flexrow-container {
        top: 50px;
        flex-direction: row;
        align-items: flex-end;
        right: 15px;
        position: absolute;
    }

    .theme-selector {
        margin-bottom: 10px;
    }
}

@media only screen and (max-width: 400px) {
    form {
        align-items: center;
        flex-direction: column;
    }

    form input {
        border-radius: 17px;
    }

    form button {
        border-radius: 15px;
        margin-top: 15px;
        width: 50%;
    }

    form>button.light-button {
        box-shadow: 0 0 5px lightgray;
    }
}

/* Github Icon Responsive */
@media (max-width: 500px) {
    .github-corner:hover .octo-arm {
        animation: none;
    }

    .github-corner .octo-arm {
        animation: octocat-wave 560ms ease-in-out;
    }
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 16px;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

th, td {
    padding: 12px;
    text-align: left;
    border: none;
    max-width: 200px; /* Set max width for table cells */
    word-wrap: break-word; /* Allow long words to be broken and wrap onto the next line */
    overflow-wrap: break-word; /* Alternative for breaking long words */
    white-space: normal; /* Allow wrapping of text */
}
thead{
    border-bottom: 1px solid #cdcdcd;
}

tr:hover {
    background-color: #ffffff33;
}



/* Responsive Styles */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    #form {
        margin: 15px 0;
    }

    input.todo-input {
        width: 90%;
        font-size: 0.9rem;
    }

    button.todo-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    table {
        width: 95%;
        margin-left: 15px;
    }

    th, td {
        font-size: 0.8rem;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    input.todo-input {
        width: 95%;
        font-size: 0.8rem;
    }

    button.todo-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    th, td {
        font-size: 0.7rem;
        padding: 6px;
    }

    .theme-selector {
        width: 15px;
        height: 15px;
    }

    #title {
        font-size: 2rem;
    }

    #datetime {
        font-size: 0.8rem;
    }

    .about-page a {
        font-size: 1.5rem;
    }
}
