/* src/styles/ubuntu-login.css */

.ubuntu-login-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 500;
  opacity: 0;
  font-family: "Ubuntu", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ubuntu-login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #300a24 0%, #2c001e 50%, #1a0f1c 100%);
  opacity: 0.9;
}

.ubuntu-login-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding: 60px 40px;
  color: #ffffff;
  align-items: center;
}

.ubuntu-login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  max-width: 480px;
  width: 100%;
  margin: auto;
}

.user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
  text-align: center;
}

.user-avatar {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  position: relative;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.user-avatar img:not([style*="display: none"]) ~ .avatar-fallback {
  display: none;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.username {
  font-size: 32px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.user-status {
  font-size: 18px;
  color: #888888;
  font-weight: 300;
}

.password-container {
  width: 100%;
}

.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input {
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0 20px;
  font-size: 18px;
  color: transparent;
  caret-color: transparent;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.password-input:focus {
  outline: none;
  border-color: #2fd2a4;
  background: rgba(255, 255, 255, 0.15);
}

.password-label {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #888888;
  font-size: 18px;
  pointer-events: none;
  transition: all 0.3s ease;
  font-weight: 400;
}

.password-input:focus + .password-label,
.password-input:not(:placeholder-shown) + .password-label {
  top: -12px;
  left: 16px;
  font-size: 14px;
  color: #2fd2a4;
  background: #300a24;
  padding: 0 12px;
  font-weight: 500;
}

.password-dots {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.password-dot {
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
  animation: dotAppear 0.2s ease-out;
}

@keyframes dotAppear {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.login-hint {
  font-size: 16px;
  color: #2fd2a4;
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(47, 210, 164, 0.5);
  padding: 12px 20px;
  background: rgba(47, 210, 164, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(47, 210, 164, 0.3);
  transition: opacity 0.3s ease;
  letter-spacing: 0.3px;
}

.authentication-status {
  display: none;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.auth-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #2fd2a4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.auth-text {
  font-size: 18px;
  color: #ffffff;
  font-weight: 500;
}

.ubuntu-login-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: #888888;
  width: 100%;
  margin-top: auto;
}

.system-info {
  opacity: 0.8;
  font-weight: 300;
}

@media (max-width: 768px) {
  .ubuntu-login-container {
    display: none;
  }

  .ubuntu-login-content {
    padding: 40px 20px;
  }

  .user-avatar {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }

  .username {
    font-size: 24px;
  }

  .user-status {
    font-size: 14px;
  }

  .ubuntu-login-form {
    gap: 30px;
  }

  .password-input {
    height: 50px;
    font-size: 16px;
  }

  .password-label {
    font-size: 16px;
  }

  .login-hint {
    font-size: 14px;
  }

  .auth-text {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .ubuntu-login-content {
    padding: 30px 16px;
  }

  .user-avatar {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

  .username {
    font-size: 20px;
  }

  .user-status {
    font-size: 13px;
  }

  .password-input {
    height: 48px;
  }
}
