*{
    box-sizing: border-box;
}
body{
     background-color:rgba(72, 163, 0, 0.07);
     font-family: "Poppins", sans-serif;
     margin: 0;
}
main{
    padding: 0 16px 32px;
}

.header{
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    display: none;
}

#welcome-msg{
    font-weight: 500;
    font-size: 16px;
    color: red;
}

.header button{
    flex-basis: 10%;
    background: rgba(72, 163, 0, 1);
    color: white;
    font-size: 16px;
    height: 40px;
    border-radius: 20px;
    border: 0;
    outline: 0;
    cursor: pointer;
    transition: background 1s;
}

.login-btn{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    
}

.login-btn button{
    flex-basis: 10%;
    background: rgba(72, 163, 0, 1);
    color: white;
    font-size: 16px;
    height: 40px;
    border-radius: 20px;
    border: 0;
    outline: 0;
    cursor: pointer;
    transition: background 1s;
}

.heading{
    font-size: 64px;
    color:rgba(72, 163, 0, 1);
    text-align: center;
}
.heading span{
    color:rgba(97, 72, 28, 1);
}
.container{
    background-color:rgba(251, 251, 251, 1);
    max-width: 660px;
    margin-inline: auto;
    border-radius: 15px;
    padding: 32px 48px;
    box-shadow: 0 0 8px 0px rgba(0, 0, 0, 0.1);
}
.heading2{
    font-size: 32px;
    font-weight: 700;
}
.heading2 img{
    vertical-align: middle;
}
.sun{
    margin-left: 10px;
    display: inline-block;
    animation: spin 4s linear infinite;
}
@keyframes spin{
    0%{
        transform: rotate(0deg);
    }
    100%{
        transform: rotate(360deg);
    }
}
.progress-label{
    font-size: 14px;
    color: rgba(133, 133, 133, 1);
    margin-bottom: 20px;
}
.progress-bar{
    height: 30px;
    background-color:rgba(72, 163, 0, 0.1);
    border-radius: 15px;
    margin-bottom: 54px;
}
.progress-value{
    height: 30px;
    background-color:rgba(72, 163, 0, 1);
    width: 0;
    height: 100%;
    border-radius: 15px;
    font-weight: 500;
    font-size: 10px;
    color: rgba(238, 255, 224, 1);
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: width 0.25s ease-in-out;
}
.progress-value span{
    padding-left: 10px;
    min-width: max-content;
}
.error-label{
    font-size: 14px;
    color:rgba(255, 81, 81, 1);
    margin-top: 4px;
    display: none;
}
.goal-container{
    height: 82px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0px 22px;
    color: white;
    margin-bottom: 42px;
}
.goal-input{
    padding-left: 22px;
    width: 100%;
    border: none;
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    outline: none;
    align-self: stretch;
}
.goal-input::placeholder{
    color: rgba(217, 217, 217, 1);
}
.custom-checkbox{
    width: 20px;
    height: 20px;
    border: 2px solid rgba(97, 72, 28, 1);
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.check-icon{
    display: none;
}
.quote{
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    margin-top: 48px;
    margin-bottom: 48px;
}
.footer{
    font-weight: 500;
    font-size: 10px;
    text-align: center;
    color: rgba(133, 133, 133, 1);
}
.completed .custom-checkbox{
    background-color:rgba(72, 163, 0, 1);
    border-color: rgba(72, 163, 0, 1);
}
.completed .check-icon{
    display: block;
}
.completed .goal-input{
    color: rgba(72, 163, 0, 1);
    text-decoration-line: line-through;
}
.show-error .error-label{
    display: block;
}
.button{
    display: flex;
    align-items: center;
    justify-content: center;
}
.delete-button{
    font-weight: 500;
    font-size: 16px;
    height: 30px;
    width: 120px;
    background-color:rgba(251, 251, 251, 1);
    border-radius: 12px;
    box-shadow: 0 0 8px 0px rgba(0, 0, 0, 0.1);
    border: 1px solid solid rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}
.delete-button:active{
    background-color: rgba(133, 133, 133, 1);
    transform: translateY(2px);
}
@media (max-width: 768px){
    .heading{
        font-size: 32px;
    }
    .container{
        padding:16px 32px
    }
    .goal-container{
        height: 64px;
        margin-bottom: 24px;
    }
    .quote{
        margin-top: 24px;
        margin-bottom: 36px;
    }
    .progress-bar{
        height: 24px;
    }
}

@media (max-width: 480px){
    .heading{
        font-size: 22px;
        margin-bottom: 12px;
    }
    .container{
        padding: 20px;
        max-width: 100%;
    }
    .goal-container{
        padding: 0 12px;
        height: 60px;
        margin-bottom: 15px;
    }
    /* Reducing input padding but keeping font-size 16px to prevent zoom on iOS */
    .goal-input {
      padding-left: 10px;
    }
    .login-btn, .header{
        justify-content: center;
        gap: 15px;
    }
    .login-btn button, .header button{
        width: auto;
        padding: 0 20px;
        font-size: 14px;
        flex-basis: auto;
        min-width: 80px;
    }
    .progress-bar {
        height: 20px;
        margin-bottom: 30px;
    }
    .quote {
        margin-top: 20px;
        margin-bottom: 30px;
        font-size: 14px;
    }
    .footer {
        font-size: 10px;
    }
}

