@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-image: url('dsi.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 0;
}

/* Position container above the overlay */
.container {
    position: relative;
    z-index: 1;
}

/* --- Original Login Form Styles --- */

.home-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: rgb(41, 245, 232);
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: all 0.3s ease;
}

.home-button:hover {
    background-color: #0d97dc;
    transform: translateY(-2px);
}

.forgot-password {
    left: 0;
    width: 100%;
    opacity: 0;
    z-index: 1;
    transition: all 0.6s ease-in-out;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container.forgot .sign-in {
    transform: translateX(100%);
}

.container.forgot .forgot-password {
    transform: translateX(0);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

.container {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
    align-items: center;
    justify-content: center;
}

.container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.container span {
    font-size: 12px;
    margin: 15px 0;
}

.container a {
    color: #5d4866;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
    transition: color 0.2s ease-in-out;
}

.container a:hover {
    color: #190562;
    text-decoration: underline;
}

/* Enhanced button styles with proper hover effects */
.container button {
    background-color: #3d13e2;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

/* Enhanced hover effect for all buttons - works during transitions */
.container button:hover {
    background-color: #2a0fb3 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(61, 19, 226, 0.4);
}

/* Specific hover for form buttons (Sign In and Sign Up) */
.form-container button:hover {
    background-color: #2a0fb3 !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(61, 19, 226, 0.6);
}

/* Enhanced hover that works even during container transitions */
.sign-in button:hover,
.sign-up button:hover {
    background-color: #2a0fb3 !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(61, 19, 226, 0.7);
    z-index: 100;
}

/* Add a subtle animation effect */
.container button:active {
    transform: translateY(0) scale(0.98);
}

/* Ensure buttons maintain hover during form transitions */
.container.active .sign-in button:hover,
.container.active .sign-up button:hover {
    background-color: #2a0fb3 !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(61, 19, 226, 0.7);
}

.container button.hidden {
    background-color: transparent;
    border-color: #fff;
    color: #fff;
}

/* Enhanced hover for toggle buttons */
.container button.hidden:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.container form {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
}

.container input {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
}

/* Add hover effect for input fields too */
.container input:hover {
    background-color: #e0e0e0;
}

.container input:focus {
    background-color: #f0f0f0;
    box-shadow: 0 0 0 2px rgba(61, 19, 226, 0.2);
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
    z-index: 5;
}

.sign-in {
    left: 0;
    width: 50%;
    z-index: 10;
}

.container.forgot .sign-in {
    display: none;
}

.container.active .sign-in {
    transform: translateX(100%);
    z-index: 10;
}

.sign-up {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 8;
}

.container.active .sign-up {
    transform: translateX(100%);
    opacity: 1;
    z-index: 15;
    animation: move 0.6s;
}

@keyframes move {
    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

.toggle-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.container.active .toggle-container {
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.container.forgot .toggle-container {
    display: none;
}

.toggle {
    background-color: #6039ef;
    height: 100%;
    background: linear-gradient(to right, #163d89, #1820f3);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.container.active .toggle {
    transform: translateX(50%);
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left {
    transform: translateX(-200%);
}

.container.active .toggle-left {
    transform: translateX(0);
}

.toggle-right {
    right: 0;
    transform: translateX(0);
}

.container.active .toggle-right {
    transform: translateX(200%);
}

/* Engineer image container styles */
.engineer-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    padding: 40px;
}

.engineer-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #2d0aba;
    box-shadow: 0 10px 30px rgba(168, 45, 131, 0.3);
    background: #fff;
    padding: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.engineer-animation {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.code-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.code-line {
    height: 4px;
    background: linear-gradient(90deg, #a82d83, #8f2da8);
    border-radius: 2px;
    width: 80px;
    animation: typing 2s ease-in-out infinite;
}

.code-line.short {
    width: 50px;
    animation-delay: 0.3s;
}

.code-line.medium {
    width: 65px;
    animation-delay: 0.6s;
}

@keyframes typing {
    0%,
    100% {
        width: 0;
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Updated message-container for split layout */
.message-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
    background: #fff;
}

.message-container h1 {
    color: #5d4866;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

.message-container p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
}

.progress-container {
    width: 100%;
    max-width: 250px;
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    width: 75%;
    background: linear-gradient(90deg, #a82d83, #8f2da8);
    border-radius: 4px;
    animation: progressAnimation 3s ease-in-out infinite;
}

@keyframes progressAnimation {
    0%,
    100% {
        width: 70%;
    }

    50% {
        width: 85%;
    }
}

.progress-text {
    font-size: 14px;
    color: #a82d83;
    font-weight: 600;
}

/* Enhanced Back to Sign In button with better hover */
.back-btn {
    background: linear-gradient(45deg, #ff4757, #ff3742);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    transition: all 0.3s ease;
    animation: glow 2s infinite alternate;
}

.back-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.6);
    background: linear-gradient(45deg, #ff3742, #ff2f3a);
}

@keyframes glow {
    from {
        box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    }

    to {
        box-shadow: 0 4px 15px rgba(255, 71, 87, 0.8), 0 0 5px rgba(255, 71, 87, 0.3);
    }
}