/* Css Variable */
:root {
    --primary-font: "Instrument Serif", serif;
    --primary-color: #442818;
    /* rich brown color */
    --secondary-color: #7e533b;
    --highlight-color: #c2d2c2;
    /*eucalyptus color */
    --highlight-color-dark: #2D4739;
    /* deep green color */
}

/* General Styles */
html,
body {
    margin: 0;
    padding: 0;
    height: auto;
}

header {
    position: fixed;
    width: 100%;
    z-index: 2;
    border-bottom: 1px solid rgba(91, 94, 91, 0.612);
}

body {
    background-color: #DDE6DE;
    font-family: var(--primary-font);
    font-size: 1.3rem;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    padding-top: 74px;
}

#main-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/view.jpg');
    background-position: top;
    background-size: cover;
    background-attachment: fixed;
}

footer {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
    background-color: var(--highlight-color);
    border-top: 1px solid rgba(83, 87, 83, 0.58);
    color: var(--primary-color);
}

h1,
h2,
h3 {
    font-family: var(--primary-font);
    font-weight: 400;
    padding: 1rem;
}

/* Navbar Styles */
.logo {
    width: 15rem;
    height: 4rem;
}

.navbar {
    background-color: var(--highlight-color);
}

.navbar-brand {
    color: var(--primary-color)
}

.nav-link {
    color: var(--primary-color);
}

/* Home Page styles */
.banner-section {
    background-image: url('../images/banner.jpg');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-name {
    font-family: var(--primary-font);
    font-weight: 400;
}

.banner-image {
    width: 100vw;
    height: auto;
}

.banner-image img {
    width: 100%;
    height: 100vh;
    display: block;
}

#home-container {
    color: var(--primary-color);
    font-family: var(--primary-font);
    line-height: 1.6;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    scroll-margin-top: 100px;
    max-width: 1000px;
    margin: 2rem auto;
}

.banner-text {
    position: absolute;
    top: 8rem;
    display: flex;
    text-align: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.banner-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0.5rem;
    width: 100%;
}

.app-description,
.app-benefits {
    background-color: rgba(255, 255, 255, 0.326);
    padding: 2rem 1rem;
    margin-bottom: 3rem;
    width: 90%;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.footer-icons i {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0 0.5rem;
}

.footer-icons i:hover {
    color: var(--secondary-color);
}

/* Overview styles*/
#overview-container {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    margin: 2rem auto;
    padding: 3rem 0;
    gap: 3rem;
    border-radius: 8px;
    text-align: center;
    max-width: 1000px;
}

.title {
    letter-spacing: 2px;
    text-transform: uppercase;
}

.welcome-block {
    margin: 1rem;
    display: flex;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    align-self: center;
}

.welcome-block p {
    margin-bottom: 2rem;
}

.delete-container,
.create-form-container {
    background: rgba(255, 255, 255, 0.479);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    width: 90%;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    line-height: 1.6;
    text-align: center;
}

#flash-messages {
    position: fixed;
    top: 91.5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    text-align: center;
    width: auto;
}

#flash-messages .alert {
    position: relative;
    padding-right: 2rem;
}

.instruction {
    max-width: fit-content;
    margin: 0 auto;
    padding: 1rem;
    border-radius: 20px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid var(--secondary-color);
    color: var(--primary-color);
    cursor: pointer;
}

.instruction:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 6px 12px var(--primary-color);
}

/* Motivation */
.motivation {
    background-color: #f4f9f4;
    border: 1.5px solid #5cdb9785;
    border-radius: 10px;
    margin: 3rem 0;
    padding: 1rem;
    text-align: center;
    position: relative;
    box-shadow: 0 7px 20px rgba(67, 210, 191, 0.356)
}

