* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #d8cbbd;
    font-family: system-ui, sans-serif;
}

/* Navbar */
.navbar {
    background: #6E6050;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 112px;
}

.navbar h1 {
    color: white;
    font-size: 32px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.auth-container {
    width: 360px;
    margin: 120px auto;
    position: relative;
}

.auth-card {
    width: 360px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    border-radius: 22px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}

.tabs {
    display: flex;
    position: relative;
    background: linear-gradient(90deg, rgba(0, 147, 69, 0.18) 0%, #cbbda9 45%, #cbbda9 100%);
    border-radius: 22px 22px 0 0;
}

.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.auth-card.show-signup .tab-indicator {
    transform: translateX(100%);
}

.tab {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 14px 28px;
    font-size: 22px;
    border: none;
    border-radius: 16px 16px 0 0;
    background: transparent;
    color: #555;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.25s ease;
}

.tab:hover {
    color: #333;
}

.tab.active {
    color: black;
}

.card-body {
    position: relative;
    background: linear-gradient(165deg, rgba(0, 147, 69, 0.04) 0%, #fff 35%, #fff 70%, rgba(93, 78, 60, 0.05) 100%);
    border-radius: 0 0 22px 22px;
    padding: 28px 24px;
    min-height: 320px;
    overflow: hidden;
}

.auth-card .form {
    position: absolute;
    inset: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.auth-card .form#login {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.auth-card .form#signup {
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}

.auth-card.show-signup .form#login {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
}

.auth-card.show-signup .form#signup {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap input {
    flex: 1;
    padding-right: 44px;
}

.toggle.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.toggle.toggle-password:hover {
    opacity: 1;
    background: #eee;
}

.toggle.toggle-password .icon-eye-off {
    display: none;
}

.toggle.toggle-password.visible .icon-eye {
    display: none;
}

.toggle.toggle-password.visible .icon-eye-off {
    display: block;
}

.result {
    position: relative;
    top: 15px;
    background: white;
    border-radius: 22px;
    padding: 28px 24px;
    height: 80px;
    display: none;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 6;
}

.explanationUser {
    position: relative;
    top: 15px;
    background: white;
    display: none;
    border-radius: 22px;
    padding: 28px 24px;
    height: 300px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 7;
}
.explanation {
    position: relative;
    top: 15px;
    background: white;
    display: none;
    border-radius: 22px;
    padding: 28px 24px;
    height: 300px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 7;
}


.valid {
    color: #009345;
}

.valid:before {
    position: relative;
    left: -10px;
    content: "✔";
}

/* Add a red text color and a sad face when the requirements are wrong */
.invalid {
    color: red;
}

.invalid:before {
    position: relative;
    left: -10px;
    content: "✗";
}

/* for the optional number, hyphen, and underscore in username signup field */
.opt {
    color: #6E6050;
}

.opt:before {
    position: relative;
    left: -10px;
    content: "-";
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Inputs */
input {
    padding: 12px 16px;
    border-radius: 22px;
    border: none;
    background: #eee;
    font-size: 14px;
}

input:invalid {
    border: 2px solid red;
}

input:valid {
    border: 2px solid #009345;
}


button {
    padding: 12px;
    border-radius: 22px;
    border: none;
    background: #5d4e3c;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

/* Footer */
.footer {
    background: #27221C;
    color: white;
    text-align: center;
    padding: 32px 20px;
    font-size: 15px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
}
