/* Make width include padding and border */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #ecf0f3;
    display: flex;
    height: 100vh;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    display: flex;
    max-width: 900px;
    width: 100%;
    height: 550px;
    background: #ecf0f3;
    border-radius: 20px;
    box-shadow: 13px 13px 20px #cbced1,
                -13px -13px 20px #ffffff;
    overflow: hidden;
}

.left-section {
    width: 40%;
    background: #dce1e7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: inset 4px 4px 8px #babecc,
                inset -4px -4px 8px #ffffff;
    padding: 30px;
}

.left-section img {
    width: 300px;
    margin-bottom: -50px;
    margin-top: -10px;
}

.left-section h2 {
    font-size: 40px;
    color: #333;
    text-align: center;
}

.right-section {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.login-form {
    width: 100%;
    max-width: 360px;
}

.login-form h1 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

/* Enhanced input container for floating labels */
.input-container {
    position: relative;
    margin: 20px 0;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 15px 15px 12px 15px;
    border: none;
    border-radius: 10px;
    background: #ecf0f3;
    box-shadow: inset 5px 5px 10px #cbced1,
                inset -5px -5px 10px #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    color: #333;
}

/* Hover effects for inputs */
.login-form input[type="email"]:hover,
.login-form input[type="password"]:hover {
    box-shadow: inset 3px 3px 6px #cbced1,
                inset -3px -3px 6px #ffffff,
                0 0 10px rgba(28, 134, 238, 0.1);
    transform: translateY(-1px);
}

/* Focus effects for inputs */
.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    box-shadow: inset 2px 2px 5px #cbced1,
                inset -2px -2px 5px #ffffff,
                0 0 15px rgba(28, 134, 238, 0.2);
    transform: translateY(-2px);
}

/* Floating label styles - starts as placeholder */
.input-container label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0;
    z-index: 1;
    transform-origin: left center;
}

/* When input is focused or has content, transform label to top */
.input-container input:focus + label,
.input-container input.has-content + label {
    top: -8px;
    left: 12px;
    font-size: 14px;
    color: #1c86ee;
    background: #ecf0f3;
    font-weight: 600;
    padding: 0 6px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: scale(0.9) translateY(0);
}

/* Ensure labels start inside input fields */
.input-container input:not(:focus):not(.has-content) + label {
    top: 50%;
    left: 15px;
    font-size: 14px;
    color: #999;
    background: transparent;
    padding: 0;
    transform: translateY(-50%);
    box-shadow: none;
}

/* Remove default placeholder on focus */
.input-container input::placeholder {
    color: transparent;
    transition: color 0.3s ease;
}

.input-container input:not(:focus)::placeholder {
    color: transparent;
}

.login-form button {
    width: 100%;
    padding: 12px 15px;
    margin-top: 10px;
    border: none;
    border-radius: 10px;
    background: #1c86ee;
    color: white;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 3px 3px 6px #b8c6db,
                -3px -3px 6px #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-form button:hover {
    background: #1a74cc;
    transform: translateY(-2px);
    box-shadow: 4px 4px 8px #b8c6db,
                -4px -4px 8px #ffffff;
}

.login-form button:active {
    transform: translateY(0);
    box-shadow: 2px 2px 4px #b8c6db,
                -2px -2px 4px #ffffff;
}

.register-link {
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
}

.register-link a {
    color: #1c86ee;
    text-decoration: none;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #1a74cc;
    text-decoration: underline;
}

.error-popup {
    display: none;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f44336;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 5px;
    z-index: 9999;
    animation: slideDown 0.3s ease;
}

.error-popup.show {
    display: block;
}

.success-popup {
    display: none;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 5px;
    z-index: 9999;
    animation: slideDown 0.3s ease;
}

.success-popup.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.fogotpassword-container {
    margin-top: -15px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.forgot-password-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.forgot-password-link a {
    color: #1c86ee;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password-link a:hover {
    color: #1a74cc;
    text-decoration: underline;
}

/* Responsive for small screens */
@media (max-width: 768px) {
    body {
      height: auto;
      padding: 20px 0;
    }
  
    .login-wrapper {
      flex-direction: column;
      width: 90%;
      height: auto;
      border-radius: 15px;
      box-shadow: 10px 10px 15px #cbced1,
                  -10px -10px 15px #ffffff;
    }
  
    .left-section,
    .right-section {
      width: 100%;
      padding: 20px;
    }
  
    .left-section {
      box-shadow: inset 3px 3px 6px #babecc,
                  inset -3px -3px 6px #ffffff;
      border-radius: 15px 15px 0 0;
    }
  
    .left-section img {
      width: 200px;
      margin-bottom: -30px;
    }
  
    .left-section h2 {
      font-size: 30px;
    }
  
    .right-section {
      border-radius: 0 0 15px 15px;
      padding-top: 30px;
    }
  
    .login-form {
      max-width: 100%;
    }

    .login-form h1 {
        margin-top: -15px;
        margin-bottom: 8px;
    }
  
    .login-form input[type="email"],
    .login-form input[type="password"] {
      width: 100%;
    }
  
    .login-form button {
      width: 100%;
    }
}