.motivation-text {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.progress-bar,
.water-progress-bar,
.sleep-progress-bar {
    width: 100%;
    max-width: 500px;
    height: 23px;
    background-color: #ffffff;
    border: 2px solid var(--highlight-color);
    border-radius: 50px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar-fill,
.sleep-progress-bar-fill,
.water-progress-bar-fill {
    height: 100%;
    background-color: #5bd39386;
    width: 0%;
    border-radius: 40px;
}

#progress-percentage,
#water-progress-percentage,
#sleep-progress-procentage {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

/* Task, Water, Sleep Cards Styles */
.tracker-card {
    width: 90%;
    min-width: 350px;
    max-width: 1000px;
    border-radius: 20px;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.854);
    border: 1.5px solid rgba(92, 219, 151, 0.3);
    box-shadow: 0 7px 20px rgba(92, 219, 151, 0.25);
}

#task {
    width: 100%;
    padding: 1rem;
    margin: 1.5rem auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background-color: #ffffff3c;
}

.add-task {
    text-align: center;
}

.task-title {
    display: block;
    max-width: 25rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-title:hover {
    cursor: pointer;
    color: var(--secondary-color);
}

.list-group {
    width: 100%;
    max-width: 100%;
    display: block;
    list-style: none;
    padding: 0;
    margin: 2rem auto;
    text-align: right;
    max-height: fit-content;
    opacity: 1;
}

.hidden {
    display: none;
}

.list-group-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary-color);
    border-bottom: 1px solid var(--highlight-color);
    background-color: white;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.list-group-item a {
    font-size: 1.5rem;
    text-decoration: none;
}

.add {
    text-align: right;
}

.add-task {
    margin-top: 1rem;
}

.custom-checkbox {
    accent-color: #5bd39386;
    min-width: 25px;
    height: 25px;
    margin-right: 10px;
}

.custom-checkbox:checked+.task-title {
    text-decoration: line-through;
}

.counter {
    font-size: 1.5rem;
    color: rgb(14, 149, 207);
    margin: 2rem;
}

.counter input {
    font-size: 1rem;
    height: 2.5rem;
    max-width: 6rem;
}

.counter button {
    color: rgb(14, 149, 207);
    border: none;
}

.counter button:hover {
    color: var(--secondary-color);
}

/* Delete/Edit Pages Styles */
.delete-container,
.create-form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.delete-choices,
.create-choices {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
}

.create-tasks h2,
.delete-form-container h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.create-tasks input,
.create-tasks textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--highlight-color);
    border-radius: 10px;
    font-size: 1.1rem;
    background-color: white;
}

/* Modal Styles */

.modal-title {
    padding-right: 10rem;
}

.dropdown {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.dropdown-toggle {
    background-color: var(--highlight-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

.dropdown-toggle:hover {
    border-radius: 10px !important;
    background-color: var(--secondary-color);
}

.dropdown-menu {
    background-color: white;
    border: 1px solid var(--highlight-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 150px;
}

.dropdown-item {
    font-family: var(--primary-font);
    color: var(--primary-color);
}

.dropdown-item:hover {
    background-color: var(--highlight-color);
}

.modal-content {
    position: relative;
}

.modal-dropdown {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

#InstModal .modal-content {
    max-width: 800px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(92, 219, 151, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
    font-family: var(--primary-font);
    color: var(--primary-color);
    background-color: var(--highlight-color);
    border: 1.5px solid var(--secondary-color);
}

/* My Profile Styles */
#profile-container {
    display: flex;
    flex-direction: column;
    margin: 2rem auto;
    border-radius: 8px;
    text-align: center;
    padding: 3rem 0;
    max-width: 1000px;
    row-gap: 3rem;
}

.profile {
    display: grid;
    gap: 2.5rem;
    align-items: center;
    width: 90%;
    border-radius: 20px;
    text-align: center;
    margin: 0 auto;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.852);
    border: 1.5px solid rgba(92, 219, 151, 0.3);
    box-shadow: 0 7px 20px rgba(92, 219, 151, 0.25);
}

.avatar {
    width: 160px;
    height: 160px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    margin: 0 auto 16px;
    border: 2px solid #f0f0f0;
}

#profile-form {
    gap: 2.5rem;
}

.avatar-form input {
    display: none;
}

#avatar-img {
    cursor: pointer;
}

.avatar-form p {
    font-size: 1rem;
}

#profile-container .form-group,
#profile-container .motivation {
    width: 90%;
    border-radius: 20px;
    text-align: center;
    margin: 0 auto;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.852);
    border: 1.5px solid rgba(92, 219, 151, 0.3);
    box-shadow: 0 7px 20px rgba(92, 219, 151, 0.25);
}

