/* IMPORT FONT */
@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');

/* COLOR VARIABLES */
:root {
    --primary-color: #0D1936;
    --secondary-color: #535354;
    --background-color: #EFEFEF;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --white-color: #FFF;
    --black-color: #000;
    --input-border-color: #E3E4E6;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --google-color: #db4437;
    --transition-3s: 0.3s;
}

/* GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* REUSABLE ELEMENTS */
a {
    text-decoration: none;
    color: var(--black-color);
    transition: var(--transition-3s);
}
a:hover {
    text-decoration: underline;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

/* WRAPPER */
.wrapper {
    position: relative;
    width: 430px;
    min-height: 550px;
    background-color: var(--white-color);
    border-radius: 20px;
    padding: 100px 32px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: var(--transition-3s);
    overflow: hidden;
}

/* FORM HEADER */
.form-header {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 70px;
    background-color: var(--primary-color);
    border-radius: 0 0 20px 20px;
    transition: opacity 0.3s;
}
.form-header::before,
.form-header::after {
    content: "";
    position: absolute;
    top: 0;
    width: 30px;
    height: 30px;
}
.form-header::before {
    left: -30px;
    border-top-right-radius: 50%;
    box-shadow: 15px 0 0 var(--primary-color);
}
.form-header::after {
    right: -30px;
    border-top-left-radius: 50%;
    box-shadow: -15px 0 0 var(--primary-color);
}

/* TITLES */
.titles {
    position: relative;
    width: 100%;
    height: 100%;
}
.title-login,
.title-register {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white-color);
    font-size: 20px;
    font-weight: 600;
    transition: var(--transition-3s);
    white-space: nowrap;
}
.title-register {
    top: 50px;
}

/* FORMS */
.login-form,
.register-form {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    transition: var(--transition-3s);
}
.register-form {
    left: 150%;
}

/* MESSAGE BOX */
.message-box {
    margin: 10px 0;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    display: none;
    animation: slideDown 0.3s ease;
}
.message-box.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}
.message-box.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}
.message-box.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* INPUT FIELDS */
.input-box {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 20px 0;
}
.input-field {
    width: 100%;
    height: 55px;
    font-size: 16px;
    background: transparent;
    color: var(--black-color);
    padding: 0 45px 0 20px;
    border: 2px solid var(--input-border-color);
    border-radius: 30px;
    outline: none;
    transition: var(--transition-3s);
}
.input-field:focus {
    border-color: var(--primary-color);
}
.label {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    color: var(--secondary-color);
    transition: 0.2s;
    cursor: text;
    pointer-events: none;
    background: transparent;
    padding: 0;
}
.input-field:focus ~ .label,
.input-field:not(:placeholder-shown) ~ .label {
    top: 0;
    font-size: 12px;
    background-color: var(--white-color);
    color: var(--primary-color);
    padding: 0 6px;
    transform: translateY(-50%);
}
.icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--secondary-color);
}

/* FORM COLS */
.form-cols {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: 15px 0;
}
.col-1 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.col-1 input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.col-1 label {
    cursor: pointer;
    color: var(--secondary-color);
}
.col-2 a {
    color: var(--primary-color);
    font-weight: 500;
}

/* SUBMIT BUTTON */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-3s);
}
.btn-submit:hover {
    gap: 15px;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 25, 54, 0.3);
}
.btn-submit i {
    font-size: 20px;
}

/* GOOGLE BUTTON */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 50px;
    background-color: var(--white-color);
    color: #5f6368;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #dadce0;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-3s);
    margin-top: 15px;
}
.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #d2e3fc;
    transform: translateY(-1px);
}
.btn-google img {
    width: 20px;
    height: 20px;
}

/* SWITCH FORM */
.switch-form {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}
.switch-form a {
    color: var(--primary-color);
    font-weight: 600;
}

/* USER INFO SECTION */
.user-info {
    text-align: center;
    padding: 20px 0;
}
.user-info .avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #2c3e66);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.user-info .avatar i {
    font-size: 48px;
    color: white;
}
.user-info h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 20px;
}
.user-info p {
    color: var(--secondary-color);
    margin-bottom: 25px;
    word-break: break-all;
    font-size: 14px;
}
.btn-logout {
    background-color: var(--error-color);
}
.btn-logout:hover {
    background-color: #c82333;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* UTILITY CLASSES */
.hidden {
    display: none !important;
}

/* RESPONSIVE */
@media only screen and (max-width: 564px) {
    .wrapper {
        width: 95%;
        margin: 20px;
        padding: 100px 20px 30px;
    }
}