@import url('https://fonts.googleapis.com/css2?family=Zalando+Sans+Expanded:ital,wght@0,200..900;1,200..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

@keyframes bl {
    from { filter: blur(16px); opacity: 0; }
    to   { filter: blur(0);    opacity: 1; }
}

@keyframes b2 {
    from { filter: blur(0px);  opacity: 1; }
    to   { filter: blur(16px); opacity: 0; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 1; transform: translateY(0px); }
    to   { opacity: 0; transform: translateY(20px); }
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    background-color: #001931;
    font-family: "Zalando Sans Expanded", sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
}


#header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 0 20px;
    background: #ddedfffd;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: rgb(0, 0, 0);
    box-shadow: #abbaff 0px 0px 15px 5px;
    border-radius: 27px;
    font-weight: 900;
    font-size: 30px;
    line-height: 1.8;
}

#header .title {
    flex: 1;
    text-align: center;
}


#menu-btn {
    order: -1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border-radius: 27px;
    transition: background 0.2s ease;
    z-index: 1001;
    flex-shrink: 0;
}
#menu-btn:hover {
    background: rgba(0, 25, 49, 0.08);
}
#menu-btn .bar {
    width: 24px;
    height: 2.5px;
    background-color: #001931;
    border-radius: 2px;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#menu-btn.open .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
#menu-btn.open .bar:nth-child(2) {
    opacity: 0;
}
#menu-btn.open .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}
#nav-menu {
    position: fixed;
    top: 75px;
    left: 5%;
    width: 30%;
    background: #ddedffda;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 27px;
    box-shadow: none;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
    transform: translateY(-10px);
    z-index: 900;
}
#nav-menu.open {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
    box-shadow: #abbaff 0px 0px 15px 5px;
    pointer-events: auto;
}
#nav-menu a {
    display: block;
    padding: 25px;
    font-size: 22px;
    font-weight: 300;
    color: #001931;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 25, 49, 0.08);
    transition: all 0.4s ease;
}
#nav-menu a:last-child {
    border-bottom: none;
}
#nav-menu a:hover {
    font-weight: 900;
    transition: all 0.4s ease;
}
#nav-menu a.active {
    color: #0084ff;
}

#search-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-top: 2rem;
    padding-bottom: 4rem;
    font-family: "Zalando Sans Expanded", sans-serif;
    gap: 0;
}

#input-container {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 70%;
}

#username-input {
    width: 100%;
    height: 40px;
    border: none;
    outline: none;
    line-height: 40px;
    border-radius: 27px 0 0 27px;
    font-size: 17px;
    background-color: #e2f0ff;
    box-shadow: 0px 0px 5px 0px #0019311a;
    font-family: "Zalando Sans Expanded", sans-serif;
    padding: 0 27px;
    transition: all 0.3s ease;
}

#username-input:focus {
    box-shadow: 0 0 0 3px rgba(171,186,255,0.25);
}

#Username {
    position: absolute;
    left: 27px;
    top: 50%;
    transform: translateY(-50%);
    color: #0084ff;
    font-size: 17px;
    pointer-events: none;
    transition: all 0.3s ease;
}

#username-input:focus ~ #Username,
#username-input:not(:placeholder-shown) ~ #Username {
    top: -10px;
    font-size: 12px;
    color: #c4e3ff;
}

#search-button {
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 40px;
    border-radius: 0 27px 27px 0;
    border: 0;
    background: #e2f0ff;
    font-family: "Urbanist", sans-serif;
    padding: 0 27px;
}

#search-icon {
    transition: all 0.3s ease;
}
#search-icon:hover {
    filter: drop-shadow(0px 0px 7px #0084ff);
}

#container-wrapper {
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 4.545rem;
    margin: 0 auto 40px;
}

.container {
    font-family: "Urbanist";
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background-color: #f0f8ff;
    width: 100%;
    box-shadow: #abbaff 0px 0px 30px 5px;
    border-radius: 10px;
    padding: 30px;
}

.container.appear {
    animation: fadeUp 1.25s cubic-bezier(0.22,1,0.36,1) both;
    opacity: 1;
}