#profile-container .form-group {
    margin-bottom: 3rem;
}

.description-label {
    display: block;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    font-family: var(--primary-font);
}

#profile-container .form-group textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 0.8rem 1rem;
    border: 1px solid var(--highlight-color);
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.motivation .custom-btn {
    display: block;
    margin: 1rem auto 0;
}

#motivation .list-group {
    margin: 0 auto;
}

.list-group-item label {
    padding-right: 2rem;
}

/* Login Page Styles */
.login-container,
.signup-container,
.logout-container,
.create-tasks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
}

.signup-container ul {
    list-style: none;
    padding: 0;
}

.signup-container h2,
.logout-container h2,
.login-container h2,
.create-tasks h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.signup-container p,
.logout-container p,
.login-container p,
.create-tasks p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    line-height: 1.7;
    text-align: center;
}

.signup-container input,
.logout-container input,
.signup-container select,
.signup-container textarea,
.create-tasks input,
.create-tasks textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--highlight-color);
    border-radius: 10px;
    background-color: white;
    font-size: 1.1rem;
}

.login-container input {
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--highlight-color);
    border-radius: 10px;
    background-color: white;
    font-size: 1.1rem;
}

.form-group,
.form-check,
.signup-form {
    padding: 1rem;
    text-align: center;
}

.error-message {
    color: red;
    font-size: 1rem;
    margin: 2rem;
    list-style: none;
    text-align: center;
}

.errorlist {
    list-style: none;
    color: red;
    font-size: 1rem;
    margin: 1rem;
    list-style: none;
    text-align: center;
    padding: 0 0.5rem;
}


/* Custom Buttons Styles */
.nav-btn {
    font-size: 1.3rem;
    margin: 0 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.nav-btn:hover {
    background-color: var(--highlight-color);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 6px 12px var(--primary-color);
}

.nav-btn:focus,
.custom-btn:focus {
    box-shadow: 0 0 0 3px var(--secondary-color);
    border-radius: 0.5rem;
}

.custom-btn {
    max-width: fit-content;
    background-color: var(--highlight-color);
    color: var(--primary-color);
    padding: 0.7rem 2.2rem;
    border-radius: 20px;
    border: 1px solid var(--secondary-color);
    margin: 0.5rem;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    text-decoration: none;
}


.custom-btn:hover {
    background-color: var(--highlight-color);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 6px 12px var(--primary-color);
}


.login-container .custom-btn {
    display: block;
    margin: 0 auto;
}

.logout-container .custom-btn,
.create-tasks .custom-btn {
    text-align: center;
    width: 100%;
    max-width: 280px;
    display: block;
}

.delete-btn {
    background-color: rgb(189, 81, 81);
}

.modal-closing {
    max-width: fit-content;
    margin-left: 1rem;
    font-size: 1rem;
}

.btn-close {
    font-size: 0.7rem;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.modal-header .btn-close {
    padding: 1rem;
}

button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Custom Links Styles */
.custom-link {
    color: var(--highlight-color-dark);
}

.custom-link:hover,
.custom-link:focus {
    color: var(--secondary-color);
}

a .custom-btn {
    margin: 0.5rem;
}

.arrow-link i {
    color: rgb(222, 229, 213);
    font-size: 2rem;
    text-decoration: none;
    cursor: pointer;
}

.arrow-link i:hover {
    /* growing effect */
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/*Styles for Big Screens */
@media screen and (min-width:992px) {
    #overview-container {
        grid-template-columns: repeat(2, minmax(360px, 1fr));
        align-items: stretch;
        justify-items: stretch;
    }

    #overview-container>.welcome-block,
    #overview-container>#task-card {
        grid-column: 1 / -1;
    }

    #overview-container .tracker-card {
        width: auto;
    }

    #task {
        width: 70%;
    }

    .profile {
        grid-template-columns: 1.6fr 1fr;
        background-color: transparent;
    }

    .profile__avatar {
        position: sticky;
        top: 24px;
    }
}