/* Login Page Styles */

:root {
  --primary-blue: #2b7fff;
  --dark-bg: #0e1629;
  --border-color: #45556c;
  --text-light: #ffffff;
  --text-dark: #1a1a1a;
  --text-placeholder: rgba(255, 255, 255, 0.5);
  --text-label: rgba(255, 255, 255, 0.4);
  --input-bg: rgba(49, 65, 88, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-40px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(40px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.7s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-right {
  animation: fadeInRight 0.7s ease-out forwards;
  opacity: 0;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out forwards;
  opacity: 0;
}

.animate-slide-up {
  animation: slideInFromBottom 0.5s ease-out forwards;
  opacity: 0;
}

/* Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }

/* Stagger animation for form inputs */
.stagger-item {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
}

.stagger-item:nth-child(1) { animation-delay: 0.5s; }
.stagger-item:nth-child(2) { animation-delay: 0.6s; }
.stagger-item:nth-child(3) { animation-delay: 0.7s; }
.stagger-item:nth-child(4) { animation-delay: 0.8s; }
.stagger-item:nth-child(5) { animation-delay: 0.9s; }

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-light);
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.page-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../images/login/login-background.2c724c7c7508.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

.page-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(46deg, rgba(14, 22, 41, 0.84) 0%, #000000 253.04%);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Login Page Styles */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 480px;
    justify-self: center;
}

.logo-container {
    width: 200px;
    height: auto;
}

.logo-container img {
    width: 100%;
    height: auto;
}

.info-title {
    font-weight: 700;
    font-size: 39px;
    line-height: 1.2;
    margin: 0;
}

.info-description {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.76;
    margin: 0;
    opacity: 0.8;
}

.form-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-form-card {
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    transition: all 0.3s ease;
}

.login-form-card:hover {
    border-color: rgba(43, 127, 255, 0.3);
    box-shadow: 0 8px 32px rgba(43, 127, 255, 0.1);
}

.form-header {
    display: flex;
    flex-direction: column;
}

.welcome-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: -0.3px;
    margin: 0;
}

.login-title {
    font-weight: 700;
    font-size: 32px;
    line-height: 1.25;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    color: var(--text-label);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.43;
    letter-spacing: -0.2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.input-wrapper:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.1);
}

.input-wrapper input {
    flex-grow: 1;
    background: transparent;
    border: none;
    padding: 12px;
    color: var(--text-light);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
}

.input-wrapper input:focus {
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-placeholder);
    opacity: 1;
}

.password-icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin-right: 8px;
    cursor: pointer;
    opacity: 0.7;
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.password-icon-wrapper:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
    border-radius: 4px;
    opacity: 1;
}

.password-icon-wrapper:hover {
    opacity: 1;
}

.password-icon-wrapper:active {
    transform: scale(0.95);
}

.password-icon-wrapper img {
    position: absolute;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.password-icon-wrapper img:first-child {
    left: 2px;
    top: 4.5px;
}

.password-icon-wrapper img:last-child {
    left: 6.5px;
    top: 6.5px;
}

/* Toggle eye icon visibility based on password state */
/* When password is HIDDEN (default state), show open eye with slash */
.password-icon-wrapper[aria-pressed="false"] img {
    opacity: 1;
}

.password-icon-wrapper[aria-pressed="false"]::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: rgba(255, 255, 255, 0.85);
    transform: rotate(-45deg);
    left: 1px;
    top: 9px;
    pointer-events: none;
}

/* When password is VISIBLE (toggled on), show open eye without slash */
.password-icon-wrapper[aria-pressed="true"] img {
    opacity: 1;
}

.hidden-checkbox {
    display: none;
}

.clickable-label {
    cursor: pointer;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0.7;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.custom-checkbox {
    width: 16px;
    height: 16px;
    background-color: var(--input-bg);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
}

.custom-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-blue);
    font-size: 12px;
    font-weight: 700;
}

.form-sub-label {
    font-weight: 400;
    line-height: 1.5;
}

.forgot-password-link {
    color: var(--text-light);
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43, 127, 255, 0.3);
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--text-light);
    line-height: 1.43;
}

.divider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.divider-container::before,
.divider-container::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: var(--border-color);
}

.divider-text {
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--dark-bg);
    padding: 0 10px;
}

.social-login-buttons {
    display: flex;
    gap: 17px;
}

.btn-social {
    flex: 1;
    background-color: var(--text-light);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-social img {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-social:hover img {
    transform: scale(1.1);
}

.signup-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

.signup-link a {
    font-weight: 700;
    text-decoration: underline;
}

/* Tablet and below */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 60px;
        padding: 40px 20px;
        min-height: auto;
    }
    .info-section {
        align-items: center;
        max-width: 550px;
    }
    .logo-container {
        width: 150px;
    }
    .info-title {
        font-size: clamp(28px, 6vw, 39px);
    }
    .info-description {
        font-size: clamp(14px, 3vw, 16px);
    }
}

/* Mobile landscape and smaller tablets */
@media (max-width: 768px) {
    .login-container {
        gap: 40px;
        padding: 30px 16px;
    }
    .login-form-card {
        padding: 32px;
        gap: 28px;
    }
    .form-header {
        gap: 8px;
    }
    .login-title {
        font-size: 28px;
    }
    .info-title {
        font-size: 32px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .login-container {
        padding: 24px 16px;
        gap: 32px;
    }
    .login-form-card {
        padding: 24px;
        gap: 24px;
        border-radius: 20px;
    }
    .logo-container {
        width: 120px;
    }
    .info-title {
        font-size: 28px;
        line-height: 1.3;
    }
    .info-description {
        font-size: 14px;
    }
    .form-header {
        gap: 6px;
    }
    .welcome-text {
        font-size: 14px;
    }
    .login-title {
        font-size: 24px;
    }
    .login-form {
        gap: 20px;
    }
    .form-group {
        gap: 6px;
    }
    .form-label {
        font-size: 13px;
    }
    .input-wrapper input {
        font-size: 14px;
    }
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    .social-login-buttons {
        flex-direction: column;
        gap: 12px;
    }
    .signup-link {
        font-size: 13px;
    }
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .login-form-card {
        padding: 20px;
        gap: 20px;
    }
    .info-title {
        font-size: 24px;
    }
    .login-title {
        font-size: 22px;
    }
}

.error-message {
    background-color: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.hidden {
    display: none;
}

/* Social login confirmation message */
.social-login-info {
    padding: 16px;
    background-color: rgba(43, 127, 255, 0.1);
    border: 1px solid rgba(43, 127, 255, 0.2);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.social-login-info p {
    margin: 0;
}

