@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 100px;
    /* background-color: red; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
    background-image: linear-gradient(180deg, #162938, transparent);
}


.navigation a, .navigation span {
    position: relative;
    font-size: 1.1em;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
    margin-left: 40px;
}

.navigation .btnLogin-popup, .navigation .btnLogOut-popup {
    width: 130px;
    height: 50px;
    background: transparent;
    border: 2px solid #FFFFFF;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    color: #FFFFFF;
    font-weight: 500;
    margin-left: 40px;
    transition: 0.5s;
}

.navigation .btnLogin-popup:hover, .navigation .btnLogOut-popup:hover {
    background-color: #FFFFFF;
    color: #162938;
}

.navigation a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: #FFFFFF;
    border-radius: 5px;
    left: 0;
    bottom: -6px;
    transform: scaleX(0);
    transition: transform 0.5s;
    transform-origin: right;
}

.navigation a:hover::after {
    transform-origin: left;
    transform: scaleX(1);
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('../images/background.jpg') no-repeat;
    background-size: cover;
    background-position: center;
}

.wrapper {
    /* position: relative; */
    position: absolute;
    width: 400px;
    height: 440px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transform: scale(0);
}

.wrapper .form-box {
    width: 100%;
    padding: 40px;
}

.form-box h2 {
    font-size: 2em;
    color: #162938;
    text-align: center;
}

.input-box {
    position: relative;
    width: 100%;
    height: 50px;
    border-bottom: 2px solid #162938;
    margin: 30px 0;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    font-size: 1em;
    color: #162938;
    font-weight: 500;
    pointer-events: none;
    transition: 0.5s;
}

.input-box input {
    width: 100%;
    height: 100%;
    background-color: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #162938;
    font-weight: 600;
    padding: 0 35px 0 5px;
}

.input-box .icon {
    position: absolute;
    right: 8px;
    font-size: 1.2em;
    color: #162938;
    line-height: 57px;
}

.input-box input:focus~label, .input-box input:valid~label {
    top: -5px;
}

.remember-forgot {
    font-size: 0.9em;
    color: #162938;
    font-weight: 500;
    margin: -15px 0 15px;
    display: flex;
    justify-content: space-between;
}

.remember-forgot label input {
    accent-color: #162938;
    margin-right: 3px;
}

.remember-forgot a {
    color: #162938;
    text-decoration: none;
}

.remember-forgot a:hover {
    text-decoration: underline;
}

.btn {
    width: 100%;
    height: 45px;
    background-color: #162938;
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    color: #FFFFFF;
    font-weight: 500;
}

.login-register {
    font-size: 0.9em;
    color: #162938;
    text-align: center;
    font-weight: 500;
    margin: 25px 0 10px;
}

.login-register p a {
    color: #162938;
    text-decoration: none;
    font-weight: 600;
}

.login-register p a:hover {
    text-decoration: underline;
}

.wrapper .icon-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background-color: #162938;
    font-size: 2em;
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 20px;
    cursor: pointer;
    z-index: 1;
}


/* before doing register form to hide it */
.wrapper .form-box.login {
    /* display: none; */
    transition: transform 0.18s ease;
    transform: translateX(0);
}

/* remove display none above */
.wrapper .form-box.register {
    position: absolute;
    transform: translateX(400px);
    transition: none;
}

/* after two listeners in js */

.wrapper.active {
    height: 520px;
}

/* add to existing wrapper */
.wrapper {
    transition: transform 0.5s ease, height 0.2s ease;
}

.wrapper.active .form-box.login {
    transition: none;
    transform: translateX(-400px);
}

.wrapper.active .form-box.register {
    transition: transform 0.18s ease;
    transform: translateX(0);
}

.wrapper {
    /* transform: scale(0); */
    /* visibility: hidden; */
    display: none;
}

.wrapper.active-popup {
    /* visibility: visible; */
    transform: scale(1);
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    color: #FFFFFF;
}

footer a {
    text-shadow: 1px 1px 3px #FFFFFF;
}

.logout_form {
    display: inline-block;
}

main{
    color: white;
    text-shadow: 2px 2px 10px black;
}

h1 {
    color: red;
}

.user_table {
    background: white;
    padding: 20px;
    border-collapse: collapse;
    border: 2px solid darkblue;
}

.user_table th, .user_table td {
    border: 2px solid darkblue;
    padding: 5px;
}

.blog {
    width: 80%;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
}

.blog article{
    margin: 20px 20px 20px 5px;
}

.new_news{
    margin: 50px 20px 0 20px;
}

.new_news div{
    margin: 10px 0;
}

#heading, #author{
    padding: 10px;
    width: 350px;
}

#content{
    padding: 10px;
    width: 100%;
    min-height: 100px;
}

.alert {
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 4px;
    font-weight: 500;
    position: absolute;
    top: 10%;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.alert.error {
    background-color: #2c3e50;
    border-left: 5px solid #e74c3c;
    color: #ecf0f1;
}

.alert.success {
    background-color: #2c3e50;
    border-left: 5px solid #27ae60;
    color: #ecf0f1;
}

.alert.fade-out {
    opacity: 0;
    transform: translateY(-5px);
}