.container.hide {
    animation: fadeDown 0.8s cubic-bezier(0.22,1,0.36,1) both;
}

.user-info {
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    border-radius: 10px;
    padding: 0;
}

.user-info.appear {
    animation: bl 1.25s cubic-bezier(0.22,1,0.36,1) 0.15s both;
    opacity: 1;
}

.user-info.hide {
    animation: b2 1.25s cubic-bezier(0.22,1,0.36,1) 0.15s both;
}

.user-icon {
    flex: 0 0 270px;
    height: 270px;
    width: 270px;
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 0px 15px 20px #0019311a;
}

.user-icon.appear {
    animation: bl 1.25s cubic-bezier(0.22,1,0.36,1) 0.15s both;
    opacity: 1;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-detail {
    margin-top: 12px;
    font-family: inherit;
}

.username-text {
    font-size: 500%;
    margin: 0;
    line-height: 1;
}

p {
    margin: 0;
    line-height: 1.6;
}

#welcome a {
    color: #7fc1ff;
}

.user-detail a {
    color: #000000;
}

#welcome {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

#input-error-msg {
    opacity: 1;
    background-color: #fdced2;
    padding: 5px 15px;
    font-style: italic;
    position: absolute;
    left: 12px;
    top: 114%;
    color: #ff0000;
    font-size: 20px;
    pointer-events: none;
    animation: fadeUp 0.5s ease-out;
}

#input-error-msg.hide {
    opacity: 0;
    position: absolute;
    left: 12px;
    top: 114%;
    animation: fadeDown 0.5s ease-out;
}




#health-info {
    margin: 3rem auto 40px;
    font-family: "Urbanist";
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background-color: #f0f8ff;
    width: 100%;
    box-shadow: #abbaff 0px 0px 30px 5px;
    border-radius: 10px;
    padding: 30px;
    font-size: 30px;
}

.info-table td:first-child {
    min-width: 250px;
}

/* TABLET */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    #header {
        top: 10px;
        width: 95%;
        font-size: 20px;
        padding: 0 14px;
        gap: 10px;
    }

    #nav-menu {
        top: 64px;
        left: 2.5%;
        width: 80%;
    }

    #welcome {
        font-size: 18px;
        padding: 0 16px;
    }

    #welcome h1 {
        font-size: 22px;
    }

    #search-bar {
        padding: 1rem 0 2rem;
    }

    #input-container {
        max-width: 80%;
    }

    #username-input {
        font-size: 14px;
    }

    #container-wrapper {
        width: 95%;
        gap: 2rem;
    }

    .container {
        padding: 20px 16px;
    }

    .user-icon {
        flex: 0 0 180px;
        height: 180px;
        width: 180px;
    }

    .username-text {
        font-size: 280%;
    }

    #health-info {
        width: 95%;
        padding: 16px;
        font-size: 18px;
        margin: 1rem auto 24px;
    }

    .health-overall {
        font-size: 16px;
        padding: 12px 16px;
    }

    .health-section {
        padding: 14px 16px;
    }

    .db-table {
        font-size: 12px;
    }

    .db-table th,
    .db-table td {
        padding: 6px 8px;
    }

    .info-table {
        font-size: 13px;
    }

    #input-error-msg {
        font-size: 14px;
    }

    #welcome h1{
        font-size: 40px;
    }

    #health-info {
        font-size: 16px;
    }

    .info-table td:first-child {
        min-width: 120px;
    }
}


/* MOBILE */
@media (max-width: 480px) {
    #header {
        font-size: 19px;
        width: 90%;
    }

    #nav-menu {
        width: 80%;
        left: 5%;
    }

    #nav-menu a {
        padding: 18px 16px;
        font-size: 18px;
        left: 10%;
    }

    #input-container {
        max-width: 70%;
    }

    .user-icon {
        flex: 0 0 140px;
        height: 140px;
        width: 140px;
    }

    .username-text {
        font-size: 200%;
    }

    .container {
        padding: 16px 12px;
        width: 90%;
        margin:auto;
    }
    #welcome h1{
        font-size: 40px;
    }

    #health-info {
        font-size: 16px;
    }

    .info-table td:first-child {
        min-width: 120px;
    }
}
